From 00366e01783dbcbd62d682a7e3dd8eafca1e6311 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 18 Mar 2025 14:30:39 +0100 Subject: [PATCH 001/185] IBX-9727: [Rector] Applied SetList::TYPE_DECLARATION built-in Rector set Applied Rectors: * Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector * Rector\TypeDeclaration\Rector\Class_\AddTestsVoidReturnTypeWhereNoReturnRector * Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeBasedOnPHPUnitDataProviderRector * Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationBasedOnParentClassMethodRector * Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector * Rector\TypeDeclaration\Rector\ClassMethod\BoolReturnTypeFromBooleanConstReturnsRector * Rector\TypeDeclaration\Rector\ClassMethod\BoolReturnTypeFromBooleanStrictReturnsRector * Rector\TypeDeclaration\Rector\ClassMethod\NumericReturnTypeFromStrictReturnsRector * Rector\TypeDeclaration\Rector\ClassMethod\NumericReturnTypeFromStrictScalarReturnsRector * Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnNullableTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromMockObjectRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictParamRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedPropertyRector * Rector\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector * Rector\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector * Rector\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector * Rector\TypeDeclaration\Rector\ClassMethod\StringReturnTypeFromStrictScalarReturnsRector * Rector\TypeDeclaration\Rector\ClassMethod\StringReturnTypeFromStrictStringReturnsRector * Rector\TypeDeclaration\Rector\Class_\PropertyTypeFromStrictSetterGetterRector * Rector\TypeDeclaration\Rector\Class_\TypedPropertyFromCreateMockAssignRector * Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector * Rector\TypeDeclaration\Rector\Closure\ClosureReturnTypeRector * Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector * Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector * Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector * Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector --- src/bundle/Core/ApiLoader/CacheFactory.php | 2 +- .../Core/ApiLoader/RepositoryFactory.php | 13 +- .../Core/ApiLoader/SearchEngineFactory.php | 2 +- .../ApiLoader/SearchEngineIndexerFactory.php | 2 +- .../Core/Cache/Warmer/ProxyCacheWarmer.php | 3 +- src/bundle/Core/Command/CheckURLsCommand.php | 12 +- .../Core/Command/CleanupVersionsCommand.php | 4 +- .../Command/DebugConfigResolverCommand.php | 8 +- .../DeleteContentTranslationCommand.php | 11 +- .../Command/NormalizeImagesPathsCommand.php | 17 +- .../Command/RegenerateUrlAliasesCommand.php | 18 +- src/bundle/Core/Command/ReindexCommand.php | 26 +- .../Command/ResizeOriginalImagesCommand.php | 27 +- .../SetSystemContentTypeGroupCommand.php | 11 +- .../Command/UpdateTimestampsToUTCCommand.php | 14 +- .../VirtualFieldDuplicateFixCommand.php | 3 +- .../Compiler/BinaryContentDownloadPass.php | 4 +- .../Compiler/ChainConfigResolverPass.php | 2 +- .../Compiler/ChainRoutingPass.php | 2 +- .../Compiler/ConsoleCacheWarmupPass.php | 2 +- .../Compiler/ConsoleCommandPass.php | 2 +- ...FieldTypeParameterProviderRegistryPass.php | 2 +- .../Compiler/ImaginePass.php | 6 +- .../InjectEntityManagerMappingsPass.php | 2 +- .../Compiler/NotificationRendererPass.php | 2 +- .../Compiler/PlaceholderProviderPass.php | 2 +- .../RegisterSearchEngineIndexerPass.php | 2 +- .../Compiler/RegisterSearchEnginePass.php | 2 +- .../Compiler/RegisterStorageEnginePass.php | 2 +- .../Compiler/RouterPass.php | 2 +- .../Compiler/SessionConfigurationPass.php | 2 +- .../SlugConverterConfigurationPass.php | 6 +- .../Compiler/StorageConnectionPass.php | 2 +- .../Compiler/TranslationCollectorPass.php | 2 +- .../Compiler/URLHandlerPass.php | 2 +- .../Compiler/ViewProvidersPass.php | 2 +- .../DependencyInjection/Configuration.php | 34 +- .../Configuration/ChainConfigResolver.php | 4 +- .../ComplexSettings/ComplexSettingParser.php | 4 +- .../Configuration/ConfigParser.php | 12 +- .../Configuration/ConfigResolver.php | 15 +- .../ContainerConfigResolver.php | 6 +- .../SiteAccessConfigResolver.php | 9 +- .../SiteAccessGroupConfigResolver.php | 2 +- .../Configuration/ContainerConfigBuilder.php | 3 +- .../Parser/AbstractFieldTypeParser.php | 2 +- .../Configuration/Parser/Common.php | 4 +- .../Configuration/Parser/Content.php | 4 +- .../Configuration/Parser/IO.php | 11 +- .../Configuration/Parser/Image.php | 6 +- .../Configuration/Parser/Languages.php | 8 +- .../Configuration/Parser/LocationView.php | 2 +- .../Configuration/Parser/Templates.php | 6 +- .../Parser/TwigVariablesParser.php | 4 +- .../Configuration/Parser/UrlChecker.php | 4 +- .../Parser/UserContentTypeIdentifier.php | 2 +- .../Configuration/Parser/View.php | 6 +- .../Configuration/RepositoryConfigParser.php | 2 +- .../SiteAccessAware/Configuration.php | 2 +- .../ConfigurationProcessor.php | 16 +- .../SiteAccessAware/Contextualizer.php | 32 +- .../SiteAccessAware/DynamicSettingParser.php | 4 +- .../Collector/SuggestionCollector.php | 4 +- .../Suggestion/ConfigSuggestion.php | 10 +- .../IbexaCoreExtension.php | 57 ++- .../PolicyProvider/PoliciesConfigBuilder.php | 6 +- .../PolicyProvider/YamlPolicyProvider.php | 2 +- .../BackgroundIndexingTerminateListener.php | 13 +- .../CacheViewResponseListener.php | 5 +- .../EventListener/ConfigScopeListener.php | 8 +- .../EventListener/ConsoleCommandListener.php | 24 +- .../ContentDownloadRouteReferenceListener.php | 5 +- .../Core/EventListener/ExceptionListener.php | 5 +- .../EventListener/IndexRequestListener.php | 5 +- .../Core/EventListener/LocaleListener.php | 9 +- .../EventListener/OriginalRequestListener.php | 2 +- .../EventListener/PreviewRequestListener.php | 3 +- ...xplicitFrontControllerRequestsListener.php | 2 +- .../EventListener/RequestEventListener.php | 13 +- .../Core/EventListener/RoutingListener.php | 11 +- .../SessionInitByPostListener.php | 2 +- .../Core/EventListener/SiteAccessListener.php | 3 +- .../EventListener/ViewControllerListener.php | 13 +- .../EventListener/ViewRendererListener.php | 6 +- .../CrowdinRequestLocaleSubscriber.php | 2 +- .../Features/Context/BasicContentContext.php | 17 +- .../Core/Features/Context/ConsoleContext.php | 30 +- .../Core/Features/Context/ContentContext.php | 9 +- .../Context/ContentPreviewContext.php | 12 +- .../Features/Context/ContentTypeContext.php | 21 +- .../Features/Context/ExceptionContext.php | 12 +- .../Features/Context/FieldTypeContext.php | 35 +- .../Context/QueryControllerContext.php | 6 +- .../Core/Features/Context/RoleContext.php | 15 +- .../Core/Features/Context/UserContext.php | 52 ++- .../Context/YamlConfigurationContext.php | 7 +- .../Core/Fragment/DirectFragmentRenderer.php | 18 +- .../Core/Fragment/FragmentListenerFactory.php | 2 +- src/bundle/Core/Imagine/AliasCleaner.php | 5 +- src/bundle/Core/Imagine/AliasGenerator.php | 18 +- src/bundle/Core/Imagine/BinaryLoader.php | 6 +- .../Imagine/Cache/AliasGeneratorDecorator.php | 17 +- .../Core/Imagine/Cache/ResolverFactory.php | 6 +- .../Core/Imagine/Filter/AbstractFilter.php | 7 +- .../Imagine/Filter/FilterConfiguration.php | 9 +- .../Filter/Loader/FilterLoaderWrapped.php | 2 +- .../Filter/Loader/ReduceNoiseFilterLoader.php | 3 +- .../Filter/Loader/SwirlFilterLoader.php | 3 +- .../Core/Imagine/IORepositoryResolver.php | 13 +- .../Imagine/ImageAsset/AliasGenerator.php | 9 +- .../Imagine/PlaceholderAliasGenerator.php | 20 +- .../PlaceholderAliasGeneratorConfigurator.php | 11 +- .../PlaceholderProvider/GenericProvider.php | 3 +- .../Imagine/PlaceholderProviderRegistry.php | 4 +- .../Variation/ImagineAwareAliasGenerator.php | 12 +- .../VariationPurger/IOVariationPurger.php | 16 +- .../ImageFileVariationPurger.php | 12 +- .../LegacyStorageImageFileList.php | 14 +- .../LegacyStorageImageFileRowReader.php | 5 +- .../Core/Matcher/ViewMatcherRegistry.php | 2 +- .../Config/ComplexConfigProcessor.php | 9 +- .../SiteAccess/Config/IOConfigResolver.php | 3 +- .../Core/SiteAccess/LanguageResolver.php | 3 +- src/bundle/Core/SiteAccess/MatcherBuilder.php | 3 +- .../SiteAccess/SiteAccessMatcherRegistry.php | 2 +- .../ContextAwareTwigVariablesExtension.php | 3 +- src/bundle/Core/Translation/GlobCollector.php | 7 +- .../AbstractConfigResolverBasedURLHandler.php | 12 +- .../URLChecker/Handler/AbstractURLHandler.php | 3 +- .../Core/URLChecker/Handler/HTTPHandler.php | 6 +- .../Core/URLChecker/Handler/MailToHandler.php | 2 +- src/bundle/Core/URLChecker/URLChecker.php | 11 +- .../Core/URLChecker/URLHandlerRegistry.php | 4 +- src/bundle/Core/View/Provider/Configured.php | 2 +- .../Debug/Collector/IbexaCoreCollector.php | 6 +- .../Collector/PersistenceCacheCollector.php | 9 +- .../Debug/Collector/SiteAccessCollector.php | 2 +- .../Compiler/DataCollectorPass.php | 2 +- src/bundle/IO/ApiLoader/HandlerRegistry.php | 2 +- src/bundle/IO/Command/MigrateFilesCommand.php | 18 +- .../Compiler/IOConfigurationPass.php | 6 +- .../Compiler/MigrationFileListerPass.php | 2 +- .../IO/DependencyInjection/Configuration.php | 6 +- .../ConfigurationFactory/Flysystem.php | 4 +- .../MetadataHandler/LegacyDFSCluster.php | 4 +- .../IO/EventListener/StreamFileListener.php | 10 +- .../Migration/FileLister/BinaryFileLister.php | 7 +- .../LegacyStorageFileIterator.php | 6 +- .../LegacyStorageFileRowReader.php | 7 +- .../Migration/FileLister/ImageFileLister.php | 13 +- .../ConfigurableRegistry.php | 2 +- src/bundle/IO/Migration/MigrationHandler.php | 13 +- .../Command/InstallPlatformCommand.php | 30 +- .../Command/ValidatePasswordHashesCommand.php | 6 +- .../Compiler/InstallerTagPass.php | 2 +- .../Subscriber/BuildSchemaSubscriber.php | 3 +- .../Installer/CoreInstaller.php | 7 +- .../Installer/DbBasedInstaller.php | 10 +- .../Event/View/PostBuildViewEvent.php | 3 +- .../FieldType/GatewayBasedStorage.php | 3 +- src/contracts/FieldType/Generic/Type.php | 6 +- .../ConstraintViolationAdapter.php | 7 +- .../AbstractValidationError.php | 10 +- src/contracts/IO/BinaryFileCreateStruct.php | 2 +- .../Target/Builder/VersionBuilder.php | 3 +- .../Limitation/Target/DestinationLocation.php | 6 +- src/contracts/Limitation/Target/Version.php | 2 +- .../MVC/Templating/BaseRenderStrategy.php | 9 +- .../Persistence/Content/ContentItem.php | 9 +- .../Content/LocationWithContentInfo.php | 6 +- .../Persistence/Filter/LazyListIterator.php | 6 +- .../Decorator/BookmarkServiceDecorator.php | 3 +- .../Decorator/ContentServiceDecorator.php | 3 +- .../Decorator/ContentTypeServiceDecorator.php | 3 +- .../Decorator/FieldTypeServiceDecorator.php | 3 +- .../Decorator/LanguageServiceDecorator.php | 3 +- .../Decorator/LocationServiceDecorator.php | 3 +- .../NotificationServiceDecorator.php | 3 +- .../Decorator/ObjectStateServiceDecorator.php | 3 +- .../Decorator/RoleServiceDecorator.php | 3 +- .../Decorator/SearchServiceDecorator.php | 3 +- .../Decorator/SectionServiceDecorator.php | 3 +- .../Decorator/SettingServiceDecorator.php | 3 +- .../Decorator/TranslationServiceDecorator.php | 3 +- .../Decorator/TrashServiceDecorator.php | 3 +- .../Decorator/URLAliasServiceDecorator.php | 3 +- .../Decorator/URLServiceDecorator.php | 3 +- .../Decorator/URLWildcardServiceDecorator.php | 7 +- .../UserPreferenceServiceDecorator.php | 3 +- .../Decorator/UserServiceDecorator.php | 3 +- .../Bookmark/BeforeCreateBookmarkEvent.php | 3 +- .../Bookmark/BeforeDeleteBookmarkEvent.php | 3 +- .../Events/Bookmark/CreateBookmarkEvent.php | 3 +- .../Events/Bookmark/DeleteBookmarkEvent.php | 3 +- .../Events/Content/AddRelationEvent.php | 9 +- .../Events/Content/BeforeAddRelationEvent.php | 9 +- .../Events/Content/BeforeCopyContentEvent.php | 12 +- .../Content/BeforeCreateContentDraftEvent.php | 15 +- .../Content/BeforeCreateContentEvent.php | 11 +- .../Content/BeforeDeleteContentEvent.php | 6 +- .../Content/BeforeDeleteRelationEvent.php | 6 +- .../Content/BeforeDeleteTranslationEvent.php | 3 +- .../Content/BeforeDeleteVersionEvent.php | 3 +- .../Events/Content/BeforeHideContentEvent.php | 3 +- .../Content/BeforePublishVersionEvent.php | 8 +- .../Content/BeforeRevealContentEvent.php | 3 +- .../Content/BeforeUpdateContentEvent.php | 11 +- .../BeforeUpdateContentMetadataEvent.php | 9 +- .../Events/Content/CopyContentEvent.php | 12 +- .../Content/CreateContentDraftEvent.php | 15 +- .../Events/Content/CreateContentEvent.php | 11 +- .../Events/Content/DeleteContentEvent.php | 6 +- .../Events/Content/DeleteRelationEvent.php | 6 +- .../Events/Content/DeleteTranslationEvent.php | 3 +- .../Events/Content/DeleteVersionEvent.php | 3 +- .../Events/Content/HideContentEvent.php | 3 +- .../Events/Content/PublishVersionEvent.php | 8 +- .../Events/Content/RevealContentEvent.php | 3 +- .../Events/Content/UpdateContentEvent.php | 11 +- .../Content/UpdateContentMetadataEvent.php | 9 +- .../ContentType/AddFieldDefinitionEvent.php | 6 +- .../AssignContentTypeGroupEvent.php | 6 +- .../BeforeAddFieldDefinitionEvent.php | 6 +- .../BeforeAssignContentTypeGroupEvent.php | 6 +- .../BeforeCopyContentTypeEvent.php | 9 +- .../BeforeCreateContentTypeDraftEvent.php | 6 +- .../BeforeCreateContentTypeEvent.php | 9 +- .../BeforeCreateContentTypeGroupEvent.php | 6 +- .../BeforeDeleteContentTypeEvent.php | 3 +- .../BeforeDeleteContentTypeGroupEvent.php | 3 +- .../BeforePublishContentTypeDraftEvent.php | 3 +- ...eforeRemoveContentTypeTranslationEvent.php | 9 +- .../BeforeRemoveFieldDefinitionEvent.php | 6 +- .../BeforeUnassignContentTypeGroupEvent.php | 6 +- .../BeforeUpdateContentTypeDraftEvent.php | 6 +- .../BeforeUpdateContentTypeGroupEvent.php | 6 +- .../BeforeUpdateFieldDefinitionEvent.php | 9 +- .../ContentType/CopyContentTypeEvent.php | 9 +- .../CreateContentTypeDraftEvent.php | 6 +- .../ContentType/CreateContentTypeEvent.php | 9 +- .../CreateContentTypeGroupEvent.php | 6 +- .../ContentType/DeleteContentTypeEvent.php | 3 +- .../DeleteContentTypeGroupEvent.php | 3 +- .../PublishContentTypeDraftEvent.php | 3 +- .../RemoveContentTypeTranslationEvent.php | 9 +- .../RemoveFieldDefinitionEvent.php | 6 +- .../UnassignContentTypeGroupEvent.php | 6 +- .../UpdateContentTypeDraftEvent.php | 6 +- .../UpdateContentTypeGroupEvent.php | 6 +- .../UpdateFieldDefinitionEvent.php | 9 +- .../Language/BeforeCreateLanguageEvent.php | 6 +- .../Language/BeforeDeleteLanguageEvent.php | 3 +- .../Language/BeforeDisableLanguageEvent.php | 6 +- .../Language/BeforeEnableLanguageEvent.php | 6 +- .../BeforeUpdateLanguageNameEvent.php | 9 +- .../Events/Language/CreateLanguageEvent.php | 6 +- .../Events/Language/DeleteLanguageEvent.php | 3 +- .../Events/Language/DisableLanguageEvent.php | 6 +- .../Events/Language/EnableLanguageEvent.php | 6 +- .../Language/UpdateLanguageNameEvent.php | 9 +- .../Location/BeforeCopySubtreeEvent.php | 9 +- .../Location/BeforeCreateLocationEvent.php | 9 +- .../Location/BeforeDeleteLocationEvent.php | 3 +- .../Location/BeforeHideLocationEvent.php | 6 +- .../Location/BeforeMoveSubtreeEvent.php | 6 +- .../Location/BeforeSwapLocationEvent.php | 6 +- .../Location/BeforeUnhideLocationEvent.php | 6 +- .../Location/BeforeUpdateLocationEvent.php | 9 +- .../Events/Location/CopySubtreeEvent.php | 9 +- .../Events/Location/CreateLocationEvent.php | 9 +- .../Events/Location/DeleteLocationEvent.php | 3 +- .../Events/Location/HideLocationEvent.php | 6 +- .../Events/Location/MoveSubtreeEvent.php | 6 +- .../Events/Location/SwapLocationEvent.php | 6 +- .../Events/Location/UnhideLocationEvent.php | 6 +- .../Events/Location/UpdateLocationEvent.php | 9 +- .../BeforeCreateNotificationEvent.php | 6 +- .../BeforeDeleteNotificationEvent.php | 3 +- .../BeforeMarkNotificationAsReadEvent.php | 3 +- .../Notification/CreateNotificationEvent.php | 6 +- .../Notification/DeleteNotificationEvent.php | 3 +- .../MarkNotificationAsReadEvent.php | 3 +- .../BeforeCreateObjectStateEvent.php | 9 +- .../BeforeCreateObjectStateGroupEvent.php | 6 +- .../BeforeDeleteObjectStateEvent.php | 3 +- .../BeforeDeleteObjectStateGroupEvent.php | 3 +- .../BeforeSetContentStateEvent.php | 9 +- .../BeforeSetPriorityOfObjectStateEvent.php | 3 +- .../BeforeUpdateObjectStateEvent.php | 9 +- .../BeforeUpdateObjectStateGroupEvent.php | 9 +- .../ObjectState/CreateObjectStateEvent.php | 9 +- .../CreateObjectStateGroupEvent.php | 6 +- .../ObjectState/DeleteObjectStateEvent.php | 3 +- .../DeleteObjectStateGroupEvent.php | 3 +- .../ObjectState/SetContentStateEvent.php | 9 +- .../SetPriorityOfObjectStateEvent.php | 3 +- .../ObjectState/UpdateObjectStateEvent.php | 9 +- .../UpdateObjectStateGroupEvent.php | 9 +- .../Events/Role/AddPolicyByRoleDraftEvent.php | 8 +- .../Events/Role/AssignRoleToUserEvent.php | 9 +- .../Role/AssignRoleToUserGroupEvent.php | 9 +- .../Role/BeforeAddPolicyByRoleDraftEvent.php | 9 +- .../Role/BeforeAssignRoleToUserEvent.php | 9 +- .../Role/BeforeAssignRoleToUserGroupEvent.php | 9 +- .../Events/Role/BeforeCopyRoleEvent.php | 9 +- .../Role/BeforeCreateRoleDraftEvent.php | 6 +- .../Events/Role/BeforeCreateRoleEvent.php | 6 +- .../Events/Role/BeforeDeletePolicyEvent.php | 3 +- .../Role/BeforeDeleteRoleDraftEvent.php | 3 +- .../Events/Role/BeforeDeleteRoleEvent.php | 3 +- .../Role/BeforePublishRoleDraftEvent.php | 3 +- .../BeforeRemovePolicyByRoleDraftEvent.php | 9 +- .../Role/BeforeRemoveRoleAssignmentEvent.php | 3 +- .../BeforeUpdatePolicyByRoleDraftEvent.php | 12 +- .../Role/BeforeUpdateRoleDraftEvent.php | 9 +- .../Repository/Events/Role/CopyRoleEvent.php | 9 +- .../Events/Role/CreateRoleDraftEvent.php | 6 +- .../Events/Role/CreateRoleEvent.php | 6 +- .../Events/Role/DeletePolicyEvent.php | 3 +- .../Events/Role/DeleteRoleDraftEvent.php | 3 +- .../Events/Role/DeleteRoleEvent.php | 3 +- .../Events/Role/PublishRoleDraftEvent.php | 3 +- .../Role/RemovePolicyByRoleDraftEvent.php | 9 +- .../Events/Role/RemoveRoleAssignmentEvent.php | 3 +- .../Role/UpdatePolicyByRoleDraftEvent.php | 12 +- .../Events/Role/UpdateRoleDraftEvent.php | 9 +- .../Events/Section/AssignSectionEvent.php | 6 +- .../Section/AssignSectionToSubtreeEvent.php | 6 +- .../Section/BeforeAssignSectionEvent.php | 6 +- .../BeforeAssignSectionToSubtreeEvent.php | 6 +- .../Section/BeforeCreateSectionEvent.php | 6 +- .../Section/BeforeDeleteSectionEvent.php | 3 +- .../Section/BeforeUpdateSectionEvent.php | 9 +- .../Events/Section/CreateSectionEvent.php | 6 +- .../Events/Section/DeleteSectionEvent.php | 3 +- .../Events/Section/UpdateSectionEvent.php | 9 +- .../Setting/BeforeCreateSettingEvent.php | 6 +- .../Setting/BeforeDeleteSettingEvent.php | 3 +- .../Setting/BeforeUpdateSettingEvent.php | 9 +- .../Events/Setting/CreateSettingEvent.php | 6 +- .../Events/Setting/DeleteSettingEvent.php | 3 +- .../Events/Setting/UpdateSettingEvent.php | 9 +- .../Trash/BeforeDeleteTrashItemEvent.php | 6 +- .../Events/Trash/BeforeEmptyTrashEvent.php | 3 +- .../Events/Trash/BeforeRecoverEvent.php | 9 +- .../Events/Trash/BeforeTrashEvent.php | 9 +- .../Events/Trash/DeleteTrashItemEvent.php | 6 +- .../Events/Trash/EmptyTrashEvent.php | 3 +- .../Repository/Events/Trash/RecoverEvent.php | 9 +- .../Repository/Events/Trash/TrashEvent.php | 6 +- .../Events/URL/BeforeUpdateUrlEvent.php | 9 +- .../Repository/Events/URL/UpdateUrlEvent.php | 9 +- .../BeforeCreateGlobalUrlAliasEvent.php | 3 +- .../URLAlias/BeforeCreateUrlAliasEvent.php | 6 +- ...efreshSystemUrlAliasesForLocationEvent.php | 3 +- .../URLAlias/BeforeRemoveAliasesEvent.php | 3 +- .../URLAlias/CreateGlobalUrlAliasEvent.php | 3 +- .../Events/URLAlias/CreateUrlAliasEvent.php | 6 +- ...efreshSystemUrlAliasesForLocationEvent.php | 3 +- .../Events/URLAlias/RemoveAliasesEvent.php | 3 +- .../Events/URLWildcard/BeforeCreateEvent.php | 3 +- .../Events/URLWildcard/BeforeRemoveEvent.php | 3 +- .../URLWildcard/BeforeTranslateEvent.php | 3 +- .../Events/URLWildcard/BeforeUpdateEvent.php | 6 +- .../Events/URLWildcard/CreateEvent.php | 3 +- .../Events/URLWildcard/RemoveEvent.php | 3 +- .../Events/URLWildcard/TranslateEvent.php | 3 +- .../Events/URLWildcard/UpdateEvent.php | 6 +- .../User/AssignUserToUserGroupEvent.php | 6 +- .../User/BeforeAssignUserToUserGroupEvent.php | 6 +- .../Events/User/BeforeCreateUserEvent.php | 9 +- .../User/BeforeCreateUserGroupEvent.php | 9 +- .../Events/User/BeforeDeleteUserEvent.php | 6 +- .../User/BeforeDeleteUserGroupEvent.php | 6 +- .../Events/User/BeforeMoveUserGroupEvent.php | 6 +- .../BeforeUnAssignUserFromUserGroupEvent.php | 6 +- .../Events/User/BeforeUpdateUserEvent.php | 9 +- .../User/BeforeUpdateUserGroupEvent.php | 9 +- .../User/BeforeUpdateUserPasswordEvent.php | 9 +- .../User/BeforeUpdateUserTokenEvent.php | 9 +- .../Events/User/CreateUserEvent.php | 9 +- .../Events/User/CreateUserGroupEvent.php | 9 +- .../Events/User/DeleteUserEvent.php | 6 +- .../Events/User/DeleteUserGroupEvent.php | 6 +- .../Events/User/MoveUserGroupEvent.php | 6 +- .../User/UnAssignUserFromUserGroupEvent.php | 6 +- .../Events/User/UpdateUserEvent.php | 9 +- .../Events/User/UpdateUserGroupEvent.php | 8 +- .../Events/User/UpdateUserPasswordEvent.php | 9 +- .../Events/User/UpdateUserTokenEvent.php | 9 +- .../BeforeSetUserPreferenceEvent.php | 2 +- .../UserPreference/SetUserPreferenceEvent.php | 2 +- .../Repository/Iterator/BatchIterator.php | 12 +- .../ContentFilteringAdapter.php | 8 +- .../LocationFilteringAdapter.php | 8 +- .../Repository/Lists/UnauthorizedListItem.php | 9 +- .../DraftList/Item/ContentDraftListItem.php | 5 +- .../Item/UnauthorizedContentDraftListItem.php | 9 +- .../Aggregation/AbstractRangeAggregation.php | 6 +- .../Aggregation/AbstractStatsAggregation.php | 4 +- .../Aggregation/AbstractTermAggregation.php | 4 +- .../DateMetadataRangeAggregation.php | 3 +- .../Field/CountryTermAggregation.php | 3 +- .../Location/SubtreeTermAggregation.php | 3 +- .../ObjectStateTermAggregation.php | 3 +- .../Query/Aggregation/RawRangeAggregation.php | 3 +- .../Query/Aggregation/RawStatsAggregation.php | 3 +- .../Query/Aggregation/RawTermAggregation.php | 3 +- .../UserMetadataTermAggregation.php | 4 +- .../Query/Criterion/Image/Orientation.php | 2 +- .../Content/Query/Criterion/MoreLikeThis.php | 4 +- .../Criterion/Operator/Specifications.php | 2 + .../RelationList/Item/RelationListItem.php | 3 +- .../Content/Search/AggregationResult.php | 4 +- .../RangeAggregationResult.php | 2 +- .../RangeAggregationResultEntry.php | 6 +- .../StatsAggregationResult.php | 12 +- .../TermAggregationResult.php | 2 +- .../TermAggregationResultEntry.php | 3 +- .../Search/AggregationResultCollection.php | 2 +- .../Repository/Values/Filter/Filter.php | 8 +- .../Values/User/LookupPolicyLimitations.php | 5 +- .../Repository/Values/User/PasswordInfo.php | 6 +- src/contracts/Search/Field.php | 4 +- .../Content/ContentTypeSpecification.php | 5 +- .../Fixture/BaseInMemoryCachedFileFixture.php | 3 +- .../Persistence/Fixture/FixtureImporter.php | 5 +- .../Test/Repository/SetupFactory/Legacy.php | 12 +- .../Container/ApiLoader/RepositoryFactory.php | 2 +- .../Persistence/FieldTypeRegistryPass.php | 2 +- .../Compiler/Search/FieldRegistryPass.php | 2 +- .../Search/Legacy/CriteriaConverterPass.php | 2 +- ...CriterionFieldValueHandlerRegistryPass.php | 2 +- .../Search/Legacy/SortClauseConverterPass.php | 2 +- .../Storage/ExternalStorageRegistryPass.php | 2 +- .../Legacy/RoleLimitationConverterPass.php | 2 +- .../BackwardCompatibleIterator.php | 9 +- .../ContentFieldValidationException.php | 2 +- ...TypeFieldDefinitionValidationException.php | 2 +- .../LimitationValidationException.php | 2 +- src/lib/Base/ServiceContainer.php | 6 +- src/lib/Base/TranslatableBase.php | 8 +- src/lib/Base/Utils/DeprecationWarner.php | 2 +- src/lib/Event/BookmarkService.php | 3 +- src/lib/Event/ContentService.php | 3 +- src/lib/Event/ContentTypeService.php | 3 +- src/lib/Event/FieldTypeService.php | 3 +- src/lib/Event/LanguageService.php | 3 +- src/lib/Event/LocationService.php | 3 +- src/lib/Event/NotificationService.php | 3 +- src/lib/Event/ObjectStateService.php | 3 +- src/lib/Event/Repository.php | 71 ++-- src/lib/Event/RoleService.php | 3 +- src/lib/Event/SearchService.php | 3 +- src/lib/Event/SectionService.php | 3 +- src/lib/Event/SettingService.php | 3 +- src/lib/Event/TranslationService.php | 3 +- src/lib/Event/TrashService.php | 3 +- src/lib/Event/URLAliasService.php | 3 +- src/lib/Event/URLService.php | 3 +- src/lib/Event/URLWildcardService.php | 5 +- src/lib/Event/UserPreferenceService.php | 3 +- src/lib/Event/UserService.php | 3 +- src/lib/FieldType/Author/AuthorCollection.php | 2 +- src/lib/FieldType/Author/SearchField.php | 4 +- src/lib/FieldType/Author/Type.php | 16 +- src/lib/FieldType/Author/Value.php | 2 +- .../BinaryBase/BinaryBaseStorage.php | 18 +- .../Gateway/DoctrineStorage.php | 11 +- src/lib/FieldType/BinaryBase/Type.php | 5 +- src/lib/FieldType/BinaryBase/Value.php | 2 +- src/lib/FieldType/BinaryFile/Type.php | 6 +- src/lib/FieldType/Checkbox/SearchField.php | 6 +- src/lib/FieldType/Checkbox/Type.php | 4 +- src/lib/FieldType/Checkbox/Value.php | 2 +- src/lib/FieldType/Country/SearchField.php | 10 +- src/lib/FieldType/Country/Type.php | 9 +- src/lib/FieldType/Country/Value.php | 2 +- src/lib/FieldType/Date/SearchField.php | 6 +- src/lib/FieldType/Date/Type.php | 8 +- src/lib/FieldType/Date/Value.php | 6 +- src/lib/FieldType/DateAndTime/SearchField.php | 6 +- src/lib/FieldType/DateAndTime/Type.php | 8 +- src/lib/FieldType/DateAndTime/Value.php | 6 +- .../FieldType/EmailAddress/SearchField.php | 6 +- src/lib/FieldType/EmailAddress/Type.php | 4 +- src/lib/FieldType/EmailAddress/Value.php | 2 +- src/lib/FieldType/FieldType.php | 6 +- src/lib/FieldType/FieldTypeRegistry.php | 2 +- src/lib/FieldType/Float/SearchField.php | 6 +- src/lib/FieldType/Float/Value.php | 2 +- src/lib/FieldType/ISBN/Type.php | 10 +- src/lib/FieldType/ISBN/Value.php | 2 +- src/lib/FieldType/Image/IO/Legacy.php | 27 +- .../FieldType/Image/IO/OptionsProvider.php | 11 +- src/lib/FieldType/Image/ImageStorage.php | 19 +- .../ImageStorage/Gateway/DoctrineStorage.php | 10 +- .../Image/ImageThumbnailProxyStrategy.php | 6 +- .../Image/ImageThumbnailStrategy.php | 9 +- src/lib/FieldType/Image/SearchField.php | 6 +- src/lib/FieldType/Image/Type.php | 12 +- src/lib/FieldType/Image/Value.php | 2 +- src/lib/FieldType/ImageAsset/AssetMapper.php | 12 +- .../ImageAssetThumbnailStrategy.php | 10 +- src/lib/FieldType/ImageAsset/Type.php | 10 +- src/lib/FieldType/ImageAsset/Value.php | 2 +- src/lib/FieldType/Integer/SearchField.php | 6 +- src/lib/FieldType/Integer/Value.php | 2 +- .../Gateway/DoctrineStorage.php | 15 +- src/lib/FieldType/Keyword/SearchField.php | 4 +- src/lib/FieldType/Keyword/Type.php | 8 +- src/lib/FieldType/Keyword/Value.php | 2 +- .../MapLocation/MapLocationStorage.php | 4 +- .../Gateway/DoctrineStorage.php | 7 +- src/lib/FieldType/MapLocation/SearchField.php | 6 +- src/lib/FieldType/MapLocation/Type.php | 6 +- src/lib/FieldType/MapLocation/Value.php | 2 +- src/lib/FieldType/Media/Type.php | 8 +- src/lib/FieldType/Null/Type.php | 6 +- src/lib/FieldType/Null/Value.php | 2 +- src/lib/FieldType/NullStorage.php | 4 +- src/lib/FieldType/Relation/SearchField.php | 6 +- src/lib/FieldType/Relation/Type.php | 18 +- src/lib/FieldType/Relation/Value.php | 2 +- .../FieldType/RelationList/SearchField.php | 4 +- src/lib/FieldType/RelationList/Type.php | 22 +- src/lib/FieldType/RelationList/Value.php | 2 +- src/lib/FieldType/Selection/SearchField.php | 4 +- src/lib/FieldType/Selection/Type.php | 8 +- src/lib/FieldType/Selection/Value.php | 2 +- src/lib/FieldType/TextBlock/SearchField.php | 6 +- src/lib/FieldType/TextLine/Value.php | 2 +- src/lib/FieldType/Time/SearchField.php | 6 +- src/lib/FieldType/Time/Type.php | 4 +- src/lib/FieldType/Time/Value.php | 4 +- src/lib/FieldType/Unindexed.php | 8 +- src/lib/FieldType/Url/SearchField.php | 6 +- src/lib/FieldType/Url/Type.php | 6 +- src/lib/FieldType/Url/UrlStorage.php | 7 +- .../UrlStorage/Gateway/DoctrineStorage.php | 9 +- src/lib/FieldType/Url/Value.php | 2 +- src/lib/FieldType/User/Type.php | 28 +- src/lib/FieldType/User/UserStorage.php | 6 +- .../UserStorage/Gateway/DoctrineStorage.php | 9 +- src/lib/FieldType/User/Value.php | 2 +- src/lib/FieldType/ValidationError.php | 7 +- src/lib/FieldType/Validator.php | 2 +- .../Validator/EmailAddressValidator.php | 4 +- .../FileExtensionBlackListValidator.php | 2 +- .../FieldType/Validator/FileSizeValidator.php | 5 +- .../FieldType/Validator/ImageValidator.php | 2 +- .../Validator/StringLengthValidator.php | 5 +- src/lib/FieldType/Value.php | 2 +- .../SymfonySerializerAdapter.php | 15 +- .../SudoMainLocationLoader.php | 5 +- src/lib/Helper/ContentPreviewHelper.php | 23 +- src/lib/Helper/FieldHelper.php | 8 +- .../ArrayTranslatorFieldsGroupsList.php | 14 +- src/lib/Helper/PreviewLocationProvider.php | 7 +- src/lib/Helper/TranslationHelper.php | 20 +- .../IO/ConfigScopeChangeAwareIOService.php | 9 +- .../SiteAccessDependentBinaryDataHandler.php | 8 +- .../SiteAccessDependentMetadataHandler.php | 6 +- .../IO/IOMetadataHandler/LegacyDFSCluster.php | 15 +- src/lib/IO/IOService.php | 30 +- src/lib/IO/TolerantIOService.php | 6 +- src/lib/IO/UrlDecorator/Prefix.php | 3 +- src/lib/IO/UrlRedecorator.php | 6 +- .../AbstractPersistenceLimitationType.php | 4 +- src/lib/Limitation/BlockingLimitationType.php | 14 +- .../Limitation/ChangeOwnerLimitationType.php | 2 +- .../Limitation/ContentTypeLimitationType.php | 16 +- src/lib/Limitation/LanguageLimitationType.php | 9 +- src/lib/Limitation/LocationLimitationType.php | 16 +- src/lib/Limitation/MemberOfLimitationType.php | 11 +- .../NewObjectStateLimitationType.php | 11 +- .../Limitation/NewSectionLimitationType.php | 14 +- .../Limitation/ObjectStateLimitationType.php | 23 +- src/lib/Limitation/OwnerLimitationType.php | 16 +- .../ParentContentTypeLimitationType.php | 13 +- .../Limitation/ParentDepthLimitationType.php | 11 +- .../Limitation/ParentOwnerLimitationType.php | 11 +- .../ParentUserGroupLimitationType.php | 11 +- src/lib/Limitation/RoleLimitationType.php | 11 +- src/lib/Limitation/SectionLimitationType.php | 18 +- .../Limitation/SiteAccessLimitationType.php | 17 +- src/lib/Limitation/StatusLimitationType.php | 11 +- src/lib/Limitation/SubtreeLimitationType.php | 11 +- .../Limitation/UserGroupLimitationType.php | 16 +- .../MVC/Exception/NoViewTemplateException.php | 3 +- src/lib/MVC/RepositoryAware.php | 2 +- .../AbstractPropertyWhitelistNormalizer.php | 2 +- .../Serializer/CompoundMatcherNormalizer.php | 2 +- .../Controller/Content/PreviewController.php | 21 +- .../Controller/Content/QueryController.php | 18 +- .../Controller/Content/ViewController.php | 8 +- src/lib/MVC/Symfony/Controller/Controller.php | 5 +- .../Symfony/Controller/SecurityController.php | 11 +- .../Event/APIContentExceptionEvent.php | 11 +- .../Event/PostSiteAccessMatchEvent.php | 6 +- .../MVC/Symfony/Event/PreContentViewEvent.php | 3 +- .../Event/ResolveRenderOptionsEvent.php | 3 +- .../Event/RouteReferenceGenerationEvent.php | 8 +- .../MVC/Symfony/Event/ScopeChangeEvent.php | 3 +- .../ContentViewTwigVariablesSubscriber.php | 9 +- .../EventListener/LanguageSwitchListener.php | 5 +- .../ContentDownloadUrlGenerator.php | 6 +- .../ImageAsset/ParameterProvider.php | 12 +- .../FieldType/Relation/ParameterProvider.php | 3 +- .../RelationList/ParameterProvider.php | 5 +- .../FieldType/User/ParameterProvider.php | 3 +- .../LocaleParameterProvider.php | 5 +- .../View/ParameterProviderRegistry.php | 2 +- .../MVC/Symfony/Locale/LocaleConverter.php | 11 +- .../Locale/UserLanguagePreferenceProvider.php | 12 +- .../Matcher/ClassNameMatcherFactory.php | 7 +- .../Symfony/Matcher/ContentBased/Depth.php | 2 +- .../ContentBased/Id/ContentTypeGroup.php | 6 +- .../ContentBased/Id/ParentContentType.php | 10 +- .../ContentBased/Id/ParentLocation.php | 2 +- .../Identifier/ParentContentType.php | 6 +- .../ContentBased/Identifier/Section.php | 6 +- .../Matcher/ContentBased/MultipleValued.php | 2 +- .../Symfony/Matcher/ContentBased/UrlAlias.php | 6 +- ...callyConfiguredMatcherFactoryDecorator.php | 15 +- src/lib/MVC/Symfony/RequestStackAware.php | 2 +- .../Generator/RouteReferenceGenerator.php | 3 +- .../MVC/Symfony/Routing/RouteReference.php | 15 +- .../MVC/Symfony/Routing/SimplifiedRequest.php | 16 +- .../Security/Authorization/Attribute.php | 2 +- .../Authorization/Voter/CoreVoter.php | 3 +- .../Authorization/Voter/ValueObjectVoter.php | 3 +- .../Symfony/Security/User/BaseProvider.php | 6 +- src/lib/MVC/Symfony/Security/UserChecker.php | 3 +- src/lib/MVC/Symfony/SiteAccess.php | 2 +- .../Symfony/SiteAccess/Matcher/Compound.php | 12 +- .../SiteAccess/Matcher/HostElement.php | 11 +- .../MVC/Symfony/SiteAccess/Matcher/Map.php | 4 +- .../Symfony/SiteAccess/Matcher/Map/Host.php | 2 +- .../Symfony/SiteAccess/Matcher/Map/Port.php | 2 +- .../Symfony/SiteAccess/Matcher/Map/URI.php | 2 +- .../MVC/Symfony/SiteAccess/Matcher/Regex.php | 4 +- .../Symfony/SiteAccess/Matcher/URIElement.php | 17 +- .../Provider/ChainSiteAccessProvider.php | 2 +- .../Provider/StaticSiteAccessProvider.php | 6 +- src/lib/MVC/Symfony/SiteAccess/Router.php | 18 +- .../Symfony/SiteAccess/SiteAccessService.php | 9 +- src/lib/MVC/Symfony/SiteAccessGroup.php | 5 +- .../MVC/Symfony/Templating/GlobalHelper.php | 17 +- .../MVC/Symfony/Templating/RenderOptions.php | 3 +- .../MVC/Symfony/Templating/RenderStrategy.php | 2 +- .../Twig/Extension/ContentExtension.php | 21 +- .../Twig/Extension/CoreExtension.php | 3 +- .../Extension/FieldRenderingExtension.php | 17 +- .../Twig/Extension/FileSizeExtension.php | 8 +- .../Twig/Extension/ImageExtension.php | 6 +- .../Extension/QueryRenderingExtension.php | 3 +- .../Twig/Extension/RenderContentExtension.php | 6 +- .../Twig/Extension/RenderExtension.php | 6 +- .../Extension/RenderLocationExtension.php | 6 +- .../Twig/Extension/RoutingExtension.php | 8 +- .../Templating/Twig/FieldBlockRenderer.php | 26 +- .../Templating/Twig/ResourceProvider.php | 3 +- .../Translation/CatalogueMapperFileWriter.php | 19 +- .../ExceptionMessageTemplateFileVisitor.php | 2 +- .../FieldTypesTranslationExtractor.php | 3 +- .../ValidationErrorFileVisitor.php | 2 +- src/lib/MVC/Symfony/View/BaseView.php | 28 +- .../View/Builder/ContentViewBuilder.php | 33 +- .../ParametersFilter/RequestAttributes.php | 2 +- .../View/Builder/Registry/ControllerMatch.php | 4 +- .../View/Configurator/ViewProvider.php | 5 +- src/lib/MVC/Symfony/View/ContentView.php | 17 +- .../View/CustomLocationControllerChecker.php | 4 +- .../FilterViewBuilderParametersEvent.php | 7 +- .../View/Event/FilterViewParametersEvent.php | 14 +- .../View/GenericVariableProviderRegistry.php | 2 +- src/lib/MVC/Symfony/View/LoginFormView.php | 6 +- src/lib/MVC/Symfony/View/Manager.php | 15 +- .../ParametersInjector/CustomParameters.php | 2 +- .../EmbedObjectParameters.php | 2 +- .../EventDispatcherInjector.php | 5 +- .../View/ParametersInjector/NoLayout.php | 2 +- .../ParametersInjector/ValueObjectsIds.php | 2 +- .../ParametersInjector/ViewbaseLayout.php | 5 +- .../MVC/Symfony/View/Provider/Configured.php | 5 +- .../MVC/Symfony/View/Provider/Registry.php | 4 +- .../View/Renderer/TemplateRenderer.php | 6 +- src/lib/Persistence/Cache/AbstractHandler.php | 19 +- .../Cache/AbstractInMemoryHandler.php | 14 +- .../AbstractInMemoryPersistenceHandler.php | 13 +- .../TransactionalInMemoryCacheAdapter.php | 2 +- src/lib/Persistence/Cache/ContentHandler.php | 14 +- .../Cache/ContentLanguageHandler.php | 4 +- .../Persistence/Cache/ContentTypeHandler.php | 22 +- src/lib/Persistence/Cache/Handler.php | 54 +-- .../Identifier/CacheIdentifierGenerator.php | 7 +- .../Cache/InMemory/InMemoryCache.php | 10 +- src/lib/Persistence/Cache/LocationHandler.php | 8 +- .../Persistence/Cache/ObjectStateHandler.php | 2 +- .../Persistence/Cache/PersistenceLogger.php | 5 +- .../Persistence/Cache/TransactionHandler.php | 6 +- src/lib/Persistence/Cache/TrashHandler.php | 6 +- src/lib/Persistence/Cache/URLHandler.php | 5 +- src/lib/Persistence/Cache/UrlAliasHandler.php | 12 +- .../Persistence/Cache/UrlWildcardHandler.php | 2 +- src/lib/Persistence/Cache/UserHandler.php | 24 +- .../Cache/UserPreferenceHandler.php | 4 +- src/lib/Persistence/FieldType.php | 4 +- .../Bookmark/Gateway/DoctrineDatabase.php | 3 +- .../Bookmark/Gateway/ExceptionConversion.php | 5 +- .../Persistence/Legacy/Bookmark/Handler.php | 6 +- .../Legacy/Content/FieldHandler.php | 35 +- .../FieldValue/Converter/AuthorConverter.php | 10 +- .../Converter/BinaryFileConverter.php | 6 +- .../Converter/CheckboxConverter.php | 8 +- .../FieldValue/Converter/CountryConverter.php | 8 +- .../Converter/DateAndTimeConverter.php | 8 +- .../FieldValue/Converter/DateConverter.php | 8 +- .../Converter/EmailAddressConverter.php | 8 +- .../FieldValue/Converter/FloatConverter.php | 8 +- .../FieldValue/Converter/ISBNConverter.php | 8 +- .../Converter/ImageAssetConverter.php | 4 +- .../FieldValue/Converter/ImageConverter.php | 18 +- .../FieldValue/Converter/IntegerConverter.php | 8 +- .../FieldValue/Converter/KeywordConverter.php | 4 +- .../Converter/MapLocationConverter.php | 2 +- .../FieldValue/Converter/MediaConverter.php | 4 +- .../FieldValue/Converter/NullConverter.php | 8 +- .../Converter/RelationConverter.php | 8 +- .../Converter/RelationListConverter.php | 13 +- .../Converter/SelectionConverter.php | 8 +- .../Converter/SerializableConverter.php | 3 +- .../Converter/TextBlockConverter.php | 8 +- .../Converter/TextLineConverter.php | 8 +- .../FieldValue/Converter/TimeConverter.php | 8 +- .../FieldValue/Converter/UrlConverter.php | 6 +- .../Content/FieldValue/ConverterRegistry.php | 6 +- .../Content/Gateway/DoctrineDatabase.php | 25 +- .../Gateway/DoctrineDatabase/QueryBuilder.php | 3 +- .../Content/Gateway/ExceptionConversion.php | 4 +- .../Persistence/Legacy/Content/Handler.php | 60 ++- .../Content/Language/CachingHandler.php | 16 +- .../Language/Gateway/DoctrineDatabase.php | 4 +- .../Language/Gateway/ExceptionConversion.php | 5 +- .../Legacy/Content/Language/Handler.php | 14 +- .../Legacy/Content/Language/MaskGenerator.php | 3 +- .../Location/Gateway/DoctrineDatabase.php | 12 +- .../Location/Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/Location/Handler.php | 52 ++- .../Legacy/Content/Location/Mapper.php | 6 +- .../Legacy/Content/Location/Trash/Handler.php | 24 +- src/lib/Persistence/Legacy/Content/Mapper.php | 32 +- .../ObjectState/Gateway/DoctrineDatabase.php | 7 +- .../Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/ObjectState/Handler.php | 16 +- .../Legacy/Content/ObjectState/Mapper.php | 15 +- .../Section/Gateway/DoctrineDatabase.php | 3 +- .../Section/Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/Section/Handler.php | 22 +- .../Legacy/Content/StorageHandler.php | 12 +- .../Legacy/Content/TreeHandler.php | 36 +- .../Legacy/Content/Type/ContentUpdater.php | 24 +- .../Content/Type/ContentUpdater/Action.php | 5 +- .../Type/ContentUpdater/Action/AddField.php | 22 +- .../ContentUpdater/Action/RemoveField.php | 16 +- .../Content/Type/Gateway/DoctrineDatabase.php | 15 +- .../Type/Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/Type/Handler.php | 32 +- .../Legacy/Content/Type/Mapper.php | 31 +- .../Type/Update/Handler/DoctrineDatabase.php | 3 +- .../UrlAlias/Gateway/DoctrineDatabase.php | 13 +- .../UrlAlias/Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/UrlAlias/Handler.php | 65 ++-- .../Legacy/Content/UrlAlias/Mapper.php | 13 +- .../Legacy/Content/UrlAlias/SlugConverter.php | 8 +- .../UrlWildcard/Gateway/DoctrineDatabase.php | 6 +- .../Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/UrlWildcard/Handler.php | 12 +- .../Legacy/Content/UrlWildcard/Mapper.php | 6 +- .../UrlWildcard/Query/CriteriaConverter.php | 2 +- .../Content/SiblingQueryBuilder.php | 3 +- .../LogicalAndQueryBuilder.php | 3 +- .../LogicalNotQueryBuilder.php | 3 +- .../LogicalOrQueryBuilder.php | 3 +- .../User/BaseUserCriterionQueryBuilder.php | 3 +- .../Legacy/Filter/CriterionVisitor.php | 2 +- .../Content/Doctrine/DoctrineGateway.php | 9 +- .../Mapper/DoctrineGatewayDataMapper.php | 17 +- .../Location/Doctrine/DoctrineGateway.php | 9 +- .../Handler/ContentFilteringHandler.php | 10 +- .../Handler/LocationFilteringHandler.php | 11 +- .../Legacy/Filter/SortClauseVisitor.php | 2 +- src/lib/Persistence/Legacy/Handler.php | 49 +-- .../Notification/Gateway/DoctrineDatabase.php | 3 +- .../Gateway/ExceptionConversion.php | 4 +- .../Legacy/Notification/Handler.php | 6 +- .../Setting/Gateway/DoctrineDatabase.php | 3 +- .../Setting/Gateway/ExceptionConversion.php | 3 +- .../Persistence/Legacy/Setting/Handler.php | 3 +- .../Legacy/SharedGateway/GatewayFactory.php | 5 +- .../Legacy/Token/AbstractGateway.php | 2 +- .../Persistence/Legacy/TransactionHandler.php | 17 +- .../Legacy/URL/Gateway/DoctrineDatabase.php | 11 +- .../URL/Gateway/ExceptionConversion.php | 4 +- src/lib/Persistence/Legacy/URL/Handler.php | 8 +- src/lib/Persistence/Legacy/URL/Mapper.php | 4 +- .../Legacy/URL/Query/CriteriaConverter.php | 2 +- .../Legacy/User/Gateway/DoctrineDatabase.php | 3 +- .../User/Gateway/ExceptionConversion.php | 4 +- src/lib/Persistence/Legacy/User/Handler.php | 45 +-- src/lib/Persistence/Legacy/User/Mapper.php | 16 +- .../User/Role/Gateway/DoctrineDatabase.php | 3 +- .../User/Role/Gateway/ExceptionConversion.php | 4 +- .../Legacy/User/Role/LimitationConverter.php | 6 +- .../Legacy/User/Role/LimitationHandler.php | 2 +- .../Gateway/DoctrineDatabase.php | 3 +- .../Gateway/ExceptionConversion.php | 4 +- .../Legacy/UserPreference/Handler.php | 6 +- .../Persistence/TransformationProcessor.php | 8 +- .../DefinitionBased.php | 4 +- .../DefinitionBased/Parser.php | 12 +- .../TransformationProcessor/PcreCompiler.php | 16 +- src/lib/Persistence/Utf8Converter.php | 2 +- src/lib/Query/QueryFactory.php | 3 +- src/lib/QueryType/ArrayQueryTypeRegistry.php | 6 +- .../QueryType/BuiltIn/AbstractQueryType.php | 11 +- .../QueryType/BuiltIn/SortClausesFactory.php | 3 +- .../DefaultSortClauseParser.php | 2 +- .../SortSpec/SortClauseParserDispatcher.php | 2 +- .../BuiltIn/SortSpec/SortSpecLexer.php | 8 +- .../BuiltIn/SortSpec/SortSpecParser.php | 6 +- src/lib/QueryType/BuiltIn/SortSpec/Token.php | 9 +- .../OptionsResolverBasedQueryType.php | 3 +- ...eryParameterContentViewQueryTypeMapper.php | 2 +- src/lib/Repository/BookmarkService.php | 8 +- src/lib/Repository/ContentService.php | 30 +- src/lib/Repository/ContentTypeService.php | 36 +- .../EventSubscriber/DeleteUserSubscriber.php | 3 +- src/lib/Repository/FieldTypeService.php | 3 +- .../Repository/Helper/RelationProcessor.php | 7 +- src/lib/Repository/LanguageService.php | 12 +- .../PermissionAwareLocationResolver.php | 3 +- src/lib/Repository/LocationService.php | 27 +- .../Repository/Mapper/ContentDomainMapper.php | 47 ++- .../DecoratedLocationService.php | 3 +- .../InMemoryContentLocationMapper.php | 2 +- src/lib/Repository/Mapper/ContentMapper.php | 7 +- .../Mapper/ContentTypeDomainMapper.php | 15 +- .../Mapper/ProxyAwareDomainMapper.php | 3 +- .../Repository/Mapper/RoleDomainMapper.php | 15 +- src/lib/Repository/NotificationService.php | 8 +- src/lib/Repository/ObjectStateService.php | 13 +- .../Permission/CachedPermissionService.php | 15 +- .../Permission/LimitationService.php | 2 +- .../PermissionCriterionResolver.php | 7 +- .../Permission/PermissionResolver.php | 25 +- .../ProxyFactory/ProxyDomainMapper.php | 5 +- .../ProxyFactory/ProxyDomainMapperFactory.php | 3 +- .../ProxyFactory/ProxyGenerator.php | 8 +- src/lib/Repository/Repository.php | 74 ++-- src/lib/Repository/RoleService.php | 25 +- src/lib/Repository/SearchService.php | 20 +- src/lib/Repository/SectionService.php | 23 +- src/lib/Repository/SettingService.php | 7 +- .../Config/IOConfigResolver.php | 9 +- .../SiteAccessAware/ContentService.php | 6 +- .../SiteAccessAware/ContentTypeService.php | 6 +- .../Language/AbstractLanguageResolver.php | 8 +- .../Language/LanguageResolver.php | 2 +- .../SiteAccessAware/LanguageService.php | 3 +- .../SiteAccessAware/LocationService.php | 6 +- .../SiteAccessAware/NotificationService.php | 3 +- .../SiteAccessAware/ObjectStateService.php | 6 +- .../Repository/SiteAccessAware/Repository.php | 35 +- .../SiteAccessAware/SearchService.php | 6 +- .../SiteAccessAware/SectionService.php | 3 +- .../SiteAccessAware/TrashService.php | 3 +- .../SiteAccessAware/URLAliasService.php | 6 +- .../SiteAccessAware/UserService.php | 6 +- .../Field/ContentFieldStrategy.php | 2 +- .../FirstMatchingFieldStrategy.php | 6 +- .../ContentThumbnail/StaticStrategy.php | 3 +- .../ThumbnailChainStrategy.php | 2 +- .../ContentValidatorStrategy.php | 2 +- src/lib/Repository/TrashService.php | 20 +- src/lib/Repository/URLAliasService.php | 23 +- src/lib/Repository/URLService.php | 10 +- src/lib/Repository/URLWildcardService.php | 17 +- src/lib/Repository/UserPreferenceService.php | 12 +- src/lib/Repository/UserService.php | 21 +- .../ContentCreateStructValidator.php | 6 +- .../ContentUpdateStructValidator.php | 8 +- .../Validator/TargetContentValidator.php | 9 +- .../Validator/UserPasswordValidator.php | 3 +- .../Repository/Validator/VersionValidator.php | 3 +- src/lib/Repository/Values/Content/Content.php | 2 +- .../Values/ContentType/ContentType.php | 4 +- .../ContentType/FieldDefinitionCollection.php | 4 +- .../Values/ContentType/FieldType.php | 2 +- .../Repository/Values/User/PolicyDraft.php | 4 +- .../Repository/Values/User/UserReference.php | 3 +- .../AbstractSearchEventSubscriber.php | 7 +- .../ContentEventSubscriber.php | 14 +- .../LocationEventSubscriber.php | 18 +- .../ObjectStateEventSubscriber.php | 2 +- .../SectionEventSubscriber.php | 2 +- .../EventSubscriber/TrashEventSubscriber.php | 4 +- .../EventSubscriber/UserEventSubscriber.php | 14 +- src/lib/Search/Common/FieldNameGenerator.php | 4 +- src/lib/Search/Common/FieldNameResolver.php | 21 +- .../Common/FieldValueMapper/IntegerMapper.php | 2 +- .../MultipleBooleanMapper.php | 5 +- .../MultipleIdentifierMapper.php | 4 +- .../MultipleIntegerMapper.php | 5 +- .../MultipleRemoteIdentifierMapper.php | 5 +- .../FieldValueMapper/MultipleStringMapper.php | 2 +- .../Common/FieldValueMapper/StringMapper.php | 2 +- src/lib/Search/Common/Indexer.php | 13 +- .../Common/Gateway/CriteriaConverter.php | 2 +- .../Common/Gateway/CriterionHandler.php | 3 +- .../ContentTypeIdentifier.php | 10 +- .../Common/Gateway/CriterionHandler/Field.php | 16 +- .../Gateway/CriterionHandler/FieldBase.php | 9 +- .../Gateway/CriterionHandler/FieldEmpty.php | 10 +- .../CriterionHandler/FieldRelation.php | 2 +- .../CriterionHandler/FieldValue/Converter.php | 8 +- .../CriterionHandler/FieldValue/Handler.php | 27 +- .../FieldValue/Handler/Collection.php | 4 +- .../FieldValue/HandlerRegistry.php | 2 +- .../Gateway/CriterionHandler/FullText.php | 15 +- .../Gateway/CriterionHandler/LanguageCode.php | 3 +- .../CriterionHandler/MapLocationDistance.php | 2 +- .../Gateway/CriterionHandler/UserEmail.php | 3 +- .../Gateway/CriterionHandler/UserLogin.php | 3 +- .../Common/Gateway/SortClauseConverter.php | 2 +- .../Common/Gateway/SortClauseHandler.php | 3 +- .../RandomSortClauseHandlerFactory.php | 5 +- .../Gateway/SortClauseHandler/Field.php | 11 +- .../Content/Gateway/DoctrineDatabase.php | 16 +- .../Content/Gateway/ExceptionConversion.php | 5 +- src/lib/Search/Legacy/Content/Handler.php | 45 +-- src/lib/Search/Legacy/Content/Indexer.php | 4 +- .../Search/Legacy/Content/IndexerGateway.php | 3 +- .../Location/IsBookmarked.php | 2 +- .../Location/Gateway/DoctrineDatabase.php | 14 +- .../Location/Gateway/ExceptionConversion.php | 4 +- .../Legacy/Content/Mapper/FullTextMapper.php | 13 +- .../WordIndexer/Gateway/DoctrineDatabase.php | 33 +- .../WordIndexer/Repository/SearchIndex.php | 2 +- .../Core/ApiLoader/CacheFactoryTest.php | 6 +- .../Cache/Warmer/ProxyCacheWarmerTest.php | 5 +- tests/bundle/Core/ChainConfigResolverTest.php | 27 +- tests/bundle/Core/ConfigResolverTest.php | 31 +- .../Compiler/ChainConfigResolverPassTest.php | 4 +- .../Compiler/ChainRoutingPassTest.php | 6 +- ...dTypeParameterProviderRegistryPassTest.php | 4 +- .../Compiler/FragmentPassTest.php | 2 +- .../Compiler/NotificationRendererPassTest.php | 4 +- .../Compiler/PlaceholderProviderPassTest.php | 4 +- .../RegisterStorageEnginePassTest.php | 6 +- .../SlugConverterConfigurationPassTest.php | 8 +- .../Compiler/URLHandlerPassTest.php | 4 +- .../Compiler/ViewProvidersPassTest.php | 4 +- .../ComplexSettingParserTest.php | 8 +- .../ComplexSettingValueResolverTest.php | 2 +- .../Configuration/ConfigParserTest.php | 15 +- .../ChainConfigResolverTest.php | 13 +- .../ConfigResolver/ConfigResolverTest.php | 5 +- .../Parser/AbstractParserTestCase.php | 2 +- .../Configuration/Parser/CommonTest.php | 18 +- .../Configuration/Parser/ContentTest.php | 6 +- .../Parser/FieldType/ImageAssetTest.php | 4 +- .../Configuration/Parser/IOTest.php | 2 +- .../Configuration/Parser/ImageTest.php | 4 +- .../Configuration/Parser/LanguagesTest.php | 8 +- .../Configuration/Parser/TemplatesTest.php | 8 +- .../Configuration/Parser/ViewTest.php | 4 +- .../ConfigurationProcessorTest.php | 23 +- .../SiteAccessAware/ContextualizerTest.php | 51 ++- .../DynamicSettingParserTest.php | 10 +- .../Collector/SuggestionCollectorTest.php | 2 +- .../Suggestion/ConfigSuggestionTest.php | 4 +- .../Formatter/YamlSuggestionFormatterTest.php | 4 +- .../IbexaCoreExtensionTest.php | 45 ++- .../PoliciesConfigBuilderTest.php | 2 +- .../PolicyProvider/YamlPolicyProviderTest.php | 4 +- .../Stub/StubPolicyProvider.php | 5 +- .../Stub/StubYamlPolicyProvider.php | 3 +- ...ackgroundIndexingTerminateListenerTest.php | 17 +- .../BackwardCompatibleCommandListenerTest.php | 4 +- .../EventListener/ConfigScopeListenerTest.php | 11 +- .../ConsoleCommandListenerTest.php | 23 +- ...tentDownloadRouteReferenceListenerTest.php | 17 +- .../EventListener/ExceptionListenerTest.php | 23 +- .../IndexRequestListenerTest.php | 19 +- .../Core/EventListener/LocaleListenerTest.php | 9 +- .../OriginalRequestListenerTest.php | 8 +- ...citFrontControllerRequestsListenerTest.php | 5 +- .../RequestEventListenerTest.php | 29 +- .../EventListener/RoutingListenerTest.php | 11 +- .../SessionSetDynamicNameListenerTest.php | 2 +- .../EventListener/SiteAccessListenerTest.php | 18 +- .../Core/EventListener/Stubs/TestOutput.php | 2 +- .../ViewControllerListenerTest.php | 31 +- .../CrowdinRequestLocaleSubscriberTest.php | 4 +- .../Fragment/DirectFragmentRendererTest.php | 8 +- .../Fragment/FragmentListenerFactoryTest.php | 6 +- .../bundle/Core/Imagine/AliasCleanerTest.php | 7 +- .../Core/Imagine/AliasGeneratorTest.php | 44 +-- .../bundle/Core/Imagine/BinaryLoaderTest.php | 15 +- .../Cache/Resolver/ProxyResolverTest.php | 13 +- .../Cache/Resolver/RelativeResolverTest.php | 5 +- .../Imagine/Cache/ResolverFactoryTest.php | 11 +- .../Imagine/Filter/AbstractFilterTest.php | 13 +- .../Filter/FilterConfigurationTest.php | 19 +- .../Filter/Loader/BorderFilterLoaderTest.php | 10 +- .../Filter/Loader/CropFilterLoaderTest.php | 11 +- .../Loader/GrayscaleFilterLoaderTest.php | 2 +- .../Loader/ReduceNoiseFilterLoaderTest.php | 7 +- .../Loader/ScaleDownOnlyFilterLoaderTest.php | 11 +- .../Loader/ScaleExactFilterLoaderTest.php | 11 +- .../Filter/Loader/ScaleFilterLoaderTest.php | 13 +- .../ScaleHeightDownOnlyFilterLoaderTest.php | 9 +- .../Loader/ScaleHeightFilterLoaderTest.php | 9 +- .../Loader/ScalePercentFilterLoaderTest.php | 11 +- .../ScaleWidthDownOnlyFilterLoaderTest.php | 9 +- .../Loader/ScaleWidthFilterLoaderTest.php | 9 +- .../Filter/Loader/SwirlFilterLoaderTest.php | 11 +- .../Imagine/Filter/UnsupportedFilterTest.php | 2 +- .../Core/Imagine/IORepositoryResolverTest.php | 37 +- .../Imagine/ImageAsset/AliasGeneratorTest.php | 15 +- ...ceholderAliasGeneratorConfiguratorTest.php | 2 +- .../Imagine/PlaceholderAliasGeneratorTest.php | 23 +- .../GenericProviderTest.php | 12 +- .../PlaceholderProviderRegistryTest.php | 8 +- ...iasDirectoryVariationPathGeneratorTest.php | 2 +- ...nalDirectoryVariationPathGeneratorTest.php | 2 +- .../ImageFileVariationPurgerTest.php | 13 +- .../LegacyStorageImageFileListTest.php | 13 +- .../bundle/Core/Routing/DefaultRouterTest.php | 25 +- .../Core/Routing/UrlAliasRouterTest.php | 21 +- .../Config/IOConfigResolverTest.php | 5 +- .../Core/SiteAccess/MatcherBuilderTest.php | 9 +- .../bundle/Core/URLChecker/URLCheckerTest.php | 28 +- .../Collector/IbexaCoreCollectorTest.php | 21 +- .../Compiler/DataCollectorPassTest.php | 2 +- .../Compiler/IOConfigurationPassTest.php | 15 +- .../BaseFlysystemTest.php | 8 +- .../MetadataHandler/FlysystemTest.php | 2 +- .../MetadataHandler/LegacyDFSClusterTest.php | 8 +- .../ConfigurationFactoryTest.php | 6 +- .../IbexaIOExtensionTest.php | 6 +- .../bundle/IO/Migration/FileMigratorTest.php | 15 +- .../BinaryBaseStorageTest.php | 6 +- .../Stub/ExampleFieldType.php | 2 +- .../Image/ImageStorage/ImageStorageTest.php | 17 +- .../Limitation/MemberOfLimitationTest.php | 3 +- .../Core/Limitation/RoleLimitationTest.php | 3 +- .../Doctrine/FilteringQueryBuilderTest.php | 2 +- .../Search/Content/IndexerGatewayTest.php | 2 +- .../Variation/InMemoryVariationHandler.php | 2 +- .../Repository/BaseContentServiceTest.php | 10 +- .../BaseNonRedundantFieldSetTest.php | 2 +- .../integration/Core/Repository/BaseTest.php | 25 +- .../Core/Repository/BookmarkServiceTest.php | 14 +- .../Core/Repository/Common/SlugConverter.php | 2 +- .../ContentService/VersionValidatorTest.php | 8 +- .../ContentServiceAuthorizationTest.php | 110 +++--- .../Core/Repository/ContentServiceTest.php | 342 +++++++++--------- .../ContentTypeServiceAuthorizationTest.php | 28 +- .../Repository/ContentTypeServiceTest.php | 223 ++++++------ .../FieldType/AuthorIntegrationTest.php | 51 +-- .../FieldType/BaseIntegrationTest.php | 52 +-- .../FieldType/CheckboxIntegrationTest.php | 33 +- .../FieldType/CountryIntegrationTest.php | 47 +-- .../FieldType/DateAndTimeIntegrationTest.php | 41 ++- .../FieldType/DateIntegrationTest.php | 37 +- .../FieldType/EmailAddressIntegrationTest.php | 35 +- .../FileSearchBaseIntegrationTest.php | 2 +- .../FieldType/FloatIntegrationTest.php | 33 +- .../FieldType/ISBNIntegrationTest.php | 35 +- .../FieldType/IntegerIntegrationTest.php | 35 +- .../FieldType/KeywordIntegrationTest.php | 64 ++-- .../FieldType/MapLocationIntegrationTest.php | 33 +- .../FieldType/RelationIntegrationTest.php | 31 +- .../FieldType/RelationListIntegrationTest.php | 39 +- ...RelationSearchBaseIntegrationTestTrait.php | 12 +- .../FieldType/SearchBaseIntegrationTest.php | 87 ++--- .../SearchMultivaluedBaseIntegrationTest.php | 48 +-- .../FieldType/SelectionIntegrationTest.php | 57 +-- .../SelectionMultilingualIntegrationTest.php | 10 +- .../FieldType/TextBlockIntegrationTest.php | 35 +- .../FieldType/TextLineIntegrationTest.php | 35 +- .../FieldType/TimeIntegrationTest.php | 37 +- .../FieldType/UrlIntegrationTest.php | 41 ++- .../FieldType/UserIntegrationTest.php | 46 +-- .../Core/Repository/FieldTypeServiceTest.php | 10 +- .../LanguageServiceAuthorizationTest.php | 10 +- ...geServiceMaximumSupportedLanguagesTest.php | 8 +- .../Core/Repository/LanguageServiceTest.php | 44 +-- .../LocationLimitationIntegrationTest.php | 2 +- .../LocationServiceAuthorizationTest.php | 26 +- .../Core/Repository/LocationServiceTest.php | 115 +++--- .../Repository/NonRedundantFieldSetTest.php | 32 +- .../Repository/NotificationServiceTest.php | 18 +- .../ObjectStateServiceAuthorizationTest.php | 16 +- .../Repository/ObjectStateServiceTest.php | 86 ++--- .../Parallel/BaseParallelTestCase.php | 2 +- .../Parallel/ContentServiceTest.php | 4 +- .../Repository/PermissionResolverTest.php | 46 +-- .../Regression/EZP20018LanguageTest.php | 8 +- .../Regression/EZP20018ObjectStateTest.php | 4 +- .../Regression/EZP20018VisibilityTest.php | 4 +- .../Repository/Regression/EZP21069Test.php | 6 +- .../Repository/Regression/EZP21089Test.php | 5 +- .../Regression/EZP21109EzIntegerTest.php | 6 +- .../Regression/EZP21771EzStringTest.php | 2 +- .../Repository/Regression/EZP21798Test.php | 2 +- ...6SearchOneContentMultipleLocationsTest.php | 4 +- .../EZP22408DeleteRelatedObjectTest.php | 18 +- .../EZP22409RelationListTypeStateTest.php | 6 +- .../EZP22612URLAliasTranslations.php | 4 +- .../Regression/EZP22840RoleLimitations.php | 4 +- ...22958SearchSubtreePathstringFormatTest.php | 8 +- .../EZP26327UrlAliasHistorizationTest.php | 2 +- ...ZP26367UrlAliasHistoryRedirectLoopTest.php | 4 +- .../EZP26551DeleteContentTypeDraftTest.php | 2 +- .../Regression/EZP28799SubtreeSearchTest.php | 6 +- .../Core/Repository/Regression/EnvTest.php | 2 +- .../Regression/PureNegativeQueryTest.php | 44 +-- .../Core/Repository/RepositoryTest.php | 40 +- .../RoleServiceAuthorizationTest.php | 38 +- .../Core/Repository/RoleServiceTest.php | 144 ++++---- .../Repository/SearchEngineIndexingTest.php | 73 ++-- .../TermAggregationDataSetBuilder.php | 6 +- .../FieldAggregationFixtureGenerator.php | 15 +- .../SearchService/RemoteIdIndexingTest.php | 2 +- .../SearchServiceAuthorizationTest.php | 12 +- .../Repository/SearchServiceFulltextTest.php | 12 +- .../Repository/SearchServiceImageTest.php | 6 +- .../Repository/SearchServiceLocationTest.php | 34 +- .../Core/Repository/SearchServiceTest.php | 331 ++++++++--------- ...ServiceTranslationLanguageFallbackTest.php | 22 +- .../SectionServiceAuthorizationTest.php | 16 +- .../Core/Repository/SectionServiceTest.php | 60 +-- .../Core/Repository/SettingServiceTest.php | 2 +- .../TrashServiceAuthorizationTest.php | 16 +- .../Core/Repository/TrashServiceTest.php | 56 +-- .../URLAliasServiceAuthorizationTest.php | 6 +- .../Core/Repository/URLAliasServiceTest.php | 95 ++--- .../URLServiceAuthorizationTest.php | 8 +- .../Core/Repository/URLServiceTest.php | 50 +-- .../URLWildcardServiceAuthorizationTest.php | 2 +- .../Repository/URLWildcardServiceTest.php | 34 +- .../Repository/UserPreferenceServiceTest.php | 12 +- .../UserServiceAuthorizationTest.php | 26 +- .../Core/Repository/UserServiceTest.php | 144 ++++---- .../Limitation/ContentTypeLimitationTest.php | 6 +- .../Limitation/LocationLimitationTest.php | 4 +- .../NewObjectStateLimitationTest.php | 4 +- .../Limitation/NewSectionLimitationTest.php | 4 +- .../User/Limitation/OwnerLimitationTest.php | 4 +- .../ParentContentTypeLimitationTest.php | 4 +- .../Limitation/ParentDepthLimitationTest.php | 6 +- .../Limitation/ParentOwnerLimitationTest.php | 4 +- .../ParentUserGroupLimitationTest.php | 4 +- .../Limitation/RolePolicyLimitationTest.php | 16 +- .../User/Limitation/SectionLimitationTest.php | 4 +- .../User/Limitation/StatusLimitationTest.php | 4 +- .../User/Limitation/SubtreeLimitationTest.php | 4 +- .../Limitation/UserGroupLimitationTest.php | 4 +- .../Compiler/FieldTypeRegistryPassTest.php | 4 +- .../Search/FieldTypeRegistryPassTest.php | 4 +- .../Legacy/CriteriaConverterPassTest.php | 4 +- ...erionFieldValueHandlerRegistryPassTest.php | 4 +- .../Legacy/SortClauseConverterPassTest.php | 6 +- .../ExternalStorageRegistryPassTest.php | 12 +- .../FieldValueConverterRegistryPassTest.php | 2 +- .../RoleLimitationConverterPassTest.php | 2 +- .../BackwardCompatibleIteratorTest.php | 5 +- .../DeprecationErrorCollector.php | 3 +- tests/lib/Collection/ArrayListTest.php | 2 +- tests/lib/Collection/ArrayMapTest.php | 8 +- tests/lib/Event/AbstractServiceTest.php | 4 +- tests/lib/Event/BookmarkServiceTest.php | 12 +- tests/lib/Event/ContentServiceTest.php | 110 +++--- tests/lib/Event/ContentTypeServiceTest.php | 110 +++--- tests/lib/Event/LanguageServiceTest.php | 46 +-- tests/lib/Event/LocationServiceTest.php | 68 ++-- tests/lib/Event/NotificationServiceTest.php | 14 +- tests/lib/Event/ObjectStateServiceTest.php | 64 ++-- tests/lib/Event/RoleServiceTest.php | 96 ++--- tests/lib/Event/SectionServiceTest.php | 38 +- tests/lib/Event/SettingServiceTest.php | 10 +- tests/lib/Event/TrashServiceTest.php | 42 +-- tests/lib/Event/URLAliasServiceTest.php | 32 +- tests/lib/Event/URLServiceTest.php | 10 +- tests/lib/Event/URLWildcardServiceTest.php | 28 +- tests/lib/Event/UserPreferenceServiceTest.php | 6 +- tests/lib/Event/UserServiceTest.php | 88 ++--- tests/lib/FieldType/APIFieldTypeTest.php | 17 +- tests/lib/FieldType/AuthorTest.php | 41 ++- tests/lib/FieldType/BaseFieldTypeTest.php | 42 ++- tests/lib/FieldType/BinaryFileTest.php | 15 +- tests/lib/FieldType/CheckboxTest.php | 26 +- tests/lib/FieldType/CountryTest.php | 22 +- tests/lib/FieldType/DateAndTimeTest.php | 28 +- tests/lib/FieldType/DateTest.php | 22 +- tests/lib/FieldType/EmailAddressTest.php | 26 +- .../FieldType/EmailAddressValidatorTest.php | 12 +- tests/lib/FieldType/FieldTypeMockTest.php | 14 +- tests/lib/FieldType/FileSizeValidatorTest.php | 33 +- tests/lib/FieldType/FloatTest.php | 26 +- tests/lib/FieldType/Generic/GenericTest.php | 17 +- tests/lib/FieldType/Generic/Stubs/Value.php | 2 +- .../SymfonySerializerAdapterTest.php | 11 +- tests/lib/FieldType/ISBNTest.php | 19 +- tests/lib/FieldType/Image/IO/LegacyTest.php | 39 +- .../PathGenerator/LegacyPathGeneratorTest.php | 4 +- .../FieldType/ImageAsset/AssetMapperTest.php | 12 +- tests/lib/FieldType/ImageAssetTest.php | 22 +- tests/lib/FieldType/ImageTest.php | 29 +- tests/lib/FieldType/IntegerTest.php | 26 +- tests/lib/FieldType/KeywordTest.php | 18 +- tests/lib/FieldType/MapLocationTest.php | 55 +-- tests/lib/FieldType/MediaTest.php | 24 +- tests/lib/FieldType/RelationListTest.php | 33 +- tests/lib/FieldType/RelationTest.php | 28 +- tests/lib/FieldType/SelectionTest.php | 26 +- tests/lib/FieldType/TimeTest.php | 22 +- .../Url/Gateway/DoctrineStorageTest.php | 10 +- tests/lib/FieldType/Url/UrlStorageTest.php | 23 +- tests/lib/FieldType/UrlTest.php | 18 +- tests/lib/FieldType/UserTest.php | 19 +- .../SudoMainLocationLoaderTest.php | 11 +- tests/lib/Helper/ContentPreviewHelperTest.php | 17 +- tests/lib/Helper/FieldHelperTest.php | 11 +- .../ArrayTranslatorFieldsGroupsListTest.php | 2 +- .../Helper/PreviewLocationProviderTest.php | 13 +- tests/lib/Helper/TranslationHelperTest.php | 45 +-- .../ConfigScopeChangeAwareIOServiceTest.php | 5 +- .../IO/FilePathNormalizer/FlysystemTest.php | 5 +- ...amicPathFilesystemAdapterDecoratorTest.php | 2 +- .../IO/IOBinarydataHandler/FlysystemTest.php | 2 +- .../IO/IOMetadataHandler/FlysystemTest.php | 10 +- .../LegacyDFSClusterTest.php | 13 +- .../lib/IO/MimeTypeDetector/FileInfoTest.php | 4 +- tests/lib/IO/UrlDecorator/PrefixTest.php | 6 +- tests/lib/IO/UrlRedecoratorTest.php | 11 +- tests/lib/Limitation/Base.php | 5 +- .../Limitation/BlockingLimitationTypeTest.php | 32 +- .../ContentTypeLimitationTypeTest.php | 39 +- .../Limitation/LocationLimitationTypeTest.php | 41 ++- .../NewObjectStateLimitationTypeTest.php | 35 +- .../ObjectStateLimitationTypeTest.php | 21 +- .../ParentContentTypeLimitationTypeTest.php | 47 +-- .../ParentDepthLimitationTypeTest.php | 31 +- .../lib/Limitation/RoleLimitationTypeTest.php | 4 +- .../Limitation/SectionLimitationTypeTest.php | 43 +-- .../SiteAccessLimitationTypeTest.php | 31 +- .../Limitation/StatusLimitationTypeTest.php | 33 +- .../Limitation/SubtreeLimitationTypeTest.php | 43 +-- .../Serializer/Stubs/CompoundStub.php | 4 +- .../Serializer/Stubs/MatcherStub.php | 6 +- .../Serializer/Stubs/RegexMatcher.php | 2 +- .../MVC/Symfony/Controller/ControllerTest.php | 11 +- .../RouteReferenceGenerationEventTest.php | 4 +- .../Symfony/Event/ScopeChangeEventTest.php | 2 +- ...ContentViewTwigVariablesSubscriberTest.php | 2 +- .../LanguageSwitchListenerTest.php | 11 +- .../ImageAsset/ParameterProviderTest.php | 15 +- .../Relation/ParameterProviderTest.php | 8 +- .../RelationList/ParameterProviderTest.php | 10 +- .../FieldType/User/ParameterProviderTest.php | 7 +- .../LocaleParameterProviderTest.php | 9 +- .../View/ParameterProviderRegistryTest.php | 6 +- .../UserLanguagePreferenceProviderTest.php | 7 +- .../Matcher/ContentBased/DepthTest.php | 13 +- .../Matcher/ContentBased/Id/ContentTest.php | 13 +- .../ContentBased/Id/ContentTypeGroupTest.php | 12 +- .../ContentBased/Id/ContentTypeTest.php | 13 +- .../Matcher/ContentBased/Id/LocationTest.php | 10 +- .../ContentBased/Id/ParentContentTypeTest.php | 11 +- .../ContentBased/Id/ParentLocationTest.php | 13 +- .../Matcher/ContentBased/Id/RemoteTest.php | 11 +- .../Matcher/ContentBased/Id/SectionTest.php | 13 +- .../Identifier/ContentTypeTest.php | 12 +- .../Identifier/ParentContentTypeTest.php | 11 +- .../ContentBased/Identifier/SectionTest.php | 10 +- .../ContentBased/MultipleValuedTest.php | 9 +- .../Matcher/ContentBased/UrlAliasTest.php | 14 +- ...yConfiguredMatcherFactoryDecoratorTest.php | 7 +- .../lib/MVC/Symfony/Routing/GeneratorTest.php | 13 +- .../Routing/RouteReferenceGeneratorTest.php | 13 +- .../Symfony/Routing/RouteReferenceTest.php | 8 +- .../Symfony/Routing/SimplifiedRequestTest.php | 4 +- .../Symfony/Routing/UrlAliasGeneratorTest.php | 71 ++-- .../Symfony/Routing/UrlAliasRouterTest.php | 91 ++--- .../MVC/Symfony/Security/HttpUtilsTest.php | 14 +- .../MVC/Symfony/Security/UserCheckerTest.php | 5 +- tests/lib/MVC/Symfony/Security/UserTest.php | 10 +- .../MVC/Symfony/Security/UserWrappedTest.php | 2 +- .../Symfony/Security/Voter/CoreVoterTest.php | 19 +- .../Security/Voter/ValueObjectVoterTest.php | 19 +- .../SiteAccess/Compound/CompoundAndTest.php | 23 +- .../SiteAccess/Compound/CompoundOrTest.php | 21 +- .../SiteAccess/MatcherSerializationTest.php | 14 +- .../Provider/ChainSiteAccessProviderTest.php | 6 +- .../MVC/Symfony/SiteAccess/RouterBaseTest.php | 2 +- .../SiteAccess/RouterHostElementTest.php | 10 +- .../SiteAccess/RouterHostPortURITest.php | 12 +- .../Symfony/SiteAccess/RouterHostTextTest.php | 4 +- .../Symfony/SiteAccess/RouterMapURITest.php | 14 +- .../SiteAccess/RouterSpecialPortsTest.php | 2 +- .../lib/MVC/Symfony/SiteAccess/RouterTest.php | 16 +- .../SiteAccess/RouterURIElement2Test.php | 16 +- .../SiteAccess/RouterURIElementTest.php | 14 +- .../Symfony/SiteAccess/RouterURITextTest.php | 8 +- .../SiteAccess/SiteAccessServiceTest.php | 11 +- .../Symfony/Templating/GlobalHelperTest.php | 31 +- .../Symfony/Templating/RenderStrategyTest.php | 6 +- .../Twig/Extension/ContentExtensionTest.php | 19 +- ...FieldRenderingExtensionIntegrationTest.php | 11 +- .../Twig/Extension/FileSizeExtensionTest.php | 15 +- .../ContentValidationExceptionUsageStub.php | 2 +- .../fixtures/ForbiddenExceptionUsageStub.php | 2 +- .../View/Builder/ContentViewBuilderTest.php | 15 +- .../lib/MVC/Symfony/View/ContentViewTest.php | 12 +- .../View/Renderer/TemplateRendererTest.php | 13 +- .../View/VariableProviderRegistryTest.php | 2 +- .../lib/MVC/Symfony/View/ViewManagerTest.php | 35 +- .../SearchHitAdapterFactoryTest.php | 5 +- .../ContentFilteringAdapterTest.php | 3 +- .../LocationFilteringAdapterTest.php | 3 +- .../Cache/AbstractBaseHandlerTest.php | 15 +- .../Cache/AbstractCacheHandlerTest.php | 6 +- .../AbstractInMemoryCacheHandlerTest.php | 6 +- .../InMemoryClearingProxyAdapterTest.php | 23 +- .../Persistence/Cache/ContentHandlerTest.php | 2 +- .../Cache/ContentTypeHandlerTest.php | 2 +- .../CacheIdentifierGeneratorTest.php | 2 +- .../CacheIdentifierSanitizerTest.php | 2 +- .../Cache/InMemory/InMemoryCacheTest.php | 44 +-- .../Cache/LocationPathConverterTest.php | 2 +- .../Cache/PersistenceHandlerTest.php | 24 +- .../Cache/PersistenceLoggerTest.php | 6 +- .../Cache/TransactionHandlerTest.php | 6 +- .../Persistence/Cache/TrashHandlerTest.php | 8 +- .../lib/Persistence/Cache/URLHandlerTest.php | 2 +- .../lib/Persistence/Cache/UserHandlerTest.php | 6 +- .../Persistence/DatabaseConnectionFactory.php | 9 +- .../lib/Persistence/FieldTypeRegistryTest.php | 13 +- .../Converter/ImageConverterTest.php | 7 +- .../Bookmark/Gateway/DoctrineDatabaseTest.php | 16 +- .../Legacy/Bookmark/HandlerTest.php | 19 +- .../Legacy/Bookmark/MapperTest.php | 6 +- .../Legacy/Content/ContentHandlerTest.php | 79 ++-- .../Legacy/Content/FieldHandlerTest.php | 57 +-- .../FieldValue/Converter/AuthorTest.php | 10 +- .../FieldValue/Converter/CheckboxTest.php | 8 +- .../FieldValue/Converter/CountryTest.php | 16 +- .../FieldValue/Converter/DateAndTimeTest.php | 26 +- .../Content/FieldValue/Converter/DateTest.php | 14 +- .../Content/FieldValue/Converter/ISBNTest.php | 4 +- .../FieldValue/Converter/KeywordTest.php | 8 +- .../FieldValue/Converter/MediaTest.php | 4 +- .../FieldValue/Converter/RelationListTest.php | 15 +- .../FieldValue/Converter/RelationTest.php | 2 +- .../FieldValue/Converter/SelectionTest.php | 16 +- .../Converter/SerializableConverterTest.php | 5 +- .../FieldValue/Converter/TextBlockTest.php | 8 +- .../FieldValue/Converter/TextLineTest.php | 10 +- .../Content/FieldValue/Converter/TimeTest.php | 12 +- .../Content/FieldValue/Converter/UrlTest.php | 8 +- .../FieldValueConverterRegistryTest.php | 9 +- .../Content/Gateway/DoctrineDatabaseTest.php | 98 ++--- .../RandomSortClauseHandlerFactoryTest.php | 4 +- .../Language/CachingLanguageHandlerTest.php | 32 +- .../Language/Gateway/DoctrineDatabaseTest.php | 12 +- .../Content/Language/LanguageHandlerTest.php | 30 +- .../Legacy/Content/Language/MapperTest.php | 12 +- .../Content/Language/MaskGeneratorTest.php | 32 +- .../Legacy/Content/LanguageAwareTestCase.php | 3 +- .../Legacy/Content/LanguageHandlerMock.php | 6 +- .../Location/Gateway/DoctrineDatabaseTest.php | 96 ++--- .../Gateway/DoctrineDatabaseTrashTest.php | 48 +-- .../Legacy/Content/Location/MapperTest.php | 10 +- .../Content/Location/TrashHandlerTest.php | 27 +- .../Legacy/Content/LocationHandlerTest.php | 45 +-- .../ResolveVirtualFieldSubscriberTest.php | 16 +- .../Persistence/Legacy/Content/MapperTest.php | 43 +-- .../Gateway/DoctrineDatabaseTest.php | 42 +-- .../Legacy/Content/ObjectState/MapperTest.php | 26 +- .../ObjectState/ObjectStateHandlerTest.php | 53 +-- .../Section/Gateway/DoctrineDatabaseTest.php | 18 +- .../Content/Section/SectionHandlerTest.php | 23 +- .../Legacy/Content/StorageRegistryTest.php | 7 +- .../Legacy/Content/TreeHandlerTest.php | 31 +- .../Content/Type/ContentTypeHandlerTest.php | 77 ++-- .../ContentUpdater/Action/AddFieldTest.php | 38 +- .../ContentUpdater/Action/RemoveFieldTest.php | 18 +- .../Content/Type/ContentUpdaterTest.php | 19 +- .../Type/Gateway/DoctrineDatabaseTest.php | 79 ++-- .../Legacy/Content/Type/MapperTest.php | 31 +- .../Update/Handler/DoctrineDatabaseTest.php | 15 +- .../UrlAlias/Gateway/DoctrineDatabaseTest.php | 38 +- .../Content/UrlAlias/SlugConverterTest.php | 25 +- .../Content/UrlAlias/UrlAliasHandlerTest.php | 279 +++++++------- .../Content/UrlAlias/UrlAliasMapperTest.php | 12 +- .../Gateway/DoctrineDatabaseTest.php | 12 +- .../UrlWildcard/UrlWildcardHandlerTest.php | 14 +- .../UrlWildcard/UrlWildcardMapperTest.php | 8 +- .../Converter/ImageConverterTest.php | 7 +- ...seCriterionVisitorQueryBuilderTestCase.php | 2 +- .../Gateway/DoctrineDatabaseTest.php | 14 +- .../Legacy/Notification/HandlerTest.php | 21 +- .../Legacy/Notification/MapperTest.php | 8 +- .../Legacy/Setting/SettingHandlerTest.php | 5 +- .../SharedGateway/GatewayFactoryTest.php | 2 +- tests/lib/Persistence/Legacy/TestCase.php | 6 +- .../Legacy/TransactionHandlerTest.php | 17 +- .../URL/Gateway/DoctrineDatabaseTest.php | 4 +- .../Persistence/Legacy/URL/HandlerTest.php | 23 +- .../lib/Persistence/Legacy/URL/MapperTest.php | 6 +- .../CriterionHandler/CriterionHandlerTest.php | 4 +- .../Query/CriterionHandler/LogicalAndTest.php | 2 +- .../Query/CriterionHandler/LogicalNotTest.php | 2 +- .../Query/CriterionHandler/LogicalOrTest.php | 2 +- .../Query/CriterionHandler/MatchAllTest.php | 4 +- .../Query/CriterionHandler/MatchNoneTest.php | 4 +- .../Query/CriterionHandler/PatternTest.php | 4 +- .../Query/CriterionHandler/ValidityTest.php | 4 +- .../User/Role/LimitationConverterTest.php | 6 +- .../Legacy/User/UserHandlerTest.php | 97 ++--- .../Gateway/DoctrineDatabaseTest.php | 8 +- .../Legacy/UserPreference/HandlerTest.php | 13 +- .../Legacy/UserPreference/MapperTest.php | 4 +- ...tionProcessorDefinitionBasedParserTest.php | 4 +- ...sformationProcessorDefinitionBasedTest.php | 12 +- ...ransformationProcessorPcreCompilerTest.php | 20 +- ...ormationProcessorPreprocessedBasedTest.php | 8 +- tests/lib/Query/QueryFactoryTest.php | 5 +- .../BuiltIn/AbstractQueryTypeTest.php | 9 +- .../CustomFieldSortClauseParserTest.php | 2 +- .../DefaultSortClauseParserTest.php | 2 +- .../FieldSortClauseParserTest.php | 2 +- .../MapDistanceSortClauseParserTest.php | 2 +- .../RandomSortClauseParserTest.php | 2 +- .../BuiltIn/SortSpec/SortSpecLexerStub.php | 8 +- tests/lib/Repository/ContentServiceTest.php | 2 +- .../ContentFieldStrategyTest.php | 3 +- .../ContentThumbnail/StaticStrategyTest.php | 2 +- .../ContentValidatorStrategyTest.php | 6 +- .../BookmarkServiceDecoratorTest.php | 8 +- .../Decorator/ContentServiceDecoratorTest.php | 58 +-- .../ContentTypeServiceDecoratorTest.php | 62 ++-- .../FieldTypeServiceDecoratorTest.php | 6 +- .../LanguageServiceDecoratorTest.php | 24 +- .../LocationServiceDecoratorTest.php | 38 +- .../NotificationServiceDecoratorTest.php | 14 +- .../ObjectStateServiceDecoratorTest.php | 36 +- .../Decorator/RoleServiceDecoratorTest.php | 54 +-- .../Decorator/SearchServiceDecoratorTest.php | 10 +- .../Decorator/SectionServiceDecoratorTest.php | 24 +- .../Decorator/SettingServiceDecoratorTest.php | 12 +- .../TranslationServiceDecoratorTest.php | 4 +- .../Decorator/TrashServiceDecoratorTest.php | 12 +- .../URLAliasServiceDecoratorTest.php | 20 +- .../Decorator/URLServiceDecoratorTest.php | 12 +- .../URLWildcardServiceDecoratorTest.php | 10 +- .../UserPreferenceServiceDecoratorTest.php | 8 +- .../Decorator/UserServiceDecoratorTest.php | 54 +-- .../Filtering/TestContentProvider.php | 6 +- .../Helper/FieldTypeRegistryTest.php | 13 +- .../Iterator/BatchIteratorTestAdapter.php | 6 +- tests/lib/Repository/LegacySchemaImporter.php | 3 +- .../PermissionAwareLocationResolverTest.php | 5 +- tests/lib/Repository/LocationServiceTest.php | 2 +- .../DecoratedLocationServiceTest.php | 7 +- .../InMemoryContentLocationMapperTest.php | 2 +- .../NameSchema/NameSchemaServiceTest.php | 2 +- .../AllValidationErrorsOccur.php | 4 +- .../PHPUnitConstraint/ContentItemEquals.php | 3 +- .../ValidationErrorOccurs.php | 3 +- .../Parallel/ParallelProcessList.php | 2 +- .../CachedPermissionServiceTest.php | 23 +- .../PermissionCriterionResolverTest.php | 59 +-- tests/lib/Repository/Service/Mock/Base.php | 31 +- .../Repository/Service/Mock/BookmarkTest.php | 46 +-- .../Service/Mock/ContentDomainMapperTest.php | 14 +- .../Repository/Service/Mock/ContentTest.php | 257 ++++++------- .../Service/Mock/PermissionTest.php | 51 +-- .../Service/Mock/RelationProcessorTest.php | 25 +- .../Service/Mock/RepositoryTest.php | 10 +- .../lib/Repository/Service/Mock/RoleTest.php | 39 +- .../Repository/Service/Mock/SearchTest.php | 77 ++-- .../Repository/Service/Mock/UrlAliasTest.php | 278 +++++++------- tests/lib/Repository/Service/Mock/UrlTest.php | 43 +-- .../Service/Mock/UrlWildcardTest.php | 47 +-- .../Mock/UserPasswordValidatorTest.php | 2 +- .../Service/Mock/UserPreferenceTest.php | 29 +- .../lib/Repository/Service/Mock/UserTest.php | 9 +- .../lib/Repository/Service/Mock/ValueStub.php | 2 +- .../SiteAccessAware/AbstractServiceTest.php | 11 +- .../ContentTypeServiceTest.php | 4 +- .../Language/LanguageResolverTest.php | 2 +- .../SiteAccessAware/LanguageServiceTest.php | 4 +- .../ObjectStateServiceTest.php | 4 +- .../SiteAccessAware/SearchServiceTest.php | 12 +- .../SiteAccessAware/TrashServiceTest.php | 4 +- .../SiteAccessAware/UrlAliasServiceTest.php | 8 +- .../SiteAccessAware/UserServiceTest.php | 4 +- .../Validator/TargetContentValidatorTest.php | 7 +- .../Repository/Values/Content/ContentTest.php | 4 +- .../Values/Content/LanguageTest.php | 10 +- .../Query/Criterion/DateMetadataTest.php | 2 +- .../Repository/Values/Content/SectionTest.php | 10 +- .../Values/Content/TrashItemTest.php | 10 +- .../ContentType/ContentTypeDraftTest.php | 2 +- .../Values/MultiLanguageTestTrait.php | 8 +- .../ObjectState/ObjectStateGroupTest.php | 12 +- .../Values/ObjectState/ObjectStateTest.php | 12 +- .../lib/Repository/Values/User/PolicyTest.php | 10 +- tests/lib/Repository/Values/User/RoleTest.php | 10 +- .../Repository/Values/User/UserGroupTest.php | 14 +- .../Values/ValueObjectTestTrait.php | 2 +- .../TrashEventSubscriberTest.php | 7 +- .../Common/FieldValueMapper/AggregateTest.php | 2 +- .../RemoteIdentifierMapperTest.php | 2 +- .../LocationEventSubscriberTest.php | 7 +- tests/lib/Search/FieldNameResolverTest.php | 45 +-- .../Legacy/Content/AbstractTestCase.php | 15 +- .../Legacy/Content/HandlerContentSortTest.php | 28 +- .../Legacy/Content/HandlerContentTest.php | 140 +++---- .../Content/HandlerLocationSortTest.php | 49 +-- .../Legacy/Content/HandlerLocationTest.php | 148 ++++---- 1537 files changed, 9356 insertions(+), 10505 deletions(-) diff --git a/src/bundle/Core/ApiLoader/CacheFactory.php b/src/bundle/Core/ApiLoader/CacheFactory.php index e28ae9bb30..68a6a19780 100644 --- a/src/bundle/Core/ApiLoader/CacheFactory.php +++ b/src/bundle/Core/ApiLoader/CacheFactory.php @@ -31,7 +31,7 @@ public function __construct(ContainerInterface $container) * * @return \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface */ - public function getCachePool(ConfigResolverInterface $configResolver) + public function getCachePool(ConfigResolverInterface $configResolver): TagAwareAdapterInterface|TagAwareAdapter { /** @var \Symfony\Component\Cache\Adapter\AdapterInterface $cacheService */ $cacheService = $this->container->get($configResolver->getParameter('cache_service_name')); diff --git a/src/bundle/Core/ApiLoader/RepositoryFactory.php b/src/bundle/Core/ApiLoader/RepositoryFactory.php index 6ef3f59eb4..72b307e0e6 100644 --- a/src/bundle/Core/ApiLoader/RepositoryFactory.php +++ b/src/bundle/Core/ApiLoader/RepositoryFactory.php @@ -40,21 +40,16 @@ */ class RepositoryFactory { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; /** * Map of system configured policies. - * - * @var array */ - private $policyMap; + private array $policyMap; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - private $languageResolver; + private LanguageResolver $languageResolver; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/bundle/Core/ApiLoader/SearchEngineFactory.php b/src/bundle/Core/ApiLoader/SearchEngineFactory.php index 85debbdbb1..b12524b181 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineFactory.php @@ -37,7 +37,7 @@ public function __construct( * @param \Ibexa\Contracts\Core\Search\Handler $searchHandler * @param string $searchEngineIdentifier */ - public function registerSearchEngine(SearchHandler $searchHandler, $searchEngineIdentifier) + public function registerSearchEngine(SearchHandler $searchHandler, $searchEngineIdentifier): void { $this->searchEngines[$searchEngineIdentifier] = $searchHandler; } diff --git a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php index 3f879135c3..837353fe0c 100644 --- a/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php +++ b/src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php @@ -38,7 +38,7 @@ public function __construct( * @param \Ibexa\Core\Search\Common\Indexer $searchEngineIndexer * @param string $searchEngineIdentifier */ - public function registerSearchEngineIndexer(SearchEngineIndexer $searchEngineIndexer, $searchEngineIdentifier) + public function registerSearchEngineIndexer(SearchEngineIndexer $searchEngineIndexer, $searchEngineIdentifier): void { $this->searchEngineIndexers[$searchEngineIdentifier] = $searchEngineIndexer; } diff --git a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php index 58f4b054ea..1d7c84d7dc 100644 --- a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php +++ b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php @@ -34,8 +34,7 @@ final class ProxyCacheWarmer implements CacheWarmerInterface Thumbnail::class, ]; - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface */ - private $proxyGenerator; + private ProxyGeneratorInterface $proxyGenerator; public function __construct(ProxyGeneratorInterface $proxyGenerator) { diff --git a/src/bundle/Core/Command/CheckURLsCommand.php b/src/bundle/Core/Command/CheckURLsCommand.php index 5b918c25f7..efd01e4d2c 100644 --- a/src/bundle/Core/Command/CheckURLsCommand.php +++ b/src/bundle/Core/Command/CheckURLsCommand.php @@ -32,17 +32,13 @@ class CheckURLsCommand extends Command private const DEFAULT_ITERATION_COUNT = 50; private const DEFAULT_REPOSITORY_USER = 'admin'; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\URLService */ - private $urlService; + private URLService $urlService; - /** @var \Ibexa\Bundle\Core\URLChecker\URLCheckerInterface */ - private $urlChecker; + private URLCheckerInterface $urlChecker; public function __construct( UserService $userService, diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 99c08c070d..64219b2d62 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -243,7 +243,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - protected function getObjectsIds($keep, $status, $excludedContentTypes = []) + protected function getObjectsIds($keep, $status, $excludedContentTypes = []): array { $query = $this->connection->createQueryBuilder() ->select('c.id') @@ -286,7 +286,7 @@ protected function getObjectsIds($keep, $status, $excludedContentTypes = []) * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - private function mapStatusToVersionInfoStatus($status) + private function mapStatusToVersionInfoStatus($status): int { if (array_key_exists($status, self::VERSION_STATUS)) { return self::VERSION_STATUS[$status]; diff --git a/src/bundle/Core/Command/DebugConfigResolverCommand.php b/src/bundle/Core/Command/DebugConfigResolverCommand.php index fae5cc7f40..d12d6d0cb8 100644 --- a/src/bundle/Core/Command/DebugConfigResolverCommand.php +++ b/src/bundle/Core/Command/DebugConfigResolverCommand.php @@ -25,11 +25,9 @@ )] class DebugConfigResolverCommand extends Command { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; public function __construct( ConfigResolverInterface $configResolver, @@ -44,7 +42,7 @@ public function __construct( /** * {@inheritdoc}. */ - public function configure() + public function configure(): void { $this->addArgument( 'parameter', diff --git a/src/bundle/Core/Command/DeleteContentTranslationCommand.php b/src/bundle/Core/Command/DeleteContentTranslationCommand.php index c9bcaabdf4..0e158de4a3 100644 --- a/src/bundle/Core/Command/DeleteContentTranslationCommand.php +++ b/src/bundle/Core/Command/DeleteContentTranslationCommand.php @@ -29,17 +29,14 @@ )] class DeleteContentTranslationCommand extends Command { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; /** @var \Ibexa\Contracts\Core\Repository\ContentService */ private $contentService; - /** @var \Symfony\Component\Console\Input\InputInterface */ - private $input; + private ?InputInterface $input = null; - /** @var \Symfony\Component\Console\Output\OutputInterface */ - private $output; + private ?OutputInterface $output = null; /** @var \Symfony\Component\Console\Helper\QuestionHelper */ private $questionHelper; @@ -159,7 +156,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int */ private function promptUserForMainLanguageChange( ContentInfo $contentInfo, - $languageCode, + string $languageCode, array $lastVersionLanguageCodes ) { $contentName = "#{$contentInfo->id} ($contentInfo->name)"; diff --git a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php index a9125de330..af1ef7701c 100644 --- a/src/bundle/Core/Command/NormalizeImagesPathsCommand.php +++ b/src/bundle/Core/Command/NormalizeImagesPathsCommand.php @@ -9,6 +9,7 @@ namespace Ibexa\Bundle\Core\Command; use Doctrine\DBAL\Driver\Connection; +use Ibexa\Core\FieldType\Image\ImageStorage\Gateway; use Ibexa\Core\FieldType\Image\ImageStorage\Gateway as ImageStorageGateway; use Ibexa\Core\IO\Exception\BinaryFileNotFoundException; use Ibexa\Core\IO\FilePathNormalizerInterface; @@ -42,17 +43,13 @@ final class NormalizeImagesPathsCommand extends Command private const SKIP_HASHING_COMMAND_PARAMETER = 'no-hash'; - /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ - private $imageGateway; + private Gateway $imageGateway; - /** @var \Ibexa\Core\IO\FilePathNormalizerInterface */ - private $filePathNormalizer; + private FilePathNormalizerInterface $filePathNormalizer; - /** @var \Doctrine\DBAL\Driver\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; /** @var bool */ private $skipHashing; @@ -71,7 +68,7 @@ public function __construct( $this->ioService = $ioService; } - protected function configure() + protected function configure(): void { $beforeRunningHints = self::BEFORE_RUNNING_HINTS; @@ -205,7 +202,7 @@ private function updateImagePath( } protected function updateImagePathsToNormalize( - $imageData, + array $imageData, array $imagePathsToNormalize ): array { $filePath = $imageData['filepath']; diff --git a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php index 9e0acb2c95..15ab0dddbc 100644 --- a/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php +++ b/src/bundle/Core/Command/RegenerateUrlAliasesCommand.php @@ -41,11 +41,9 @@ class RegenerateUrlAliasesCommand extends Command - Manually clear HTTP cache after running this command. EOT; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; /** * @param \Ibexa\Contracts\Core\Repository\Repository $repository @@ -167,7 +165,7 @@ static function (Repository $repository): int { * * @return \Symfony\Component\Console\Helper\ProgressBar */ - protected function getProgressBar($maxSteps, OutputInterface $output) + protected function getProgressBar($maxSteps, OutputInterface $output): ProgressBar { $progressBar = new ProgressBar($output, $maxSteps); $progressBar->setFormat( @@ -186,7 +184,7 @@ protected function getProgressBar($maxSteps, OutputInterface $output) private function processLocations(array $locations, ProgressBar $progressBar): void { $contentList = $this->repository->sudo( - static function (Repository $repository) use ($locations) { + static function (Repository $repository) use ($locations): iterable { $contentInfoList = array_map( static function (Location $location) { return $location->contentInfo; @@ -211,7 +209,7 @@ static function (Location $location) { } $this->repository->sudo( - static function (Repository $repository) use ($location) { + static function (Repository $repository) use ($location): void { $repository->getURLAliasService()->refreshSystemUrlAliasesForLocation( $location ); @@ -247,7 +245,7 @@ static function (Repository $repository) use ($location) { private function loadAllLocations(int $offset, int $iterationCount): array { return $this->repository->sudo( - static function (Repository $repository) use ($offset, $iterationCount) { + static function (Repository $repository) use ($offset, $iterationCount): array { return $repository->getLocationService()->loadAllLocations($offset, $iterationCount); } ); @@ -267,7 +265,7 @@ private function loadSpecificLocations(array $locationIds, int $offset, int $ite $locationIds = array_slice($locationIds, $offset, $iterationCount); return $this->repository->sudo( - static function (Repository $repository) use ($locationIds) { + static function (Repository $repository) use ($locationIds): iterable { return $repository->getLocationService()->loadLocationList($locationIds); } ); @@ -283,7 +281,7 @@ static function (Repository $repository) use ($locationIds) { private function getFilteredLocationList(array $locationIds): array { $locations = $this->repository->sudo( - static function (Repository $repository) use ($locationIds) { + static function (Repository $repository) use ($locationIds): iterable { $locationService = $repository->getLocationService(); return $locationService->loadLocationList($locationIds); diff --git a/src/bundle/Core/Command/ReindexCommand.php b/src/bundle/Core/Command/ReindexCommand.php index f0d124359e..4b162f9adc 100644 --- a/src/bundle/Core/Command/ReindexCommand.php +++ b/src/bundle/Core/Command/ReindexCommand.php @@ -36,32 +36,24 @@ class ReindexCommand extends Command private const string IBEXA_CLOUD_CONFIG_FILE = '/run/config.json'; private const string LINUX_CPUINFO_FILE = '/proc/cpuinfo'; - /** @var \Ibexa\Core\Search\Common\Indexer|\Ibexa\Core\Search\Common\IncrementalIndexer */ - private $searchIndexer; + private Indexer $searchIndexer; - /** @var string */ - private $phpPath; + private string|null|bool $phpPath = null; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; /** @var string */ private $siteaccess; - /** @var string */ - private $env; + private string $env; - /** @var bool */ - private $isDebug; + private bool $isDebug; - /** @var string */ - private $projectDir; + private string $projectDir; - /** @var \Ibexa\Contracts\Core\Search\Content\IndexerGateway */ - private $gateway; + private IndexerGateway $gateway; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - private $locationHandler; + private Handler $locationHandler; private ContentIdListGeneratorStrategyInterface $contentIdListGeneratorStrategy; @@ -97,7 +89,7 @@ public function __construct( * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output */ - public function initialize(InputInterface $input, OutputInterface $output) + public function initialize(InputInterface $input, OutputInterface $output): void { parent::initialize($input, $output); if (!$this->searchIndexer instanceof Indexer) { diff --git a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php index 4ad67d87ee..360a32224f 100644 --- a/src/bundle/Core/Command/ResizeOriginalImagesCommand.php +++ b/src/bundle/Core/Command/ResizeOriginalImagesCommand.php @@ -43,32 +43,23 @@ class ResizeOriginalImagesCommand extends Command public const DEFAULT_ITERATION_COUNT = 25; public const DEFAULT_REPOSITORY_USER = 'admin'; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - private $searchService; + private SearchService $searchService; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterManager */ - private $filterManager; + private FilterManager $filterManager; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Symfony\Component\Mime\MimeTypesInterface */ - private $mimeTypes; + private MimeTypesInterface $mimeTypes; - /** @var \Imagine\Image\ImagineInterface */ - private $imagine; + private ImagineInterface $imagine; public function __construct( PermissionResolver $permissionResolver, diff --git a/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php b/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php index 6d0fb9d1e9..eeffcc038d 100644 --- a/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php +++ b/src/bundle/Core/Command/SetSystemContentTypeGroupCommand.php @@ -31,14 +31,11 @@ final class SetSystemContentTypeGroupCommand extends Command { private const DEFAULT_REPOSITORY_USER = 'admin'; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; public function __construct( ContentTypeService $contentTypeService, @@ -52,7 +49,7 @@ public function __construct( $this->userService = $userService; } - protected function configure() + protected function configure(): void { $this ->addArgument('content-type-group-identifier', InputArgument::REQUIRED, 'ContentTypGroup identifier') diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index 4df1cdd56f..8678218b9b 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -48,17 +48,13 @@ class UpdateTimestampsToUTCCommand extends Command /** @var string */ private $mode; - /** @var string */ - private $from; + private ?int $from = null; - /** @var string */ - private $to; + private ?int $to = null; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var string */ - private $phpPath; + private string|bool|null $phpPath = null; /** @var bool */ private $dryRun; @@ -441,7 +437,7 @@ protected function validateTimezone($timezone, OutputInterface $output) * * @return \Symfony\Component\Console\Helper\ProgressBar */ - protected function getProgressBar($maxSteps, OutputInterface $output) + protected function getProgressBar($maxSteps, OutputInterface $output): ProgressBar { $progressBar = new ProgressBar($output, $maxSteps); $progressBar->setFormat( diff --git a/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php b/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php index 134c86acec..74ebc3f41a 100644 --- a/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php +++ b/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php @@ -30,8 +30,7 @@ final class VirtualFieldDuplicateFixCommand extends Command private const DEFAULT_SLEEP = 0; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct( Connection $connection diff --git a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php index be62d4d949..295d4d20ea 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php @@ -19,7 +19,7 @@ */ class BinaryContentDownloadPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->has(ContentDownloadUrlGenerator::class)) { return; @@ -31,7 +31,7 @@ public function process(ContainerBuilder $container) $this->addCall($container, $downloadUrlReference, BinaryFileStorage::class); } - private function addCall(ContainerBuilder $container, Reference $reference, $targetServiceName) + private function addCall(ContainerBuilder $container, Reference $reference, string $targetServiceName): void { if (!$container->has($targetServiceName)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php index 9093bede65..1acf4a1e74 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPass.php @@ -21,7 +21,7 @@ class ChainConfigResolverPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(ChainConfigResolver::class)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php index 5d9c517ddd..af032adef7 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ChainRoutingPass.php @@ -22,7 +22,7 @@ class ChainRoutingPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(ChainRouter::class)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php index af65886591..b1ca64f2ad 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCacheWarmupPass.php @@ -18,7 +18,7 @@ */ class ConsoleCacheWarmupPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { // This pass is CLI only as CLI class cache warmup conflicts with web access, see EZP-29034 if (\PHP_SAPI !== 'cli' || diff --git a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php index 471937ade6..bb7185db59 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ConsoleCommandPass.php @@ -14,7 +14,7 @@ final class ConsoleCommandPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { foreach ($container->findTaggedServiceIds('console.command') as $id => $attributes) { $definition = $container->getDefinition($id); diff --git a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php index 351b49e537..f8492afbcb 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPass.php @@ -24,7 +24,7 @@ class FieldTypeParameterProviderRegistryPass implements CompilerPassInterface * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(ParameterProviderRegistry::class)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php index f21605b412..25ff50e796 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php @@ -19,7 +19,7 @@ class ImaginePass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition('liip_imagine.filter.configuration')) { return; @@ -38,7 +38,7 @@ public function process(ContainerBuilder $container) } } - private function processReduceNoiseFilter(ContainerBuilder $container, $driver) + private function processReduceNoiseFilter(ContainerBuilder $container, string $driver): void { if ($driver === 'imagick') { $container->setAlias('ibexa.image_alias.imagine.filter.reduce_noise', new Alias(ImagickReduceNoiseFilter::class)); @@ -47,7 +47,7 @@ private function processReduceNoiseFilter(ContainerBuilder $container, $driver) } } - private function processSwirlFilter(ContainerBuilder $container, $driver) + private function processSwirlFilter(ContainerBuilder $container, string $driver): void { if ($driver === 'imagick') { $container->setAlias('ibexa.image_alias.imagine.filter.swirl', new Alias(ImagickSwirlFilter::class)); diff --git a/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php b/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php index 9044a3cde7..767c428103 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php @@ -64,7 +64,7 @@ public function process(ContainerBuilder $container): void } } - private function createMetadataDriverDefinition($driverType, $driverPaths): Definition + private function createMetadataDriverDefinition(int|string $driverType, $driverPaths): Definition { $metadataDriver = new Definition("%doctrine.orm.metadata.{$driverType}.class%"); $arguments = []; diff --git a/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php b/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php index bb9f90d91e..6c79354ffa 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/NotificationRendererPass.php @@ -18,7 +18,7 @@ class NotificationRendererPass implements CompilerPassInterface public const TAG_NAME = 'ibexa.notification.renderer'; public const REGISTRY_DEFINITION_ID = 'notification.renderer.registry'; - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->has(self::REGISTRY_DEFINITION_ID)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php index 59d317a6cd..18490fcdbd 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPass.php @@ -18,7 +18,7 @@ class PlaceholderProviderPass implements CompilerPassInterface public const TAG_NAME = 'ibexa.media.images.placeholder.provider'; public const REGISTRY_DEFINITION_ID = PlaceholderProviderRegistry::class; - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(self::REGISTRY_DEFINITION_ID)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php index d5b2d6d372..92c0460218 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPass.php @@ -36,7 +36,7 @@ class RegisterSearchEngineIndexerPass implements CompilerPassInterface * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition($this->factoryId)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php index 99075e7f7b..681940bd79 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePass.php @@ -36,7 +36,7 @@ class RegisterSearchEnginePass implements CompilerPassInterface * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition($this->factoryId)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php index 34adfbacf1..d931d3e6ee 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePass.php @@ -30,7 +30,7 @@ class RegisterStorageEnginePass implements CompilerPassInterface * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(StorageEngineFactory::class)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php index 51cc81949f..66d84e32a6 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/RouterPass.php @@ -19,7 +19,7 @@ */ class RouterPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition('router.default')) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php b/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php index 2177d6b712..d95e0c6a78 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SessionConfigurationPass.php @@ -23,7 +23,7 @@ */ final class SessionConfigurationPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $handlerId = $container->hasParameter('ibexa.session.handler_id') ? $container->getParameter('ibexa.session.handler_id') diff --git a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php index 935d0004e5..7ce284b964 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPass.php @@ -20,12 +20,12 @@ class SlugConverterConfigurationPass implements CompilerPassInterface /** * {@inheritdoc} */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { - if (!$container->has(\Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter::class)) { + if (!$container->has(SlugConverter::class)) { return; } - $slugConverterDefinition = $container->getDefinition(\Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter::class); + $slugConverterDefinition = $container->getDefinition(SlugConverter::class); $parameterConfiguration = $slugConverterDefinition->getArgument(1); $semanticConfiguration = $container->getParameter('ibexa.url_alias.slug_converter'); diff --git a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php index 4974ebfa15..85c081032a 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/StorageConnectionPass.php @@ -17,7 +17,7 @@ */ class StorageConnectionPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $taggedServiceIds = $container->findTaggedServiceIds( RegisterStorageEnginePass::STORAGE_ENGINE_TAG diff --git a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php index 243a7062b4..4e837dcfb9 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php @@ -36,7 +36,7 @@ class TranslationCollectorPass implements CompilerPassInterface 'ru_RU' => 'ru', ]; - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition('translator.default')) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php index e02fedab63..253309471f 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/URLHandlerPass.php @@ -21,7 +21,7 @@ class URLHandlerPass implements CompilerPassInterface /** * {@inheritdoc} */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(URLHandlerRegistry::class)) { return; diff --git a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php index ca0bb62309..4ab49e8f40 100644 --- a/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php +++ b/src/bundle/Core/DependencyInjection/Compiler/ViewProvidersPass.php @@ -25,7 +25,7 @@ class ViewProvidersPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $rawViewProviders = []; foreach ($container->findTaggedServiceIds(self::VIEW_PROVIDER_TAG) as $serviceId => $tags) { diff --git a/src/bundle/Core/DependencyInjection/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration.php index 57dc11ae77..e0fa827d4a 100644 --- a/src/bundle/Core/DependencyInjection/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration.php @@ -12,23 +12,21 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Configuration as SiteAccessConfiguration; use Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; +use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; class Configuration extends SiteAccessConfiguration { public const CUSTOM_TAG_ATTRIBUTE_TYPES = ['number', 'string', 'boolean', 'choice']; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface */ - private $mainSiteAccessConfigParser; + private ParserInterface $mainSiteAccessConfigParser; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\RepositoryConfigParserInterface */ - private $mainRepositoryConfigParser; + private RepositoryConfigParserInterface $mainRepositoryConfigParser; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollectorInterface */ - private $suggestionCollector; + private SuggestionCollectorInterface $suggestionCollector; /** @var \Ibexa\Bundle\Core\SiteAccess\SiteAccessConfigurationFilter[] */ - private $siteAccessConfigurationFilters; + private ?array $siteAccessConfigurationFilters = null; public function __construct( ParserInterface $mainConfigParser, @@ -40,7 +38,7 @@ public function __construct( $this->suggestionCollector = $suggestionCollector; } - public function setSiteAccessConfigurationFilters(array $filters) + public function setSiteAccessConfigurationFilters(array $filters): void { $this->siteAccessConfigurationFilters = $filters; } @@ -73,7 +71,7 @@ public function getConfigTreeBuilder(): TreeBuilder return $treeBuilder; } - public function addRepositoriesSection(ArrayNodeDefinition $rootNode) + public function addRepositoriesSection(ArrayNodeDefinition $rootNode): void { $repositoriesNode = $rootNode ->children() @@ -153,7 +151,7 @@ static function ($v) { ); } - public function addSiteaccessSection(ArrayNodeDefinition $rootNode) + public function addSiteaccessSection(ArrayNodeDefinition $rootNode): void { $rootNode ->children() @@ -204,7 +202,7 @@ public function addSiteaccessSection(ArrayNodeDefinition $rootNode) ->useAttributeAsKey('key') ->beforeNormalization() ->always( - static function ($v) { + static function ($v): array { // Value passed to the matcher should always be an array. // If value is not an array, we transform it to a hash, with 'value' as key. if (!is_array($v)) { @@ -253,7 +251,7 @@ static function ($v) { ->end(); } - private function addImageMagickSection(ArrayNodeDefinition $rootNode) + private function addImageMagickSection(ArrayNodeDefinition $rootNode): void { $filtersInfo = <<end(); } - private function addHttpCacheSection(ArrayNodeDefinition $rootNode) + private function addHttpCacheSection(ArrayNodeDefinition $rootNode): void { $purgeTypeInfo = <<end(); } - private function addRouterSection(ArrayNodeDefinition $rootNode) + private function addRouterSection(ArrayNodeDefinition $rootNode): void { $nonSAAwareInfo = <<children() @@ -466,7 +464,7 @@ private function addUrlAliasSection(ArrayNodeDefinition $rootNode) * * @return \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition */ - private function addUrlWildcardsSection($rootNode): ArrayNodeDefinition + private function addUrlWildcardsSection(NodeDefinition $rootNode): ArrayNodeDefinition { return $rootNode ->children() @@ -501,7 +499,7 @@ private function addUrlWildcardsSection($rootNode): ArrayNodeDefinition * * @return \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition */ - private function addOrmSection($rootNode): ArrayNodeDefinition + private function addOrmSection(NodeDefinition $rootNode): ArrayNodeDefinition { return $rootNode ->children() @@ -546,7 +544,7 @@ private function addOrmSection($rootNode): ArrayNodeDefinition * * @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $rootNode */ - private function addUITranslationsSection($rootNode): ArrayNodeDefinition + private function addUITranslationsSection(NodeDefinition $rootNode): ArrayNodeDefinition { return $rootNode ->children() diff --git a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php index ffdb5e1c9b..42a6c2a3aa 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php @@ -25,7 +25,7 @@ class ChainConfigResolver implements ConfigResolverInterface * @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $resolver * @param int $priority */ - public function addResolver(ConfigResolverInterface $resolver, $priority = 0) + public function addResolver(ConfigResolverInterface $resolver, $priority = 0): void { $priority = (int)$priority; if (!isset($this->resolvers[$priority])) { @@ -54,7 +54,7 @@ public function getAllResolvers() * * @return \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface[] */ - protected function sortResolvers() + protected function sortResolvers(): array { $sortedResolvers = []; krsort($this->resolvers); diff --git a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php index 29f5380c6f..fb02f438c5 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParser.php @@ -13,10 +13,8 @@ class ComplexSettingParser extends DynamicSettingParser implements ComplexSettin { /** * Regular expression that matches a dynamic variable. - * - * @var string */ - private $dynamicSettingRegex; + private string $dynamicSettingRegex; public function __construct() { diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php index bc5661c4b6..7e0c2b55b0 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php @@ -18,7 +18,7 @@ class ConfigParser implements ParserInterface { /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface[] */ - private $configParsers; + private array $configParsers; public function __construct(array $configParsers = []) { @@ -38,7 +38,7 @@ public function __construct(array $configParsers = []) /** * @param \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface[] $configParsers */ - public function setConfigParsers($configParsers) + public function setConfigParsers($configParsers): void { $this->configParsers = $configParsers; } @@ -51,28 +51,28 @@ public function getConfigParsers() return $this->configParsers; } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { foreach ($this->configParsers as $parser) { $parser->mapConfig($scopeSettings, $currentScope, $contextualizer); } } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { foreach ($this->configParsers as $parser) { $parser->preMap($config, $contextualizer); } } - public function postMap(array $config, ContextualizerInterface $contextualizer) + public function postMap(array $config, ContextualizerInterface $contextualizer): void { foreach ($this->configParsers as $parser) { $parser->postMap($config, $contextualizer); } } - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $fieldTypeNodeBuilder = $nodeBuilder ->arrayNode('fieldtypes') diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php index c37bc42310..ae3d36ba5c 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php @@ -46,11 +46,10 @@ class ConfigResolver implements VersatileScopeInterface, SiteAccessAware /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ protected $siteAccess; - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected LoggerInterface $logger; /** @var array Siteaccess groups, indexed by siteaccess name */ - protected $groupsBySiteAccess; + protected array $groupsBySiteAccess; /** @var string */ protected $defaultNamespace; @@ -62,7 +61,7 @@ class ConfigResolver implements VersatileScopeInterface, SiteAccessAware protected $undefinedStrategy; /** @var array[] List of blame => [params] loaded while siteAccess->matchingType was 'uninitialized' */ - private $tooEarlyLoadedList = []; + private array $tooEarlyLoadedList = []; /** * @param \Psr\Log\LoggerInterface|null $logger @@ -87,7 +86,7 @@ public function __construct( $this->undefinedStrategy = $undefinedStrategy; } - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { $this->siteAccess = $siteAccess; } @@ -102,7 +101,7 @@ public function setSiteAccess(SiteAccess $siteAccess = null) * * @param int $undefinedStrategy */ - public function setUndefinedStrategy($undefinedStrategy) + public function setUndefinedStrategy($undefinedStrategy): void { $this->undefinedStrategy = $undefinedStrategy; } @@ -229,7 +228,7 @@ public function setDefaultScope(string $scope): void } } - private function warnAboutTooEarlyLoadedParams() + private function warnAboutTooEarlyLoadedParams(): void { if (empty($this->tooEarlyLoadedList)) { return; @@ -255,7 +254,7 @@ private function warnAboutTooEarlyLoadedParams() * * @return string */ - private function logTooEarlyLoadedListIfNeeded($paramName) + private function logTooEarlyLoadedListIfNeeded(string $paramName): void { if ($this->container instanceof ContainerBuilder) { return; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php index 9ccfa5128b..906ef27708 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ContainerConfigResolver.php @@ -16,11 +16,9 @@ abstract class ContainerConfigResolver implements ConfigResolverInterface { protected ContainerInterface $container; - /** @var string */ - private $scope; + private string $scope; - /** @var string */ - private $defaultNamespace; + private string $defaultNamespace; public function __construct(ContainerInterface $container, string $scope, string $defaultNamespace) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php index 1ca3e12d83..e52d8b5176 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessConfigResolver.php @@ -12,11 +12,11 @@ use Ibexa\Core\MVC\Symfony\Configuration\VersatileScopeInterface; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessAware; +use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface; abstract class SiteAccessConfigResolver implements VersatileScopeInterface, SiteAccessAware { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface */ - protected $siteAccessProvider; + protected SiteAccessProviderInterface $siteAccessProvider; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ protected $currentSiteAccess; @@ -24,11 +24,10 @@ abstract class SiteAccessConfigResolver implements VersatileScopeInterface, Site /** @var string */ protected $defaultScope; - /** @var string */ - protected $defaultNamespace; + protected string $defaultNamespace; public function __construct( - SiteAccess\SiteAccessProviderInterface $siteAccessProvider, + SiteAccessProviderInterface $siteAccessProvider, string $defaultNamespace ) { $this->siteAccessProvider = $siteAccessProvider; diff --git a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php index 32dba952a7..63a21793ef 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolver.php @@ -21,7 +21,7 @@ class SiteAccessGroupConfigResolver extends SiteAccessConfigResolver protected ContainerInterface $container; /** @var string[][] */ - protected $siteAccessGroups; + protected array $siteAccessGroups; public function __construct( ContainerInterface $container, diff --git a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php index c5a3451a45..e6a17c1256 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Configuration/ContainerConfigBuilder.php @@ -11,8 +11,7 @@ abstract class ContainerConfigBuilder implements ConfigBuilderInterface { - /** @var \Symfony\Component\DependencyInjection\ContainerBuilder */ - protected $containerBuilder; + protected ContainerBuilder $containerBuilder; public function __construct(ContainerBuilder $containerBuilder) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php index ddaf1fc56c..ab4626ee93 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php @@ -22,7 +22,7 @@ abstract class AbstractFieldTypeParser extends AbstractParser implements FieldTy * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $fieldTypeNodeBuilder = $nodeBuilder->arrayNode($this->getFieldTypeIdentifier())->children(); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php index 39466ee876..ffedeba47a 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php @@ -102,12 +102,12 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder): void ->end(); } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { $contextualizer->mapConfigArray('session', $config); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { if (isset($scopeSettings['repository'])) { $contextualizer->setContextualParameter('repository', $currentScope, $scopeSettings['repository']); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php index 629ec24275..fc86ce6ece 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php @@ -21,7 +21,7 @@ class Content extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('content') @@ -48,7 +48,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { if (!empty($scopeSettings['content'])) { if (isset($scopeSettings['content']['view_cache'])) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php index 8c1c422b48..a4cacb3c3d 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php @@ -15,15 +15,14 @@ class IO extends AbstractParser { - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParserInterface */ - private $complexSettingParser; + private ComplexSettingParserInterface $complexSettingParser; public function __construct(ComplexSettingParserInterface $complexSettingParser) { $this->complexSettingParser = $complexSettingParser; } - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('io') @@ -56,7 +55,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { if (!isset($scopeSettings['io'])) { return; @@ -85,7 +84,7 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn /** * Post process configuration to add io_root_dir and io_prefix. */ - public function postMap(array $config, ContextualizerInterface $contextualizer) + public function postMap(array $config, ContextualizerInterface $contextualizer): void { $container = $contextualizer->getContainer(); @@ -100,7 +99,7 @@ public function postMap(array $config, ContextualizerInterface $contextualizer) /** * Applies dependencies of complex $parameter in $scope. */ - private function addComplexParametersDependencies($parameter, $scope, ContainerBuilder $container) + private function addComplexParametersDependencies(string $parameter, $scope, ContainerBuilder $container): void { // The complex setting exists in this scope, we don't need to do anything if ($container->hasParameter("ibexa.site_access.config.$scope.$parameter")) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php index f58a18bd94..c44b3f8ea3 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php @@ -21,7 +21,7 @@ class Image extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('image_variations') @@ -75,7 +75,7 @@ static function ($v): bool { } ) ->then( - static function ($v) { + static function (array $v) { // If we have the "params" key, just use the value. return $v['params']; } @@ -105,7 +105,7 @@ static function ($v) { ->end(); } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { $contextualizer->mapConfigArray('image_variations', $config); $contextualizer->mapSetting('image_host', $config); diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php index c0779fea1f..3ffd44a0a1 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php @@ -20,7 +20,7 @@ class Languages extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('languages') @@ -36,7 +36,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { $contextualizer->mapConfigArray('languages', $config, ContextualizerInterface::UNIQUE); $contextualizer->mapConfigArray('translation_siteaccesses', $config, ContextualizerInterface::UNIQUE); @@ -47,7 +47,7 @@ public function preMap(array $config, ContextualizerInterface $contextualizer) } } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { $container = $contextualizer->getContainer(); if ($container->hasParameter("ibexa.site_access.config.$currentScope.languages")) { @@ -59,7 +59,7 @@ public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerIn } } - public function postMap(array $config, ContextualizerInterface $contextualizer) + public function postMap(array $config, ContextualizerInterface $contextualizer): void { $contextualizer->getContainer()->setParameter( 'ibexa.site_access.by_language', diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php index b7b13c07a8..4b0264a3a1 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/LocationView.php @@ -15,7 +15,7 @@ class LocationView extends View public const NODE_KEY = 'location_view'; public const INFO = 'Template selection settings when displaying a location. Deprecated from 5.4.5/2015.09, use content_view instead.'; - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { $scopes = array_merge( [ConfigResolver::SCOPE_GLOBAL], diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php index b287780e67..0e5bc95271 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php @@ -18,7 +18,7 @@ class Templates extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode(static::NODE_KEY) @@ -37,7 +37,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { foreach ($config['siteaccess']['groups'] as $group => $saArray) { if (!empty($config[$contextualizer->getSiteAccessNodeName()][$group][static::NODE_KEY])) { @@ -52,7 +52,7 @@ public function preMap(array $config, ContextualizerInterface $contextualizer) $contextualizer->mapConfigArray(static::NODE_KEY, $config); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { // Nothing to do here. } diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php index 17109a37e0..27e9dc5150 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php @@ -14,7 +14,7 @@ final class TwigVariablesParser extends AbstractParser { - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('twig_variables') @@ -36,7 +36,7 @@ public function mapConfig( array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer - ) { + ): void { if (!empty($scopeSettings['twig_variables'])) { $settings = $scopeSettings['twig_variables']; diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php index 52432524a4..e399d3f675 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php @@ -13,7 +13,7 @@ class UrlChecker extends AbstractParser { - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('url_checker') @@ -27,7 +27,7 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { if (isset($scopeSettings['url_checker']) && !empty($scopeSettings['url_checker']['handlers'])) { foreach ($scopeSettings['url_checker']['handlers'] as $name => $options) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php index c3a60c72b8..d72a2bd91f 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php @@ -32,7 +32,7 @@ final class UserContentTypeIdentifier extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode('user_content_type_identifier') diff --git a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php index 485c51ab0e..19fe302a8e 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Parser/View.php @@ -18,7 +18,7 @@ class View extends AbstractParser * * @param \Symfony\Component\Config\Definition\Builder\NodeBuilder $nodeBuilder Node just under ezpublish.system. */ - public function addSemanticConfig(NodeBuilder $nodeBuilder) + public function addSemanticConfig(NodeBuilder $nodeBuilder): void { $nodeBuilder ->arrayNode(static::NODE_KEY) @@ -69,12 +69,12 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder) ->end(); } - public function preMap(array $config, ContextualizerInterface $contextualizer) + public function preMap(array $config, ContextualizerInterface $contextualizer): void { $contextualizer->mapConfigArray(static::NODE_KEY, $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); } - public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) + public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void { // Nothing to do here. } diff --git a/src/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParser.php b/src/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParser.php index d0954f0a86..a8649186f9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/RepositoryConfigParser.php @@ -14,7 +14,7 @@ final class RepositoryConfigParser implements RepositoryConfigParserInterface { /** @var iterable<\Ibexa\Bundle\Core\DependencyInjection\Configuration\RepositoryConfigParserInterface> */ - private $configParsers; + private iterable $configParsers; /** * @param \Ibexa\Bundle\Core\DependencyInjection\Configuration\RepositoryConfigParserInterface[] $configParsers diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php index eb7aeaeaa3..d6faaf30c6 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Configuration.php @@ -40,7 +40,7 @@ abstract class Configuration implements ConfigurationInterface * * @return \Symfony\Component\Config\Definition\Builder\NodeBuilder */ - public function generateScopeBaseNode(ArrayNodeDefinition $rootNode, $scopeNodeName = 'system') + public function generateScopeBaseNode(ArrayNodeDefinition $rootNode, string $scopeNodeName = 'system') { $contextNode = $rootNode ->children() diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php index f08c94117f..b3c8d89309 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php @@ -61,7 +61,7 @@ public function __construct(ContainerInterface $containerBuilder, $namespace, $s * * @param string[] $availableSiteAccesses */ - public static function setAvailableSiteAccesses(array $availableSiteAccesses) + public static function setAvailableSiteAccesses(array $availableSiteAccesses): void { static::$availableSiteAccesses = $availableSiteAccesses; } @@ -74,7 +74,7 @@ public static function setAvailableSiteAccesses(array $availableSiteAccesses) * * @param array $groupsBySiteAccess Registered scope groups names, indexed by scope. */ - public static function setGroupsBySiteAccess(array $groupsBySiteAccess) + public static function setGroupsBySiteAccess(array $groupsBySiteAccess): void { static::$groupsBySiteAccess = $groupsBySiteAccess; } @@ -83,7 +83,7 @@ public static function setGroupsBySiteAccess(array $groupsBySiteAccess) * @param array> $availableSiteAccessGroups keys are Site Access group names and values are * an array of Site Access name which belongs to this group */ - public static function setAvailableSiteAccessGroups(array $availableSiteAccessGroups) + public static function setAvailableSiteAccessGroups(array $availableSiteAccessGroups): void { static::$availableSiteAccessGroups = $availableSiteAccessGroups; } @@ -102,7 +102,7 @@ public static function setAvailableSiteAccessGroups(array $availableSiteAccessGr * * @throws \InvalidArgumentException */ - public function mapConfig(array $config, $mapper) + public function mapConfig(array $config, $mapper): void { $mapperCallable = is_callable($mapper); if (!$mapperCallable && !$mapper instanceof ConfigurationMapperInterface) { @@ -135,7 +135,7 @@ public function mapConfig(array $config, $mapper) * @param string $id Id of the setting to map. * @param array $config Full semantic configuration array for current bundle. */ - public function mapSetting($id, array $config) + public function mapSetting($id, array $config): void { $this->contextualizer->mapSetting($id, $config); } @@ -149,7 +149,7 @@ public function mapSetting($id, array $config) * @param array $config Full semantic configuration array for current bundle. * @param int $options Bit mask of options (See constants of `ContextualizerInterface`) */ - public function mapConfigArray($id, array $config, $options = 0) + public function mapConfigArray($id, array $config, $options = 0): void { $this->contextualizer->mapConfigArray($id, $config, $options); } @@ -165,7 +165,7 @@ public function mapConfigArray($id, array $config, $options = 0) * * @return \Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface */ - protected function buildContextualizer(ContainerInterface $containerBuilder, $namespace, $siteAccessNodeName) + protected function buildContextualizer(ContainerInterface $containerBuilder, $namespace, $siteAccessNodeName): Contextualizer { return new Contextualizer( $containerBuilder, @@ -180,7 +180,7 @@ protected function buildContextualizer(ContainerInterface $containerBuilder, $na /** * @param \Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface $contextualizer */ - public function setContextualizer(ContextualizerInterface $contextualizer) + public function setContextualizer(ContextualizerInterface $contextualizer): void { $this->contextualizer = $contextualizer; } diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php index 1ab945571d..4d1829cf1c 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php @@ -12,8 +12,7 @@ class Contextualizer implements ContextualizerInterface { - /** @var \Symfony\Component\DependencyInjection\ContainerInterface */ - private $container; + private ContainerInterface $container; /** @var string */ private $namespace; @@ -25,14 +24,11 @@ class Contextualizer implements ContextualizerInterface */ private $siteAccessNodeName; - /** @var array */ - private $availableSiteAccesses; + private array $availableSiteAccesses; - /** @var array */ - private $availableSiteAccessGroups; + private array $availableSiteAccessGroups; - /** @var array */ - private $groupsBySiteAccess; + private array $groupsBySiteAccess; public function __construct( ContainerInterface $containerBuilder, @@ -50,12 +46,12 @@ public function __construct( $this->groupsBySiteAccess = $groupsBySiteAccess; } - public function setContextualParameter($parameterName, $scope, $value) + public function setContextualParameter($parameterName, $scope, $value): void { $this->container->setParameter("$this->namespace.$scope.$parameterName", $value); } - public function mapSetting($id, array $config) + public function mapSetting($id, array $config): void { foreach ($config[$this->siteAccessNodeName] as $currentScope => $scopeSettings) { if (isset($scopeSettings[$id])) { @@ -64,7 +60,7 @@ public function mapSetting($id, array $config) } } - public function mapConfigArray($id, array $config, $options = 0) + public function mapConfigArray($id, array $config, $options = 0): void { $this->mapReservedScopeArray($id, $config, ConfigResolver::SCOPE_DEFAULT); $this->mapReservedScopeArray($id, $config, ConfigResolver::SCOPE_GLOBAL); @@ -157,7 +153,7 @@ protected function getContainerParameter($id, $default = null) * * @return array */ - private function groupsArraySetting(array $groups, $id, array $config, $options = 0) + private function groupsArraySetting(array $groups, $id, array $config, int $options = 0): array { $groupsSettings = []; sort($groups); @@ -197,7 +193,7 @@ private function groupsArraySetting(array $groups, $id, array $config, $options * @param string $id * @param string $scope */ - private function mapReservedScopeArray($id, array $config, $scope) + private function mapReservedScopeArray($id, array $config, string $scope): void { if ( isset($config[$this->siteAccessNodeName][$scope][$id]) @@ -215,7 +211,7 @@ private function mapReservedScopeArray($id, array $config, $scope) } } - public function setContainer(ContainerInterface $container) + public function setContainer(ContainerInterface $container): void { $this->container = $container; } @@ -225,7 +221,7 @@ public function getContainer() return $this->container; } - public function setSiteAccessNodeName($scopeNodeName) + public function setSiteAccessNodeName($scopeNodeName): void { $this->siteAccessNodeName = $scopeNodeName; } @@ -235,7 +231,7 @@ public function getSiteAccessNodeName() return $this->siteAccessNodeName; } - public function setNamespace($namespace) + public function setNamespace($namespace): void { $this->namespace = $namespace; } @@ -245,7 +241,7 @@ public function getNamespace() return $this->namespace; } - public function setAvailableSiteAccesses(array $availableSiteAccesses) + public function setAvailableSiteAccesses(array $availableSiteAccesses): void { $this->availableSiteAccesses = $availableSiteAccesses; } @@ -255,7 +251,7 @@ public function getAvailableSiteAccesses() return $this->availableSiteAccesses; } - public function setGroupsBySiteAccess(array $groupsBySiteAccess) + public function setGroupsBySiteAccess(array $groupsBySiteAccess): void { $this->groupsBySiteAccess = $groupsBySiteAccess; } diff --git a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php index cc8a5d3cb2..10f4e79cb9 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php +++ b/src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParser.php @@ -11,7 +11,7 @@ class DynamicSettingParser implements DynamicSettingParserInterface { - public function isDynamicSetting($setting) + public function isDynamicSetting($setting): bool { // Checks if $setting begins and ends with appropriate delimiter. return @@ -22,7 +22,7 @@ public function isDynamicSetting($setting) && substr_count($setting, static::INNER_DELIMITER) <= 2; } - public function parseDynamicSetting($setting) + public function parseDynamicSetting($setting): array { $params = explode(static::INNER_DELIMITER, $this->removeBoundaryDelimiter($setting)); if (count($params) > 3) { diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php index c6c98e949d..6dc8b1b961 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php @@ -12,14 +12,14 @@ class SuggestionCollector implements SuggestionCollectorInterface { /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion[] */ - private $suggestions = []; + private array $suggestions = []; /** * Adds a config suggestion to the list. * * @param \Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\ConfigSuggestion $suggestion */ - public function addSuggestion(ConfigSuggestion $suggestion) + public function addSuggestion(ConfigSuggestion $suggestion): void { $this->suggestions[] = $suggestion; } diff --git a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php index f64c5ca1cd..065a0376cb 100644 --- a/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php +++ b/src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php @@ -24,10 +24,8 @@ class ConfigSuggestion /** * Suggested semantic configuration. * Hash as been used with Symfony Config component. - * - * @var array */ - private $suggestion; + private array $suggestion; /** @var bool */ private $mandatory; @@ -42,7 +40,7 @@ public function __construct($message = null, array $suggestion = [], $mandatory /** * @param string $message */ - public function setMessage($message) + public function setMessage($message): void { $this->message = $message; } @@ -58,7 +56,7 @@ public function getMessage() /** * @param array $suggestion */ - public function setSuggestion(array $suggestion) + public function setSuggestion(array $suggestion): void { $this->suggestion = $suggestion; } @@ -74,7 +72,7 @@ public function getSuggestion() /** * @param bool $mandatory */ - public function setMandatory($mandatory) + public function setMandatory($mandatory): void { $this->mandatory = $mandatory; } diff --git a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php index 9a152a16c1..c6f4f79ebd 100644 --- a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php +++ b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php @@ -50,34 +50,29 @@ class IbexaCoreExtension extends Extension implements PrependExtensionInterface private const DEBUG_PARAM = 'kernel.debug'; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\Suggestion\Collector\SuggestionCollector */ - private $suggestionCollector; + private SuggestionCollector $suggestionCollector; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface */ - private $mainConfigParser; + private ?ConfigParser $mainConfigParser = null; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\RepositoryConfigParser */ - private $mainRepositoryConfigParser; + private ?RepositoryConfigParser $mainRepositoryConfigParser = null; /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface[] */ - private $siteAccessConfigParsers; + private array $siteAccessConfigParsers; /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\RepositoryConfigParserInterface[] */ - private $repositoryConfigParsers = []; + private array $repositoryConfigParsers = []; /** @var \Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface[] */ - private $policyProviders = []; + private array $policyProviders = []; /** * Holds a collection of YAML files, as an array with directory path as a * key to the array of contained file names. - * - * @var array */ - private $defaultSettingsCollection = []; + private array $defaultSettingsCollection = []; /** @var \Ibexa\Bundle\Core\SiteAccess\SiteAccessConfigurationFilter[] */ - private $siteaccessConfigurationFilters = []; + private array $siteaccessConfigurationFilters = []; public function __construct(array $siteAccessConfigParsers = [], array $repositoryConfigParsers = []) { @@ -249,7 +244,7 @@ private function handleDefaultSettingsLoading(ContainerBuilder $container): void } } - private function registerRepositoriesConfiguration(array $config, ContainerBuilder $container) + private function registerRepositoriesConfiguration(array $config, ContainerBuilder $container): void { if (!isset($config['repositories'])) { $config['repositories'] = []; @@ -264,7 +259,7 @@ private function registerRepositoriesConfiguration(array $config, ContainerBuild $container->setParameter('ibexa.repositories', $config['repositories']); } - private function registerSiteAccessConfiguration(array $config, ContainerBuilder $container) + private function registerSiteAccessConfiguration(array $config, ContainerBuilder $container): void { if (!isset($config['siteaccess'])) { $config['siteaccess'] = []; @@ -318,7 +313,7 @@ private function registerUITranslationsConfiguration(array $config, ContainerBui * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleRouting(array $config, ContainerBuilder $container, FileLoader $loader) + private function handleRouting(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('routing.yml'); $container->setAlias('router', ChainRouter::class); @@ -395,7 +390,7 @@ private function handleApiLoading(ContainerBuilder $container, FileLoader $loade * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleTemplating(ContainerBuilder $container, FileLoader $loader) + private function handleTemplating(ContainerBuilder $container, FileLoader $loader): void { $loader->load('templating.yml'); } @@ -406,7 +401,7 @@ private function handleTemplating(ContainerBuilder $container, FileLoader $loade * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleSessionLoading(ContainerBuilder $container, FileLoader $loader) + private function handleSessionLoading(ContainerBuilder $container, FileLoader $loader): void { $loader->load('session.yml'); } @@ -420,7 +415,7 @@ private function handleSessionLoading(ContainerBuilder $container, FileLoader $l * * @throws \InvalidArgumentException */ - private function handleCache(array $config, ContainerBuilder $container, FileLoader $loader) + private function handleCache(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('cache.yml'); @@ -446,7 +441,7 @@ private function handleCache(array $config, ContainerBuilder $container, FileLoa * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader) + private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('locale.yml'); $container->setParameter( @@ -462,7 +457,7 @@ private function handleLocale(array $config, ContainerBuilder $container, FileLo * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleHelpers(array $config, ContainerBuilder $container, FileLoader $loader) + private function handleHelpers(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('helpers.yml'); } @@ -472,7 +467,7 @@ private function handleHelpers(array $config, ContainerBuilder $container, FileL * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleImage(array $config, ContainerBuilder $container, FileLoader $loader) + private function handleImage(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('image.yml'); @@ -490,12 +485,12 @@ private function handleImage(array $config, ContainerBuilder $container, FileLoa $container->setParameter('ibexa.io.images.alias.placeholder_provider', $providers); } - private function handleUrlChecker($config, ContainerBuilder $container, FileLoader $loader) + private function handleUrlChecker(array $config, ContainerBuilder $container, FileLoader $loader): void { $loader->load('url_checker.yml'); } - private function buildPolicyMap(ContainerBuilder $container) + private function buildPolicyMap(ContainerBuilder $container): void { $policiesBuilder = new PoliciesConfigBuilder($container); foreach ($this->policyProviders as $provider) { @@ -519,7 +514,7 @@ private function buildPolicyMap(ContainerBuilder $container) * * @param \Ibexa\Bundle\Core\DependencyInjection\Security\PolicyProvider\PolicyProviderInterface $policyProvider */ - public function addPolicyProvider(PolicyProviderInterface $policyProvider) + public function addPolicyProvider(PolicyProviderInterface $policyProvider): void { $this->policyProviders[] = $policyProvider; } @@ -540,7 +535,7 @@ public function addPolicyProvider(PolicyProviderInterface $policyProvider) * * @param \Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface $configParser */ - public function addConfigParser(ParserInterface $configParser) + public function addConfigParser(ParserInterface $configParser): void { $this->siteAccessConfigParsers[] = $configParser; } @@ -570,12 +565,12 @@ public function addRepositoryConfigParser(RepositoryConfigParserInterface $confi * @param string $fileLocation * @param array $files */ - public function addDefaultSettings($fileLocation, array $files) + public function addDefaultSettings($fileLocation, array $files): void { $this->defaultSettingsCollection[$fileLocation] = $files; } - public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $filter) + public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $filter): void { $this->siteaccessConfigurationFilters[] = $filter; } @@ -584,7 +579,7 @@ public function addSiteAccessConfigurationFilter(SiteAccessConfigurationFilter $ * @param array $config * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - private function registerUrlAliasConfiguration(array $config, ContainerBuilder $container) + private function registerUrlAliasConfiguration(array $config, ContainerBuilder $container): void { if (!isset($config['url_alias'])) { $config['url_alias'] = ['slug_converter' => []]; @@ -596,7 +591,7 @@ private function registerUrlAliasConfiguration(array $config, ContainerBuilder $ /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - private function prependTranslatorConfiguration(ContainerBuilder $container) + private function prependTranslatorConfiguration(ContainerBuilder $container): void { if (!$container->hasExtension('framework')) { return; @@ -679,7 +674,7 @@ private function registerUrlWildcardsConfiguration(array $config, ContainerBuild * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader */ - private function handleUrlWildcards(array $config, ContainerBuilder $container, Loader\YamlFileLoader $loader) + private function handleUrlWildcards(array $config, ContainerBuilder $container, Loader\YamlFileLoader $loader): void { if ($container->getParameter('ibexa.url_wildcards.enabled')) { $loader->load('url_wildcard.yml'); diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php index 3cff590d2a..cbab1ce842 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php @@ -12,7 +12,7 @@ class PoliciesConfigBuilder extends ContainerConfigBuilder { - public function addConfig(array $config) + public function addConfig(array $config): void { $previousPolicyMap = []; @@ -39,7 +39,7 @@ public function addConfig(array $config) ); } - public function addResource(ResourceInterface $resource) + public function addResource(ResourceInterface $resource): void { $this->containerBuilder->addResource($resource); } @@ -53,7 +53,7 @@ public function addResource(ResourceInterface $resource) * * @return bool */ - private function policyExists(array $policyMap, $module, $function): bool + private function policyExists(array $policyMap, int|string $module, $function): bool { return array_key_exists($module, $policyMap) && array_key_exists($function, $policyMap[$module]); } diff --git a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php index 53c2160ac5..858b2d082c 100644 --- a/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php +++ b/src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php @@ -16,7 +16,7 @@ */ abstract class YamlPolicyProvider implements PolicyProviderInterface { - public function addPolicies(ConfigBuilderInterface $configBuilder) + public function addPolicies(ConfigBuilderInterface $configBuilder): void { $policiesConfig = []; foreach ($this->getFiles() as $file) { diff --git a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php index 5301a1a020..398ee3311c 100644 --- a/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php +++ b/src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\Location; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; @@ -26,11 +27,9 @@ class BackgroundIndexingTerminateListener implements BackgroundIndexerInterface, { use LoggerAwareTrait; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var \Ibexa\Contracts\Core\Search\Handler */ - protected $searchHandler; + protected SearchHandler $searchHandler; /** @var \Ibexa\Contracts\Core\Persistence\Content\ContentInfo[] */ protected $contentInfo = []; @@ -56,7 +55,7 @@ public static function getSubscribedEvents(): array /** * {@inheritdoc} */ - public function registerContent(ContentInfo $contentInfo) + public function registerContent(ContentInfo $contentInfo): void { $this->contentInfo[] = $contentInfo; } @@ -64,12 +63,12 @@ public function registerContent(ContentInfo $contentInfo) /** * {@inheritdoc} */ - public function registerLocation(Location $location) + public function registerLocation(Location $location): void { $this->locations[] = $location; } - public function reindex() + public function reindex(): void { $contentHandler = $this->persistenceHandler->contentHandler(); $contentIndexed = []; diff --git a/src/bundle/Core/EventListener/CacheViewResponseListener.php b/src/bundle/Core/EventListener/CacheViewResponseListener.php index 07104ce4a7..ef7d0b4e94 100644 --- a/src/bundle/Core/EventListener/CacheViewResponseListener.php +++ b/src/bundle/Core/EventListener/CacheViewResponseListener.php @@ -20,8 +20,7 @@ */ class CacheViewResponseListener implements EventSubscriberInterface { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct(ConfigResolverInterface $configResolver) { @@ -33,7 +32,7 @@ public static function getSubscribedEvents(): array return [KernelEvents::RESPONSE => 'configureCache']; } - public function configureCache(ResponseEvent $event) + public function configureCache(ResponseEvent $event): void { if (!($view = $event->getRequest()->attributes->get('view')) instanceof CachableView) { return; diff --git a/src/bundle/Core/EventListener/ConfigScopeListener.php b/src/bundle/Core/EventListener/ConfigScopeListener.php index f9c9088a47..bd381605c9 100644 --- a/src/bundle/Core/EventListener/ConfigScopeListener.php +++ b/src/bundle/Core/EventListener/ConfigScopeListener.php @@ -18,13 +18,13 @@ class ConfigScopeListener implements EventSubscriberInterface, ConfigScopeChangeSubscriber { /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface[] */ - private $configResolvers; + private iterable $configResolvers; /** @var \Ibexa\Core\MVC\Symfony\View\ViewManagerInterface|\Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessAware */ - private $viewManager; + private ViewManagerInterface $viewManager; /** @var \Ibexa\Core\MVC\Symfony\View\ViewProvider[]|\Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessAware[] */ - private $viewProviders; + private ?array $viewProviders = null; public function __construct( iterable $configResolvers, @@ -66,7 +66,7 @@ public function onConfigScopeChange(ScopeChangeEvent $event): void /** * Sets the complete list of view providers. */ - public function setViewProviders(array $viewProviders) + public function setViewProviders(array $viewProviders): void { $this->viewProviders = $viewProviders; } diff --git a/src/bundle/Core/EventListener/ConsoleCommandListener.php b/src/bundle/Core/EventListener/ConsoleCommandListener.php index a1b4cfba7b..f57b4e8f0a 100644 --- a/src/bundle/Core/EventListener/ConsoleCommandListener.php +++ b/src/bundle/Core/EventListener/ConsoleCommandListener.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\MVCEvents; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessAware; +use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface; use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -19,24 +20,19 @@ class ConsoleCommandListener implements EventSubscriberInterface, SiteAccessAware { - /** @var string */ - private $defaultSiteAccessName; + private string $defaultSiteAccessName; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface */ - private $siteAccessProvider; + private SiteAccessProviderInterface $siteAccessProvider; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess|null */ - private $siteAccess; + private ?SiteAccess $siteAccess = null; - /** @var bool */ - private $debug; + private bool $debug; public function __construct( string $defaultSiteAccessName, - SiteAccess\SiteAccessProviderInterface $siteAccessProvider, + SiteAccessProviderInterface $siteAccessProvider, EventDispatcherInterface $eventDispatcher, bool $debug = false ) { @@ -55,7 +51,7 @@ public static function getSubscribedEvents(): array ]; } - public function onConsoleCommand(ConsoleCommandEvent $event) + public function onConsoleCommand(ConsoleCommandEvent $event): void { $this->siteAccess->name = $event->getInput()->getParameterOption('--siteaccess', $this->defaultSiteAccessName); $this->siteAccess->matchingType = 'cli'; @@ -72,12 +68,12 @@ public function onConsoleCommand(ConsoleCommandEvent $event) $this->eventDispatcher->dispatch(new ScopeChangeEvent($this->siteAccess), MVCEvents::CONFIG_SCOPE_CHANGE); } - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { $this->siteAccess = $siteAccess; } - public function setDebug($debug = false) + public function setDebug($debug = false): void { $this->debug = $debug; } diff --git a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php index 16e269c4f1..46f2e17077 100644 --- a/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php +++ b/src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php @@ -29,8 +29,7 @@ class ContentDownloadRouteReferenceListener implements EventSubscriberInterface public const OPT_SITEACCESS = 'siteaccess'; public const OPT_VERSION = 'version'; - /** @var \Ibexa\Core\Helper\TranslationHelper */ - private $translationHelper; + private TranslationHelper $translationHelper; public function __construct(TranslationHelper $translationHelper) { @@ -47,7 +46,7 @@ public static function getSubscribedEvents(): array /** * @throws \InvalidArgumentException If the required arguments are not correct */ - public function onRouteReferenceGeneration(RouteReferenceGenerationEvent $event) + public function onRouteReferenceGeneration(RouteReferenceGenerationEvent $event): void { $routeReference = $event->getRouteReference(); diff --git a/src/bundle/Core/EventListener/ExceptionListener.php b/src/bundle/Core/EventListener/ExceptionListener.php index 9691d314c7..7df73d16a9 100644 --- a/src/bundle/Core/EventListener/ExceptionListener.php +++ b/src/bundle/Core/EventListener/ExceptionListener.php @@ -26,8 +26,7 @@ class ExceptionListener implements EventSubscriberInterface { - /** @var \Symfony\Contracts\Translation\TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; public function __construct(TranslatorInterface $translator) { @@ -41,7 +40,7 @@ public static function getSubscribedEvents(): array ]; } - public function onKernelException(ExceptionEvent $event) + public function onKernelException(ExceptionEvent $event): void { $exception = $event->getThrowable(); diff --git a/src/bundle/Core/EventListener/IndexRequestListener.php b/src/bundle/Core/EventListener/IndexRequestListener.php index 3b76b42207..bbc09ffe14 100644 --- a/src/bundle/Core/EventListener/IndexRequestListener.php +++ b/src/bundle/Core/EventListener/IndexRequestListener.php @@ -15,8 +15,7 @@ class IndexRequestListener implements EventSubscriberInterface { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; public function __construct(ConfigResolverInterface $configResolver) { @@ -38,7 +37,7 @@ public static function getSubscribedEvents(): array * * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event */ - public function onKernelRequestIndex(RequestEvent $event) + public function onKernelRequestIndex(RequestEvent $event): void { $request = $event->getRequest(); $semanticPathinfo = $request->attributes->get('semanticPathinfo') ?: '/'; diff --git a/src/bundle/Core/EventListener/LocaleListener.php b/src/bundle/Core/EventListener/LocaleListener.php index 89ce7b6864..9d5b9ff8a6 100644 --- a/src/bundle/Core/EventListener/LocaleListener.php +++ b/src/bundle/Core/EventListener/LocaleListener.php @@ -20,14 +20,11 @@ */ class LocaleListener implements EventSubscriberInterface { - /** @var \Symfony\Component\HttpKernel\EventListener\LocaleListener */ - private $innerListener; + private BaseLocaleListener $innerListener; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface */ - private $localeConverter; + private LocaleConverterInterface $localeConverter; public function __construct(BaseLocaleListener $innerListener, ConfigResolverInterface $configResolver, LocaleConverterInterface $localeConverter) { diff --git a/src/bundle/Core/EventListener/OriginalRequestListener.php b/src/bundle/Core/EventListener/OriginalRequestListener.php index 1dc2f5b5fe..03c43bff49 100644 --- a/src/bundle/Core/EventListener/OriginalRequestListener.php +++ b/src/bundle/Core/EventListener/OriginalRequestListener.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array ]; } - public function onKernelRequest(RequestEvent $event) + public function onKernelRequest(RequestEvent $event): void { if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; diff --git a/src/bundle/Core/EventListener/PreviewRequestListener.php b/src/bundle/Core/EventListener/PreviewRequestListener.php index 2b752f1dd8..6dbfd51e00 100644 --- a/src/bundle/Core/EventListener/PreviewRequestListener.php +++ b/src/bundle/Core/EventListener/PreviewRequestListener.php @@ -16,8 +16,7 @@ class PreviewRequestListener implements EventSubscriberInterface { - /** @var \Symfony\Component\HttpFoundation\RequestStack */ - private $requestStack; + private RequestStack $requestStack; public function __construct(RequestStack $requestStack) { diff --git a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php index e16dc3c4b1..af222c4abe 100644 --- a/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php +++ b/src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php @@ -29,7 +29,7 @@ public static function getSubscribedEvents(): array ]; } - public function onKernelRequest(RequestEvent $event) + public function onKernelRequest(RequestEvent $event): void { if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; diff --git a/src/bundle/Core/EventListener/RequestEventListener.php b/src/bundle/Core/EventListener/RequestEventListener.php index 2e9b1ca58a..8ca2bee848 100644 --- a/src/bundle/Core/EventListener/RequestEventListener.php +++ b/src/bundle/Core/EventListener/RequestEventListener.php @@ -22,17 +22,14 @@ class RequestEventListener implements EventSubscriberInterface { - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private ?LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; /** @var string */ private $defaultSiteAccess; - /** @var \Symfony\Component\Routing\RouterInterface */ - private $router; + private RouterInterface $router; public function __construct(ConfigResolverInterface $configResolver, RouterInterface $router, $defaultSiteAccess, LoggerInterface $logger = null) { @@ -55,7 +52,7 @@ public static function getSubscribedEvents(): array /** * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event */ - public function onKernelRequestForward(RequestEvent $event) + public function onKernelRequestForward(RequestEvent $event): void { if ($event->getRequestType() === HttpKernelInterface::MAIN_REQUEST) { $request = $event->getRequest(); @@ -106,7 +103,7 @@ public function onKernelRequestForward(RequestEvent $event) * * @see \Ibexa\Core\MVC\Symfony\Routing\UrlAliasRouter */ - public function onKernelRequestRedirect(RequestEvent $event) + public function onKernelRequestRedirect(RequestEvent $event): void { if ($event->getRequestType() == HttpKernelInterface::MAIN_REQUEST) { $request = $event->getRequest(); diff --git a/src/bundle/Core/EventListener/RoutingListener.php b/src/bundle/Core/EventListener/RoutingListener.php index 4bd5f241de..540561d556 100644 --- a/src/bundle/Core/EventListener/RoutingListener.php +++ b/src/bundle/Core/EventListener/RoutingListener.php @@ -19,14 +19,11 @@ */ class RoutingListener implements EventSubscriberInterface { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Symfony\Component\Routing\RouterInterface */ - private $urlAliasRouter; + private RouterInterface $urlAliasRouter; - /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator */ - private $urlAliasGenerator; + private Generator $urlAliasGenerator; public function __construct(ConfigResolverInterface $configResolver, RouterInterface $urlAliasRouter, Generator $urlAliasGenerator) { @@ -42,7 +39,7 @@ public static function getSubscribedEvents(): array ]; } - public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) + public function onSiteAccessMatch(PostSiteAccessMatchEvent $event): void { $rootLocationId = $this->configResolver->getParameter('content.tree_root.location_id'); $this->urlAliasRouter->setRootLocationId($rootLocationId); diff --git a/src/bundle/Core/EventListener/SessionInitByPostListener.php b/src/bundle/Core/EventListener/SessionInitByPostListener.php index ecd7df18ce..d92888e382 100644 --- a/src/bundle/Core/EventListener/SessionInitByPostListener.php +++ b/src/bundle/Core/EventListener/SessionInitByPostListener.php @@ -25,7 +25,7 @@ public static function getSubscribedEvents(): array ]; } - public function onSiteAccessMatch(PostSiteAccessMatchEvent $event) + public function onSiteAccessMatch(PostSiteAccessMatchEvent $event): void { $request = $event->getRequest(); $session = null; diff --git a/src/bundle/Core/EventListener/SiteAccessListener.php b/src/bundle/Core/EventListener/SiteAccessListener.php index 07b70100e6..ae2d76a95a 100644 --- a/src/bundle/Core/EventListener/SiteAccessListener.php +++ b/src/bundle/Core/EventListener/SiteAccessListener.php @@ -18,8 +18,7 @@ */ class SiteAccessListener implements EventSubscriberInterface { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteaccess; + private SiteAccess $siteaccess; public function __construct( SiteAccess $siteaccess diff --git a/src/bundle/Core/EventListener/ViewControllerListener.php b/src/bundle/Core/EventListener/ViewControllerListener.php index 35a7d5a2a9..5886ec2f5d 100644 --- a/src/bundle/Core/EventListener/ViewControllerListener.php +++ b/src/bundle/Core/EventListener/ViewControllerListener.php @@ -21,17 +21,14 @@ class ViewControllerListener implements EventSubscriberInterface { - /** @var \Symfony\Component\HttpKernel\Controller\ControllerResolverInterface */ - private $controllerResolver; + private ControllerResolverInterface $controllerResolver; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; - /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilderRegistry */ - private $viewBuilderRegistry; + private ViewBuilderRegistry $viewBuilderRegistry; /** @var \Symfony\Component\EventDispatcher\EventDispatcher */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct( ControllerResolverInterface $controllerResolver, @@ -57,7 +54,7 @@ public static function getSubscribedEvents(): array * * @throws \Symfony\Component\Security\Core\Exception\AccessDeniedException */ - public function getController(ControllerEvent $event) + public function getController(ControllerEvent $event): void { $request = $event->getRequest(); diff --git a/src/bundle/Core/EventListener/ViewRendererListener.php b/src/bundle/Core/EventListener/ViewRendererListener.php index 0693f9082b..dba047bd5b 100644 --- a/src/bundle/Core/EventListener/ViewRendererListener.php +++ b/src/bundle/Core/EventListener/ViewRendererListener.php @@ -7,6 +7,7 @@ namespace Ibexa\Bundle\Core\EventListener; +use Ibexa\Core\MVC\Symfony\View\Renderer; use Ibexa\Core\MVC\Symfony\View\Renderer as ViewRenderer; use Ibexa\Core\MVC\Symfony\View\View; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -16,8 +17,7 @@ class ViewRendererListener implements EventSubscriberInterface { - /** @var \Ibexa\Core\MVC\Symfony\View\Renderer */ - private $viewRenderer; + private Renderer $viewRenderer; public function __construct(ViewRenderer $viewRenderer) { @@ -29,7 +29,7 @@ public static function getSubscribedEvents(): array return [KernelEvents::VIEW => 'renderView']; } - public function renderView(ViewEvent $event) + public function renderView(ViewEvent $event): void { if (!($view = $event->getControllerResult()) instanceof View) { return; diff --git a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php index de2e7ce860..cc8616a105 100644 --- a/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php +++ b/src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array ]; } - public function setInContextAcceptLanguage(RequestEvent $e) + public function setInContextAcceptLanguage(RequestEvent $e): void { if (!$e->getRequest()->cookies->has('ez_in_context_translation')) { return; diff --git a/src/bundle/Core/Features/Context/BasicContentContext.php b/src/bundle/Core/Features/Context/BasicContentContext.php index 1f8af9d624..1d9c2d5fa9 100644 --- a/src/bundle/Core/Features/Context/BasicContentContext.php +++ b/src/bundle/Core/Features/Context/BasicContentContext.php @@ -26,16 +26,13 @@ class BasicContentContext implements Context /** * Content path mapping. */ - private $contentPaths = []; + private array $contentPaths = []; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; public function __construct( Repository $repository, @@ -68,7 +65,7 @@ public function createContent($contentType, $fields, $parentLocationId) /** * Publishes a content draft. */ - public function publishDraft(Content $content) + public function publishDraft(Content $content): void { $this->contentService->publishVersion($content->versionInfo->id); } @@ -83,7 +80,7 @@ public function publishDraft(Content $content) * * @return \Ibexa\Core\Repository\Values\Content\Content an unpublished Content draft */ - public function createContentDraft($parentLocationId, $contentTypeIdentifier, $fields, $languageCode = null) + public function createContentDraft(int $parentLocationId, $contentTypeIdentifier, array $fields, $languageCode = null): \Ibexa\Contracts\Core\Repository\Values\Content\Content { $languageCode = $languageCode ?: self::DEFAULT_LANGUAGE; $locationCreateStruct = $this->repository->getLocationService()->newLocationCreateStruct($parentLocationId); @@ -137,7 +134,7 @@ public function getContentPath($name) /** * Maps the path of the content to it's name for later use. */ - private function mapContentPath($path) + private function mapContentPath(string $path): void { $contentNames = explode('/', $path); $this->contentPaths[end($contentNames)] = $path; diff --git a/src/bundle/Core/Features/Context/ConsoleContext.php b/src/bundle/Core/Features/Context/ConsoleContext.php index b5a4b0df6a..87ce8b6ee2 100644 --- a/src/bundle/Core/Features/Context/ConsoleContext.php +++ b/src/bundle/Core/Features/Context/ConsoleContext.php @@ -15,16 +15,14 @@ class ConsoleContext implements Context { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; /** @var string[] */ - private $siteaccessList; + private array $siteaccessList; - /** @var string */ - private $defaultSiteaccess; + private string $defaultSiteaccess; - private $scriptOutput = null; + private ?string $scriptOutput = null; /** * Elements referenced by 'it' in sentences. @@ -51,7 +49,7 @@ public function __construct( /** * @When I run a console script without specifying a siteaccess */ - public function iRunAConsoleScript() + public function iRunAConsoleScript(): void { $this->iRunTheCommand('ibexa:behat:test-siteaccess'); } @@ -59,7 +57,7 @@ public function iRunAConsoleScript() /** * @When I run a console script with the siteaccess option :siteaccessOption */ - public function iRunAConsoleScriptWithSiteaccess($siteaccessOption) + public function iRunAConsoleScriptWithSiteaccess($siteaccessOption): void { $this->iRunTheCommand('ibexa:behat:test-siteaccess', $siteaccessOption); } @@ -67,7 +65,7 @@ public function iRunAConsoleScriptWithSiteaccess($siteaccessOption) /** * @Then It is executed with the siteaccess :siteaccess */ - public function iExpectItToBeExecutedWithTheSiteaccess($siteaccess) + public function iExpectItToBeExecutedWithTheSiteaccess($siteaccess): void { $actualSiteaccess = trim($this->scriptOutput); Assertion::assertEquals( @@ -82,7 +80,7 @@ public function iExpectItToBeExecutedWithTheSiteaccess($siteaccess) * * default one: default siteaccess. */ - public function iExpectItToBeExecutedWithTheDefaultOne() + public function iExpectItToBeExecutedWithTheDefaultOne(): void { $this->iExpectItToBeExecutedWithTheSiteaccess($this->getDefaultSiteaccessName()); } @@ -90,7 +88,7 @@ public function iExpectItToBeExecutedWithTheDefaultOne() /** * @Given /^that there is a "([^"]*)" siteaccess$/ */ - public function thereIsASiteaccess($expectedSiteaccessName, $default = false) + public function thereIsASiteaccess($expectedSiteaccessName, $default = false): void { $found = false; @@ -108,7 +106,7 @@ public function thereIsASiteaccess($expectedSiteaccessName, $default = false) /** * @Given /^that there is a default "([^"]*)" siteaccess$/ */ - public function thereIsADefaultSiteaccess($expectedSiteaccessName) + public function thereIsADefaultSiteaccess($expectedSiteaccessName): void { $this->thereIsASiteaccess($expectedSiteaccessName, true); Assertion::assertEquals( @@ -122,7 +120,7 @@ public function thereIsADefaultSiteaccess($expectedSiteaccessName) * * it: the siteaccess referenced above. */ - public function iRunAConsoleScriptWithIt() + public function iRunAConsoleScriptWithIt(): void { $this->iRunTheCommand( 'ibexa:behat:test-siteaccess', @@ -131,7 +129,7 @@ public function iRunAConsoleScriptWithIt() $this->it['siteaccess'] = $this->scriptOutput; } - private function iRunTheCommand($command, $siteaccess = null) + private function iRunTheCommand(string $command, $siteaccess = null): void { $phpFinder = new PhpExecutableFinder(); if (!$phpPath = $phpFinder->find(false)) { @@ -164,7 +162,7 @@ private function iRunTheCommand($command, $siteaccess = null) /** * @Given /^that there is a siteaccess that is not the default one$/ */ - public function thereIsASiteaccessThatIsNotTheDefaultOne() + public function thereIsASiteaccessThatIsNotTheDefaultOne(): void { $siteaccessName = $this->getNonDefaultSiteaccessName(); Assertion::assertNotNull($siteaccessName, 'There is no siteaccess other than the default one'); @@ -174,7 +172,7 @@ public function thereIsASiteaccessThatIsNotTheDefaultOne() /** * @Then /^I expect it to be executed with it$/ */ - public function iExpectItToBeExecutedWithIt() + public function iExpectItToBeExecutedWithIt(): void { Assertion::assertEquals($this->it['siteaccess'], $this->scriptOutput); } diff --git a/src/bundle/Core/Features/Context/ContentContext.php b/src/bundle/Core/Features/Context/ContentContext.php index c35ffd6d7a..7b47d69c49 100644 --- a/src/bundle/Core/Features/Context/ContentContext.php +++ b/src/bundle/Core/Features/Context/ContentContext.php @@ -21,8 +21,7 @@ class ContentContext implements Context, SnippetAcceptingContext /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ private $currentDraft; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; public function __construct(Repository $repository) { @@ -32,7 +31,7 @@ public function __construct(Repository $repository) /** * @Given /^I create an folder draft$/ */ - public function iCreateAnFolderDraft() + public function iCreateAnFolderDraft(): void { $this->currentDraft = $this->createDraft( 'folder', @@ -46,7 +45,7 @@ public function iCreateAnFolderDraft() /** * @Given /^I create a draft of an existing content item$/ */ - public function iCreateADraftOfAnExistingContentItem() + public function iCreateADraftOfAnExistingContentItem(): void { $this->currentContent = $this->createContentItem( 'folder', @@ -128,7 +127,7 @@ public function updateDraft($fields) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content the created draft. */ - public function createDraft($contentTypeIdentifier, array $fields) + public function createDraft(string $contentTypeIdentifier, array $fields) { $contentService = $this->repository->getContentService(); diff --git a/src/bundle/Core/Features/Context/ContentPreviewContext.php b/src/bundle/Core/Features/Context/ContentPreviewContext.php index 3cca9f2984..d08f57d714 100644 --- a/src/bundle/Core/Features/Context/ContentPreviewContext.php +++ b/src/bundle/Core/Features/Context/ContentPreviewContext.php @@ -18,7 +18,7 @@ class ContentPreviewContext extends RawMinkContext private $contentContext; /** @BeforeScenario */ - public function gatherContexts(BeforeScenarioScope $scope) + public function gatherContexts(BeforeScenarioScope $scope): void { $environment = $scope->getEnvironment(); @@ -28,7 +28,7 @@ public function gatherContexts(BeforeScenarioScope $scope) /** * @Given /^I create a draft for a content type that uses a custom location controller$/ */ - public function iCreateDraftOfContentTypeWithCustomLocationController() + public function iCreateDraftOfContentTypeWithCustomLocationController(): void { $this->contentContext->createDraft( 'blog_post', @@ -42,7 +42,7 @@ public function iCreateDraftOfContentTypeWithCustomLocationController() /** * @When /^I preview this draft$/ */ - public function iPreviewThisDraft() + public function iPreviewThisDraft(): void { $this->getSession()->getDriver()->visit($this->mapToVersionViewUri($this->contentContext->getCurrentDraft()->versionInfo)); } @@ -63,7 +63,7 @@ private function mapToVersionViewUri(VersionInfo $version): string /** * @Then /^the output is valid$/ */ - public function theOutputIsValid() + public function theOutputIsValid(): void { $this->checkForExceptions(); } @@ -93,7 +93,7 @@ protected function checkForExceptions() /** * @Then /^I see a preview of this draft$/ */ - public function iSeeAPreviewOfTheCurrentDraft() + public function iSeeAPreviewOfTheCurrentDraft(): void { $this->assertSession()->elementContains( 'xpath', @@ -107,7 +107,7 @@ public function iSeeAPreviewOfTheCurrentDraft() * * @Given /^I modify a field from the draft$/ */ - public function iModifyAFieldFromTheDraft() + public function iModifyAFieldFromTheDraft(): void { $this->contentContext->updateDraft( ['name' => 'MODIFIED - ' . $this->contentContext->getCurrentDraft()->getFieldValue('name')->text] diff --git a/src/bundle/Core/Features/Context/ContentTypeContext.php b/src/bundle/Core/Features/Context/ContentTypeContext.php index 7d3dda7fef..a2f9debc2d 100644 --- a/src/bundle/Core/Features/Context/ContentTypeContext.php +++ b/src/bundle/Core/Features/Context/ContentTypeContext.php @@ -11,6 +11,8 @@ use Behat\Gherkin\Node\TableNode; use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Exceptions as ApiExceptions; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup; use PHPUnit\Framework\Assert as Assertion; /** @@ -28,8 +30,7 @@ class ContentTypeContext implements Context */ public const DEFAULT_LANGUAGE = 'eng-GB'; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - protected $contentTypeService; + protected ContentTypeService $contentTypeService; public function __construct(ContentTypeService $contentTypeService) { @@ -66,7 +67,7 @@ public function ensureContentTypeWithIndentifier( * Makes sure a content type with $identifier does not exist. * If it exists deletes it. */ - public function ensureContentTypeDoesntExist($identifier) + public function ensureContentTypeDoesntExist($identifier): void { $contentType = $this->loadContentTypeByIdentifier($identifier, false); if ($contentType) { @@ -79,7 +80,7 @@ public function ensureContentTypeDoesntExist($identifier) * * Verifies that a content type with $identifier exists. */ - public function assertContentTypeExistsByIdentifier($identifier) + public function assertContentTypeExistsByIdentifier($identifier): void { Assertion::assertTrue( $this->checkContentTypeExistenceByIdentifier($identifier), @@ -92,7 +93,7 @@ public function assertContentTypeExistsByIdentifier($identifier) * * Verifies that a content type with $identifier does not exist. */ - public function assertContentTypeDoesntExistsByIdentifier($identifier) + public function assertContentTypeDoesntExistsByIdentifier($identifier): void { Assertion::assertFalse( $this->checkContentTypeExistenceByIdentifier($identifier), @@ -105,7 +106,7 @@ public function assertContentTypeDoesntExistsByIdentifier($identifier) * * Verifies that a content type with $identifier exists in group with identifier $groupIdentifier. */ - public function assertContentTypeExistsByIdentifierOnGroup($identifier, $groupIdentifier) + public function assertContentTypeExistsByIdentifierOnGroup($identifier, $groupIdentifier): void { Assertion::assertTrue( $this->checkContentTypeExistenceByIdentifier($identifier, $groupIdentifier), @@ -121,7 +122,7 @@ public function assertContentTypeExistsByIdentifierOnGroup($identifier, $groupId * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup|null */ - protected function loadContentTypeByIdentifier($identifier, $throwIfNotFound = true) + protected function loadContentTypeByIdentifier(string $identifier, $throwIfNotFound = true) { $contentType = null; try { @@ -147,7 +148,7 @@ protected function loadContentTypeByIdentifier($identifier, $throwIfNotFound = t * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - public function createContentType($groupIdentifier, $identifier, $fields) + public function createContentType(string $groupIdentifier, string $identifier, $fields) { $contentTypeService = $this->contentTypeService; $contentTypeGroup = $contentTypeService->loadContentTypeGroupByIdentifier($groupIdentifier); @@ -195,7 +196,7 @@ public function createContentType($groupIdentifier, $identifier, $fields) * * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType */ - protected function removeContentType($contentType) + protected function removeContentType(ContentType $contentType) { try { $this->contentTypeService->deleteContentType($contentType); @@ -208,7 +209,7 @@ protected function removeContentType($contentType) * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $contentType * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup $contentTypeGroup */ - protected function assignContentGroupTypeToContentType($contentType, $contentTypeGroup) + protected function assignContentGroupTypeToContentType(ContentType $contentType, ContentTypeGroup $contentTypeGroup) { try { $this->contentTypeService->assignContentTypeGroup($contentType, $contentTypeGroup); diff --git a/src/bundle/Core/Features/Context/ExceptionContext.php b/src/bundle/Core/Features/Context/ExceptionContext.php index 101dbf6fdc..f4d277941a 100644 --- a/src/bundle/Core/Features/Context/ExceptionContext.php +++ b/src/bundle/Core/Features/Context/ExceptionContext.php @@ -17,7 +17,7 @@ class ExceptionContext extends RawMinkContext implements Context, SnippetAccepti /** * @Given /^that I am not logged in$/ */ - public function iAmNotLoggedIn() + public function iAmNotLoggedIn(): void { $this->visitPath('/logout'); } @@ -25,7 +25,7 @@ public function iAmNotLoggedIn() /** * @Given /^that I am logged in$/ */ - public function iAmLoggedIn() + public function iAmLoggedIn(): void { $this->visitPath('/login'); $this->getSession()->getPage()->fillField('Username', 'admin'); @@ -36,7 +36,7 @@ public function iAmLoggedIn() /** * @When /^a repository UnauthorizedException is thrown during an HTTP request$/ */ - public function anExceptionIsThrownDuringAnHTTPRequest() + public function anExceptionIsThrownDuringAnHTTPRequest(): void { $this->visitPath('/platform-behat/exceptions/repository-unauthorized'); } @@ -44,7 +44,7 @@ public function anExceptionIsThrownDuringAnHTTPRequest() /** * @Then /^it is converted to a Symfony Security AccessDeniedException$/ */ - public function itIsConvertedToAnSymfonyComponentSecurityCoreExceptionAccessDeniedException() + public function itIsConvertedToAnSymfonyComponentSecurityCoreExceptionAccessDeniedException(): void { // unsure how to assert this :) } @@ -52,7 +52,7 @@ public function itIsConvertedToAnSymfonyComponentSecurityCoreExceptionAccessDeni /** * @Given /^the login form is shown$/ */ - public function theLoginFormIsShown() + public function theLoginFormIsShown(): void { $this->assertSession()->addressEquals('/login'); } @@ -60,7 +60,7 @@ public function theLoginFormIsShown() /** * @Then /^(?:a|an) ([\w\\]+Exception) is displayed$/ */ - public function anAccessDeniedExceptionIsThrown($exceptionString) + public function anAccessDeniedExceptionIsThrown($exceptionString): void { $this->assertSession()->elementExists('xpath', "//abbr[@title='$exceptionString']"); } diff --git a/src/bundle/Core/Features/Context/FieldTypeContext.php b/src/bundle/Core/Features/Context/FieldTypeContext.php index c1628862e2..2166036b73 100644 --- a/src/bundle/Core/Features/Context/FieldTypeContext.php +++ b/src/bundle/Core/Features/Context/FieldTypeContext.php @@ -45,28 +45,25 @@ class FieldTypeContext implements Context ]; /** @var array Stores Internal mapping of the fieldType names */ - private $fieldTypeInternalIdentifier = [ + private array $fieldTypeInternalIdentifier = [ 'integer' => 'ezinteger', ]; /** @var array Maps the validator of the fieldtypes */ - private $validatorMappings = [ + private array $validatorMappings = [ 'integer' => 'IntegerValue', ]; /** @var array Maps the default values of the fieldtypes */ - private $defaultValues = [ + private array $defaultValues = [ 'integer' => 1, ]; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; public function __construct( ContentTypeService $contentTypeService, @@ -109,7 +106,7 @@ public function getFieldValidator($field) * @param string $name Name of the field, optional, if not specified $fieldType is used * @param bool $required True if the is the field required, optional */ - public function createField($fieldType, $name = null, $required = false) + public function createField($fieldType, $name = null, $required = false): void { $fieldPosition = $this->getActualFieldPosition(); $name = ($name == null ? $fieldType : $name); @@ -132,7 +129,7 @@ public function createField($fieldType, $name = null, $required = false) * @param string $value Value of the constraint * @param string $constraint Constraint name */ - public function addValueConstraint($fieldType, $value, $constraint) + public function addValueConstraint($fieldType, $value, string $constraint): void { $validatorName = $this->getFieldValidator($fieldType); $validatorParent = $validatorName . 'Validator'; @@ -153,7 +150,7 @@ public function addValueConstraint($fieldType, $value, $constraint) * @param string $field Name of the field * @param mixed $value Value of the field */ - public function createContent($field, $value) + public function createContent($field, $value): void { $this->setFieldContentState(self::CONTENT_PUBLISHED, $field, $value); } @@ -166,7 +163,7 @@ public function createContent($field, $value) * @param string $field Name of the field, optional * @param mixed $value Value of the field, optional */ - public function setFieldContentState($stateFlag, $field = null, $value = null) + public function setFieldContentState($stateFlag, $field = null, $value = null): void { if ($stateFlag <= $this->fieldConstructionObject['objectState'] || $stateFlag < self::FIELD_TYPE_NOT_CREATED @@ -208,7 +205,7 @@ public function getFieldContentState() * @param string The field name * @param mixed The field value */ - private function createAndPublishContent($field, $value) + private function createAndPublishContent($field, $value): void { $languageCode = self::DEFAULT_LANGUAGE; @@ -230,7 +227,7 @@ private function createAndPublishContent($field, $value) /** * Associates the stored fieldtype to the stored contenttype. */ - private function associateFieldToContentType() + private function associateFieldToContentType(): void { $fieldCreateStruct = $this->fieldConstructionObject['fieldType']; $this->fieldConstructionObject['contentType']->addFieldDefinition($fieldCreateStruct); @@ -240,7 +237,7 @@ private function associateFieldToContentType() /** * Publishes the stored contenttype. */ - private function publishContentType() + private function publishContentType(): void { $contentTypeGroup = $this->contentTypeService->loadContentTypeGroupByIdentifier('Content'); $contentTypeCreateStruct = $this->fieldConstructionObject['contentType']; @@ -314,7 +311,7 @@ public function getThisContentId() /** * Creates an instance of a contenttype and stores it for later publishing. */ - private function createContentType() + private function createContentType(): void { $name = $this->fieldConstructionObject['fieldType']->identifier; $name = uniqid($name . '#', true); @@ -330,7 +327,7 @@ private function createContentType() /** * Getter method for the position of the field, relative to other possible fields. */ - private function getActualFieldPosition() + private function getActualFieldPosition(): int|float { if ($this->fieldConstructionObject['fieldType'] == null) { return 10; @@ -376,7 +373,7 @@ public function createContentOfThisType($field = null, $value = null) * @Given a content type with an :fieldType field exists with Properties: * @Given a content type with an :fieldType field with name :name exists with Properties: */ - public function createContentOfThisTypeWithProperties($fieldType, TableNode $properties, $name = null) + public function createContentOfThisTypeWithProperties($fieldType, TableNode $properties, $name = null): void { $this->createField($fieldType, $name); foreach ($properties as $property) { diff --git a/src/bundle/Core/Features/Context/QueryControllerContext.php b/src/bundle/Core/Features/Context/QueryControllerContext.php index 64667f2023..e86e46841d 100644 --- a/src/bundle/Core/Features/Context/QueryControllerContext.php +++ b/src/bundle/Core/Features/Context/QueryControllerContext.php @@ -15,7 +15,7 @@ class QueryControllerContext extends RawMinkContext /** * @Given /^the Query results are assigned to the "([^"]*)" twig variable$/ */ - public function theQueryResultsAreAssignedToTheTwigVariable($twigVariableName) + public function theQueryResultsAreAssignedToTheTwigVariable($twigVariableName): void { $variableTypes = $this->getVariableTypesFromTemplate(); @@ -25,7 +25,7 @@ public function theQueryResultsAreAssignedToTheTwigVariable($twigVariableName) /** * @Then the Query results assigned to the :arg1 twig variable is a :arg2 object */ - public function theQueryResultsAssignedToTheTwigVariableIsAObject($twigVariableName, $className) + public function theQueryResultsAssignedToTheTwigVariableIsAObject($twigVariableName, $className): void { $variableTypes = $this->getVariableTypesFromTemplate(); @@ -36,7 +36,7 @@ public function theQueryResultsAssignedToTheTwigVariableIsAObject($twigVariableN /** * @Then the Query results assigned to the twig variable is a Pagerfanta object and has limit :arg1 and selected page :arg2 */ - public function theQueryResultsAssignedToTheTwigVariableIsAObjectAndHasLimitAndCountParams($pageLimit, $pageValue) + public function theQueryResultsAssignedToTheTwigVariableIsAObjectAndHasLimitAndCountParams($pageLimit, $pageValue): void { $pageLimitFound = false; $currentPageFound = false; diff --git a/src/bundle/Core/Features/Context/RoleContext.php b/src/bundle/Core/Features/Context/RoleContext.php index 595a505a1a..2bbabc789f 100644 --- a/src/bundle/Core/Features/Context/RoleContext.php +++ b/src/bundle/Core/Features/Context/RoleContext.php @@ -17,8 +17,7 @@ */ class RoleContext implements Context { - /** @var \Ibexa\Contracts\Core\Repository\roleService */ - protected $roleService; + protected RoleService $roleService; public function __construct(RoleService $roleService) { @@ -32,7 +31,7 @@ public function __construct(RoleService $roleService) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Role */ - public function ensureRoleExists($name) + public function ensureRoleExists(string $name) { try { $role = $this->roleService->loadRoleByIdentifier($name); @@ -53,7 +52,7 @@ public function ensureRoleExists($name) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Role */ - public function getRole($identifier) + public function getRole(string $identifier) { $role = null; try { @@ -82,7 +81,7 @@ public function iHaveRole($name) * * Verifies that a role with $name exists. */ - public function iSeeRole($name) + public function iSeeRole($name): void { $role = $this->getRole($name); Assertion::assertNotNull( @@ -94,7 +93,7 @@ public function iSeeRole($name) /** * @Given :name do not have any assigned policies */ - public function noAssginedPolicies($name) + public function noAssginedPolicies($name): void { $role = $this->getRole($name); Assertion::assertNotNull( @@ -108,7 +107,7 @@ public function noAssginedPolicies($name) /** * @Given :name do not have any assigned Users and groups */ - public function noAssigneGroups($name) + public function noAssigneGroups($name): void { $role = $this->getRole($name); Assertion::assertNotNull( @@ -124,7 +123,7 @@ public function noAssigneGroups($name) * * Verifies that a role with $name exists. */ - public function iDontSeeRole($name) + public function iDontSeeRole($name): void { $role = $this->getRole($name); Assertion::assertNull( diff --git a/src/bundle/Core/Features/Context/UserContext.php b/src/bundle/Core/Features/Context/UserContext.php index 7146119724..ef4c076bd5 100644 --- a/src/bundle/Core/Features/Context/UserContext.php +++ b/src/bundle/Core/Features/Context/UserContext.php @@ -9,12 +9,12 @@ use Behat\Behat\Context\Context; use Behat\Gherkin\Node\TableNode; -use Ibexa\Contracts\Core\Repository\Exceptions as ApiExceptions; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\User\UserGroup; use PHPUnit\Framework\Assert as Assertion; /** @@ -34,11 +34,9 @@ class UserContext implements Context public const USERGROUP_ROOT_SUBTREE = '/1/5/'; public const USERGROUP_CONTENT_IDENTIFIER = 'user_group'; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - protected $userService; + protected UserService $userService; - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - protected $searchService; + protected SearchService $searchService; public function __construct(UserService $userService, SearchService $searchService) { @@ -54,11 +52,11 @@ public function __construct(UserService $userService, SearchService $searchServi * * @return \Ibexa\Core\Repository\Values\User\User found */ - public function searchUserByLogin($username, $parentGroupId = null) + public function searchUserByLogin(string $username, $parentGroupId = null) { try { $user = $this->userService->loadUserByLogin($username); - } catch (ApiExceptions\NotFoundException $e) { + } catch (NotFoundException $e) { return null; } @@ -115,7 +113,7 @@ public function searchUserGroups(string $name, ?int $parentLocationId = null): a * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - protected function createUser($username, $email, $password, $parentGroup = null, $fields = []) + protected function createUser($username, string $email, string $password, $parentGroup = null, $fields = []) { $userCreateStruct = $this->userService->newUserCreateStruct( $username, @@ -154,7 +152,7 @@ protected function createUser($username, $email, $password, $parentGroup = null, * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - public function createUserGroup($name, $parentGroup = null) + public function createUserGroup($name, $parentGroup = null): UserGroup { if (!$parentGroup) { $parentGroup = $this->userService->loadUserGroup(self::USERGROUP_ROOT_CONTENT_ID); @@ -221,7 +219,7 @@ public function ensureUserExists($username, $email, $password, $parentGroupName * @param string $username User name * @param string $parentGroupName (optional) name of the parent group to check */ - public function ensureUserDoesntExist($username, $parentGroupName = null) + public function ensureUserDoesntExist($username, $parentGroupName = null): void { $user = null; if ($parentGroupName) { @@ -240,14 +238,14 @@ public function ensureUserDoesntExist($username, $parentGroupName = null) } else { try { $user = $this->userService->loadUserByLogin($username); - } catch (ApiExceptions\NotFoundException $e) { + } catch (NotFoundException $e) { // nothing to do } } if ($user) { try { $this->userService->deleteUser($user); - } catch (ApiExceptions\NotFoundException $e) { + } catch (NotFoundException $e) { // nothing to do } } @@ -287,7 +285,7 @@ public function checkUserExistenceByUsername($username, $parentGroupName = null) * * @return bool true if it exists, false if not */ - public function checkUserExistenceByEmail($email, $parentGroupName = null): bool + public function checkUserExistenceByEmail(string $email, $parentGroupName = null): bool { $existingUsers = $this->userService->loadUsersByEmail($email); if (count($existingUsers) == 0) { @@ -334,7 +332,7 @@ public function createPasswordHash($login, $password, $type) * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - public function iHaveUser($username) + public function iHaveUser($username): void { $email = $this->findNonExistingUserEmail($username); $password = $username; @@ -348,7 +346,7 @@ public function iHaveUser($username) * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - public function iHaveUserWithUsernameEmailAndPassword($username, $email, $password) + public function iHaveUserWithUsernameEmailAndPassword($username, $email, $password): void { $this->ensureUserExists($username, $email, $password); } @@ -360,7 +358,7 @@ public function iHaveUserWithUsernameEmailAndPassword($username, $email, $passwo * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - public function iHaveUserInGroup($username, $parentGroupName) + public function iHaveUserInGroup($username, $parentGroupName): void { $email = $this->findNonExistingUserEmail($username); $password = $username; @@ -384,7 +382,7 @@ public function iHaveUserWithUsernameEmailAndPasswordInGroup($username, $email, * * Makes sure a user with username ':username' doesn't exist, removing it if necessary. */ - public function iDontHaveUser($username) + public function iDontHaveUser($username): void { $this->ensureUserDoesntExist($username); } @@ -394,7 +392,7 @@ public function iDontHaveUser($username) * * Makes sure a user with username ':username' doesn't exist as a chield of group ':parentGroup', removing it if necessary. */ - public function iDontHaveUserInGroup($username, $parentGroup) + public function iDontHaveUserInGroup($username, $parentGroup): void { $this->ensureUserDoesntExist($username, $parentGroup); } @@ -408,7 +406,7 @@ public function iDontHaveUserInGroup($username, $parentGroup) * | testUser2 | Editors | * | testUser3 | NewParent | # Both user and group should be created */ - public function iHaveTheFollowingUsers(TableNode $table) + public function iHaveTheFollowingUsers(TableNode $table): void { $users = $table->getTable(); array_shift($users); @@ -425,7 +423,7 @@ public function iHaveTheFollowingUsers(TableNode $table) * * Checks that user ':username' exists. */ - public function assertUserWithNameExists($username) + public function assertUserWithNameExists($username): void { Assertion::assertTrue( $this->checkUserExistenceByUsername($username), @@ -438,7 +436,7 @@ public function assertUserWithNameExists($username) * * Checks that user ':username' does not exist. */ - public function assertUserWithNameDoesntExist($username) + public function assertUserWithNameDoesntExist($username): void { Assertion::assertFalse( $this->checkUserExistenceByUsername($username), @@ -452,7 +450,7 @@ public function assertUserWithNameDoesntExist($username) * * Checks that user ':username' exists as a child of group ':parentGroup'. */ - public function assertUserWithNameExistsInGroup($username, $parentGroup) + public function assertUserWithNameExistsInGroup($username, $parentGroup): void { Assertion::assertTrue( $this->checkUserExistenceByUsername($username, $parentGroup), @@ -466,7 +464,7 @@ public function assertUserWithNameExistsInGroup($username, $parentGroup) * * Checks that user ':username' does not exist as a child of group ':parentGroup'. */ - public function assertUserWithNameDoesntExistInGroup($username, $parentGroup) + public function assertUserWithNameDoesntExistInGroup($username, $parentGroup): void { Assertion::assertFalse( $this->checkUserExistenceByUsername($username, $parentGroup), @@ -484,7 +482,7 @@ public function assertUserWithNameDoesntExistInGroup($username, $parentGroup) * | Editors | * | Administrator users | */ - public function assertUserWithNameDoesntExistInGroups($username, TableNode $table) + public function assertUserWithNameDoesntExistInGroups($username, TableNode $table): void { $groups = $table->getTable(); array_shift($groups); @@ -508,7 +506,7 @@ public function assertUserWithNameDoesntExistInGroups($username, TableNode $tabl * | first_name | Test | * | last_name | User | */ - public function assertUserWithNameExistsWithFields($username, TableNode $table) + public function assertUserWithNameExistsWithFields($username, TableNode $table): void { Assertion::assertTrue( $this->checkUserExistenceByUsername($username), @@ -547,7 +545,7 @@ public function assertUserWithNameExistsWithFields($username, TableNode $table) * * @throws \Exception Possible endless loop */ - private function findNonExistingUserEmail($username = 'User') + private function findNonExistingUserEmail($username = 'User'): string { $email = "{$username}@ibexa.co"; if ($this->checkUserExistenceByEmail($email)) { @@ -571,7 +569,7 @@ private function findNonExistingUserEmail($username = 'User') * * @throws \Exception Possible endless loop */ - private function findNonExistingUserName() + private function findNonExistingUserName(): string { for ($i = 0; $i < 20; ++$i) { $username = uniqid('User#', true); diff --git a/src/bundle/Core/Features/Context/YamlConfigurationContext.php b/src/bundle/Core/Features/Context/YamlConfigurationContext.php index c0a0d4922c..1426158fc1 100644 --- a/src/bundle/Core/Features/Context/YamlConfigurationContext.php +++ b/src/bundle/Core/Features/Context/YamlConfigurationContext.php @@ -22,17 +22,16 @@ */ class YamlConfigurationContext implements Context { - /** @var \Symfony\Component\HttpKernel\KernelInterface */ - private $kernel; + private KernelInterface $kernel; - private static $platformConfigurationFilePath = 'config/packages/%env%/ezplatform.yaml'; + private static string $platformConfigurationFilePath = 'config/packages/%env%/ezplatform.yaml'; public function __construct(KernelInterface $kernel) { $this->kernel = $kernel; } - public function addConfiguration(array $configuration) + public function addConfiguration(array $configuration): void { $env = $this->getEnvironment(); diff --git a/src/bundle/Core/Fragment/DirectFragmentRenderer.php b/src/bundle/Core/Fragment/DirectFragmentRenderer.php index 563c2c01cd..244f85d48c 100644 --- a/src/bundle/Core/Fragment/DirectFragmentRenderer.php +++ b/src/bundle/Core/Fragment/DirectFragmentRenderer.php @@ -27,23 +27,17 @@ class DirectFragmentRenderer extends InlineFragmentRenderer implements FragmentR { public const NAME = 'direct'; - /** @var \Symfony\Component\HttpKernel\KernelInterface */ - protected $kernel; + protected KernelInterface $kernel; - /** @var \Ibexa\Bundle\Core\EventListener\ViewControllerListener */ - protected $controllerListener; + protected ViewControllerListener $controllerListener; - /** @var \Symfony\Component\HttpKernel\Controller\ControllerResolverInterface */ - protected $controllerResolver; + protected ControllerResolverInterface $controllerResolver; - /** @var \Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface */ - protected $argumentMetadataFactory; + protected ArgumentMetadataFactoryInterface $argumentMetadataFactory; - /** @var \Symfony\Component\HttpKernel\Controller\ValueResolverInterface */ - protected $argumentValueResolver; + protected ValueResolverInterface $argumentValueResolver; - /** @var \Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer */ - protected $viewTemplateRenderer; + protected TemplateRenderer $viewTemplateRenderer; public function __construct( FragmentRendererInterface $innerRenderer, diff --git a/src/bundle/Core/Fragment/FragmentListenerFactory.php b/src/bundle/Core/Fragment/FragmentListenerFactory.php index a3be5b9d4f..0405707e72 100644 --- a/src/bundle/Core/Fragment/FragmentListenerFactory.php +++ b/src/bundle/Core/Fragment/FragmentListenerFactory.php @@ -18,7 +18,7 @@ class FragmentListenerFactory { use RequestStackAware; - public function buildFragmentListener(UriSigner $uriSigner, $fragmentPath, $fragmentListenerClass) + public function buildFragmentListener(UriSigner $uriSigner, $fragmentPath, $fragmentListenerClass): ?object { // no request when executing over CLI if (!$request = $this->getCurrentRequest()) { diff --git a/src/bundle/Core/Imagine/AliasCleaner.php b/src/bundle/Core/Imagine/AliasCleaner.php index 78ff42b9cf..809b2f27ae 100644 --- a/src/bundle/Core/Imagine/AliasCleaner.php +++ b/src/bundle/Core/Imagine/AliasCleaner.php @@ -12,15 +12,14 @@ class AliasCleaner implements AliasCleanerInterface { - /** @var \Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $aliasResolver; + private ResolverInterface $aliasResolver; public function __construct(ResolverInterface $aliasResolver) { $this->aliasResolver = $aliasResolver; } - public function removeAliases($originalPath) + public function removeAliases($originalPath): void { $this->aliasResolver->remove([$originalPath], []); } diff --git a/src/bundle/Core/Imagine/AliasGenerator.php b/src/bundle/Core/Imagine/AliasGenerator.php index 41f51896ec..ef59b3e345 100644 --- a/src/bundle/Core/Imagine/AliasGenerator.php +++ b/src/bundle/Core/Imagine/AliasGenerator.php @@ -36,25 +36,19 @@ class AliasGenerator implements VariationHandler { public const ALIAS_ORIGINAL = 'original'; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; /** * Loader used to retrieve the original image. * DataManager is not used to remain independent from ImagineBundle configuration. - * - * @var \Liip\ImagineBundle\Binary\Loader\LoaderInterface */ - private $dataLoader; + private LoaderInterface $dataLoader; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterManager */ - private $filterManager; + private FilterManager $filterManager; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; - /** @var \Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $ioResolver; + private ResolverInterface $ioResolver; public function __construct( LoaderInterface $dataLoader, @@ -77,7 +71,7 @@ public function __construct( * @throws \Ibexa\Core\MVC\Exception\SourceImageNotFoundException If source image cannot be found. * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidVariationException If a problem occurs with generated variation. */ - public function getVariation(Field $field, VersionInfo $versionInfo, $variationName, array $parameters = []) + public function getVariation(Field $field, VersionInfo $versionInfo, $variationName, array $parameters = []): ImageVariation { /** @var \Ibexa\Core\FieldType\Image\Value $imageValue */ $imageValue = $field->value; diff --git a/src/bundle/Core/Imagine/BinaryLoader.php b/src/bundle/Core/Imagine/BinaryLoader.php index 48d7cf755a..5c35098581 100644 --- a/src/bundle/Core/Imagine/BinaryLoader.php +++ b/src/bundle/Core/Imagine/BinaryLoader.php @@ -22,11 +22,9 @@ */ class BinaryLoader implements LoaderInterface { - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Symfony\Component\Mime\MimeTypesInterface */ - private $mimeTypes; + private MimeTypesInterface $mimeTypes; public function __construct(IOServiceInterface $ioService, MimeTypesInterface $mimeTypes) { diff --git a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php index f786489239..999cd37c14 100644 --- a/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php +++ b/src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php @@ -29,20 +29,15 @@ class AliasGeneratorDecorator implements VariationHandler, SiteAccessAware private const CONTENT_IDENTIFIER = 'content'; private const CONTENT_VERSION_IDENTIFIER = 'content_version'; - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $aliasGenerator; + private VariationHandler $aliasGenerator; - /** @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface */ - private $cache; + private TagAwareAdapterInterface $cache; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private ?SiteAccess $siteAccess = null; - /** @var \Symfony\Component\Routing\RequestContext */ - private $requestContext; + private RequestContext $requestContext; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - private $cacheIdentifierGenerator; + private CacheIdentifierGeneratorInterface $cacheIdentifierGenerator; /** * @param \Ibexa\Contracts\Core\Variation\VariationHandler $aliasGenerator @@ -89,7 +84,7 @@ public function getVariation(Field $field, VersionInfo $versionInfo, $variationN /** * @param \Ibexa\Core\MVC\Symfony\SiteAccess|null $siteAccess */ - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { $this->siteAccess = $siteAccess; } diff --git a/src/bundle/Core/Imagine/Cache/ResolverFactory.php b/src/bundle/Core/Imagine/Cache/ResolverFactory.php index d6666ffa4e..dc7538908d 100644 --- a/src/bundle/Core/Imagine/Cache/ResolverFactory.php +++ b/src/bundle/Core/Imagine/Cache/ResolverFactory.php @@ -12,11 +12,9 @@ class ResolverFactory { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $resolver; + private ResolverInterface $resolver; /** @var string|null */ private $resolverDecoratorClass; diff --git a/src/bundle/Core/Imagine/Filter/AbstractFilter.php b/src/bundle/Core/Imagine/Filter/AbstractFilter.php index 2a0956a27f..55aa7c2dd8 100644 --- a/src/bundle/Core/Imagine/Filter/AbstractFilter.php +++ b/src/bundle/Core/Imagine/Filter/AbstractFilter.php @@ -12,15 +12,14 @@ */ abstract class AbstractFilter implements FilterInterface { - /** @var array */ - private $options; + private array $options; public function __construct(array $options = []) { $this->options = $options; } - public function setOption($optionName, $value) + public function setOption($optionName, $value): void { $this->options[$optionName] = $value; } @@ -35,7 +34,7 @@ public function hasOption($optionName) return isset($this->options[$optionName]); } - public function setOptions(array $options) + public function setOptions(array $options): void { $this->options = $options; } diff --git a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php index 22ab6b5596..cc0048df87 100644 --- a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php +++ b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php @@ -12,13 +12,12 @@ class FilterConfiguration extends BaseFilterConfiguration { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ?ConfigResolverInterface $configResolver = null; /** * @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $configResolver */ - public function setConfigResolver(ConfigResolverInterface $configResolver) + public function setConfigResolver(ConfigResolverInterface $configResolver): void { $this->configResolver = $configResolver; } @@ -57,7 +56,7 @@ public function all() * * @return array */ - private function getVariationFilters($variationName, array $configuredVariations) + private function getVariationFilters(string $variationName, array $configuredVariations) { if (!isset($configuredVariations[$variationName]['filters']) && !isset($this->filters[$variationName]['filters'])) { return []; @@ -85,7 +84,7 @@ private function getVariationFilters($variationName, array $configuredVariations * * @return array */ - private function getVariationPostProcessors($variationName, array $configuredVariations) + private function getVariationPostProcessors(string $variationName, array $configuredVariations) { if (isset($configuredVariations[$variationName]['post_processors'])) { return $configuredVariations[$variationName]['post_processors']; diff --git a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php index 5aa4c68170..68f4f9bc68 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php +++ b/src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php @@ -17,7 +17,7 @@ abstract class FilterLoaderWrapped implements LoaderInterface /** * @param \Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface $innerLoader */ - public function setInnerLoader(LoaderInterface $innerLoader) + public function setInnerLoader(LoaderInterface $innerLoader): void { $this->innerLoader = $innerLoader; } diff --git a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php index 427fea0744..929de6ae26 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php @@ -22,8 +22,7 @@ class ReduceNoiseFilterLoader implements LoaderInterface { public const IDENTIFIER = 'filter/noise'; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterInterface */ - private $filter; + private FilterInterface $filter; public function __construct(FilterInterface $filter) { diff --git a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php index 918bd250d3..72735c4467 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php @@ -15,8 +15,7 @@ class SwirlFilterLoader implements LoaderInterface { public const IDENTIFIER = 'filter/swirl'; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterInterface */ - private $filter; + private FilterInterface $filter; public function __construct(FilterInterface $filter) { diff --git a/src/bundle/Core/Imagine/IORepositoryResolver.php b/src/bundle/Core/Imagine/IORepositoryResolver.php index a4d2241ad3..216fcd07cf 100644 --- a/src/bundle/Core/Imagine/IORepositoryResolver.php +++ b/src/bundle/Core/Imagine/IORepositoryResolver.php @@ -26,14 +26,11 @@ class IORepositoryResolver extends PathResolver implements ResolverInterface { public const VARIATION_ORIGINAL = 'original'; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; - /** @var \Ibexa\Contracts\Core\Variation\VariationPurger */ - private $variationPurger; + private VariationPurger $variationPurger; public function __construct( IOServiceInterface $ioService, @@ -88,7 +85,7 @@ public function resolve($path, $filter): string * * {@inheritdoc} */ - public function store(BinaryInterface $binary, $path, $filter) + public function store(BinaryInterface $binary, $path, $filter): void { $tmpFile = tmpfile(); fwrite($tmpFile, $binary->getContent()); @@ -105,7 +102,7 @@ public function store(BinaryInterface $binary, $path, $filter) * @param string[] $paths The paths where the original files are expected to be. * @param string[] $filters The imagine filters in effect. */ - public function remove(array $paths, array $filters) + public function remove(array $paths, array $filters): void { if (empty($filters)) { $filters = array_keys($this->filterConfiguration->all()); diff --git a/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php b/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php index 148d594baf..a300108ac3 100644 --- a/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php +++ b/src/bundle/Core/Imagine/ImageAsset/AliasGenerator.php @@ -22,14 +22,11 @@ */ class AliasGenerator implements VariationHandler { - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $innerAliasGenerator; + private VariationHandler $innerAliasGenerator; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper */ - private $assetMapper; + private AssetMapper $assetMapper; /** * @param \Ibexa\Contracts\Core\Variation\VariationHandler $innerAliasGenerator diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php index 4de8618e25..bcb2120293 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGenerator.php @@ -21,23 +21,17 @@ class PlaceholderAliasGenerator implements VariationHandler { - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $aliasGenerator; + private VariationHandler $aliasGenerator; - /** @var \Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $ioResolver; + private ResolverInterface $ioResolver; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderProvider|null */ - private $placeholderProvider; + private ?PlaceholderProvider $placeholderProvider = null; - /** @var array */ - private $placeholderOptions = []; + private array $placeholderOptions = []; - /** @var bool */ - private $verifyBinaryDataAvailability = false; + private bool $verifyBinaryDataAvailability = false; public function __construct( VariationHandler $aliasGenerator, @@ -74,7 +68,7 @@ public function getVariation(Field $field, VersionInfo $versionInfo, $variationN return $this->aliasGenerator->getVariation($field, $versionInfo, $variationName, $parameters); } - public function setPlaceholderProvider(PlaceholderProvider $provider, array $options = []) + public function setPlaceholderProvider(PlaceholderProvider $provider, array $options = []): void { $this->placeholderProvider = $provider; $this->placeholderOptions = $options; diff --git a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php index a8a3b6d894..938bedceb3 100644 --- a/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php +++ b/src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php @@ -11,14 +11,11 @@ class PlaceholderAliasGeneratorConfigurator { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderProviderRegistry */ - private $providerRegistry; + private PlaceholderProviderRegistry $providerRegistry; - /** @var array */ - private $providersConfig; + private array $providersConfig; public function __construct( ConfigResolverInterface $configResolver, @@ -30,7 +27,7 @@ public function __construct( $this->providersConfig = $providersConfig; } - public function configure(PlaceholderAliasGenerator $generator) + public function configure(PlaceholderAliasGenerator $generator): void { $binaryHandlerName = $this->configResolver->getParameter('io.binarydata_handler'); diff --git a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php index ca397bcd99..9bc5d69b7c 100644 --- a/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php +++ b/src/bundle/Core/Imagine/PlaceholderProvider/GenericProvider.php @@ -15,8 +15,7 @@ class GenericProvider implements PlaceholderProvider { - /** @var \Imagine\Image\ImagineInterface */ - private $imagine; + private ImagineInterface $imagine; /** * GenericProvider constructor. diff --git a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php index 3ef89d4ff8..b26297949e 100644 --- a/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php +++ b/src/bundle/Core/Imagine/PlaceholderProviderRegistry.php @@ -12,7 +12,7 @@ class PlaceholderProviderRegistry { /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderProvider */ - private $providers; + private array $providers; /** * PlaceholderProviderRegistry constructor. @@ -24,7 +24,7 @@ public function __construct(array $providers = []) $this->providers = $providers; } - public function addProvider(string $type, PlaceholderProvider $provider) + public function addProvider(string $type, PlaceholderProvider $provider): void { $this->providers[$type] = $provider; } diff --git a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php index 7e9fd7a11a..65a493e1f7 100644 --- a/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php +++ b/src/bundle/Core/Imagine/Variation/ImagineAwareAliasGenerator.php @@ -22,20 +22,16 @@ */ class ImagineAwareAliasGenerator implements VariationHandler { - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $aliasGenerator; + private VariationHandler $aliasGenerator; - /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator */ - private $variationPathGenerator; + private VariationPathGenerator $variationPathGenerator; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ private $configResolver; - /** @var \Imagine\Image\ImagineInterface */ - private $imagine; + private ImagineInterface $imagine; public function __construct( VariationHandler $aliasGenerator, diff --git a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php index f4d67a314e..61709b2d54 100644 --- a/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php @@ -20,17 +20,13 @@ */ class IOVariationPurger implements VariationPurger { - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $io; + private IOServiceInterface $io; - /** @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface */ - private $cache; + private TagAwareAdapterInterface $cache; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - private $cacheIdentifierGenerator; + private CacheIdentifierGeneratorInterface $cacheIdentifierGenerator; - /** @var \Ibexa\Bundle\Core\Imagine\Cache\AliasGeneratorDecorator */ - private $aliasGeneratorDecorator; + private AliasGeneratorDecorator $aliasGeneratorDecorator; /** @var \Psr\Log\LoggerInterface */ private $logger; @@ -50,12 +46,12 @@ public function __construct( /** * @param \Psr\Log\LoggerInterface $logger */ - public function setLogger($logger) + public function setLogger($logger): void { $this->logger = $logger; } - public function purge(array $aliasNames) + public function purge(array $aliasNames): void { $variationNameTag = $this->aliasGeneratorDecorator->getVariationNameTag(); diff --git a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php index 0159672668..d8a10f9c53 100644 --- a/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php +++ b/src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php @@ -21,13 +21,11 @@ class ImageFileVariationPurger implements VariationPurger { /** @var ImageFileList */ - private $imageFileList; + private Iterator $imageFileList; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator */ - private $variationPathGenerator; + private VariationPathGenerator $variationPathGenerator; /** @var \Psr\Log\LoggerInterface */ private $logger; @@ -44,7 +42,7 @@ public function __construct(Iterator $imageFileList, IOServiceInterface $ioServi * * @param array $aliasNames */ - public function purge(array $aliasNames) + public function purge(array $aliasNames): void { foreach ($this->imageFileList as $originalImageId) { foreach ($aliasNames as $aliasName) { @@ -65,7 +63,7 @@ public function purge(array $aliasNames) /** * @param \Psr\Log\LoggerInterface $logger */ - public function setLogger($logger) + public function setLogger($logger): void { $this->logger = $logger; } diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php index 6809724625..305ed41084 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php @@ -26,23 +26,17 @@ class LegacyStorageImageFileList implements ImageFileList /** * Iteration cursor on $statement. - * - * @var int */ - private $cursor; + private ?int $cursor = null; /** * Used to get ezimagefile rows. - * - * @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileRowReader */ - private $rowReader; + private ImageFileRowReader $rowReader; - /** @var \Ibexa\Core\IO\IOConfigProvider */ - private $ioConfigResolver; + private IOConfigProvider $ioConfigResolver; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct( ImageFileRowReader $rowReader, diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php index c4a4810ef7..32ac88afa2 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php @@ -11,8 +11,7 @@ class LegacyStorageImageFileRowReader implements ImageFileRowReader { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Driver\Statement */ private $statement; @@ -22,7 +21,7 @@ public function __construct(Connection $connection) $this->connection = $connection; } - public function init() + public function init(): void { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery->select('filepath')->from('ezimagefile'); diff --git a/src/bundle/Core/Matcher/ViewMatcherRegistry.php b/src/bundle/Core/Matcher/ViewMatcherRegistry.php index 7fbbae6a85..5a380767fd 100644 --- a/src/bundle/Core/Matcher/ViewMatcherRegistry.php +++ b/src/bundle/Core/Matcher/ViewMatcherRegistry.php @@ -18,7 +18,7 @@ final class ViewMatcherRegistry implements ViewMatcherRegistryInterface { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ViewMatcherInterface[] */ - private $matchers; + private array $matchers; /** * @param iterable<\Ibexa\Core\MVC\Symfony\Matcher\ViewMatcherInterface> $matchers diff --git a/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php b/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php index 5329e4dffc..c3294a6c77 100644 --- a/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php +++ b/src/bundle/Core/SiteAccess/Config/ComplexConfigProcessor.php @@ -19,14 +19,11 @@ final class ComplexConfigProcessor implements ConfigProcessor { private const DEFAULT_NAMESPACE = 'ibexa.site_access.config'; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService */ - private $siteAccessService; + private SiteAccessService $siteAccessService; - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParserInterface */ - private $complexSettingParser; + private ComplexSettingParser $complexSettingParser; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php b/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php index 4ee9d9b377..ea1bf69828 100644 --- a/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php +++ b/src/bundle/Core/SiteAccess/Config/IOConfigResolver.php @@ -15,8 +15,7 @@ */ final class IOConfigResolver implements IOConfigProvider { - /** @var \Ibexa\Bundle\Core\SiteAccess\Config\ComplexConfigProcessor */ - private $complexConfigProcessor; + private ComplexConfigProcessor $complexConfigProcessor; public function __construct( ComplexConfigProcessor $complexConfigProcessor diff --git a/src/bundle/Core/SiteAccess/LanguageResolver.php b/src/bundle/Core/SiteAccess/LanguageResolver.php index 374f6ea837..8004590bb6 100644 --- a/src/bundle/Core/SiteAccess/LanguageResolver.php +++ b/src/bundle/Core/SiteAccess/LanguageResolver.php @@ -15,8 +15,7 @@ */ final class LanguageResolver extends AbstractLanguageResolver { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/bundle/Core/SiteAccess/MatcherBuilder.php b/src/bundle/Core/SiteAccess/MatcherBuilder.php index db8e23ed23..98004a0ed4 100644 --- a/src/bundle/Core/SiteAccess/MatcherBuilder.php +++ b/src/bundle/Core/SiteAccess/MatcherBuilder.php @@ -15,8 +15,7 @@ */ final class MatcherBuilder extends BaseMatcherBuilder { - /** @var \Ibexa\Bundle\Core\SiteAccess\SiteAccessMatcherRegistryInterface */ - protected $siteAccessMatcherRegistry; + protected SiteAccessMatcherRegistryInterface $siteAccessMatcherRegistry; public function __construct(SiteAccessMatcherRegistryInterface $siteAccessMatcherRegistry) { diff --git a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php index 6bcca7c216..791fb92db1 100644 --- a/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php +++ b/src/bundle/Core/SiteAccess/SiteAccessMatcherRegistry.php @@ -13,7 +13,7 @@ final class SiteAccessMatcherRegistry implements SiteAccessMatcherRegistryInterface { /** @var \Ibexa\Bundle\Core\SiteAccess\Matcher[] */ - private $matchers; + private array $matchers; /** * @param \Ibexa\Bundle\Core\SiteAccess\Matcher[] $matchers diff --git a/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php b/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php index d3442193b7..9124a3fd9e 100644 --- a/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php +++ b/src/bundle/Core/Templating/Twig/ContextAwareTwigVariablesExtension.php @@ -14,8 +14,7 @@ final class ContextAwareTwigVariablesExtension extends AbstractExtension implements GlobalsInterface { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct( ConfigResolverInterface $configResolver diff --git a/src/bundle/Core/Translation/GlobCollector.php b/src/bundle/Core/Translation/GlobCollector.php index 2e04d7e6bb..e399d49ab4 100644 --- a/src/bundle/Core/Translation/GlobCollector.php +++ b/src/bundle/Core/Translation/GlobCollector.php @@ -14,13 +14,12 @@ */ class GlobCollector implements Collector { - /** @var string */ - private $tranlationPattern; + private string $tranlationPattern; /** * @param string $kernelRootDir */ - public function __construct($kernelRootDir) + public function __construct(string $kernelRootDir) { $this->tranlationPattern = $kernelRootDir . sprintf('%1$svendor%1$sibexa%1$si18n%1$stranslations%1$s*%1$s*%1$s*.xlf', DIRECTORY_SEPARATOR); } @@ -28,7 +27,7 @@ public function __construct($kernelRootDir) /** * @return array */ - public function collect() + public function collect(): array { $meta = []; foreach (glob($this->tranlationPattern) as $file) { diff --git a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php index 8ec374a82d..cf3d81814b 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractConfigResolverBasedURLHandler.php @@ -15,17 +15,13 @@ */ abstract class AbstractConfigResolverBasedURLHandler extends AbstractURLHandler { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; - /** @var string */ - private $parameterName; + private string $parameterName; - /** @var string|null */ - private $namespace; + private ?string $namespace; - /** @var string|null */ - private $scope; + private ?string $scope; public function __construct( URLService $urlService, diff --git a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php index a683598f56..434e95bc66 100644 --- a/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php +++ b/src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php @@ -20,8 +20,7 @@ abstract class AbstractURLHandler implements URLHandlerInterface { use LoggerAwareTrait; - /** @var \Ibexa\Contracts\Core\Repository\URLService */ - protected $urlService; + protected URLService $urlService; public function __construct(URLService $urlService) { diff --git a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php index a121c2c2af..7e261af48c 100644 --- a/src/bundle/Core/URLChecker/Handler/HTTPHandler.php +++ b/src/bundle/Core/URLChecker/Handler/HTTPHandler.php @@ -19,7 +19,7 @@ class HTTPHandler extends AbstractConfigResolverBasedURLHandler * * Based on https://www.onlineaspect.com/2009/01/26/how-to-use-curl_multi-without-blocking/ */ - public function validate(array $urls) + public function validate(array $urls): void { $options = $this->getOptions(); @@ -149,12 +149,12 @@ private function createCurlHandlerForUrl(URL $url, array &$handlers, int $connec * @param \Ibexa\Contracts\Core\Repository\Values\URL\URL $url * @param resource $handler CURL handler */ - private function doValidate(URL $url, $handler) + private function doValidate(URL $url, $handler): void { $this->setUrlStatus($url, $this->isSuccessful(curl_getinfo($handler, CURLINFO_HTTP_CODE))); } - private function isSuccessful($statusCode): bool + private function isSuccessful(int $statusCode): bool { return $statusCode >= 200 && $statusCode < 300; } diff --git a/src/bundle/Core/URLChecker/Handler/MailToHandler.php b/src/bundle/Core/URLChecker/Handler/MailToHandler.php index d8a44142b2..f549495589 100644 --- a/src/bundle/Core/URLChecker/Handler/MailToHandler.php +++ b/src/bundle/Core/URLChecker/Handler/MailToHandler.php @@ -25,7 +25,7 @@ public function __construct( /** * {@inheritdoc} */ - public function validate(array $urls) + public function validate(array $urls): void { $options = $this->getOptions(); diff --git a/src/bundle/Core/URLChecker/URLChecker.php b/src/bundle/Core/URLChecker/URLChecker.php index 852dbd58c0..be5d8de521 100644 --- a/src/bundle/Core/URLChecker/URLChecker.php +++ b/src/bundle/Core/URLChecker/URLChecker.php @@ -7,6 +7,7 @@ namespace Ibexa\Bundle\Core\URLChecker; +use Ibexa\Contracts\Core\Repository\URLService; use Ibexa\Contracts\Core\Repository\URLService as URLServiceInterface; use Ibexa\Contracts\Core\Repository\Values\URL\SearchResult; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; @@ -17,11 +18,9 @@ class URLChecker implements URLCheckerInterface { use LoggerAwareTrait; - /** @var \Ibexa\Contracts\Core\Repository\URLService */ - protected $urlService; + protected URLService $urlService; - /** @var \Ibexa\Bundle\Core\URLChecker\URLHandlerRegistryInterface */ - protected $handlerRegistry; + protected URLHandlerRegistryInterface $handlerRegistry; /** * URLChecker constructor. @@ -41,7 +40,7 @@ public function __construct( /** * {@inheritdoc} */ - public function check(URLQuery $query) + public function check(URLQuery $query): void { $grouped = $this->fetchUrls($query); foreach ($grouped as $scheme => $urls) { @@ -76,7 +75,7 @@ protected function fetchUrls(URLQuery $query) * * @return array */ - private function groupByScheme(SearchResult $urls) + private function groupByScheme(SearchResult $urls): array { $grouped = []; diff --git a/src/bundle/Core/URLChecker/URLHandlerRegistry.php b/src/bundle/Core/URLChecker/URLHandlerRegistry.php index b34b6e98aa..f6d5414df7 100644 --- a/src/bundle/Core/URLChecker/URLHandlerRegistry.php +++ b/src/bundle/Core/URLChecker/URLHandlerRegistry.php @@ -12,7 +12,7 @@ class URLHandlerRegistry implements URLHandlerRegistryInterface { /** @var \Ibexa\Bundle\Core\URLChecker\URLHandlerInterface[] */ - private $handlers = []; + private array $handlers = []; /** * URLHandlerRegistry constructor. @@ -25,7 +25,7 @@ public function __construct() /** * {@inheritdoc} */ - public function addHandler($scheme, URLHandlerInterface $handler) + public function addHandler($scheme, URLHandlerInterface $handler): void { $this->handlers[$scheme] = $handler; } diff --git a/src/bundle/Core/View/Provider/Configured.php b/src/bundle/Core/View/Provider/Configured.php index 5f2293f110..b47c423d4f 100644 --- a/src/bundle/Core/View/Provider/Configured.php +++ b/src/bundle/Core/View/Provider/Configured.php @@ -18,7 +18,7 @@ class Configured extends BaseConfigured implements SiteAccessAware * * @param \Ibexa\Core\MVC\Symfony\SiteAccess $siteAccess */ - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { if ($this->matcherFactory instanceof SiteAccessAware) { $this->matcherFactory->setSiteAccess($siteAccess); diff --git a/src/bundle/Debug/Collector/IbexaCoreCollector.php b/src/bundle/Debug/Collector/IbexaCoreCollector.php index 5500125642..f7062fd9cb 100644 --- a/src/bundle/Debug/Collector/IbexaCoreCollector.php +++ b/src/bundle/Debug/Collector/IbexaCoreCollector.php @@ -20,7 +20,7 @@ public function __construct() $this->reset(); } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Throwable $exception = null): void { /** @var \Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface $innerCollector */ foreach ($this->data['collectors'] as $innerCollector) { @@ -36,7 +36,7 @@ public function getName(): string /** * @param \Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface $collector */ - public function addCollector(DataCollectorInterface $collector, $panelTemplate = null, $toolbarTemplate = null) + public function addCollector(DataCollectorInterface $collector, $panelTemplate = null, $toolbarTemplate = null): void { $name = $collector->getName(); $this->data['collectors'][$name] = $collector; @@ -103,7 +103,7 @@ public function getPanelTemplate($collectorName) /** * {@inheritdoc} */ - public function reset() + public function reset(): void { $this->data = [ 'collectors' => [], diff --git a/src/bundle/Debug/Collector/PersistenceCacheCollector.php b/src/bundle/Debug/Collector/PersistenceCacheCollector.php index 2231f202d1..159b222a0c 100644 --- a/src/bundle/Debug/Collector/PersistenceCacheCollector.php +++ b/src/bundle/Debug/Collector/PersistenceCacheCollector.php @@ -17,15 +17,14 @@ */ class PersistenceCacheCollector extends DataCollector { - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger */ - private $logger; + private PersistenceLogger $logger; public function __construct(PersistenceLogger $logger) { $this->logger = $logger; } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Throwable $exception = null): void { $this->data = [ 'stats' => $this->logger->getStats(), @@ -69,7 +68,7 @@ public function getCallsLoggingEnabled() * * @return array */ - public function getCalls() + public function getCalls(): array { if (empty($this->data['calls'])) { return []; @@ -110,7 +109,7 @@ public function getCalls() * * @return array */ - public function getHandlers() + public function getHandlers(): array { $handlers = []; foreach ($this->data['handlers'] as $handler => $count) { diff --git a/src/bundle/Debug/Collector/SiteAccessCollector.php b/src/bundle/Debug/Collector/SiteAccessCollector.php index 9f10a20dc3..0985107878 100644 --- a/src/bundle/Debug/Collector/SiteAccessCollector.php +++ b/src/bundle/Debug/Collector/SiteAccessCollector.php @@ -17,7 +17,7 @@ */ class SiteAccessCollector extends DataCollector { - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Throwable $exception = null): void { $this->data = [ 'siteAccess' => $request->attributes->get('siteaccess'), diff --git a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php index aa54f9b6e4..8d85b51192 100644 --- a/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php +++ b/src/bundle/Debug/DependencyInjection/Compiler/DataCollectorPass.php @@ -14,7 +14,7 @@ class DataCollectorPass implements CompilerPassInterface { - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(IbexaCoreCollector::class)) { return; diff --git a/src/bundle/IO/ApiLoader/HandlerRegistry.php b/src/bundle/IO/ApiLoader/HandlerRegistry.php index 76aa227d72..906ed3cb80 100644 --- a/src/bundle/IO/ApiLoader/HandlerRegistry.php +++ b/src/bundle/IO/ApiLoader/HandlerRegistry.php @@ -21,7 +21,7 @@ class HandlerRegistry */ private $handlersMap = []; - public function setHandlersMap($handlersMap) + public function setHandlersMap($handlersMap): void { $this->handlersMap = $handlersMap; } diff --git a/src/bundle/IO/Command/MigrateFilesCommand.php b/src/bundle/IO/Command/MigrateFilesCommand.php index df20bfdf49..39228b4a59 100644 --- a/src/bundle/IO/Command/MigrateFilesCommand.php +++ b/src/bundle/IO/Command/MigrateFilesCommand.php @@ -24,19 +24,17 @@ final class MigrateFilesCommand extends Command { /** @var mixed Configuration for metadata handlers */ - private $configuredMetadataHandlers; + private array $configuredMetadataHandlers; /** @var mixed Configuration for binary data handlers */ - private $configuredBinarydataHandlers; + private array $configuredBinarydataHandlers; - /** @var \Ibexa\Bundle\IO\Migration\FileListerRegistry */ - private $fileListerRegistry; + private FileListerRegistry $fileListerRegistry; /** @var \Ibexa\Bundle\IO\Migration\FileListerInterface[] */ - private $fileListers; + private ?array $fileListers = null; - /** @var \Ibexa\Bundle\IO\Migration\FileMigratorInterface */ - private $fileMigrator; + private FileMigratorInterface $fileMigrator; public function __construct( array $configuredMetadataHandlers, @@ -63,7 +61,7 @@ public function __construct( parent::__construct(); } - protected function configure() + protected function configure(): void { $this ->addOption('from', null, InputOption::VALUE_REQUIRED, 'Migrate from ,') @@ -192,7 +190,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * * @param \Symfony\Component\Console\Output\OutputInterface $output */ - protected function outputConfiguredHandlers(OutputInterface $output) + protected function outputConfiguredHandlers(OutputInterface $output): void { $output->writeln( 'Configured metadata handlers: ' . implode(', ', array_keys($this->configuredMetadataHandlers)) @@ -261,7 +259,7 @@ protected function migrateFiles( $bulkCount, $dryRun, OutputInterface $output - ) { + ): void { $progress = new ProgressBar($output, $totalFileCount); if ($totalFileCount) { $progress->setFormat("%message%\n %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%"); diff --git a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php index 1b2cce216f..fdcec0dd47 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php @@ -24,10 +24,10 @@ class IOConfigurationPass implements CompilerPassInterface { /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject */ - private $metadataHandlerFactories; + private ?ArrayObject $metadataHandlerFactories; /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject */ - private $binarydataHandlerFactories; + private ?ArrayObject $binarydataHandlerFactories; public function __construct( ArrayObject $metadataHandlerFactories = null, @@ -42,7 +42,7 @@ public function __construct( * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { $ioMetadataHandlers = $container->hasParameter('ibexa.io.metadata_handlers') ? $container->getParameter('ibexa.io.metadata_handlers') : diff --git a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php index 3bf3bf324f..1e208b6499 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/MigrationFileListerPass.php @@ -19,7 +19,7 @@ final class MigrationFileListerPass implements CompilerPassInterface * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->has(ConfigurableRegistry::class)) { return; diff --git a/src/bundle/IO/DependencyInjection/Configuration.php b/src/bundle/IO/DependencyInjection/Configuration.php index d3f4e09a85..f628b1bdb2 100644 --- a/src/bundle/IO/DependencyInjection/Configuration.php +++ b/src/bundle/IO/DependencyInjection/Configuration.php @@ -20,12 +20,12 @@ class Configuration implements ConfigurationInterface /** @var ConfigurationFactory[]|\ArrayObject */ private $binarydataHandlerFactories = []; - public function setMetadataHandlerFactories(ArrayObject $factories) + public function setMetadataHandlerFactories(ArrayObject $factories): void { $this->metadataHandlerFactories = $factories; } - public function setBinarydataHandlerFactories(ArrayObject $factories) + public function setBinarydataHandlerFactories(ArrayObject $factories): void { $this->binarydataHandlerFactories = $factories; } @@ -60,7 +60,7 @@ public function getConfigTreeBuilder(): TreeBuilder * @param string $info block info line * @param ConfigurationFactory[]|\ArrayObject $factories */ - private function addHandlersSection(NodeDefinition $node, $name, $info, ArrayObject $factories) + private function addHandlersSection(NodeDefinition $node, string $name, string $info, ArrayObject $factories): void { $handlersNodeBuilder = $node ->children() diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php index 99b5bc208c..fd44173625 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php @@ -23,7 +23,7 @@ */ abstract class Flysystem implements ConfigurationFactory { - public function addConfiguration(ArrayNodeDefinition $node) + public function addConfiguration(ArrayNodeDefinition $node): void { $node ->info( @@ -42,7 +42,7 @@ public function addConfiguration(ArrayNodeDefinition $node) ->end(); } - public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config) + public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config): void { $filesystemId = $this->createFilesystem($container, $config['name'], $config['adapter']); $definition->replaceArgument(0, new Reference($filesystemId)); diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php index d9a13991c4..f40a597eb7 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php @@ -20,12 +20,12 @@ public function getParentServiceId(): string return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; } - public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config) + public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config): void { $definition->replaceArgument(0, new Reference($config['connection'])); } - public function addConfiguration(ArrayNodeDefinition $node) + public function addConfiguration(ArrayNodeDefinition $node): void { $node ->info( diff --git a/src/bundle/IO/EventListener/StreamFileListener.php b/src/bundle/IO/EventListener/StreamFileListener.php index 0a8a740c86..7388133bfe 100644 --- a/src/bundle/IO/EventListener/StreamFileListener.php +++ b/src/bundle/IO/EventListener/StreamFileListener.php @@ -22,11 +22,9 @@ */ class StreamFileListener implements EventSubscriberInterface { - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private IOServiceInterface $ioService; - /** @var \Ibexa\Core\IO\IOConfigProvider */ - private $ioConfigResolver; + private IOConfigProvider $ioConfigResolver; public function __construct(IOServiceInterface $ioService, IOConfigProvider $ioConfigResolver) { @@ -41,7 +39,7 @@ public static function getSubscribedEvents(): array ]; } - public function onKernelRequest(RequestEvent $event) + public function onKernelRequest(RequestEvent $event): void { if ($event->getRequestType() !== HttpKernelInterface::MAIN_REQUEST) { return; @@ -82,7 +80,7 @@ public function onKernelRequest(RequestEvent $event) * * @return bool */ - private function isIoUri($uri, $urlPrefix): bool + private function isIoUri(string $uri, $urlPrefix): bool { return strpos(ltrim($uri, '/'), $urlPrefix) === 0; } diff --git a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php index c040beef7d..16871dbaad 100644 --- a/src/bundle/IO/Migration/FileLister/BinaryFileLister.php +++ b/src/bundle/IO/Migration/FileLister/BinaryFileLister.php @@ -18,7 +18,7 @@ class BinaryFileLister extends MigrationHandler implements FileListerInterface { /** @var \Ibexa\Bundle\IO\Migration\FileLister\FileIteratorInterface */ - private $fileList; + private Iterator $fileList; /** @var string Directory where files are stored, within the storage dir. Example: 'original' */ private $filesDir; @@ -50,7 +50,10 @@ public function countFiles(): int return count($this->fileList); } - public function loadMetadataList($limit = null, $offset = null) + /** + * @return mixed[] + */ + public function loadMetadataList($limit = null, $offset = null): array { $metadataList = []; $fileLimitList = new LimitIterator($this->fileList, $offset, $limit); diff --git a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php index d50e0cf5b5..daf7e7f555 100644 --- a/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php +++ b/src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php @@ -21,10 +21,10 @@ final class LegacyStorageFileIterator implements FileIteratorInterface private $item; /** @var int Iteration cursor on statement. */ - private $cursor; + private ?int $cursor = null; /** @var \Ibexa\Bundle\IO\Migration\FileLister\FileRowReaderInterface Used to get file rows. */ - private $rowReader; + private FileRowReaderInterface $rowReader; /** * @param \Ibexa\Bundle\IO\Migration\FileLister\FileRowReaderInterface $rowReader @@ -71,7 +71,7 @@ public function count(): int /** * Fetches the next item from the resultset and moves the cursor forward. */ - private function fetchRow() + private function fetchRow(): void { ++$this->cursor; $fileId = $this->rowReader->getRow(); diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index c68d4bf697..b99ee1051b 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -12,8 +12,7 @@ abstract class LegacyStorageFileRowReader implements FileRowReaderInterface { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Driver\Statement */ private $statement; @@ -23,7 +22,7 @@ public function __construct(Connection $connection) $this->connection = $connection; } - final public function init() + final public function init(): void { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery @@ -59,7 +58,7 @@ final public function getCount() * * @return string */ - private function prependMimeToPath($path, $mimeType): string + private function prependMimeToPath(string $path, $mimeType): string { return substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; } diff --git a/src/bundle/IO/Migration/FileLister/ImageFileLister.php b/src/bundle/IO/Migration/FileLister/ImageFileLister.php index da3e9c02e8..36e6a4a726 100644 --- a/src/bundle/IO/Migration/FileLister/ImageFileLister.php +++ b/src/bundle/IO/Migration/FileLister/ImageFileLister.php @@ -20,13 +20,11 @@ class ImageFileLister extends MigrationHandler implements FileListerInterface { /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileList */ - private $imageFileList; + private Iterator $imageFileList; - /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator */ - private $variationPathGenerator; + private VariationPathGenerator $variationPathGenerator; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; /** @var string Directory where images are stored, within the storage dir. Example: 'images' */ private $imagesDir; @@ -64,7 +62,10 @@ public function countFiles(): int return count($this->imageFileList); } - public function loadMetadataList($limit = null, $offset = null) + /** + * @return mixed[] + */ + public function loadMetadataList($limit = null, $offset = null): array { $metadataList = []; $imageLimitList = new LimitIterator($this->imageFileList, $offset, $limit); diff --git a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php index f1518b998a..b218f183e6 100644 --- a/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php +++ b/src/bundle/IO/Migration/FileListerRegistry/ConfigurableRegistry.php @@ -16,7 +16,7 @@ final class ConfigurableRegistry implements FileListerRegistry { /** @var \Ibexa\Bundle\IO\Migration\FileListerInterface[] */ - private $registry = []; + private array $registry; /** * @param \Ibexa\Bundle\IO\Migration\FileListerInterface[] $items Hash of FileListerInterfaces, with identifier string as key. diff --git a/src/bundle/IO/Migration/MigrationHandler.php b/src/bundle/IO/Migration/MigrationHandler.php index 2a6a0cabd3..9c174b1c67 100644 --- a/src/bundle/IO/Migration/MigrationHandler.php +++ b/src/bundle/IO/Migration/MigrationHandler.php @@ -15,14 +15,11 @@ */ abstract class MigrationHandler implements MigrationHandlerInterface { - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry */ - private $metadataHandlerRegistry; + private HandlerRegistry $metadataHandlerRegistry; - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry */ - private $binarydataHandlerRegistry; + private HandlerRegistry $binarydataHandlerRegistry; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private ?LoggerInterface $logger; /** @var \Ibexa\Core\IO\IOMetadataHandler */ protected $fromMetadataHandler; @@ -60,14 +57,14 @@ public function setIODataHandlersByIdentifiers( return $this; } - final protected function logError($message) + final protected function logError(string|\Stringable $message) { if (isset($this->logger)) { $this->logger->error($message); } } - final protected function logInfo($message) + final protected function logInfo(string|\Stringable $message) { if (isset($this->logger)) { $this->logger->info($message); diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index 240b971bc1..8e2ac9ebb4 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -29,20 +29,16 @@ final class InstallPlatformCommand extends Command public const int EXIT_UNKNOWN_INSTALL_TYPE = 6; public const int EXIT_MISSING_PERMISSIONS = 7; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Symfony\Component\Console\Output\OutputInterface */ - private $output; + private ?OutputInterface $output = null; - /** @var \Psr\Cache\CacheItemPoolInterface */ - private $cachePool; + private CacheItemPoolInterface $cachePool; - /** @var string */ - private $environment; + private string $environment; /** @var \Ibexa\Bundle\RepositoryInstaller\Installer\Installer[] */ - private $installers = []; + private array $installers; private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; @@ -61,7 +57,7 @@ public function __construct( parent::__construct(); } - protected function configure() + protected function configure(): void { $this->addArgument( 'type', @@ -117,7 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int return self::SUCCESS; } - private function checkPermissions() + private function checkPermissions(): void { // @todo should take var-dir etc. from composer config or fallback to flex directory scheme if (!is_writable('public') && !is_writable('public/var')) { @@ -126,7 +122,7 @@ private function checkPermissions() } } - private function checkParameters() + private function checkParameters(): void { // @todo doesn't make sense to check for parameters.yml in sf4 and flex return; @@ -137,7 +133,7 @@ private function checkParameters() } } - private function checkCreateDatabase(OutputInterface $output) + private function checkCreateDatabase(OutputInterface $output): void { $output->writeln( sprintf( @@ -169,7 +165,7 @@ private function checkCreateDatabase(OutputInterface $output) * * @param \Symfony\Component\Console\Output\OutputInterface $output */ - private function cacheClear(OutputInterface $output) + private function cacheClear(OutputInterface $output): void { $this->cachePool->clear(); } @@ -186,7 +182,7 @@ private function cacheClear(OutputInterface $output) * @param \Symfony\Component\Console\Output\OutputInterface $output * @param string|null $siteaccess */ - private function indexData(OutputInterface $output, $siteaccess = null) + private function indexData(OutputInterface $output, $siteaccess = null): void { $output->writeln( sprintf('Search engine re-indexing, executing command ibexa:reindex') @@ -226,7 +222,7 @@ private function getInstaller($type) * Escape any user provided arguments, like: 'assets:install '.escapeshellarg($webDir) * @param int $timeout */ - private function executeCommand(OutputInterface $output, $cmd, $timeout = 300) + private function executeCommand(OutputInterface $output, string $cmd, $timeout = 300): void { $phpFinder = new PhpExecutableFinder(); if (!$phpPath = $phpFinder->find(false)) { @@ -267,7 +263,7 @@ private function executeCommand(OutputInterface $output, $cmd, $timeout = 300) $timeout ); - $process->run(static function ($type, $buffer) use ($output) { $output->write($buffer, false); }); + $process->run(static function ($type, $buffer) use ($output): void { $output->write($buffer, false); }); if (!$process->getExitCode() === 1) { throw new \RuntimeException(sprintf('An error occurred when executing the "%s" command.', escapeshellarg($cmd))); } diff --git a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php index cc8eadff76..24762fdb38 100644 --- a/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php +++ b/src/bundle/RepositoryInstaller/Command/ValidatePasswordHashesCommand.php @@ -17,11 +17,9 @@ #[AsCommand(name: 'ibexa:user:validate-password-hashes')] final class ValidatePasswordHashesCommand extends Command { - /** @var \Ibexa\Core\FieldType\User\UserStorage */ - private $userStorage; + private UserStorage $userStorage; - /** @var \Ibexa\Contracts\Core\Repository\PasswordHashService */ - private $passwordHashService; + private PasswordHashService $passwordHashService; public function __construct( UserStorage $userStorage, diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php index b3d46c96cb..673c033dfb 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php @@ -21,7 +21,7 @@ class InstallerTagPass implements CompilerPassInterface { public const INSTALLER_TAG = 'ibexa.installer'; - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(InstallPlatformCommand::class)) { return; diff --git a/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php b/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php index 46ee5f4437..be63f90716 100644 --- a/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php +++ b/src/bundle/RepositoryInstaller/Event/Subscriber/BuildSchemaSubscriber.php @@ -14,8 +14,7 @@ class BuildSchemaSubscriber implements EventSubscriberInterface { - /** @var string */ - private $schemaFilePath; + private string $schemaFilePath; /** * @param string $schemaFilePath Path to Yaml schema definition supported by SchemaBuilder diff --git a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php index 6351c6cc62..269c1e575a 100644 --- a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php @@ -19,8 +19,7 @@ */ class CoreInstaller extends DbBasedInstaller implements Installer { - /** @var \Ibexa\Contracts\DoctrineSchema\Builder\SchemaBuilderInterface */ - protected $schemaBuilder; + protected SchemaBuilderInterface $schemaBuilder; /** * @param \Doctrine\DBAL\Connection $db @@ -43,7 +42,7 @@ public function __construct(Connection $db, SchemaBuilderInterface $schemaBuilde * * @throws \Doctrine\DBAL\DBALException */ - public function importSchema() + public function importSchema(): void { // note: schema is built using Schema Builder event-driven API $schema = $this->schemaBuilder->buildSchema(); @@ -82,7 +81,7 @@ public function importSchema() * @throws \Doctrine\DBAL\DBALException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function importData() + public function importData(): void { $this->runQueriesFromFile($this->getKernelSQLFileForDBMS('cleandata.sql')); } diff --git a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php index 9188a527f0..ebbae03ca7 100644 --- a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php @@ -13,14 +13,12 @@ class DbBasedInstaller { - /** @var \Doctrine\DBAL\Connection */ - protected $db; + protected Connection $db; /** @var \Symfony\Component\Console\Output\OutputInterface */ protected $output; - /** @var string */ - protected $baseDataDir; + protected string $baseDataDir; public function __construct(Connection $db) { @@ -32,7 +30,7 @@ public function __construct(Connection $db) /** * @param \Symfony\Component\Console\Output\OutputInterface $output */ - public function setOutput($output) + public function setOutput($output): void { $this->output = $output; } @@ -43,7 +41,7 @@ public function setOutput($output) * @param string $source * @param string $target */ - protected function copyConfigurationFile($source, $target) + protected function copyConfigurationFile(string $source, string $target) { $fs = new Filesystem(); $fs->copy($source, $target, true); diff --git a/src/contracts/Event/View/PostBuildViewEvent.php b/src/contracts/Event/View/PostBuildViewEvent.php index a4636f570d..9cbb7006a1 100644 --- a/src/contracts/Event/View/PostBuildViewEvent.php +++ b/src/contracts/Event/View/PostBuildViewEvent.php @@ -13,8 +13,7 @@ final class PostBuildViewEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\View\View */ - private $view; + private View $view; public function __construct(View $view) { diff --git a/src/contracts/FieldType/GatewayBasedStorage.php b/src/contracts/FieldType/GatewayBasedStorage.php index d0e55dab37..9487c420a4 100644 --- a/src/contracts/FieldType/GatewayBasedStorage.php +++ b/src/contracts/FieldType/GatewayBasedStorage.php @@ -20,11 +20,10 @@ abstract class GatewayBasedStorage implements FieldStorage /** * Field Type External Storage Gateway. * - * @var \Ibexa\Contracts\Core\FieldType\StorageGatewayInterface * * @phpstan-var T */ - protected $gateway; + protected StorageGatewayInterface $gateway; /** * @param \Ibexa\Contracts\Core\FieldType\StorageGatewayInterface $gateway diff --git a/src/contracts/FieldType/Generic/Type.php b/src/contracts/FieldType/Generic/Type.php index 0af7c518e5..6a276133fe 100644 --- a/src/contracts/FieldType/Generic/Type.php +++ b/src/contracts/FieldType/Generic/Type.php @@ -23,11 +23,9 @@ abstract class Type extends FieldType { - /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface */ - protected $serializer; + protected ValueSerializerInterface $serializer; - /** @var \Symfony\Component\Validator\Validator\ValidatorInterface */ - protected $validator; + protected ValidatorInterface $validator; public function __construct(ValueSerializerInterface $serializer, ValidatorInterface $validator) { diff --git a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php index 54a73434ca..c9c2430cae 100644 --- a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php +++ b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php @@ -21,18 +21,15 @@ */ final class ConstraintViolationAdapter implements ValidationErrorInterface { - /** @var \Symfony\Component\Validator\ConstraintViolationInterface */ - private $violation; + private ConstraintViolationInterface $violation; /** * Element on which the error occurred * e.g. property name or property path compatible with Symfony PropertyAccess component. * * Example: StringLengthValidator[minStringLength] - * - * @var string */ - private $target; + private string $target; public function __construct(ConstraintViolationInterface $violation) { diff --git a/src/contracts/FieldType/ValidationError/AbstractValidationError.php b/src/contracts/FieldType/ValidationError/AbstractValidationError.php index ba7bf17c7b..b2aff3c027 100644 --- a/src/contracts/FieldType/ValidationError/AbstractValidationError.php +++ b/src/contracts/FieldType/ValidationError/AbstractValidationError.php @@ -17,21 +17,17 @@ */ abstract class AbstractValidationError implements ValidationError { - /** @var string */ - protected $message; + protected string $message; - /** @var array */ - protected $parameters; + protected array $parameters; /** * Element on which the error occurred * e.g. property name or property path compatible with Symfony PropertyAccess component. * * Example: StringLengthValidator[minStringLength] - * - * @var string */ - protected $target; + protected string $target; public function __construct(string $message, array $parameters, string $target) { diff --git a/src/contracts/IO/BinaryFileCreateStruct.php b/src/contracts/IO/BinaryFileCreateStruct.php index 01621157a1..d4799f6da5 100644 --- a/src/contracts/IO/BinaryFileCreateStruct.php +++ b/src/contracts/IO/BinaryFileCreateStruct.php @@ -62,7 +62,7 @@ public function getInputStream() * * @param resource $inputStream */ - public function setInputStream($inputStream) + public function setInputStream($inputStream): void { $this->inputStream = $inputStream; } diff --git a/src/contracts/Limitation/Target/Builder/VersionBuilder.php b/src/contracts/Limitation/Target/Builder/VersionBuilder.php index 5b870b5fed..240493218d 100644 --- a/src/contracts/Limitation/Target/Builder/VersionBuilder.php +++ b/src/contracts/Limitation/Target/Builder/VersionBuilder.php @@ -20,8 +20,7 @@ */ final class VersionBuilder { - /** @var array */ - private $targetVersionProperties = []; + private array $targetVersionProperties = []; public function build(): Target\Version { diff --git a/src/contracts/Limitation/Target/DestinationLocation.php b/src/contracts/Limitation/Target/DestinationLocation.php index 31bd9269b6..7f183d63c0 100644 --- a/src/contracts/Limitation/Target/DestinationLocation.php +++ b/src/contracts/Limitation/Target/DestinationLocation.php @@ -17,11 +17,9 @@ */ final class DestinationLocation extends ValueObject implements Target { - /** @var int */ - private $locationId; + private int $locationId; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $targetContentInfo; + private ContentInfo $targetContentInfo; public function __construct(int $locationId, ContentInfo $targetContentInfo, array $properties = []) { diff --git a/src/contracts/Limitation/Target/Version.php b/src/contracts/Limitation/Target/Version.php index 388a368342..5cef02732e 100644 --- a/src/contracts/Limitation/Target/Version.php +++ b/src/contracts/Limitation/Target/Version.php @@ -78,7 +78,7 @@ final class Version extends ValueObject implements Target * * @var string[] */ - private $translationsToDelete = []; + private array $translationsToDelete = []; /** * @param string[] $translationsToDelete List of language codes of translations to delete diff --git a/src/contracts/MVC/Templating/BaseRenderStrategy.php b/src/contracts/MVC/Templating/BaseRenderStrategy.php index a317356242..f19ba3bc8d 100644 --- a/src/contracts/MVC/Templating/BaseRenderStrategy.php +++ b/src/contracts/MVC/Templating/BaseRenderStrategy.php @@ -18,14 +18,11 @@ abstract class BaseRenderStrategy implements RenderStrategy /** @var \Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface[] */ protected $fragmentRenderers; - /** @var string */ - protected $defaultRenderer; + protected string $defaultRenderer; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - protected $siteAccess; + protected SiteAccess $siteAccess; - /** @var \Symfony\Component\HttpFoundation\RequestStack */ - protected $requestStack; + protected RequestStack $requestStack; public function __construct( iterable $fragmentRenderers, diff --git a/src/contracts/Persistence/Content/ContentItem.php b/src/contracts/Persistence/Content/ContentItem.php index 2870797717..ba8c0dba57 100644 --- a/src/contracts/Persistence/Content/ContentItem.php +++ b/src/contracts/Persistence/Content/ContentItem.php @@ -20,14 +20,11 @@ */ final class ContentItem extends ValueObject { - /** @var \Ibexa\Contracts\Core\Persistence\Content */ - protected $content; + protected Content $content; - /** @var \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - protected $contentInfo; + protected ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected $type; + protected Type $type; /** * @internal for internal use by Repository Storage abstraction diff --git a/src/contracts/Persistence/Content/LocationWithContentInfo.php b/src/contracts/Persistence/Content/LocationWithContentInfo.php index d792da8928..5fcfa21900 100644 --- a/src/contracts/Persistence/Content/LocationWithContentInfo.php +++ b/src/contracts/Persistence/Content/LocationWithContentInfo.php @@ -19,11 +19,9 @@ */ class LocationWithContentInfo extends ValueObject { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location */ - protected $location; + protected Location $location; - /** @var \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - protected $contentInfo; + protected ContentInfo $contentInfo; /** * @internal for internal use by Repository Storage abstraction diff --git a/src/contracts/Persistence/Filter/LazyListIterator.php b/src/contracts/Persistence/Filter/LazyListIterator.php index 8f341d2fcf..de74d1c459 100644 --- a/src/contracts/Persistence/Filter/LazyListIterator.php +++ b/src/contracts/Persistence/Filter/LazyListIterator.php @@ -19,11 +19,9 @@ */ abstract class LazyListIterator implements IteratorAggregate { - /** @var int */ - private $totalCount; + private int $totalCount; - /** @var iterable|null */ - private $iterator; + private ?iterable $iterator; /** @var callable|null */ private $iterationCallback; diff --git a/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php b/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php index c8b0574f18..628f879c7f 100644 --- a/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php +++ b/src/contracts/Repository/Decorator/BookmarkServiceDecorator.php @@ -14,8 +14,7 @@ abstract class BookmarkServiceDecorator implements BookmarkService { - /** @var \Ibexa\Contracts\Core\Repository\BookmarkService */ - protected $innerService; + protected BookmarkService $innerService; public function __construct(BookmarkService $innerService) { diff --git a/src/contracts/Repository/Decorator/ContentServiceDecorator.php b/src/contracts/Repository/Decorator/ContentServiceDecorator.php index fdf280423d..5a87d05ed7 100644 --- a/src/contracts/Repository/Decorator/ContentServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ContentServiceDecorator.php @@ -29,8 +29,7 @@ abstract class ContentServiceDecorator implements ContentService { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - protected $innerService; + protected ContentService $innerService; public function __construct(ContentService $innerService) { diff --git a/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php b/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php index 61fbe8f220..432c480842 100644 --- a/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ContentTypeServiceDecorator.php @@ -23,8 +23,7 @@ abstract class ContentTypeServiceDecorator implements ContentTypeService { - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - protected $innerService; + protected ContentTypeService $innerService; public function __construct(ContentTypeService $innerService) { diff --git a/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php b/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php index 689fdcd564..d0c6921878 100644 --- a/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php +++ b/src/contracts/Repository/Decorator/FieldTypeServiceDecorator.php @@ -13,8 +13,7 @@ abstract class FieldTypeServiceDecorator implements FieldTypeService { - /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */ - protected $innerService; + protected FieldTypeService $innerService; public function __construct(FieldTypeService $innerService) { diff --git a/src/contracts/Repository/Decorator/LanguageServiceDecorator.php b/src/contracts/Repository/Decorator/LanguageServiceDecorator.php index ac07957a68..3511dcb599 100644 --- a/src/contracts/Repository/Decorator/LanguageServiceDecorator.php +++ b/src/contracts/Repository/Decorator/LanguageServiceDecorator.php @@ -14,8 +14,7 @@ abstract class LanguageServiceDecorator implements LanguageService { - /** @var \Ibexa\Contracts\Core\Repository\LanguageService */ - protected $innerService; + protected LanguageService $innerService; public function __construct(LanguageService $innerService) { diff --git a/src/contracts/Repository/Decorator/LocationServiceDecorator.php b/src/contracts/Repository/Decorator/LocationServiceDecorator.php index 7afa5f436b..9cdf51d075 100644 --- a/src/contracts/Repository/Decorator/LocationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/LocationServiceDecorator.php @@ -19,8 +19,7 @@ abstract class LocationServiceDecorator implements LocationService { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - protected $innerService; + protected LocationService $innerService; public function __construct(LocationService $innerService) { diff --git a/src/contracts/Repository/Decorator/NotificationServiceDecorator.php b/src/contracts/Repository/Decorator/NotificationServiceDecorator.php index 658b39940d..8256bc818b 100644 --- a/src/contracts/Repository/Decorator/NotificationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/NotificationServiceDecorator.php @@ -15,8 +15,7 @@ abstract class NotificationServiceDecorator implements NotificationService { - /** @var \Ibexa\Contracts\Core\Repository\NotificationService */ - protected $innerService; + protected NotificationService $innerService; public function __construct(NotificationService $innerService) { diff --git a/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php b/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php index 24f73bb0e5..9a2e0b34ea 100644 --- a/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php +++ b/src/contracts/Repository/Decorator/ObjectStateServiceDecorator.php @@ -19,8 +19,7 @@ abstract class ObjectStateServiceDecorator implements ObjectStateService { - /** @var \Ibexa\Contracts\Core\Repository\ObjectStateService */ - protected $innerService; + protected ObjectStateService $innerService; public function __construct(ObjectStateService $innerService) { diff --git a/src/contracts/Repository/Decorator/RoleServiceDecorator.php b/src/contracts/Repository/Decorator/RoleServiceDecorator.php index eca74f1274..0e3f48185b 100644 --- a/src/contracts/Repository/Decorator/RoleServiceDecorator.php +++ b/src/contracts/Repository/Decorator/RoleServiceDecorator.php @@ -29,8 +29,7 @@ abstract class RoleServiceDecorator implements RoleService { - /** @var \Ibexa\Contracts\Core\Repository\RoleService */ - protected $innerService; + protected RoleService $innerService; public function __construct(RoleService $innerService) { diff --git a/src/contracts/Repository/Decorator/SearchServiceDecorator.php b/src/contracts/Repository/Decorator/SearchServiceDecorator.php index ba9478a8cb..3b9d41fbe6 100644 --- a/src/contracts/Repository/Decorator/SearchServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SearchServiceDecorator.php @@ -17,8 +17,7 @@ abstract class SearchServiceDecorator implements SearchService { - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - protected $innerService; + protected SearchService $innerService; public function __construct(SearchService $innerService) { diff --git a/src/contracts/Repository/Decorator/SectionServiceDecorator.php b/src/contracts/Repository/Decorator/SectionServiceDecorator.php index 7927170989..def11a465d 100644 --- a/src/contracts/Repository/Decorator/SectionServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SectionServiceDecorator.php @@ -21,8 +21,7 @@ abstract class SectionServiceDecorator implements SectionService { - /** @var \Ibexa\Contracts\Core\Repository\SectionService */ - protected $innerService; + protected SectionService $innerService; public function __construct(SectionService $innerService) { diff --git a/src/contracts/Repository/Decorator/SettingServiceDecorator.php b/src/contracts/Repository/Decorator/SettingServiceDecorator.php index 6174be9137..4f8f91a259 100644 --- a/src/contracts/Repository/Decorator/SettingServiceDecorator.php +++ b/src/contracts/Repository/Decorator/SettingServiceDecorator.php @@ -15,8 +15,7 @@ abstract class SettingServiceDecorator implements SettingService { - /** @var \Ibexa\Contracts\Core\Repository\SettingService */ - protected $innerService; + protected SettingService $innerService; public function __construct( SettingService $innerService diff --git a/src/contracts/Repository/Decorator/TranslationServiceDecorator.php b/src/contracts/Repository/Decorator/TranslationServiceDecorator.php index 47617365ce..4a8d49bc89 100644 --- a/src/contracts/Repository/Decorator/TranslationServiceDecorator.php +++ b/src/contracts/Repository/Decorator/TranslationServiceDecorator.php @@ -13,8 +13,7 @@ abstract class TranslationServiceDecorator implements TranslationService { - /** @var \Ibexa\Contracts\Core\Repository\TranslationService */ - protected $innerService; + protected TranslationService $innerService; public function __construct(TranslationService $innerService) { diff --git a/src/contracts/Repository/Decorator/TrashServiceDecorator.php b/src/contracts/Repository/Decorator/TrashServiceDecorator.php index 8dc21bdea2..f38902e4cc 100644 --- a/src/contracts/Repository/Decorator/TrashServiceDecorator.php +++ b/src/contracts/Repository/Decorator/TrashServiceDecorator.php @@ -18,8 +18,7 @@ abstract class TrashServiceDecorator implements TrashService { - /** @var \Ibexa\Contracts\Core\Repository\TrashService */ - protected $innerService; + protected TrashService $innerService; public function __construct(TrashService $innerService) { diff --git a/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php b/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php index 3b90f711ee..5df6b33bbb 100644 --- a/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLAliasServiceDecorator.php @@ -14,8 +14,7 @@ abstract class URLAliasServiceDecorator implements URLAliasService { - /** @var \Ibexa\Contracts\Core\Repository\URLAliasService */ - protected $innerService; + protected URLAliasService $innerService; public function __construct(URLAliasService $innerService) { diff --git a/src/contracts/Repository/Decorator/URLServiceDecorator.php b/src/contracts/Repository/Decorator/URLServiceDecorator.php index a7dd0562d2..70f7027da7 100644 --- a/src/contracts/Repository/Decorator/URLServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLServiceDecorator.php @@ -17,8 +17,7 @@ abstract class URLServiceDecorator implements URLService { - /** @var \Ibexa\Contracts\Core\Repository\URLService */ - protected $innerService; + protected URLService $innerService; public function __construct(URLService $innerService) { diff --git a/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php b/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php index 8c68f43dc2..261f42d6db 100644 --- a/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php +++ b/src/contracts/Repository/Decorator/URLWildcardServiceDecorator.php @@ -17,8 +17,7 @@ abstract class URLWildcardServiceDecorator implements URLWildcardService { - /** @var \Ibexa\Contracts\Core\Repository\URLWildcardService */ - protected $innerService; + protected URLWildcardService $innerService; public function __construct(URLWildcardService $innerService) { @@ -29,7 +28,7 @@ public function create( string $sourceUrl, string $destinationUrl, bool $forward = false - ): UrlWildcard { + ): URLWildcard { return $this->innerService->create($sourceUrl, $destinationUrl, $forward); } @@ -45,7 +44,7 @@ public function remove(URLWildcard $urlWildcard): void $this->innerService->remove($urlWildcard); } - public function load(int $id): UrlWildcard + public function load(int $id): URLWildcard { return $this->innerService->load($id); } diff --git a/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php b/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php index 15ad6068b7..04cfaef6e3 100644 --- a/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php +++ b/src/contracts/Repository/Decorator/UserPreferenceServiceDecorator.php @@ -14,8 +14,7 @@ abstract class UserPreferenceServiceDecorator implements UserPreferenceService { - /** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */ - protected $innerService; + protected UserPreferenceService $innerService; public function __construct(UserPreferenceService $innerService) { diff --git a/src/contracts/Repository/Decorator/UserServiceDecorator.php b/src/contracts/Repository/Decorator/UserServiceDecorator.php index 0e7ba27413..dc6b80e640 100644 --- a/src/contracts/Repository/Decorator/UserServiceDecorator.php +++ b/src/contracts/Repository/Decorator/UserServiceDecorator.php @@ -27,8 +27,7 @@ abstract class UserServiceDecorator implements UserService { - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - protected $innerService; + protected UserService $innerService; public function __construct(UserService $innerService) { diff --git a/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php index 5dd37d081f..129ab4352a 100644 --- a/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/BeforeCreateBookmarkEvent.php @@ -13,8 +13,7 @@ final class BeforeCreateBookmarkEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php index def4418944..cd338b6a44 100644 --- a/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/BeforeDeleteBookmarkEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteBookmarkEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php index 6117d15ab1..9c3f0dbe1b 100644 --- a/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/CreateBookmarkEvent.php @@ -13,8 +13,7 @@ final class CreateBookmarkEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php b/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php index 72fee09b22..b1d462f9d8 100644 --- a/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php +++ b/src/contracts/Repository/Events/Bookmark/DeleteBookmarkEvent.php @@ -13,8 +13,7 @@ final class DeleteBookmarkEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Content/AddRelationEvent.php b/src/contracts/Repository/Events/Content/AddRelationEvent.php index 7bbc561cde..f6baa24fa8 100644 --- a/src/contracts/Repository/Events/Content/AddRelationEvent.php +++ b/src/contracts/Repository/Events/Content/AddRelationEvent.php @@ -15,14 +15,11 @@ final class AddRelationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Relation */ - private $relation; + private Relation $relation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $sourceVersion; + private VersionInfo $sourceVersion; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $destinationContent; + private ContentInfo $destinationContent; public function __construct( Relation $relation, diff --git a/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php b/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php index 4a5ce76e67..c593d16128 100644 --- a/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeAddRelationEvent.php @@ -16,14 +16,11 @@ final class BeforeAddRelationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $sourceVersion; + private VersionInfo $sourceVersion; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $destinationContent; + private ContentInfo $destinationContent; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Relation|null */ - private $relation; + private ?Relation $relation = null; public function __construct(VersionInfo $sourceVersion, ContentInfo $destinationContent) { diff --git a/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php b/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php index e4833b4275..b049dcff38 100644 --- a/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php @@ -17,17 +17,13 @@ final class BeforeCopyContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct */ - private $destinationLocationCreateStruct; + private LocationCreateStruct $destinationLocationCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private ?VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $content; + private ?Content $content = null; public function __construct( ContentInfo $contentInfo, diff --git a/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php b/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php index 47afdbbe6e..e91cf7153e 100644 --- a/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php @@ -18,20 +18,15 @@ final class BeforeCreateContentDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private ?VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $creator; + private ?User $creator; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $language; + private ?Language $language; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $contentDraft; + private ?Content $contentDraft = null; public function __construct( ContentInfo $contentInfo, diff --git a/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php b/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php index 4c57ca3b9b..0258bd19a4 100644 --- a/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeCreateContentEvent.php @@ -15,17 +15,14 @@ final class BeforeCreateContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct */ - private $contentCreateStruct; + private ContentCreateStruct $contentCreateStruct; - /** @var array */ - private $locationCreateStructs; + private array $locationCreateStructs; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $content; + private ?Content $content = null; /** @var string[]|null */ - private $fieldIdentifiersToValidate; + private ?array $fieldIdentifiersToValidate; public function __construct( ContentCreateStruct $contentCreateStruct, diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php index 953ee3f6f3..3edf7f242a 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteContentEvent.php @@ -14,11 +14,9 @@ final class BeforeDeleteContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var array|null */ - private $locations; + private ?array $locations = null; public function __construct(ContentInfo $contentInfo) { diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php index c628f72c19..e566d656a5 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteRelationEvent.php @@ -14,11 +14,9 @@ final class BeforeDeleteRelationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $sourceVersion; + private VersionInfo $sourceVersion; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $destinationContent; + private ContentInfo $destinationContent; public function __construct(VersionInfo $sourceVersion, ContentInfo $destinationContent) { diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php index 61c9763837..208724f112 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteTranslationEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteTranslationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; private $languageCode; diff --git a/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php b/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php index fa7245ad7a..9d2f5c782f 100644 --- a/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeDeleteVersionEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteVersionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; public function __construct(VersionInfo $versionInfo) { diff --git a/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php b/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php index 5d60bb8f5f..a8e0d262d6 100644 --- a/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeHideContentEvent.php @@ -13,8 +13,7 @@ final class BeforeHideContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; public function __construct(ContentInfo $contentInfo) { diff --git a/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php b/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php index 130c2d802e..de6f50abd5 100644 --- a/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php +++ b/src/contracts/Repository/Events/Content/BeforePublishVersionEvent.php @@ -15,14 +15,12 @@ final class BeforePublishVersionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $content; + private ?Content $content = null; /** @var string[] */ - private $translations; + private array $translations; public function __construct(VersionInfo $versionInfo, array $translations) { diff --git a/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php b/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php index 197b3baf8a..c394b1b7be 100644 --- a/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeRevealContentEvent.php @@ -13,8 +13,7 @@ final class BeforeRevealContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; public function __construct(ContentInfo $contentInfo) { diff --git a/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php b/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php index cac5490729..cbe677e35b 100644 --- a/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeUpdateContentEvent.php @@ -16,17 +16,14 @@ final class BeforeUpdateContentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentUpdateStruct */ - private $contentUpdateStruct; + private ContentUpdateStruct $contentUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $content; + private ?Content $content = null; /** @var string[]|null */ - private $fieldIdentifiersToValidate; + private ?array $fieldIdentifiersToValidate; public function __construct( VersionInfo $versionInfo, diff --git a/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php b/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php index f940a44da8..18f12d5b02 100644 --- a/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php +++ b/src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php @@ -16,14 +16,11 @@ final class BeforeUpdateContentMetadataEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentMetadataUpdateStruct */ - private $contentMetadataUpdateStruct; + private ContentMetadataUpdateStruct $contentMetadataUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content|null */ - private $content; + private ?Content $content = null; public function __construct(ContentInfo $contentInfo, ContentMetadataUpdateStruct $contentMetadataUpdateStruct) { diff --git a/src/contracts/Repository/Events/Content/CopyContentEvent.php b/src/contracts/Repository/Events/Content/CopyContentEvent.php index e63a5c9e85..baa1b107e1 100644 --- a/src/contracts/Repository/Events/Content/CopyContentEvent.php +++ b/src/contracts/Repository/Events/Content/CopyContentEvent.php @@ -16,17 +16,13 @@ final class CopyContentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct */ - private $destinationLocationCreateStruct; + private LocationCreateStruct $destinationLocationCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private ?VersionInfo $versionInfo; public function __construct( Content $content, diff --git a/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php b/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php index 3955565119..16766cb9f4 100644 --- a/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php +++ b/src/contracts/Repository/Events/Content/CreateContentDraftEvent.php @@ -17,20 +17,15 @@ final class CreateContentDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $contentDraft; + private Content $contentDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private ?VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $creator; + private ?User $creator; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $language; + private ?Language $language; public function __construct( Content $contentDraft, diff --git a/src/contracts/Repository/Events/Content/CreateContentEvent.php b/src/contracts/Repository/Events/Content/CreateContentEvent.php index 5a7d2fb3e1..65f36c67fa 100644 --- a/src/contracts/Repository/Events/Content/CreateContentEvent.php +++ b/src/contracts/Repository/Events/Content/CreateContentEvent.php @@ -14,17 +14,14 @@ final class CreateContentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct */ - private $contentCreateStruct; + private ContentCreateStruct $contentCreateStruct; - /** @var array */ - private $locationCreateStructs; + private array $locationCreateStructs; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; /** @var string[]|null */ - private $fieldIdentifiersToValidate; + private ?array $fieldIdentifiersToValidate; public function __construct( Content $content, diff --git a/src/contracts/Repository/Events/Content/DeleteContentEvent.php b/src/contracts/Repository/Events/Content/DeleteContentEvent.php index 41e2599e33..feef592b5a 100644 --- a/src/contracts/Repository/Events/Content/DeleteContentEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteContentEvent.php @@ -13,11 +13,9 @@ final class DeleteContentEvent extends AfterEvent { - /** @var array */ - private $locations; + private array $locations; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; public function __construct( array $locations, diff --git a/src/contracts/Repository/Events/Content/DeleteRelationEvent.php b/src/contracts/Repository/Events/Content/DeleteRelationEvent.php index 8252930efa..4b3f1cf79a 100644 --- a/src/contracts/Repository/Events/Content/DeleteRelationEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteRelationEvent.php @@ -14,11 +14,9 @@ final class DeleteRelationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $sourceVersion; + private VersionInfo $sourceVersion; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $destinationContent; + private ContentInfo $destinationContent; public function __construct( VersionInfo $sourceVersion, diff --git a/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php b/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php index 16c2372409..3f03e4b493 100644 --- a/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteTranslationEvent.php @@ -13,8 +13,7 @@ final class DeleteTranslationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; private $languageCode; diff --git a/src/contracts/Repository/Events/Content/DeleteVersionEvent.php b/src/contracts/Repository/Events/Content/DeleteVersionEvent.php index 29cb76beb7..cc03953e87 100644 --- a/src/contracts/Repository/Events/Content/DeleteVersionEvent.php +++ b/src/contracts/Repository/Events/Content/DeleteVersionEvent.php @@ -13,8 +13,7 @@ final class DeleteVersionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; public function __construct(VersionInfo $versionInfo) { diff --git a/src/contracts/Repository/Events/Content/HideContentEvent.php b/src/contracts/Repository/Events/Content/HideContentEvent.php index 6cf729721f..829d9e72ac 100644 --- a/src/contracts/Repository/Events/Content/HideContentEvent.php +++ b/src/contracts/Repository/Events/Content/HideContentEvent.php @@ -13,8 +13,7 @@ final class HideContentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; public function __construct(ContentInfo $contentInfo) { diff --git a/src/contracts/Repository/Events/Content/PublishVersionEvent.php b/src/contracts/Repository/Events/Content/PublishVersionEvent.php index abd18bca8f..95d677896e 100644 --- a/src/contracts/Repository/Events/Content/PublishVersionEvent.php +++ b/src/contracts/Repository/Events/Content/PublishVersionEvent.php @@ -14,14 +14,12 @@ final class PublishVersionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; /** @var string[] */ - private $translations; + private array $translations; public function __construct( Content $content, diff --git a/src/contracts/Repository/Events/Content/RevealContentEvent.php b/src/contracts/Repository/Events/Content/RevealContentEvent.php index e53d4d00bf..19784d57fd 100644 --- a/src/contracts/Repository/Events/Content/RevealContentEvent.php +++ b/src/contracts/Repository/Events/Content/RevealContentEvent.php @@ -13,8 +13,7 @@ final class RevealContentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; public function __construct(ContentInfo $contentInfo) { diff --git a/src/contracts/Repository/Events/Content/UpdateContentEvent.php b/src/contracts/Repository/Events/Content/UpdateContentEvent.php index 004809882b..68ba907c76 100644 --- a/src/contracts/Repository/Events/Content/UpdateContentEvent.php +++ b/src/contracts/Repository/Events/Content/UpdateContentEvent.php @@ -15,17 +15,14 @@ final class UpdateContentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private $versionInfo; + private VersionInfo $versionInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentUpdateStruct */ - private $contentUpdateStruct; + private ContentUpdateStruct $contentUpdateStruct; /** @var string[]|null */ - private $fieldIdentifiersToValidate; + private ?array $fieldIdentifiersToValidate; public function __construct( Content $content, diff --git a/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php b/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php index a48047e1fa..12f64c5ccc 100644 --- a/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php +++ b/src/contracts/Repository/Events/Content/UpdateContentMetadataEvent.php @@ -15,14 +15,11 @@ final class UpdateContentMetadataEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentMetadataUpdateStruct */ - private $contentMetadataUpdateStruct; + private ContentMetadataUpdateStruct $contentMetadataUpdateStruct; public function __construct( Content $content, diff --git a/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php index 6985436851..19e29678c0 100644 --- a/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/AddFieldDefinitionEvent.php @@ -14,11 +14,9 @@ final class AddFieldDefinitionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct */ - private $fieldDefinitionCreateStruct; + private FieldDefinitionCreateStruct $fieldDefinitionCreateStruct; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php index dc73297169..cad1cf24e9 100644 --- a/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/AssignContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class AssignContentTypeGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct( ContentType $contentType, diff --git a/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php index 3d343a1450..5c2a9f9dec 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeAddFieldDefinitionEvent.php @@ -14,11 +14,9 @@ final class BeforeAddFieldDefinitionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct */ - private $fieldDefinitionCreateStruct; + private FieldDefinitionCreateStruct $fieldDefinitionCreateStruct; public function __construct(ContentTypeDraft $contentTypeDraft, FieldDefinitionCreateStruct $fieldDefinitionCreateStruct) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php index c01983125e..9ef82d3087 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeAssignContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeAssignContentTypeGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct(ContentType $contentType, ContentTypeGroup $contentTypeGroup) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php index 2a706ed4a0..403c12cd4f 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php @@ -15,14 +15,11 @@ final class BeforeCopyContentTypeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $creator; + private ?User $creator; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null */ - private $contentTypeCopy; + private ?ContentType $contentTypeCopy = null; public function __construct(ContentType $contentType, ?User $creator = null) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php index 0d6d39e9b4..d724924f89 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeDraftEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateContentTypeDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft|null */ - private $contentTypeDraft; + private ?ContentTypeDraft $contentTypeDraft = null; public function __construct(ContentType $contentType) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php index f4706b7389..86737c47f7 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeEvent.php @@ -15,14 +15,11 @@ final class BeforeCreateContentTypeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeCreateStruct */ - private $contentTypeCreateStruct; + private ContentTypeCreateStruct $contentTypeCreateStruct; - /** @var array */ - private $contentTypeGroups; + private array $contentTypeGroups; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft|null */ - private $contentTypeDraft; + private ?ContentTypeDraft $contentTypeDraft = null; public function __construct(ContentTypeCreateStruct $contentTypeCreateStruct, array $contentTypeGroups) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php index d0ea49b65b..ef37f3a65a 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeCreateContentTypeGroupEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateContentTypeGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupCreateStruct */ - private $contentTypeGroupCreateStruct; + private ContentTypeGroupCreateStruct $contentTypeGroupCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup|null */ - private $contentTypeGroup; + private ?ContentTypeGroup $contentTypeGroup = null; public function __construct(ContentTypeGroupCreateStruct $contentTypeGroupCreateStruct) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php index 8258fbaa1b..2974c108ff 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteContentTypeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; public function __construct(ContentType $contentType) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php index effb3812aa..108a8675f7 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeDeleteContentTypeGroupEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteContentTypeGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct(ContentTypeGroup $contentTypeGroup) { diff --git a/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php index 601c560f4b..c7f30e558a 100644 --- a/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforePublishContentTypeDraftEvent.php @@ -13,8 +13,7 @@ final class BeforePublishContentTypeDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; public function __construct(ContentTypeDraft $contentTypeDraft) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php b/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php index a85344d48e..e3492461bf 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php @@ -14,14 +14,11 @@ final class BeforeRemoveContentTypeTranslationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var string */ - private $languageCode; + private string $languageCode; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft|null */ - private $newContentTypeDraft; + private ?ContentTypeDraft $newContentTypeDraft = null; public function __construct(ContentTypeDraft $contentTypeDraft, string $languageCode) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php index 87d8288921..059ca83557 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeRemoveFieldDefinitionEvent.php @@ -14,11 +14,9 @@ final class BeforeRemoveFieldDefinitionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition */ - private $fieldDefinition; + private FieldDefinition $fieldDefinition; public function __construct(ContentTypeDraft $contentTypeDraft, FieldDefinition $fieldDefinition) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php index ba712fccc5..289441c756 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUnassignContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeUnassignContentTypeGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct(ContentType $contentType, ContentTypeGroup $contentTypeGroup) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php index 27f66aeecd..c336f8a49c 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeDraftEvent.php @@ -14,11 +14,9 @@ final class BeforeUpdateContentTypeDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeUpdateStruct */ - private $contentTypeUpdateStruct; + private ContentTypeUpdateStruct $contentTypeUpdateStruct; public function __construct(ContentTypeDraft $contentTypeDraft, ContentTypeUpdateStruct $contentTypeUpdateStruct) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php index 085a83041b..3c51894ee9 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeUpdateContentTypeGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupUpdateStruct */ - private $contentTypeGroupUpdateStruct; + private ContentTypeGroupUpdateStruct $contentTypeGroupUpdateStruct; public function __construct(ContentTypeGroup $contentTypeGroup, ContentTypeGroupUpdateStruct $contentTypeGroupUpdateStruct) { diff --git a/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php index dc1b874ccd..32340c5878 100644 --- a/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/BeforeUpdateFieldDefinitionEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateFieldDefinitionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition */ - private $fieldDefinition; + private FieldDefinition $fieldDefinition; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct */ - private $fieldDefinitionUpdateStruct; + private FieldDefinitionUpdateStruct $fieldDefinitionUpdateStruct; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php index a64a2be0ce..5e0f3ccdfc 100644 --- a/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php @@ -14,14 +14,11 @@ final class CopyContentTypeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentTypeCopy; + private ContentType $contentTypeCopy; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $creator; + private ?User $creator; public function __construct( ContentType $contentTypeCopy, diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php index 4084795a14..386ea3db66 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeDraftEvent.php @@ -14,11 +14,9 @@ final class CreateContentTypeDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php index bd39572c64..cbf7a11adb 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeEvent.php @@ -14,14 +14,11 @@ final class CreateContentTypeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeCreateStruct */ - private $contentTypeCreateStruct; + private ContentTypeCreateStruct $contentTypeCreateStruct; - /** @var array */ - private $contentTypeGroups; + private array $contentTypeGroups; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php index 0d3d537974..0a8614834f 100644 --- a/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/CreateContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class CreateContentTypeGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupCreateStruct */ - private $contentTypeGroupCreateStruct; + private ContentTypeGroupCreateStruct $contentTypeGroupCreateStruct; public function __construct( ContentTypeGroup $contentTypeGroup, diff --git a/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php b/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php index e3fc0a907d..2d1e7af824 100644 --- a/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php +++ b/src/contracts/Repository/Events/ContentType/DeleteContentTypeEvent.php @@ -13,8 +13,7 @@ final class DeleteContentTypeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; public function __construct(ContentType $contentType) { diff --git a/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php index 4941f4c66b..d64db21eb2 100644 --- a/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/DeleteContentTypeGroupEvent.php @@ -13,8 +13,7 @@ final class DeleteContentTypeGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct(ContentTypeGroup $contentTypeGroup) { diff --git a/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php index e19b5b0f6c..449b63f575 100644 --- a/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/PublishContentTypeDraftEvent.php @@ -13,8 +13,7 @@ final class PublishContentTypeDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; public function __construct(ContentTypeDraft $contentTypeDraft) { diff --git a/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php b/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php index a6d78df42d..a27d5b2af8 100644 --- a/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php +++ b/src/contracts/Repository/Events/ContentType/RemoveContentTypeTranslationEvent.php @@ -13,14 +13,11 @@ final class RemoveContentTypeTranslationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $newContentTypeDraft; + private ContentTypeDraft $newContentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var string */ - private $languageCode; + private string $languageCode; public function __construct( ContentTypeDraft $newContentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php index 43196645d8..c89e039e2d 100644 --- a/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/RemoveFieldDefinitionEvent.php @@ -14,11 +14,9 @@ final class RemoveFieldDefinitionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition */ - private $fieldDefinition; + private FieldDefinition $fieldDefinition; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php index 9adc7dd415..3b110cb95b 100644 --- a/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/UnassignContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class UnassignContentTypeGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; public function __construct( ContentType $contentType, diff --git a/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php b/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php index 00d8e74246..0fe72ef50b 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateContentTypeDraftEvent.php @@ -14,11 +14,9 @@ final class UpdateContentTypeDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeUpdateStruct */ - private $contentTypeUpdateStruct; + private ContentTypeUpdateStruct $contentTypeUpdateStruct; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php b/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php index 65493292c5..27c9a047d7 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateContentTypeGroupEvent.php @@ -14,11 +14,9 @@ final class UpdateContentTypeGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup */ - private $contentTypeGroup; + private ContentTypeGroup $contentTypeGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupUpdateStruct */ - private $contentTypeGroupUpdateStruct; + private ContentTypeGroupUpdateStruct $contentTypeGroupUpdateStruct; public function __construct( ContentTypeGroup $contentTypeGroup, diff --git a/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php b/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php index 0368061b75..12ce634271 100644 --- a/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php +++ b/src/contracts/Repository/Events/ContentType/UpdateFieldDefinitionEvent.php @@ -15,14 +15,11 @@ final class UpdateFieldDefinitionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft */ - private $contentTypeDraft; + private ContentTypeDraft $contentTypeDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition */ - private $fieldDefinition; + private FieldDefinition $fieldDefinition; - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct */ - private $fieldDefinitionUpdateStruct; + private FieldDefinitionUpdateStruct $fieldDefinitionUpdateStruct; public function __construct( ContentTypeDraft $contentTypeDraft, diff --git a/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php index 04291b8a4a..fb9c35db10 100644 --- a/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeCreateLanguageEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateLanguageEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LanguageCreateStruct */ - private $languageCreateStruct; + private LanguageCreateStruct $languageCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $language; + private ?Language $language = null; public function __construct(LanguageCreateStruct $languageCreateStruct) { diff --git a/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php index cbbdb0e44d..34afe9ed56 100644 --- a/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeDeleteLanguageEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteLanguageEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; public function __construct(Language $language) { diff --git a/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php index 58d35fe568..ed0341e024 100644 --- a/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeDisableLanguageEvent.php @@ -14,11 +14,9 @@ final class BeforeDisableLanguageEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $disabledLanguage; + private ?Language $disabledLanguage = null; public function __construct(Language $language) { diff --git a/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php b/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php index cef3f53404..d3c70e399f 100644 --- a/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeEnableLanguageEvent.php @@ -14,11 +14,9 @@ final class BeforeEnableLanguageEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $enabledLanguage; + private ?Language $enabledLanguage = null; public function __construct(Language $language) { diff --git a/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php b/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php index 550e53609f..9fdfc31d14 100644 --- a/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php +++ b/src/contracts/Repository/Events/Language/BeforeUpdateLanguageNameEvent.php @@ -14,14 +14,11 @@ final class BeforeUpdateLanguageNameEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; - /** @var string */ - private $newName; + private string $newName; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language|null */ - private $updatedLanguage; + private ?Language $updatedLanguage = null; public function __construct(Language $language, string $newName) { diff --git a/src/contracts/Repository/Events/Language/CreateLanguageEvent.php b/src/contracts/Repository/Events/Language/CreateLanguageEvent.php index fb1c6efd96..0c242cc972 100644 --- a/src/contracts/Repository/Events/Language/CreateLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/CreateLanguageEvent.php @@ -14,11 +14,9 @@ final class CreateLanguageEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LanguageCreateStruct */ - private $languageCreateStruct; + private LanguageCreateStruct $languageCreateStruct; public function __construct( Language $language, diff --git a/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php b/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php index 5186d48cbd..f2a2b228d7 100644 --- a/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/DeleteLanguageEvent.php @@ -13,8 +13,7 @@ final class DeleteLanguageEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; public function __construct(Language $language) { diff --git a/src/contracts/Repository/Events/Language/DisableLanguageEvent.php b/src/contracts/Repository/Events/Language/DisableLanguageEvent.php index 0da88b89ae..4774d6e798 100644 --- a/src/contracts/Repository/Events/Language/DisableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/DisableLanguageEvent.php @@ -13,11 +13,9 @@ final class DisableLanguageEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $disabledLanguage; + private Language $disabledLanguage; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; public function __construct( Language $disabledLanguage, diff --git a/src/contracts/Repository/Events/Language/EnableLanguageEvent.php b/src/contracts/Repository/Events/Language/EnableLanguageEvent.php index 3fa5468948..7dbed14a5b 100644 --- a/src/contracts/Repository/Events/Language/EnableLanguageEvent.php +++ b/src/contracts/Repository/Events/Language/EnableLanguageEvent.php @@ -13,11 +13,9 @@ final class EnableLanguageEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $enabledLanguage; + private Language $enabledLanguage; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; public function __construct( Language $enabledLanguage, diff --git a/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php b/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php index 0e0d02adbb..78a6e38752 100644 --- a/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php +++ b/src/contracts/Repository/Events/Language/UpdateLanguageNameEvent.php @@ -13,14 +13,11 @@ final class UpdateLanguageNameEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $updatedLanguage; + private Language $updatedLanguage; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - private $language; + private Language $language; - /** @var string */ - private $newName; + private string $newName; public function __construct( Language $updatedLanguage, diff --git a/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php b/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php index dc04dc4b5e..7aeb4478ad 100644 --- a/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeCopySubtreeEvent.php @@ -14,14 +14,11 @@ final class BeforeCopySubtreeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $subtree; + private Location $subtree; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $targetParentLocation; + private Location $targetParentLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $location; + private ?Location $location = null; public function __construct(Location $subtree, Location $targetParentLocation) { diff --git a/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php index 9b47d301c9..4840474ac5 100644 --- a/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeCreateLocationEvent.php @@ -16,14 +16,11 @@ final class BeforeCreateLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct */ - private $locationCreateStruct; + private LocationCreateStruct $locationCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $location; + private ?Location $location = null; public function __construct(ContentInfo $contentInfo, LocationCreateStruct $locationCreateStruct) { diff --git a/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php index 316c903d37..a5a40aa658 100644 --- a/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeDeleteLocationEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php index d108669424..fdf6b8d9b1 100644 --- a/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeHideLocationEvent.php @@ -14,11 +14,9 @@ final class BeforeHideLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $hiddenLocation; + private ?Location $hiddenLocation = null; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php b/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php index 2dfa9dc116..b3a2c283a9 100644 --- a/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeMoveSubtreeEvent.php @@ -13,11 +13,9 @@ final class BeforeMoveSubtreeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $newParentLocation; + private Location $newParentLocation; public function __construct(Location $location, Location $newParentLocation) { diff --git a/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php index e84e903a31..3b4119f6cc 100644 --- a/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeSwapLocationEvent.php @@ -13,11 +13,9 @@ final class BeforeSwapLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location1; + private Location $location1; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location2; + private Location $location2; public function __construct(Location $location1, Location $location2) { diff --git a/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php index 081eb4889a..497188178a 100644 --- a/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeUnhideLocationEvent.php @@ -14,11 +14,9 @@ final class BeforeUnhideLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $revealedLocation; + private ?Location $revealedLocation = null; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php b/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php index 455d84b4ab..c4add31f7d 100644 --- a/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/BeforeUpdateLocationEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationUpdateStruct */ - private $locationUpdateStruct; + private LocationUpdateStruct $locationUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $updatedLocation; + private ?Location $updatedLocation = null; public function __construct(Location $location, LocationUpdateStruct $locationUpdateStruct) { diff --git a/src/contracts/Repository/Events/Location/CopySubtreeEvent.php b/src/contracts/Repository/Events/Location/CopySubtreeEvent.php index e52bb3c734..700a09bde4 100644 --- a/src/contracts/Repository/Events/Location/CopySubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/CopySubtreeEvent.php @@ -13,14 +13,11 @@ final class CopySubtreeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $subtree; + private Location $subtree; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $targetParentLocation; + private Location $targetParentLocation; public function __construct( Location $location, diff --git a/src/contracts/Repository/Events/Location/CreateLocationEvent.php b/src/contracts/Repository/Events/Location/CreateLocationEvent.php index fff974a204..ce2dd1f705 100644 --- a/src/contracts/Repository/Events/Location/CreateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/CreateLocationEvent.php @@ -15,14 +15,11 @@ final class CreateLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct */ - private $locationCreateStruct; + private LocationCreateStruct $locationCreateStruct; public function __construct( Location $location, diff --git a/src/contracts/Repository/Events/Location/DeleteLocationEvent.php b/src/contracts/Repository/Events/Location/DeleteLocationEvent.php index eae70e86ef..5d8d5c23bf 100644 --- a/src/contracts/Repository/Events/Location/DeleteLocationEvent.php +++ b/src/contracts/Repository/Events/Location/DeleteLocationEvent.php @@ -13,8 +13,7 @@ final class DeleteLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Location/HideLocationEvent.php b/src/contracts/Repository/Events/Location/HideLocationEvent.php index 7518436127..e6dae2e93d 100644 --- a/src/contracts/Repository/Events/Location/HideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/HideLocationEvent.php @@ -13,11 +13,9 @@ final class HideLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $hiddenLocation; + private Location $hiddenLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct( Location $hiddenLocation, diff --git a/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php b/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php index 02a668d525..d221f97650 100644 --- a/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php +++ b/src/contracts/Repository/Events/Location/MoveSubtreeEvent.php @@ -13,11 +13,9 @@ final class MoveSubtreeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $newParentLocation; + private Location $newParentLocation; public function __construct( Location $location, diff --git a/src/contracts/Repository/Events/Location/SwapLocationEvent.php b/src/contracts/Repository/Events/Location/SwapLocationEvent.php index c60df93659..48976902ae 100644 --- a/src/contracts/Repository/Events/Location/SwapLocationEvent.php +++ b/src/contracts/Repository/Events/Location/SwapLocationEvent.php @@ -13,11 +13,9 @@ final class SwapLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location1; + private Location $location1; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location2; + private Location $location2; public function __construct( Location $location1, diff --git a/src/contracts/Repository/Events/Location/UnhideLocationEvent.php b/src/contracts/Repository/Events/Location/UnhideLocationEvent.php index 37b511c41f..b27d959cdd 100644 --- a/src/contracts/Repository/Events/Location/UnhideLocationEvent.php +++ b/src/contracts/Repository/Events/Location/UnhideLocationEvent.php @@ -13,11 +13,9 @@ final class UnhideLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $revealedLocation; + private Location $revealedLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct( Location $revealedLocation, diff --git a/src/contracts/Repository/Events/Location/UpdateLocationEvent.php b/src/contracts/Repository/Events/Location/UpdateLocationEvent.php index 642073f96c..df6dcef0fd 100644 --- a/src/contracts/Repository/Events/Location/UpdateLocationEvent.php +++ b/src/contracts/Repository/Events/Location/UpdateLocationEvent.php @@ -14,14 +14,11 @@ final class UpdateLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $updatedLocation; + private Location $updatedLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\LocationUpdateStruct */ - private $locationUpdateStruct; + private LocationUpdateStruct $locationUpdateStruct; public function __construct( Location $updatedLocation, diff --git a/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php b/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php index 1b3827c413..5d6fcff99b 100644 --- a/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeCreateNotificationEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateNotificationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\CreateStruct */ - private $createStruct; + private CreateStruct $createStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification|null */ - private $notification; + private ?Notification $notification = null; public function __construct(CreateStruct $createStruct) { diff --git a/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php b/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php index bec89d4137..a2d22f4f80 100644 --- a/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeDeleteNotificationEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteNotificationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification */ - private $notification; + private Notification $notification; public function __construct(Notification $notification) { diff --git a/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php b/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php index 98cd8baf1f..2641376c14 100644 --- a/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php +++ b/src/contracts/Repository/Events/Notification/BeforeMarkNotificationAsReadEvent.php @@ -13,8 +13,7 @@ final class BeforeMarkNotificationAsReadEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification */ - private $notification; + private Notification $notification; public function __construct(Notification $notification) { diff --git a/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php b/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php index a5c0294e04..46c1aa4a7f 100644 --- a/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/CreateNotificationEvent.php @@ -14,11 +14,9 @@ final class CreateNotificationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification */ - private $notification; + private Notification $notification; - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\CreateStruct */ - private $createStruct; + private CreateStruct $createStruct; public function __construct( Notification $notification, diff --git a/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php b/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php index 3c300612d7..63ca728092 100644 --- a/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php +++ b/src/contracts/Repository/Events/Notification/DeleteNotificationEvent.php @@ -13,8 +13,7 @@ final class DeleteNotificationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification */ - private $notification; + private Notification $notification; public function __construct(Notification $notification) { diff --git a/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php b/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php index 1c45771144..0f74cdc60d 100644 --- a/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php +++ b/src/contracts/Repository/Events/Notification/MarkNotificationAsReadEvent.php @@ -13,8 +13,7 @@ final class MarkNotificationAsReadEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Notification\Notification */ - private $notification; + private Notification $notification; public function __construct(Notification $notification) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php index d0393f2163..258e67186d 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateEvent.php @@ -16,14 +16,11 @@ final class BeforeCreateObjectStateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateCreateStruct */ - private $objectStateCreateStruct; + private ObjectStateCreateStruct $objectStateCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState|null */ - private $objectState; + private ?ObjectState $objectState = null; public function __construct(ObjectStateGroup $objectStateGroup, ObjectStateCreateStruct $objectStateCreateStruct) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php index 03965101ef..4efa0e7ded 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeCreateObjectStateGroupEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateObjectStateGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupCreateStruct */ - private $objectStateGroupCreateStruct; + private ObjectStateGroupCreateStruct $objectStateGroupCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup|null */ - private $objectStateGroup; + private ?ObjectStateGroup $objectStateGroup = null; public function __construct(ObjectStateGroupCreateStruct $objectStateGroupCreateStruct) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php index 719a8e60da..48fe94f3a2 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteObjectStateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; public function __construct(ObjectState $objectState) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php index 25486cefa9..c24fae92f7 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeDeleteObjectStateGroupEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteObjectStateGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; public function __construct(ObjectStateGroup $objectStateGroup) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php index 42bc078d59..505a130ccc 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeSetContentStateEvent.php @@ -15,14 +15,11 @@ final class BeforeSetContentStateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; public function __construct(ContentInfo $contentInfo, ObjectStateGroup $objectStateGroup, ObjectState $objectState) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php index d3c9cd3bad..4640399d05 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeSetPriorityOfObjectStateEvent.php @@ -13,8 +13,7 @@ final class BeforeSetPriorityOfObjectStateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; private $priority; diff --git a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php index 3df199026c..248e75deb2 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateObjectStateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateUpdateStruct */ - private $objectStateUpdateStruct; + private ObjectStateUpdateStruct $objectStateUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState|null */ - private $updatedObjectState; + private ?ObjectState $updatedObjectState = null; public function __construct(ObjectState $objectState, ObjectStateUpdateStruct $objectStateUpdateStruct) { diff --git a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php index f2411eac80..2d0835c218 100644 --- a/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/BeforeUpdateObjectStateGroupEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateObjectStateGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct */ - private $objectStateGroupUpdateStruct; + private ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup|null */ - private $updatedObjectStateGroup; + private ?ObjectStateGroup $updatedObjectStateGroup = null; public function __construct(ObjectStateGroup $objectStateGroup, ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct) { diff --git a/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php index 80c9087190..6236675313 100644 --- a/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/CreateObjectStateEvent.php @@ -15,14 +15,11 @@ final class CreateObjectStateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateCreateStruct */ - private $objectStateCreateStruct; + private ObjectStateCreateStruct $objectStateCreateStruct; public function __construct( ObjectState $objectState, diff --git a/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php index e90555a34b..b9815b750b 100644 --- a/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/CreateObjectStateGroupEvent.php @@ -14,11 +14,9 @@ final class CreateObjectStateGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupCreateStruct */ - private $objectStateGroupCreateStruct; + private ObjectStateGroupCreateStruct $objectStateGroupCreateStruct; public function __construct( ObjectStateGroup $objectStateGroup, diff --git a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php index 469bdfa662..9f0ecaed6a 100644 --- a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateEvent.php @@ -13,8 +13,7 @@ final class DeleteObjectStateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; public function __construct(ObjectState $objectState) { diff --git a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php index 02b8994fdc..fc68106df3 100644 --- a/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/DeleteObjectStateGroupEvent.php @@ -13,8 +13,7 @@ final class DeleteObjectStateGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; public function __construct(ObjectStateGroup $objectStateGroup) { diff --git a/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php b/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php index f30e5dffc7..42c41ae19a 100644 --- a/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/SetContentStateEvent.php @@ -15,14 +15,11 @@ final class SetContentStateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; public function __construct( ContentInfo $contentInfo, diff --git a/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php index 78499fbee3..57c2ad829d 100644 --- a/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php @@ -13,8 +13,7 @@ final class SetPriorityOfObjectStateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; private $priority; diff --git a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php index d327ff383d..a2134be4ba 100644 --- a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php +++ b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateEvent.php @@ -14,14 +14,11 @@ final class UpdateObjectStateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $updatedObjectState; + private ObjectState $updatedObjectState; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState */ - private $objectState; + private ObjectState $objectState; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateUpdateStruct */ - private $objectStateUpdateStruct; + private ObjectStateUpdateStruct $objectStateUpdateStruct; public function __construct( ObjectState $updatedObjectState, diff --git a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php index 46ae8b3eca..cbfa4553e6 100644 --- a/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php +++ b/src/contracts/Repository/Events/ObjectState/UpdateObjectStateGroupEvent.php @@ -14,14 +14,11 @@ final class UpdateObjectStateGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $updatedObjectStateGroup; + private ObjectStateGroup $updatedObjectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup */ - private $objectStateGroup; + private ObjectStateGroup $objectStateGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct */ - private $objectStateGroupUpdateStruct; + private ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct; public function __construct( ObjectStateGroup $updatedObjectStateGroup, diff --git a/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php index 24af78f65e..df94d9ea62 100644 --- a/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php @@ -14,13 +14,11 @@ final class AddPolicyByRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct */ - private $policyCreateStruct; + private PolicyCreateStruct $policyCreateStruct; - private $updatedRoleDraft; + private RoleDraft $updatedRoleDraft; public function __construct( RoleDraft $updatedRoleDraft, diff --git a/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php b/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php index bfbb85861c..07610df0ff 100644 --- a/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php +++ b/src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php @@ -15,14 +15,11 @@ final class AssignRoleToUserEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation */ - private $roleLimitation; + private ?RoleLimitation $roleLimitation; public function __construct( Role $role, diff --git a/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php b/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php index 558caf61e3..cd6573cb1f 100644 --- a/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php +++ b/src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php @@ -15,14 +15,11 @@ final class AssignRoleToUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation */ - private $roleLimitation; + private ?RoleLimitation $roleLimitation; public function __construct( Role $role, diff --git a/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php index 2b2cf734d2..22d2423a0c 100644 --- a/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php @@ -15,14 +15,11 @@ final class BeforeAddPolicyByRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct */ - private $policyCreateStruct; + private PolicyCreateStruct $policyCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft|null */ - private $updatedRoleDraft; + private ?RoleDraft $updatedRoleDraft = null; public function __construct(RoleDraft $roleDraft, PolicyCreateStruct $policyCreateStruct) { diff --git a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php index 79e845cf98..eb204bd545 100644 --- a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php @@ -15,14 +15,11 @@ final class BeforeAssignRoleToUserEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation */ - private $roleLimitation; + private ?RoleLimitation $roleLimitation; public function __construct(Role $role, User $user, ?RoleLimitation $roleLimitation = null) { diff --git a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php index 6e3468cd96..f100d0789c 100644 --- a/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php @@ -15,14 +15,11 @@ final class BeforeAssignRoleToUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation */ - private $roleLimitation; + private ?RoleLimitation $roleLimitation; public function __construct(Role $role, UserGroup $userGroup, ?RoleLimitation $roleLimitation = null) { diff --git a/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php index 88112c8770..d527e709c0 100644 --- a/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCopyRoleEvent.php @@ -15,14 +15,11 @@ final class BeforeCopyRoleEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleCopyStruct */ - private $roleCopyStruct; + private RoleCopyStruct $roleCopyStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role|null */ - private $copiedRole; + private ?Role $copiedRole = null; public function __construct(Role $role, RoleCopyStruct $roleCopyStruct) { diff --git a/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php index 831b32ba30..a47457055c 100644 --- a/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCreateRoleDraftEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft|null */ - private $roleDraft; + private ?RoleDraft $roleDraft = null; public function __construct(Role $role) { diff --git a/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php index 76953db37b..1a8168e949 100644 --- a/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeCreateRoleEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateRoleEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleCreateStruct */ - private $roleCreateStruct; + private RoleCreateStruct $roleCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft|null */ - private $roleDraft; + private ?RoleDraft $roleDraft = null; public function __construct(RoleCreateStruct $roleCreateStruct) { diff --git a/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php b/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php index 3e4e8089f4..184db86875 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeletePolicyEvent.php @@ -13,8 +13,7 @@ final class BeforeDeletePolicyEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Policy */ - private $policy; + private Policy $policy; public function __construct(Policy $policy) { diff --git a/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php index 9e979aa701..aac19bc60f 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeleteRoleDraftEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct(RoleDraft $roleDraft) { diff --git a/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php b/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php index 4509d9a224..c5e3d3a90e 100644 --- a/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeDeleteRoleEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteRoleEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; public function __construct(Role $role) { diff --git a/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php index 9c497b9314..183f4a6eca 100644 --- a/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforePublishRoleDraftEvent.php @@ -13,8 +13,7 @@ final class BeforePublishRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct(RoleDraft $roleDraft) { diff --git a/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php index 2c1cb6dbbc..b5eba1e2f2 100644 --- a/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeRemovePolicyByRoleDraftEvent.php @@ -15,14 +15,11 @@ final class BeforeRemovePolicyByRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - private $policyDraft; + private PolicyDraft $policyDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft|null */ - private $updatedRoleDraft; + private ?RoleDraft $updatedRoleDraft = null; public function __construct(RoleDraft $roleDraft, PolicyDraft $policyDraft) { diff --git a/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php b/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php index 36e4ccc8db..de1cf9f245 100644 --- a/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeRemoveRoleAssignmentEvent.php @@ -13,8 +13,7 @@ final class BeforeRemoveRoleAssignmentEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleAssignment */ - private $roleAssignment; + private RoleAssignment $roleAssignment; public function __construct(RoleAssignment $roleAssignment) { diff --git a/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php index f1a56118d7..379ea5dd09 100644 --- a/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeUpdatePolicyByRoleDraftEvent.php @@ -16,17 +16,13 @@ final class BeforeUpdatePolicyByRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - private $policy; + private PolicyDraft $policy; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyUpdateStruct */ - private $policyUpdateStruct; + private PolicyUpdateStruct $policyUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft|null */ - private $updatedPolicyDraft; + private ?PolicyDraft $updatedPolicyDraft = null; public function __construct(RoleDraft $roleDraft, PolicyDraft $policy, PolicyUpdateStruct $policyUpdateStruct) { diff --git a/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php index f9fad19f97..5f1558e33f 100644 --- a/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/BeforeUpdateRoleDraftEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateRoleDraftEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleUpdateStruct */ - private $roleUpdateStruct; + private RoleUpdateStruct $roleUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft|null */ - private $updatedRoleDraft; + private ?RoleDraft $updatedRoleDraft = null; public function __construct(RoleDraft $roleDraft, RoleUpdateStruct $roleUpdateStruct) { diff --git a/src/contracts/Repository/Events/Role/CopyRoleEvent.php b/src/contracts/Repository/Events/Role/CopyRoleEvent.php index 402bead5e3..46c03c8147 100644 --- a/src/contracts/Repository/Events/Role/CopyRoleEvent.php +++ b/src/contracts/Repository/Events/Role/CopyRoleEvent.php @@ -14,14 +14,11 @@ final class CopyRoleEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $copiedRole; + private Role $copiedRole; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleCopyStruct */ - private $roleCopyStruct; + private RoleCopyStruct $roleCopyStruct; public function __construct( Role $copiedRole, diff --git a/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php index 1a6877641a..48186bf8d2 100644 --- a/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/CreateRoleDraftEvent.php @@ -14,11 +14,9 @@ final class CreateRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct( RoleDraft $roleDraft, diff --git a/src/contracts/Repository/Events/Role/CreateRoleEvent.php b/src/contracts/Repository/Events/Role/CreateRoleEvent.php index 4a806578a2..4fcdc2f1bb 100644 --- a/src/contracts/Repository/Events/Role/CreateRoleEvent.php +++ b/src/contracts/Repository/Events/Role/CreateRoleEvent.php @@ -14,11 +14,9 @@ final class CreateRoleEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleCreateStruct */ - private $roleCreateStruct; + private RoleCreateStruct $roleCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct( RoleDraft $roleDraft, diff --git a/src/contracts/Repository/Events/Role/DeletePolicyEvent.php b/src/contracts/Repository/Events/Role/DeletePolicyEvent.php index b1511f288c..097823cd35 100644 --- a/src/contracts/Repository/Events/Role/DeletePolicyEvent.php +++ b/src/contracts/Repository/Events/Role/DeletePolicyEvent.php @@ -13,8 +13,7 @@ final class DeletePolicyEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Policy */ - private $policy; + private Policy $policy; public function __construct( Policy $policy diff --git a/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php b/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php index f3b5d420bc..52cc28b401 100644 --- a/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/DeleteRoleDraftEvent.php @@ -13,8 +13,7 @@ final class DeleteRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct( RoleDraft $roleDraft diff --git a/src/contracts/Repository/Events/Role/DeleteRoleEvent.php b/src/contracts/Repository/Events/Role/DeleteRoleEvent.php index 153f0c862a..0278ab2a14 100644 --- a/src/contracts/Repository/Events/Role/DeleteRoleEvent.php +++ b/src/contracts/Repository/Events/Role/DeleteRoleEvent.php @@ -13,8 +13,7 @@ final class DeleteRoleEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Role */ - private $role; + private Role $role; public function __construct( Role $role diff --git a/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php b/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php index 32388b589f..808e683f5f 100644 --- a/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/PublishRoleDraftEvent.php @@ -13,8 +13,7 @@ final class PublishRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; public function __construct( RoleDraft $roleDraft diff --git a/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php index 07e713e060..ac3c407896 100644 --- a/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/RemovePolicyByRoleDraftEvent.php @@ -14,14 +14,11 @@ final class RemovePolicyByRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - private $policyDraft; + private PolicyDraft $policyDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $updatedRoleDraft; + private RoleDraft $updatedRoleDraft; public function __construct( RoleDraft $updatedRoleDraft, diff --git a/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php b/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php index 5278c115d7..f111d530d4 100644 --- a/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php +++ b/src/contracts/Repository/Events/Role/RemoveRoleAssignmentEvent.php @@ -13,8 +13,7 @@ final class RemoveRoleAssignmentEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleAssignment */ - private $roleAssignment; + private RoleAssignment $roleAssignment; public function __construct( RoleAssignment $roleAssignment diff --git a/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php b/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php index a624899877..2ffdd7d39d 100644 --- a/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/UpdatePolicyByRoleDraftEvent.php @@ -15,17 +15,13 @@ final class UpdatePolicyByRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - private $policy; + private PolicyDraft $policy; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyUpdateStruct */ - private $policyUpdateStruct; + private PolicyUpdateStruct $policyUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - private $updatedPolicyDraft; + private PolicyDraft $updatedPolicyDraft; public function __construct( PolicyDraft $updatedPolicyDraft, diff --git a/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php b/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php index 0f2a5ab3a1..930f50a4a6 100644 --- a/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php +++ b/src/contracts/Repository/Events/Role/UpdateRoleDraftEvent.php @@ -14,14 +14,11 @@ final class UpdateRoleDraftEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $roleDraft; + private RoleDraft $roleDraft; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleUpdateStruct */ - private $roleUpdateStruct; + private RoleUpdateStruct $roleUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - private $updatedRoleDraft; + private RoleDraft $updatedRoleDraft; public function __construct( RoleDraft $updatedRoleDraft, diff --git a/src/contracts/Repository/Events/Section/AssignSectionEvent.php b/src/contracts/Repository/Events/Section/AssignSectionEvent.php index 8a695fc10a..7528fde171 100644 --- a/src/contracts/Repository/Events/Section/AssignSectionEvent.php +++ b/src/contracts/Repository/Events/Section/AssignSectionEvent.php @@ -14,11 +14,9 @@ final class AssignSectionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct( ContentInfo $contentInfo, diff --git a/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php b/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php index d717259819..8bf089e990 100644 --- a/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php +++ b/src/contracts/Repository/Events/Section/AssignSectionToSubtreeEvent.php @@ -14,11 +14,9 @@ final class AssignSectionToSubtreeEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct( Location $location, diff --git a/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php index a2ae2f3863..96dbb90ce1 100644 --- a/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeAssignSectionEvent.php @@ -14,11 +14,9 @@ final class BeforeAssignSectionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - private $contentInfo; + private ContentInfo $contentInfo; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct(ContentInfo $contentInfo, Section $section) { diff --git a/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php b/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php index a5b06848ef..192e139e90 100644 --- a/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeAssignSectionToSubtreeEvent.php @@ -14,11 +14,9 @@ final class BeforeAssignSectionToSubtreeEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct(Location $location, Section $section) { diff --git a/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php index 4b2208095e..f3418d245d 100644 --- a/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeCreateSectionEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateSectionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\SectionCreateStruct */ - private $sectionCreateStruct; + private SectionCreateStruct $sectionCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section|null */ - private $section; + private ?Section $section = null; public function __construct(SectionCreateStruct $sectionCreateStruct) { diff --git a/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php index 5caf4732fa..50d7aa73b6 100644 --- a/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeDeleteSectionEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteSectionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct(Section $section) { diff --git a/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php b/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php index 9c800aee06..231d6ddc3d 100644 --- a/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/BeforeUpdateSectionEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateSectionEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\SectionUpdateStruct */ - private $sectionUpdateStruct; + private SectionUpdateStruct $sectionUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section|null */ - private $updatedSection; + private ?Section $updatedSection = null; public function __construct(Section $section, SectionUpdateStruct $sectionUpdateStruct) { diff --git a/src/contracts/Repository/Events/Section/CreateSectionEvent.php b/src/contracts/Repository/Events/Section/CreateSectionEvent.php index 8528a0b363..fe4a9845c3 100644 --- a/src/contracts/Repository/Events/Section/CreateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/CreateSectionEvent.php @@ -14,11 +14,9 @@ final class CreateSectionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\SectionCreateStruct */ - private $sectionCreateStruct; + private SectionCreateStruct $sectionCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct( Section $section, diff --git a/src/contracts/Repository/Events/Section/DeleteSectionEvent.php b/src/contracts/Repository/Events/Section/DeleteSectionEvent.php index 881d512d23..026ab50d0f 100644 --- a/src/contracts/Repository/Events/Section/DeleteSectionEvent.php +++ b/src/contracts/Repository/Events/Section/DeleteSectionEvent.php @@ -13,8 +13,7 @@ final class DeleteSectionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; public function __construct( Section $section diff --git a/src/contracts/Repository/Events/Section/UpdateSectionEvent.php b/src/contracts/Repository/Events/Section/UpdateSectionEvent.php index 0360bd61ed..c686008377 100644 --- a/src/contracts/Repository/Events/Section/UpdateSectionEvent.php +++ b/src/contracts/Repository/Events/Section/UpdateSectionEvent.php @@ -14,14 +14,11 @@ final class UpdateSectionEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $section; + private Section $section; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\SectionUpdateStruct */ - private $sectionUpdateStruct; + private SectionUpdateStruct $sectionUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - private $updatedSection; + private Section $updatedSection; public function __construct( Section $updatedSection, diff --git a/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php index da4d4f99c1..f2cf2f12e3 100644 --- a/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeCreateSettingEvent.php @@ -15,11 +15,9 @@ final class BeforeCreateSettingEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\SettingCreateStruct */ - private $settingCreateStruct; + private SettingCreateStruct $settingCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting|null */ - private $setting; + private ?Setting $setting = null; public function __construct(SettingCreateStruct $settingCreateStruct) { diff --git a/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php index a63f1b5bd2..bf41ee1f3b 100644 --- a/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeDeleteSettingEvent.php @@ -13,8 +13,7 @@ final class BeforeDeleteSettingEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $setting; + private Setting $setting; public function __construct(Setting $setting) { diff --git a/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php b/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php index 9d4dcbc519..56b40f9a9e 100644 --- a/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/BeforeUpdateSettingEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateSettingEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $setting; + private Setting $setting; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\SettingUpdateStruct */ - private $settingUpdateStruct; + private SettingUpdateStruct $settingUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting|null */ - private $updatedSetting; + private ?Setting $updatedSetting = null; public function __construct(Setting $setting, SettingUpdateStruct $settingUpdateStruct) { diff --git a/src/contracts/Repository/Events/Setting/CreateSettingEvent.php b/src/contracts/Repository/Events/Setting/CreateSettingEvent.php index ef418dc1bc..4fe91cda6a 100644 --- a/src/contracts/Repository/Events/Setting/CreateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/CreateSettingEvent.php @@ -14,11 +14,9 @@ final class CreateSettingEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $setting; + private Setting $setting; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\SettingCreateStruct */ - private $settingCreateStruct; + private SettingCreateStruct $settingCreateStruct; public function __construct( Setting $setting, diff --git a/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php b/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php index e1c09c27f7..3cd3b8086a 100644 --- a/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/DeleteSettingEvent.php @@ -13,8 +13,7 @@ final class DeleteSettingEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $setting; + private Setting $setting; public function __construct(Setting $setting) { diff --git a/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php b/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php index f094a322ce..50245bc0a4 100644 --- a/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php +++ b/src/contracts/Repository/Events/Setting/UpdateSettingEvent.php @@ -14,14 +14,11 @@ final class UpdateSettingEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $updatedSetting; + private Setting $updatedSetting; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\Setting */ - private $setting; + private Setting $setting; - /** @var \Ibexa\Contracts\Core\Repository\Values\Setting\SettingUpdateStruct */ - private $settingUpdateStruct; + private SettingUpdateStruct $settingUpdateStruct; public function __construct( Setting $updatedSetting, diff --git a/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php b/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php index a8c4775cc5..b68d71574e 100644 --- a/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeDeleteTrashItemEvent.php @@ -15,11 +15,9 @@ final class BeforeDeleteTrashItemEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem */ - private $trashItem; + private TrashItem $trashItem; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResult|null */ - private $result; + private ?TrashItemDeleteResult $result = null; public function __construct(TrashItem $trashItem) { diff --git a/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php b/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php index fb6741860c..9312d58ed1 100644 --- a/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeEmptyTrashEvent.php @@ -14,8 +14,7 @@ final class BeforeEmptyTrashEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResultList|null */ - private $resultList; + private ?TrashItemDeleteResultList $resultList = null; public function __construct() { diff --git a/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php b/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php index 1ac9dcd8e1..aaf1d95e35 100644 --- a/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php @@ -15,14 +15,11 @@ final class BeforeRecoverEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem */ - private $trashItem; + private TrashItem $trashItem; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $newParentLocation; + private ?Location $newParentLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $location; + private ?Location $location = null; public function __construct(TrashItem $trashItem, ?Location $newParentLocation = null) { diff --git a/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php b/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php index d952e1ac42..6d57a4a809 100644 --- a/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/BeforeTrashEvent.php @@ -15,14 +15,11 @@ final class BeforeTrashEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem|null */ - private $result; + private ?TrashItem $result = null; - /** @var bool */ - private $resultSet = false; + private bool $resultSet = false; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php b/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php index 0015fd9250..68c61052b2 100644 --- a/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php +++ b/src/contracts/Repository/Events/Trash/DeleteTrashItemEvent.php @@ -14,11 +14,9 @@ final class DeleteTrashItemEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem */ - private $trashItem; + private TrashItem $trashItem; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResult */ - private $result; + private TrashItemDeleteResult $result; public function __construct( TrashItemDeleteResult $result, diff --git a/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php b/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php index 92db321e86..164a2e2735 100644 --- a/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php +++ b/src/contracts/Repository/Events/Trash/EmptyTrashEvent.php @@ -13,8 +13,7 @@ final class EmptyTrashEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResultList */ - private $resultList; + private TrashItemDeleteResultList $resultList; public function __construct(TrashItemDeleteResultList $resultList) { diff --git a/src/contracts/Repository/Events/Trash/RecoverEvent.php b/src/contracts/Repository/Events/Trash/RecoverEvent.php index 55d47df63f..11bf51629d 100644 --- a/src/contracts/Repository/Events/Trash/RecoverEvent.php +++ b/src/contracts/Repository/Events/Trash/RecoverEvent.php @@ -14,14 +14,11 @@ final class RecoverEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem */ - private $trashItem; + private TrashItem $trashItem; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $newParentLocation; + private ?Location $newParentLocation; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct( Location $location, diff --git a/src/contracts/Repository/Events/Trash/TrashEvent.php b/src/contracts/Repository/Events/Trash/TrashEvent.php index 50503e9bd2..69dd31f641 100644 --- a/src/contracts/Repository/Events/Trash/TrashEvent.php +++ b/src/contracts/Repository/Events/Trash/TrashEvent.php @@ -14,11 +14,9 @@ final class TrashEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem|null */ - private $trashItem; + private ?TrashItem $trashItem; public function __construct( ?TrashItem $trashItem, diff --git a/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php b/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php index 5f534a28dd..f1ea0939eb 100644 --- a/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php +++ b/src/contracts/Repository/Events/URL/BeforeUpdateUrlEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateUrlEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URL */ - private $url; + private URL $url; - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URLUpdateStruct */ - private $struct; + private URLUpdateStruct $struct; - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URL|null */ - private $updatedUrl; + private ?URL $updatedUrl = null; public function __construct(URL $url, URLUpdateStruct $struct) { diff --git a/src/contracts/Repository/Events/URL/UpdateUrlEvent.php b/src/contracts/Repository/Events/URL/UpdateUrlEvent.php index 56e123893b..7dec66f271 100644 --- a/src/contracts/Repository/Events/URL/UpdateUrlEvent.php +++ b/src/contracts/Repository/Events/URL/UpdateUrlEvent.php @@ -14,14 +14,11 @@ final class UpdateUrlEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URL */ - private $url; + private URL $url; - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URLUpdateStruct */ - private $struct; + private URLUpdateStruct $struct; - /** @var \Ibexa\Contracts\Core\Repository\Values\URL\URL */ - private $updatedUrl; + private URL $updatedUrl; public function __construct( URL $updatedUrl, diff --git a/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php index ff4eef4428..eab2b83021 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeCreateGlobalUrlAliasEvent.php @@ -24,8 +24,7 @@ final class BeforeCreateGlobalUrlAliasEvent extends BeforeEvent private $alwaysAvailable; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias|null */ - private $urlAlias; + private ?URLAlias $urlAlias = null; public function __construct($resource, $path, $languageCode, $forwarding, $alwaysAvailable) { diff --git a/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php index a9b7135bb1..4f5f055ce9 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeCreateUrlAliasEvent.php @@ -15,8 +15,7 @@ final class BeforeCreateUrlAliasEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; private $path; @@ -26,8 +25,7 @@ final class BeforeCreateUrlAliasEvent extends BeforeEvent private $alwaysAvailable; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias|null */ - private $urlAlias; + private ?URLAlias $urlAlias = null; public function __construct(Location $location, $path, $languageCode, $forwarding, $alwaysAvailable) { diff --git a/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php index a5124320ad..afcccec73b 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeRefreshSystemUrlAliasesForLocationEvent.php @@ -13,8 +13,7 @@ final class BeforeRefreshSystemUrlAliasesForLocationEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php b/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php index 1a09d8a321..c34d951c54 100644 --- a/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php +++ b/src/contracts/Repository/Events/URLAlias/BeforeRemoveAliasesEvent.php @@ -12,8 +12,7 @@ final class BeforeRemoveAliasesEvent extends BeforeEvent { - /** @var array */ - private $aliasList; + private array $aliasList; public function __construct(array $aliasList) { diff --git a/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php index 3dfe6c382b..f3f834515a 100644 --- a/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/CreateGlobalUrlAliasEvent.php @@ -23,8 +23,7 @@ final class CreateGlobalUrlAliasEvent extends AfterEvent private $alwaysAvailable; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias */ - private $urlAlias; + private URLAlias $urlAlias; public function __construct( URLAlias $urlAlias, diff --git a/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php b/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php index c638aa13c8..b5b73a0200 100644 --- a/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php +++ b/src/contracts/Repository/Events/URLAlias/CreateUrlAliasEvent.php @@ -14,8 +14,7 @@ final class CreateUrlAliasEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; private $path; @@ -25,8 +24,7 @@ final class CreateUrlAliasEvent extends AfterEvent private $alwaysAvailable; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias */ - private $urlAlias; + private URLAlias $urlAlias; public function __construct( URLAlias $urlAlias, diff --git a/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php b/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php index 5ec39e41e0..55bb51c155 100644 --- a/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php +++ b/src/contracts/Repository/Events/URLAlias/RefreshSystemUrlAliasesForLocationEvent.php @@ -13,8 +13,7 @@ final class RefreshSystemUrlAliasesForLocationEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $location; + private Location $location; public function __construct(Location $location) { diff --git a/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php b/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php index 966dbdf532..08e5bfa61d 100644 --- a/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php +++ b/src/contracts/Repository/Events/URLAlias/RemoveAliasesEvent.php @@ -12,8 +12,7 @@ final class RemoveAliasesEvent extends AfterEvent { - /** @var array */ - private $aliasList; + private array $aliasList; public function __construct( array $aliasList diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php index 08bca21c0e..9793fe97c4 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeCreateEvent.php @@ -20,8 +20,7 @@ final class BeforeCreateEvent extends BeforeEvent private $forward; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard|null */ - private $urlWildcard; + private ?URLWildcard $urlWildcard = null; public function __construct($sourceUrl, $destinationUrl, $forward) { diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php index 07c691373e..e51e73f42c 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeRemoveEvent.php @@ -13,8 +13,7 @@ final class BeforeRemoveEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard */ - private $urlWildcard; + private URLWildcard $urlWildcard; public function __construct(URLWildcard $urlWildcard) { diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php index 21e70d4508..dbf885948c 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeTranslateEvent.php @@ -16,8 +16,7 @@ final class BeforeTranslateEvent extends BeforeEvent { private $url; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardTranslationResult|null */ - private $result; + private ?URLWildcardTranslationResult $result = null; public function __construct($url) { diff --git a/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php b/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php index d95d3b50a6..4c51bb7767 100644 --- a/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/BeforeUpdateEvent.php @@ -14,11 +14,9 @@ final class BeforeUpdateEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard */ - private $urlWildcard; + private URLWildcard $urlWildcard; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardUpdateStruct */ - private $updateStruct; + private URLWildcardUpdateStruct $updateStruct; public function __construct( URLWildcard $urlWildcard, diff --git a/src/contracts/Repository/Events/URLWildcard/CreateEvent.php b/src/contracts/Repository/Events/URLWildcard/CreateEvent.php index 34f6f9f1b4..3f0ac3216d 100644 --- a/src/contracts/Repository/Events/URLWildcard/CreateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/CreateEvent.php @@ -19,8 +19,7 @@ final class CreateEvent extends AfterEvent private $forward; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard */ - private $urlWildcard; + private URLWildcard $urlWildcard; public function __construct( URLWildcard $urlWildcard, diff --git a/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php b/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php index 6e9bf88ed8..f5a30cd887 100644 --- a/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/RemoveEvent.php @@ -13,8 +13,7 @@ final class RemoveEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard */ - private $urlWildcard; + private URLWildcard $urlWildcard; public function __construct( URLWildcard $urlWildcard diff --git a/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php b/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php index 2cf8a6e731..09c0c25df9 100644 --- a/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/TranslateEvent.php @@ -15,8 +15,7 @@ final class TranslateEvent extends AfterEvent { private $url; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardTranslationResult */ - private $result; + private URLWildcardTranslationResult $result; public function __construct( URLWildcardTranslationResult $result, diff --git a/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php b/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php index 77599ff663..a211488f4f 100644 --- a/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php +++ b/src/contracts/Repository/Events/URLWildcard/UpdateEvent.php @@ -14,11 +14,9 @@ final class UpdateEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard */ - private $urlWildcard; + private URLWildcard $urlWildcard; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardUpdateStruct */ - private $updateStruct; + private URLWildcardUpdateStruct $updateStruct; public function __construct( URLWildcard $urlWildcard, diff --git a/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php b/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php index 17fbf38fef..38d577932f 100644 --- a/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/AssignUserToUserGroupEvent.php @@ -14,11 +14,9 @@ final class AssignUserToUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; public function __construct( User $user, diff --git a/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php index b1d1aaf6d1..2aea317bec 100644 --- a/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeAssignUserToUserGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeAssignUserToUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; public function __construct(User $user, UserGroup $userGroup) { diff --git a/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php b/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php index f2771575e3..2ce4bd7a8d 100644 --- a/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeCreateUserEvent.php @@ -15,14 +15,11 @@ final class BeforeCreateUserEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserCreateStruct */ - private $userCreateStruct; + private UserCreateStruct $userCreateStruct; - /** @var array */ - private $parentGroups; + private array $parentGroups; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|null */ - private $user; + private ?User $user = null; public function __construct(UserCreateStruct $userCreateStruct, array $parentGroups) { diff --git a/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php index dae1206c69..c97401a527 100644 --- a/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeCreateUserGroupEvent.php @@ -15,14 +15,11 @@ final class BeforeCreateUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroupCreateStruct */ - private $userGroupCreateStruct; + private UserGroupCreateStruct $userGroupCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $parentGroup; + private UserGroup $parentGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup|null */ - private $userGroup; + private ?UserGroup $userGroup = null; public function __construct(UserGroupCreateStruct $userGroupCreateStruct, UserGroup $parentGroup) { diff --git a/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php b/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php index 5485f87d05..5cba0c0dd8 100644 --- a/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeDeleteUserEvent.php @@ -14,11 +14,9 @@ final class BeforeDeleteUserEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var array|null */ - private $locations; + private ?array $locations = null; public function __construct(User $user) { diff --git a/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php index 2d5d76969e..03282547df 100644 --- a/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeDeleteUserGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeDeleteUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var array|null */ - private $locations; + private ?array $locations = null; public function __construct(UserGroup $userGroup) { diff --git a/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php index db6c85b32a..4841750021 100644 --- a/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeMoveUserGroupEvent.php @@ -13,11 +13,9 @@ final class BeforeMoveUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $newParent; + private UserGroup $newParent; public function __construct(UserGroup $userGroup, UserGroup $newParent) { diff --git a/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php index 3ad55444e6..42bcf52b29 100644 --- a/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUnAssignUserFromUserGroupEvent.php @@ -14,11 +14,9 @@ final class BeforeUnAssignUserFromUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; public function __construct(User $user, UserGroup $userGroup) { diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php index 163e6c8d9a..ce92056349 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateUserEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserUpdateStruct */ - private $userUpdateStruct; + private UserUpdateStruct $userUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|null */ - private $updatedUser; + private ?User $updatedUser = null; public function __construct(User $user, UserUpdateStruct $userUpdateStruct) { diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php index a70046fa6b..b40aa00489 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserGroupEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateUserGroupEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroupUpdateStruct */ - private $userGroupUpdateStruct; + private UserGroupUpdateStruct $userGroupUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup|null */ - private $updatedUserGroup; + private ?UserGroup $updatedUserGroup = null; public function __construct(UserGroup $userGroup, UserGroupUpdateStruct $userGroupUpdateStruct) { diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php index cc93f1423a..3b3e259902 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserPasswordEvent.php @@ -14,14 +14,11 @@ final class BeforeUpdateUserPasswordEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var string */ - private $newPassword; + private string $newPassword; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|null */ - private $updatedUser; + private ?User $updatedUser = null; public function __construct(User $user, string $newPassword) { diff --git a/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php b/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php index 82ca2131dc..c352147458 100644 --- a/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php +++ b/src/contracts/Repository/Events/User/BeforeUpdateUserTokenEvent.php @@ -15,14 +15,11 @@ final class BeforeUpdateUserTokenEvent extends BeforeEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserTokenUpdateStruct */ - private $userTokenUpdateStruct; + private UserTokenUpdateStruct $userTokenUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|null */ - private $updatedUser; + private ?User $updatedUser = null; public function __construct(User $user, UserTokenUpdateStruct $userTokenUpdateStruct) { diff --git a/src/contracts/Repository/Events/User/CreateUserEvent.php b/src/contracts/Repository/Events/User/CreateUserEvent.php index f86983991e..d47f199429 100644 --- a/src/contracts/Repository/Events/User/CreateUserEvent.php +++ b/src/contracts/Repository/Events/User/CreateUserEvent.php @@ -14,14 +14,11 @@ final class CreateUserEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserCreateStruct */ - private $userCreateStruct; + private UserCreateStruct $userCreateStruct; - /** @var array */ - private $parentGroups; + private array $parentGroups; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; public function __construct( User $user, diff --git a/src/contracts/Repository/Events/User/CreateUserGroupEvent.php b/src/contracts/Repository/Events/User/CreateUserGroupEvent.php index b7cd39820d..3fc6724318 100644 --- a/src/contracts/Repository/Events/User/CreateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/CreateUserGroupEvent.php @@ -14,14 +14,11 @@ final class CreateUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroupCreateStruct */ - private $userGroupCreateStruct; + private UserGroupCreateStruct $userGroupCreateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $parentGroup; + private UserGroup $parentGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; public function __construct( UserGroup $userGroup, diff --git a/src/contracts/Repository/Events/User/DeleteUserEvent.php b/src/contracts/Repository/Events/User/DeleteUserEvent.php index 1ceee53299..948147a934 100644 --- a/src/contracts/Repository/Events/User/DeleteUserEvent.php +++ b/src/contracts/Repository/Events/User/DeleteUserEvent.php @@ -13,11 +13,9 @@ final class DeleteUserEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var array */ - private $locations; + private array $locations; public function __construct( array $locations, diff --git a/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php b/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php index 312b9df192..c5c2c65c1f 100644 --- a/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/DeleteUserGroupEvent.php @@ -13,11 +13,9 @@ final class DeleteUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var array */ - private $locations; + private array $locations; public function __construct( array $locations, diff --git a/src/contracts/Repository/Events/User/MoveUserGroupEvent.php b/src/contracts/Repository/Events/User/MoveUserGroupEvent.php index 4c0cb5710b..647ec301ea 100644 --- a/src/contracts/Repository/Events/User/MoveUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/MoveUserGroupEvent.php @@ -13,11 +13,9 @@ final class MoveUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $newParent; + private UserGroup $newParent; public function __construct( UserGroup $userGroup, diff --git a/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php b/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php index 8a563a5c69..c6f33e96a0 100644 --- a/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/UnAssignUserFromUserGroupEvent.php @@ -14,11 +14,9 @@ final class UnAssignUserFromUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; public function __construct( User $user, diff --git a/src/contracts/Repository/Events/User/UpdateUserEvent.php b/src/contracts/Repository/Events/User/UpdateUserEvent.php index 61c58e892a..334819b9d6 100644 --- a/src/contracts/Repository/Events/User/UpdateUserEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserEvent.php @@ -14,14 +14,11 @@ final class UpdateUserEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserUpdateStruct */ - private $userUpdateStruct; + private UserUpdateStruct $userUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $updatedUser; + private User $updatedUser; public function __construct( User $updatedUser, diff --git a/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php b/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php index e51d086141..d23b0ba1d5 100644 --- a/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserGroupEvent.php @@ -14,13 +14,11 @@ final class UpdateUserGroupEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private $userGroup; + private UserGroup $userGroup; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserGroupUpdateStruct */ - private $userGroupUpdateStruct; + private UserGroupUpdateStruct $userGroupUpdateStruct; - private $updatedUserGroup; + private UserGroup $updatedUserGroup; public function __construct( UserGroup $updatedUserGroup, diff --git a/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php b/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php index b12e1d59f0..7dce670593 100644 --- a/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserPasswordEvent.php @@ -13,14 +13,11 @@ final class UpdateUserPasswordEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var string */ - private $newPassword; + private string $newPassword; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $updatedUser; + private User $updatedUser; public function __construct( User $updatedUser, diff --git a/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php b/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php index d6fca1a7b9..c9aa29821d 100644 --- a/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php +++ b/src/contracts/Repository/Events/User/UpdateUserTokenEvent.php @@ -14,14 +14,11 @@ final class UpdateUserTokenEvent extends AfterEvent { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $user; + private User $user; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\UserTokenUpdateStruct */ - private $userTokenUpdateStruct; + private UserTokenUpdateStruct $userTokenUpdateStruct; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $updatedUser; + private User $updatedUser; public function __construct( User $updatedUser, diff --git a/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php b/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php index f59525ee10..239b3449b4 100644 --- a/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php +++ b/src/contracts/Repository/Events/UserPreference/BeforeSetUserPreferenceEvent.php @@ -13,7 +13,7 @@ final class BeforeSetUserPreferenceEvent extends BeforeEvent { /** @var \Ibexa\Contracts\Core\Repository\Values\UserPreference\UserPreferenceSetStruct[] */ - private $userPreferenceSetStructs; + private array $userPreferenceSetStructs; public function __construct(array $userPreferenceSetStructs) { diff --git a/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php b/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php index 8120251f49..ee438751b4 100644 --- a/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php +++ b/src/contracts/Repository/Events/UserPreference/SetUserPreferenceEvent.php @@ -13,7 +13,7 @@ final class SetUserPreferenceEvent extends AfterEvent { /** @var \Ibexa\Contracts\Core\Repository\Values\UserPreference\UserPreferenceSetStruct[] */ - private $userPreferenceSetStructs; + private array $userPreferenceSetStructs; public function __construct(array $userPreferenceSetStructs) { diff --git a/src/contracts/Repository/Iterator/BatchIterator.php b/src/contracts/Repository/Iterator/BatchIterator.php index 0ad579dc5a..5b1f91de61 100644 --- a/src/contracts/Repository/Iterator/BatchIterator.php +++ b/src/contracts/Repository/Iterator/BatchIterator.php @@ -14,17 +14,13 @@ final class BatchIterator implements Iterator { public const DEFAULT_BATCH_SIZE = 25; - /** @var \Ibexa\Contracts\Core\Repository\Iterator\BatchIteratorAdapter */ - private $adapter; + private BatchIteratorAdapter $adapter; - /** @var \Iterator|null */ - private $innerIterator; + private ?Iterator $innerIterator = null; - /** @var int */ - private $batchSize; + private int $batchSize; - /** @var int */ - private $position; + private int $position; public function __construct( BatchIteratorAdapter $adapter, diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php index 5040118493..55844b4533 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/ContentFilteringAdapter.php @@ -15,14 +15,12 @@ final class ContentFilteringAdapter implements BatchIteratorAdapter { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\Filter */ - private $filter; + private Filter $filter; /** @var string[]|null */ - private $languages; + private ?array $languages; public function __construct(ContentService $contentService, Filter $filter, ?array $languages = null) { diff --git a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php index 16467431c1..f98bdaa9c2 100644 --- a/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php +++ b/src/contracts/Repository/Iterator/BatchIteratorAdapter/LocationFilteringAdapter.php @@ -15,14 +15,12 @@ final class LocationFilteringAdapter implements BatchIteratorAdapter { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\Filter */ - private $filter; + private Filter $filter; /** @var string[]|null */ - private $languages; + private ?array $languages; public function __construct(LocationService $locationService, Filter $filter, ?array $languages = null) { diff --git a/src/contracts/Repository/Lists/UnauthorizedListItem.php b/src/contracts/Repository/Lists/UnauthorizedListItem.php index 7b4be7eb27..f50c4d4a6e 100644 --- a/src/contracts/Repository/Lists/UnauthorizedListItem.php +++ b/src/contracts/Repository/Lists/UnauthorizedListItem.php @@ -13,14 +13,11 @@ */ abstract class UnauthorizedListItem { - /** @var string */ - private $module; + private string $module; - /** @var string */ - private $function; + private string $function; - /** @var array */ - private $payload; + private array $payload; /** * @param string $module diff --git a/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php b/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php index 422cb91121..e39fe58f80 100644 --- a/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php +++ b/src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php @@ -16,10 +16,7 @@ */ class ContentDraftListItem implements ContentDraftListItemInterface { - /** - * @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo - */ - private $versionInfo; + private VersionInfo $versionInfo; /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo diff --git a/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php b/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php index f56a239a46..3115851f43 100644 --- a/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php +++ b/src/contracts/Repository/Values/Content/DraftList/Item/UnauthorizedContentDraftListItem.php @@ -16,14 +16,11 @@ */ class UnauthorizedContentDraftListItem implements ContentDraftListItemInterface { - /** @var string */ - private $module; + private string $module; - /** @var string */ - private $function; + private string $function; - /** @var array */ - private $payload; + private array $payload; /** * @param string $module diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php index 745648fd81..fb1de6a8f5 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractRangeAggregation.php @@ -14,13 +14,11 @@ abstract class AbstractRangeAggregation implements Aggregation { /** * The name of the aggregation. - * - * @var string */ - protected $name; + protected string $name; /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\Range[] */ - protected $ranges; + protected array $ranges; public function __construct(string $name, array $ranges = []) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php index 7aafd1b2e9..c85fd26ad0 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractStatsAggregation.php @@ -14,10 +14,8 @@ abstract class AbstractStatsAggregation implements Aggregation { /** * The name of the aggregation. - * - * @var string */ - protected $name; + protected string $name; public function __construct(string $name) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php index 2736744e73..241bd9e33c 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/AbstractTermAggregation.php @@ -17,10 +17,8 @@ abstract class AbstractTermAggregation implements Aggregation /** * The name of the aggregation. - * - * @var string */ - protected $name; + protected string $name; /** * Number of facets (terms) returned. diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php index 4c977605b4..21dfd2ce7d 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/DateMetadataRangeAggregation.php @@ -17,8 +17,7 @@ final class DateMetadataRangeAggregation extends AbstractRangeAggregation public const CREATED = 'created'; public const PUBLISHED = 'published'; - /** @var string */ - private $type; + private string $type; public function __construct(string $name, string $type, array $ranges = []) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php index dafe9fb50b..198b38ea88 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Field/CountryTermAggregation.php @@ -15,8 +15,7 @@ final class CountryTermAggregation extends AbstractFieldTermAggregation public const TYPE_ALPHA_2 = 4; public const TYPE_ALPHA_3 = 8; - /** @var int */ - private $type; + private int $type; public function __construct( string $name, diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php index 4c8b674191..4585586b8d 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/Location/SubtreeTermAggregation.php @@ -15,8 +15,7 @@ final class SubtreeTermAggregation extends AbstractTermAggregation implements LocationAggregation { - /** @var string */ - private $pathString; + private string $pathString; public function __construct(string $name, string $pathString) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php index 9bb9c37759..6fa05df4e6 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/ObjectStateTermAggregation.php @@ -10,8 +10,7 @@ final class ObjectStateTermAggregation extends AbstractTermAggregation { - /** @var string */ - private $objectStateGroupIdentifier; + private string $objectStateGroupIdentifier; public function __construct( string $name, diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php index 860a414323..02b681eb90 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawRangeAggregation.php @@ -13,8 +13,7 @@ final class RawRangeAggregation extends AbstractRangeAggregation implements RawAggregation { - /** @var string */ - private $fieldName; + private string $fieldName; public function __construct(string $name, string $fieldName, array $ranges = []) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php index e17577d066..1a3a27d800 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawStatsAggregation.php @@ -10,8 +10,7 @@ final class RawStatsAggregation extends AbstractStatsAggregation implements RawAggregation { - /** @var string */ - private $fieldName; + private string $fieldName; public function __construct(string $name, string $fieldName) { diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php index f48364d924..221e578c9e 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/RawTermAggregation.php @@ -10,8 +10,7 @@ final class RawTermAggregation extends AbstractTermAggregation implements RawAggregation { - /** @var string */ - private $fieldName; + private string $fieldName; public function __construct( string $name, diff --git a/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php b/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php index a1fb81d715..c7fb3021e0 100644 --- a/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php +++ b/src/contracts/Repository/Values/Content/Query/Aggregation/UserMetadataTermAggregation.php @@ -27,10 +27,8 @@ final class UserMetadataTermAggregation extends AbstractTermAggregation /** * The type of the user facet. - * - * @var string */ - private $type; + private string $type; public function __construct( string $name, diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Image/Orientation.php b/src/contracts/Repository/Values/Content/Query/Criterion/Image/Orientation.php index 5bae6e19e2..2dfc7d8734 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Image/Orientation.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Image/Orientation.php @@ -86,7 +86,7 @@ private function isSupportedOrientation(string $orientation): bool /** * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - private function throwException(string $whatIsWrong): void + private function throwException(string $whatIsWrong): never { throw new InvalidArgumentException( '$orientation', diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php b/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php index 2fe2966308..10ae897aea 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/MoreLikeThis.php @@ -23,10 +23,8 @@ class MoreLikeThis extends Criterion /** * The type of the parameter from which terms are extracted for finding similar objects. - * - * @var int */ - protected $type; + protected int $type; /** * Creates a new more like this criterion. diff --git a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php index cf03d4ca1f..860023c970 100644 --- a/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php +++ b/src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php @@ -29,6 +29,8 @@ class Specifications /** * Specified operator, as one of the Operator::* constants. + * + * @var string */ public $operator; diff --git a/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php b/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php index 96d16e2cb6..561e15a806 100644 --- a/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php +++ b/src/contracts/Repository/Values/Content/RelationList/Item/RelationListItem.php @@ -16,8 +16,7 @@ */ class RelationListItem implements RelationListItemInterface { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Relation */ - private $relation; + private Relation $relation; public function __construct(Relation $relation) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult.php index d0d9672920..50043cdaa7 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult.php @@ -14,10 +14,8 @@ abstract class AggregationResult extends ValueObject { /** * The name of the aggregation. - * - * @var string */ - private $name; + private string $name; public function __construct(string $name) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php index a07437968d..cdbce5b272 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php @@ -18,7 +18,7 @@ final class RangeAggregationResult extends AggregationResult implements IteratorAggregate, Countable { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Search\AggregationResult\RangeAggregationResultEntry[] */ - private $entries; + private iterable $entries; /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Search\AggregationResult\RangeAggregationResultEntry[] $entries diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php index 358bb29374..0d7584d715 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResultEntry.php @@ -13,11 +13,9 @@ final class RangeAggregationResultEntry extends ValueObject { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation\Range */ - private $key; + private Range $key; - /** @var int */ - private $count; + private int $count; public function __construct(Range $key, int $count) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php index 543f5e1f86..b4993cfd30 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/StatsAggregationResult.php @@ -15,17 +15,13 @@ final class StatsAggregationResult extends AggregationResult /** @var float|null */ public $sum; - /** @var int|null */ - private $count; + private ?int $count; - /** @var float|null */ - private $min; + private ?float $min; - /** @var float|null */ - private $max; + private ?float $max; - /** @var float|null */ - private $avg; + private ?float $avg; public function __construct(string $name, ?int $count, ?float $min, ?float $max, ?float $avg, ?float $sum) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php index 3990484cf7..e8d4beeee2 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php @@ -18,7 +18,7 @@ class TermAggregationResult extends AggregationResult implements IteratorAggregate, Countable { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Search\AggregationResult\TermAggregationResultEntry[] */ - private $entries; + private iterable $entries; public function __construct(string $name, iterable $entries = []) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php index 80bf8d187a..0d3f5d8d6c 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResultEntry.php @@ -15,8 +15,7 @@ final class TermAggregationResultEntry extends ValueObject /** @var mixed */ private $key; - /** @var int */ - private $count; + private int $count; public function __construct($key, int $count) { diff --git a/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php b/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php index 6824c7409b..a5fddec64d 100644 --- a/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php +++ b/src/contracts/Repository/Values/Content/Search/AggregationResultCollection.php @@ -17,7 +17,7 @@ final class AggregationResultCollection implements Countable, IteratorAggregate { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Search\AggregationResult[] */ - private $entries; + private array $entries; /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Search\AggregationResult[] $results diff --git a/src/contracts/Repository/Values/Filter/Filter.php b/src/contracts/Repository/Values/Filter/Filter.php index a0b660400d..469dc5d30d 100644 --- a/src/contracts/Repository/Values/Filter/Filter.php +++ b/src/contracts/Repository/Values/Filter/Filter.php @@ -22,13 +22,11 @@ final class Filter private $criterion; /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\FilteringSortClause[] */ - private $sortClauses = []; + private array $sortClauses = []; - /** @var int */ - private $offset = 0; + private int $offset = 0; - /** @var int */ - private $limit = 0; + private int $limit = 0; /** * Build Filter. diff --git a/src/contracts/Repository/Values/User/LookupPolicyLimitations.php b/src/contracts/Repository/Values/User/LookupPolicyLimitations.php index 1b1dbd4955..4c64f8a3c5 100644 --- a/src/contracts/Repository/Values/User/LookupPolicyLimitations.php +++ b/src/contracts/Repository/Values/User/LookupPolicyLimitations.php @@ -15,11 +15,10 @@ */ final class LookupPolicyLimitations extends ValueObject { - /** @var \Ibexa\Contracts\Core\Repository\Values\User\Policy */ - protected $policy; + protected Policy $policy; /** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] */ - protected $limitations; + protected array $limitations; /** * @param \Ibexa\Contracts\Core\Repository\Values\User\Policy $policy diff --git a/src/contracts/Repository/Values/User/PasswordInfo.php b/src/contracts/Repository/Values/User/PasswordInfo.php index 17c3f34e07..60f3393586 100644 --- a/src/contracts/Repository/Values/User/PasswordInfo.php +++ b/src/contracts/Repository/Values/User/PasswordInfo.php @@ -14,11 +14,9 @@ final class PasswordInfo extends ValueObject { - /** @var \DateTimeImmutable|null */ - private $expirationDate; + private ?DateTimeImmutable $expirationDate; - /** @var \DateTimeImmutable|null */ - private $expirationWarningDate; + private ?DateTimeImmutable $expirationWarningDate; public function __construct(?DateTimeImmutable $expirationDate = null, ?DateTimeImmutable $expirationWarningDate = null) { diff --git a/src/contracts/Search/Field.php b/src/contracts/Search/Field.php index b3a154c5b3..2531bea45e 100644 --- a/src/contracts/Search/Field.php +++ b/src/contracts/Search/Field.php @@ -36,10 +36,8 @@ class Field extends ValueObject /** * Type of the search field. - * - * @var \Ibexa\Contracts\Core\Search\FieldType */ - protected $type; + protected FieldType $type; /** * @param string $name diff --git a/src/contracts/Specification/Content/ContentTypeSpecification.php b/src/contracts/Specification/Content/ContentTypeSpecification.php index e29909ae01..c4fc9cb6c9 100644 --- a/src/contracts/Specification/Content/ContentTypeSpecification.php +++ b/src/contracts/Specification/Content/ContentTypeSpecification.php @@ -12,10 +12,7 @@ final class ContentTypeSpecification implements ContentSpecification { - /** - * @var string - */ - private $expectedType; + private string $expectedType; public function __construct(string $expectedType) { diff --git a/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php b/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php index 585766d473..b75ce9d4f7 100644 --- a/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php +++ b/src/contracts/Test/Persistence/Fixture/BaseInMemoryCachedFileFixture.php @@ -18,8 +18,7 @@ */ abstract class BaseInMemoryCachedFileFixture implements Fixture { - /** @var array|null */ - private static $inMemoryCachedLoadedData = null; + private static ?array $inMemoryCachedLoadedData = null; /** @var string */ private $filePath; diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index dbe36f34e2..df96ed4d44 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -21,11 +21,10 @@ */ final class FixtureImporter { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var array */ - private static $resetSequenceStatements = []; + private static array $resetSequenceStatements = []; public function __construct(Connection $connection) { diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index f57a5fcec1..08aa69f894 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -21,7 +21,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler as CachingContentTypeHandler; use Ibexa\Core\Persistence\Legacy\Handler; use Ibexa\Core\Repository\Values\User\UserReference; -use Ibexa\Tests\Core\Repository\IdManager; +use Ibexa\Tests\Core\Repository\IdManager\Php; use Ibexa\Tests\Core\Repository\LegacySchemaImporter; use Ibexa\Tests\Integration\Core\LegacyTestContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -70,10 +70,8 @@ class Legacy extends SetupFactory /** * Cached in-memory initial database data fixture. - * - * @var \Ibexa\Contracts\Core\Test\Persistence\Fixture */ - private static $initialDataFixture; + private static ?YamlFixture $initialDataFixture = null; /** * Cached in-memory post insert SQL statements. @@ -183,9 +181,9 @@ public function getConfigValue($configKey) * * @return \Ibexa\Tests\Integration\Core\Repository\IdManager */ - public function getIdManager() + public function getIdManager(): Php { - return new IdManager\Php(); + return new Php(); } /** @@ -207,7 +205,7 @@ protected function getInitialVarDir(): string return __DIR__ . '/../../../../../var'; } - protected function cleanupVarDir($sourceDir) + protected function cleanupVarDir(string $sourceDir) { $fs = new Filesystem(); $varDir = self::$ioRootDir . '/var'; diff --git a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php index 7acd59855a..3e590e8326 100644 --- a/src/lib/Base/Container/ApiLoader/RepositoryFactory.php +++ b/src/lib/Base/Container/ApiLoader/RepositoryFactory.php @@ -144,7 +144,7 @@ public function buildRepository( * * @return mixed */ - public function buildService(Repository $repository, $serviceName) + public function buildService(Repository $repository, string $serviceName) { $methodName = 'get' . $serviceName . 'Service'; if (!method_exists($repository, $methodName)) { diff --git a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php index 3a50cae01e..5d097d994d 100644 --- a/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Persistence/FieldTypeRegistryPass.php @@ -19,7 +19,7 @@ class FieldTypeRegistryPass extends AbstractFieldTypeBasedPass * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(FieldTypeRegistry::class)) { return; diff --git a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php index 5c80610fe5..89df523c8c 100644 --- a/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/FieldRegistryPass.php @@ -25,7 +25,7 @@ class FieldRegistryPass implements CompilerPassInterface * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(FieldRegistry::class)) { return; diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php index def88898f4..d3ffbb7eb0 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPass.php @@ -21,7 +21,7 @@ class CriteriaConverterPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if ( !$container->hasDefinition('ibexa.search.legacy.gateway.criteria_converter.content') && diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php index 76a9100e05..d2a6bf5a7b 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPass.php @@ -23,7 +23,7 @@ class CriterionFieldValueHandlerRegistryPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(HandlerRegistry::class)) { return; diff --git a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php index 49cd59ef8a..7b619b7124 100644 --- a/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php +++ b/src/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPass.php @@ -20,7 +20,7 @@ class SortClauseConverterPass implements CompilerPassInterface /** * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if ( !$container->hasDefinition('ibexa.search.legacy.gateway.sort_clause_converter.content') && diff --git a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php index 0d999b2a34..e8ff834732 100644 --- a/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php +++ b/src/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPass.php @@ -26,7 +26,7 @@ class ExternalStorageRegistryPass implements CompilerPassInterface * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(StorageRegistry::class)) { return; diff --git a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php index 75673d2f56..1143c3fb0c 100644 --- a/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php +++ b/src/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPass.php @@ -22,7 +22,7 @@ class RoleLimitationConverterPass implements CompilerPassInterface * * @throws \LogicException */ - public function process(ContainerBuilder $container) + public function process(ContainerBuilder $container): void { if (!$container->hasDefinition(LimitationConverter::class)) { return; diff --git a/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php b/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php index dfd87e5880..ea48026f0d 100644 --- a/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php +++ b/src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php @@ -17,14 +17,11 @@ */ final class BackwardCompatibleIterator implements IteratorAggregate { - /** @var \Symfony\Component\DependencyInjection\TaggedContainerInterface */ - private $container; + private TaggedContainerInterface $container; - /** @var string */ - private $serviceTag; + private string $serviceTag; - /** @var string */ - private $deprecatedServiceTag; + private string $deprecatedServiceTag; public function __construct(TaggedContainerInterface $container, string $serviceTag, string $deprecatedServiceTag) { diff --git a/src/lib/Base/Exceptions/ContentFieldValidationException.php b/src/lib/Base/Exceptions/ContentFieldValidationException.php index 9c7c15055f..7a4627fdad 100644 --- a/src/lib/Base/Exceptions/ContentFieldValidationException.php +++ b/src/lib/Base/Exceptions/ContentFieldValidationException.php @@ -31,7 +31,7 @@ class ContentFieldValidationException extends APIContentFieldValidationException * * @var array> */ - protected $errors; + protected array $errors; /** @var string|null */ protected $contentName; diff --git a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php index 2e4e8814cf..be63ca5cff 100644 --- a/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php +++ b/src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php @@ -29,7 +29,7 @@ class ContentTypeFieldDefinitionValidationException extends APIContentTypeFieldD * * @var \Ibexa\Core\FieldType\ValidationError[] */ - protected $errors; + protected array $errors; /** * Generates: Content fields did not validate. diff --git a/src/lib/Base/Exceptions/LimitationValidationException.php b/src/lib/Base/Exceptions/LimitationValidationException.php index a1000bde5d..757331c3f1 100644 --- a/src/lib/Base/Exceptions/LimitationValidationException.php +++ b/src/lib/Base/Exceptions/LimitationValidationException.php @@ -24,7 +24,7 @@ class LimitationValidationException extends APILimitationValidationException imp * * @var \Ibexa\Core\FieldType\ValidationError[] */ - protected $errors; + protected array $errors; /** * Generates: Limitations did not validate. diff --git a/src/lib/Base/ServiceContainer.php b/src/lib/Base/ServiceContainer.php index c5cc16002f..b8fb2c91e4 100644 --- a/src/lib/Base/ServiceContainer.php +++ b/src/lib/Base/ServiceContainer.php @@ -89,7 +89,7 @@ public function __construct($container, $installDir, $cacheDir, $debug = false, * * @return \Ibexa\Contracts\Core\Repository\Repository */ - public function getRepository() + public function getRepository(): ?object { return $this->innerContainer->get('ibexa.api.repository'); } @@ -109,7 +109,7 @@ public function getInnerContainer() * * @return object */ - public function get($id) + public function get(string $id): ?object { return $this->innerContainer->get($id); } @@ -121,7 +121,7 @@ public function get($id) * * @return mixed */ - public function getParameter($name) + public function getParameter(string $name) { return $this->innerContainer->getParameter($name); } diff --git a/src/lib/Base/TranslatableBase.php b/src/lib/Base/TranslatableBase.php index d77971497b..aea950f500 100644 --- a/src/lib/Base/TranslatableBase.php +++ b/src/lib/Base/TranslatableBase.php @@ -16,7 +16,7 @@ trait TranslatableBase private $parameters = []; - public function setMessageTemplate($messageTemplate) + public function setMessageTemplate($messageTemplate): void { $this->messageTemplate = $messageTemplate; } @@ -26,17 +26,17 @@ public function getMessageTemplate() return $this->messageTemplate; } - public function setParameters(array $parameters) + public function setParameters(array $parameters): void { $this->parameters = $parameters; } - public function addParameter($name, $value) + public function addParameter($name, $value): void { $this->parameters[$name] = $value; } - public function addParameters(array $parameters) + public function addParameters(array $parameters): void { $this->parameters += $parameters; } diff --git a/src/lib/Base/Utils/DeprecationWarner.php b/src/lib/Base/Utils/DeprecationWarner.php index b592fc52d9..5f43c26da5 100644 --- a/src/lib/Base/Utils/DeprecationWarner.php +++ b/src/lib/Base/Utils/DeprecationWarner.php @@ -9,7 +9,7 @@ class DeprecationWarner implements DeprecationWarnerInterface { - public function log($message) + public function log($message): void { @trigger_error($message, E_USER_DEPRECATED); } diff --git a/src/lib/Event/BookmarkService.php b/src/lib/Event/BookmarkService.php index c0daea036c..3da0d4f93b 100644 --- a/src/lib/Event/BookmarkService.php +++ b/src/lib/Event/BookmarkService.php @@ -19,8 +19,7 @@ class BookmarkService extends BookmarkServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( BookmarkServiceInterface $innerService, diff --git a/src/lib/Event/ContentService.php b/src/lib/Event/ContentService.php index e9f4fb9a67..b96e2c6389 100644 --- a/src/lib/Event/ContentService.php +++ b/src/lib/Event/ContentService.php @@ -50,8 +50,7 @@ class ContentService extends ContentServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( ContentServiceInterface $innerService, diff --git a/src/lib/Event/ContentTypeService.php b/src/lib/Event/ContentTypeService.php index a1714e29fa..3948de9fa3 100644 --- a/src/lib/Event/ContentTypeService.php +++ b/src/lib/Event/ContentTypeService.php @@ -55,8 +55,7 @@ class ContentTypeService extends ContentTypeServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( ContentTypeServiceInterface $innerService, diff --git a/src/lib/Event/FieldTypeService.php b/src/lib/Event/FieldTypeService.php index a4b72a6805..bab18407d0 100644 --- a/src/lib/Event/FieldTypeService.php +++ b/src/lib/Event/FieldTypeService.php @@ -14,8 +14,7 @@ class FieldTypeService extends FieldTypeServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( FieldTypeServiceInterface $innerService, diff --git a/src/lib/Event/LanguageService.php b/src/lib/Event/LanguageService.php index ca8402ce5d..a28c6ea686 100644 --- a/src/lib/Event/LanguageService.php +++ b/src/lib/Event/LanguageService.php @@ -26,8 +26,7 @@ class LanguageService extends LanguageServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( LanguageServiceInterface $innerService, diff --git a/src/lib/Event/LocationService.php b/src/lib/Event/LocationService.php index 4af4d37c4b..8c387788e7 100644 --- a/src/lib/Event/LocationService.php +++ b/src/lib/Event/LocationService.php @@ -34,8 +34,7 @@ class LocationService extends LocationServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( LocationServiceInterface $innerService, diff --git a/src/lib/Event/NotificationService.php b/src/lib/Event/NotificationService.php index 29ddcaede2..41f518cd90 100644 --- a/src/lib/Event/NotificationService.php +++ b/src/lib/Event/NotificationService.php @@ -24,8 +24,7 @@ class NotificationService extends NotificationServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( NotificationServiceInterface $innerService, diff --git a/src/lib/Event/ObjectStateService.php b/src/lib/Event/ObjectStateService.php index dced3aaccf..b09ca6182d 100644 --- a/src/lib/Event/ObjectStateService.php +++ b/src/lib/Event/ObjectStateService.php @@ -37,8 +37,7 @@ class ObjectStateService extends ObjectStateServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( ObjectStateServiceInterface $innerService, diff --git a/src/lib/Event/Repository.php b/src/lib/Event/Repository.php index 5a7cde3043..5dd6567583 100644 --- a/src/lib/Event/Repository.php +++ b/src/lib/Event/Repository.php @@ -8,81 +8,80 @@ namespace Ibexa\Core\Event; +use Ibexa\Contracts\Core\Repository\BookmarkService; use Ibexa\Contracts\Core\Repository\BookmarkService as BookmarkServiceInterface; +use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\ContentService as ContentServiceInterface; +use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\ContentTypeService as ContentTypeServiceInterface; +use Ibexa\Contracts\Core\Repository\FieldTypeService; use Ibexa\Contracts\Core\Repository\FieldTypeService as FieldTypeServiceInterface; +use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Repository\LanguageService as LanguageServiceInterface; +use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\LocationService as LocationServiceInterface; +use Ibexa\Contracts\Core\Repository\NotificationService; use Ibexa\Contracts\Core\Repository\NotificationService as NotificationServiceInterface; +use Ibexa\Contracts\Core\Repository\ObjectStateService; use Ibexa\Contracts\Core\Repository\ObjectStateService as ObjectStateServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionResolver as PermissionResolverInterface; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; +use Ibexa\Contracts\Core\Repository\RoleService; use Ibexa\Contracts\Core\Repository\RoleService as RoleServiceInterface; +use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\SearchService as SearchServiceInterface; +use Ibexa\Contracts\Core\Repository\SectionService; use Ibexa\Contracts\Core\Repository\SectionService as SectionServiceInterface; +use Ibexa\Contracts\Core\Repository\TrashService; use Ibexa\Contracts\Core\Repository\TrashService as TrashServiceInterface; +use Ibexa\Contracts\Core\Repository\URLAliasService; use Ibexa\Contracts\Core\Repository\URLAliasService as URLAliasServiceInterface; +use Ibexa\Contracts\Core\Repository\URLService; use Ibexa\Contracts\Core\Repository\URLService as URLServiceInterface; +use Ibexa\Contracts\Core\Repository\URLWildcardService; use Ibexa\Contracts\Core\Repository\URLWildcardService as URLWildcardServiceInterface; +use Ibexa\Contracts\Core\Repository\UserPreferenceService; use Ibexa\Contracts\Core\Repository\UserPreferenceService as UserPreferenceServiceInterface; +use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\UserService as UserServiceInterface; final class Repository implements RepositoryInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private RepositoryInterface $repository; - /** @var \Ibexa\Contracts\Core\Repository\BookmarkService */ - private $bookmarkService; + private BookmarkService $bookmarkService; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */ - private $fieldTypeService; + private FieldTypeService $fieldTypeService; - /** @var \Ibexa\Contracts\Core\Repository\LanguageService */ - private $languageService; + private LanguageService $languageService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\NotificationService */ - private $notificationService; + private NotificationService $notificationService; - /** @var \Ibexa\Contracts\Core\Repository\ObjectStateService */ - private $objectStateService; + private ObjectStateService $objectStateService; - /** @var \Ibexa\Contracts\Core\Repository\RoleService */ - private $roleService; + private RoleService $roleService; - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - private $searchService; + private SearchService $searchService; - /** @var \Ibexa\Contracts\Core\Repository\SectionService */ - private $sectionService; + private SectionService $sectionService; - /** @var \Ibexa\Contracts\Core\Repository\TrashService */ - private $trashService; + private TrashService $trashService; - /** @var \Ibexa\Contracts\Core\Repository\URLAliasService */ - private $urlAliasService; + private URLAliasService $urlAliasService; - /** @var \Ibexa\Contracts\Core\Repository\URLService */ - private $urlService; + private URLService $urlService; - /** @var \Ibexa\Contracts\Core\Repository\URLWildcardService */ - private $urlWildcardService; + private URLWildcardService $urlWildcardService; - /** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */ - private $userPreferenceService; + private UserPreferenceService $userPreferenceService; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; public function __construct( RepositoryInterface $repository, diff --git a/src/lib/Event/RoleService.php b/src/lib/Event/RoleService.php index af8d128a65..28871478d2 100644 --- a/src/lib/Event/RoleService.php +++ b/src/lib/Event/RoleService.php @@ -52,8 +52,7 @@ class RoleService extends RoleServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( RoleServiceInterface $innerService, diff --git a/src/lib/Event/SearchService.php b/src/lib/Event/SearchService.php index e75dba3f1b..ff19ffbae1 100644 --- a/src/lib/Event/SearchService.php +++ b/src/lib/Event/SearchService.php @@ -14,8 +14,7 @@ class SearchService extends SearchServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( SearchServiceInterface $innerService, diff --git a/src/lib/Event/SectionService.php b/src/lib/Event/SectionService.php index e98bf95b23..29a482f466 100644 --- a/src/lib/Event/SectionService.php +++ b/src/lib/Event/SectionService.php @@ -29,8 +29,7 @@ class SectionService extends SectionServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( SectionServiceInterface $innerService, diff --git a/src/lib/Event/SettingService.php b/src/lib/Event/SettingService.php index 45bbafd46b..380eb5be92 100644 --- a/src/lib/Event/SettingService.php +++ b/src/lib/Event/SettingService.php @@ -23,8 +23,7 @@ final class SettingService extends SettingServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct( SettingServiceInterface $innerService, diff --git a/src/lib/Event/TranslationService.php b/src/lib/Event/TranslationService.php index 4d535e4323..453b61a86e 100644 --- a/src/lib/Event/TranslationService.php +++ b/src/lib/Event/TranslationService.php @@ -14,8 +14,7 @@ class TranslationService extends TranslationServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( TranslationServiceInterface $innerService, diff --git a/src/lib/Event/TrashService.php b/src/lib/Event/TrashService.php index b2d900bb60..7b99612f9c 100644 --- a/src/lib/Event/TrashService.php +++ b/src/lib/Event/TrashService.php @@ -26,8 +26,7 @@ class TrashService extends TrashServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( TrashServiceInterface $innerService, diff --git a/src/lib/Event/URLAliasService.php b/src/lib/Event/URLAliasService.php index 7dc7426bd5..9df5532d16 100644 --- a/src/lib/Event/URLAliasService.php +++ b/src/lib/Event/URLAliasService.php @@ -24,8 +24,7 @@ class URLAliasService extends URLAliasServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( URLAliasServiceInterface $innerService, diff --git a/src/lib/Event/URLService.php b/src/lib/Event/URLService.php index 8460bcd838..7e3ba5db84 100644 --- a/src/lib/Event/URLService.php +++ b/src/lib/Event/URLService.php @@ -18,8 +18,7 @@ class URLService extends URLServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( URLServiceInterface $innerService, diff --git a/src/lib/Event/URLWildcardService.php b/src/lib/Event/URLWildcardService.php index 80a07b8ea1..5cea6ca726 100644 --- a/src/lib/Event/URLWildcardService.php +++ b/src/lib/Event/URLWildcardService.php @@ -25,8 +25,7 @@ class URLWildcardService extends URLWildcardServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( URLWildcardServiceInterface $innerService, @@ -41,7 +40,7 @@ public function create( string $sourceUrl, string $destinationUrl, bool $forward = false - ): UrlWildcard { + ): URLWildcard { $eventData = [ $sourceUrl, $destinationUrl, diff --git a/src/lib/Event/UserPreferenceService.php b/src/lib/Event/UserPreferenceService.php index 11ba84a4ce..e01e22338a 100644 --- a/src/lib/Event/UserPreferenceService.php +++ b/src/lib/Event/UserPreferenceService.php @@ -16,8 +16,7 @@ class UserPreferenceService extends UserPreferenceServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( UserPreferenceServiceInterface $innerService, diff --git a/src/lib/Event/UserService.php b/src/lib/Event/UserService.php index 94b7346d1f..f0a4786027 100644 --- a/src/lib/Event/UserService.php +++ b/src/lib/Event/UserService.php @@ -43,8 +43,7 @@ class UserService extends UserServiceDecorator { - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct( UserServiceInterface $innerService, diff --git a/src/lib/FieldType/Author/AuthorCollection.php b/src/lib/FieldType/Author/AuthorCollection.php index 2d1081ccbf..f563b1fc93 100644 --- a/src/lib/FieldType/Author/AuthorCollection.php +++ b/src/lib/FieldType/Author/AuthorCollection.php @@ -65,7 +65,7 @@ public function offsetSet($offset, $value): void * * @param array $authorIds Author's Ids to remove from current collection */ - public function removeAuthorsById(array $authorIds) + public function removeAuthorsById(array $authorIds): void { $aAuthors = $this->getArrayCopy(); foreach ($aAuthors as $i => $author) { diff --git a/src/lib/FieldType/Author/SearchField.php b/src/lib/FieldType/Author/SearchField.php index ea1615bd8a..3e666e075c 100644 --- a/src/lib/FieldType/Author/SearchField.php +++ b/src/lib/FieldType/Author/SearchField.php @@ -18,7 +18,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { $name = []; $id = []; @@ -75,7 +75,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'name' => new Search\FieldType\MultipleStringField(), diff --git a/src/lib/FieldType/Author/Type.php b/src/lib/FieldType/Author/Type.php index 5fa7348ecf..e05feb5013 100644 --- a/src/lib/FieldType/Author/Type.php +++ b/src/lib/FieldType/Author/Type.php @@ -66,7 +66,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Author\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -108,7 +108,7 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): false|string { if (empty($value->authors)) { return false; @@ -131,11 +131,11 @@ protected function getSortInfo(BaseValue $value) * * @return \Ibexa\Core\FieldType\Author\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value( array_map( - static function ($author) { + static function ($author): Author { return new Author($author); }, $hash @@ -153,7 +153,7 @@ static function ($author) { public function toHash(SPIValue $value): array { return array_map( - static function ($author) { + static function ($author): array { return (array)$author; }, $value->authors->getArrayCopy() @@ -177,7 +177,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -208,7 +208,7 @@ public function validateFieldSettings($fieldSettings) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError|null */ - private function validateSettingName($name) + private function validateSettingName($name): ?ValidationError { if (!isset($this->settingsSchema[$name])) { return new ValidationError( @@ -232,7 +232,7 @@ private function validateSettingName($name) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError|null */ - private function validateDefaultAuthorSetting($name, $value) + private function validateDefaultAuthorSetting(int|string $name, $value): ?ValidationError { $definedValues = [ self::DEFAULT_VALUE_EMPTY, diff --git a/src/lib/FieldType/Author/Value.php b/src/lib/FieldType/Author/Value.php index bac3dfa70b..e156dacf82 100644 --- a/src/lib/FieldType/Author/Value.php +++ b/src/lib/FieldType/Author/Value.php @@ -31,7 +31,7 @@ public function __construct(array $authors = []) $this->authors = new AuthorCollection($authors); } - public function __toString() + public function __toString(): string { if (empty($this->authors)) { return ''; diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php index 7a19ebb623..a3698a7ec4 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php @@ -25,23 +25,19 @@ class BinaryBaseStorage extends GatewayBasedStorage { /** * An instance of IOService configured to store to the images folder. - * - * @var \Ibexa\Core\IO\IOServiceInterface */ - protected $ioService; + protected IOServiceInterface $ioService; protected PathGeneratorInterface $pathGenerator; - /** @var \Ibexa\Contracts\Core\IO\MimeTypeDetector */ - protected $mimeTypeDetector; + protected MimeTypeDetector $mimeTypeDetector; protected PathGeneratorInterface $downloadUrlGenerator; /** @var \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway */ protected $gateway; - /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator */ - protected $fileExtensionBlackListValidator; + protected FileExtensionBlackListValidator $fileExtensionBlackListValidator; public function __construct( StorageGatewayInterface $gateway, @@ -57,7 +53,7 @@ public function __construct( $this->fileExtensionBlackListValidator = $fileExtensionBlackListValidator; } - public function setDownloadUrlGenerator(PathGeneratorInterface $downloadUrlGenerator) + public function setDownloadUrlGenerator(PathGeneratorInterface $downloadUrlGenerator): void { $this->downloadUrlGenerator = $downloadUrlGenerator; } @@ -150,7 +146,7 @@ protected function removeOldFile($fieldId, $versionNo) } } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $this->gateway->getFileReferenceData($field->id, $versionInfo->versionNo); if ($field->value->externalData !== null) { @@ -174,7 +170,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field) } } - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { if (empty($fieldIds)) { return; @@ -194,7 +190,7 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) } } - public function hasFieldData() + public function hasFieldData(): bool { return true; } diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index 9d12671fb8..122ff5e9a0 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -20,8 +20,7 @@ */ abstract class DoctrineStorage extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { @@ -299,7 +298,7 @@ protected function castToPropertyValue($value, $columnName) * * @return string */ - public function prependMimeToPath($path, $mimeType) + public function prependMimeToPath(string $path, $mimeType) { $res = substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; @@ -312,7 +311,7 @@ public function prependMimeToPath($path, $mimeType) * @param array $fieldIds * @param int $versionNo */ - public function removeFileReferences(array $fieldIds, $versionNo) + public function removeFileReferences(array $fieldIds, $versionNo): void { if (empty($fieldIds)) { return; @@ -346,7 +345,7 @@ public function removeFileReferences(array $fieldIds, $versionNo) * @param int $fieldId * @param int $versionNo */ - public function removeFileReference($fieldId, $versionNo) + public function removeFileReference($fieldId, $versionNo): void { $deleteQuery = $this->connection->createQueryBuilder(); $deleteQuery @@ -409,7 +408,7 @@ public function getReferencedFiles(array $fieldIds, $versionNo) $statement = $selectQuery->execute(); return array_map( - function ($row) { + function (array $row) { return $this->prependMimeToPath($row['filename'], $row['mime_type']); }, $statement->fetchAll(PDO::FETCH_ASSOC) diff --git a/src/lib/FieldType/BinaryBase/Type.php b/src/lib/FieldType/BinaryBase/Type.php index 8fcd7d0816..e36ad27188 100644 --- a/src/lib/FieldType/BinaryBase/Type.php +++ b/src/lib/FieldType/BinaryBase/Type.php @@ -32,10 +32,9 @@ abstract class Type extends FieldType ]; /** @var \Ibexa\Core\FieldType\Validator[] */ - private $validators; + private array $validators; - /** @var \Ibexa\Contracts\Core\FieldType\BinaryBase\RouteAwarePathGenerator|null */ - protected $routeAwarePathGenerator; + protected ?RouteAwarePathGenerator $routeAwarePathGenerator; /** * @param \Ibexa\Core\FieldType\Validator[] $validators diff --git a/src/lib/FieldType/BinaryBase/Value.php b/src/lib/FieldType/BinaryBase/Value.php index 8def62307b..e8a9a8c90b 100644 --- a/src/lib/FieldType/BinaryBase/Value.php +++ b/src/lib/FieldType/BinaryBase/Value.php @@ -88,7 +88,7 @@ public function __construct(array $fileData = []) * * @return string */ - public function __toString() + public function __toString(): string { return (string)$this->uri; } diff --git a/src/lib/FieldType/BinaryFile/Type.php b/src/lib/FieldType/BinaryFile/Type.php index a5474a481e..795e8c7f37 100644 --- a/src/lib/FieldType/BinaryFile/Type.php +++ b/src/lib/FieldType/BinaryFile/Type.php @@ -37,7 +37,7 @@ public function getFieldTypeIdentifier(): string * * @return \Ibexa\Core\FieldType\BinaryFile\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -49,7 +49,7 @@ public function getEmptyValue() * * @return \Ibexa\Core\FieldType\BinaryFile\Value */ - protected function createValue(array $inputValue) + protected function createValue(array $inputValue): Value { $inputValue = $this->regenerateUri($inputValue); @@ -61,7 +61,7 @@ protected function createValue(array $inputValue) * * @param \Ibexa\Core\FieldType\BinaryFile\Value|\Ibexa\Core\FieldType\Value $value */ - protected function completeValue(Basevalue $value) + protected function completeValue(BaseValue $value) { parent::completeValue($value); diff --git a/src/lib/FieldType/Checkbox/SearchField.php b/src/lib/FieldType/Checkbox/SearchField.php index 842e87f6cb..58eb57f75f 100644 --- a/src/lib/FieldType/Checkbox/SearchField.php +++ b/src/lib/FieldType/Checkbox/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -28,7 +28,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\BooleanField(), @@ -58,7 +58,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Checkbox/Type.php b/src/lib/FieldType/Checkbox/Type.php index 5733bd9c8d..91872dfa6f 100644 --- a/src/lib/FieldType/Checkbox/Type.php +++ b/src/lib/FieldType/Checkbox/Type.php @@ -46,7 +46,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Checkbox\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(false); } @@ -117,7 +117,7 @@ protected function getSortInfo(BaseValue $value): int * * @return \Ibexa\Core\FieldType\Checkbox\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value($hash); } diff --git a/src/lib/FieldType/Checkbox/Value.php b/src/lib/FieldType/Checkbox/Value.php index a1339ee241..1a98fe6a58 100644 --- a/src/lib/FieldType/Checkbox/Value.php +++ b/src/lib/FieldType/Checkbox/Value.php @@ -34,7 +34,7 @@ public function __construct($boolValue = false) /** * @return string */ - public function __toString() + public function __toString(): string { return $this->bool ? '1' : '0'; } diff --git a/src/lib/FieldType/Country/SearchField.php b/src/lib/FieldType/Country/SearchField.php index 4ca6e75998..4e641b0e7e 100644 --- a/src/lib/FieldType/Country/SearchField.php +++ b/src/lib/FieldType/Country/SearchField.php @@ -17,8 +17,7 @@ */ class SearchField implements Indexable { - /** @var array */ - protected $countriesInfo; + protected array $countriesInfo; /** * @param array $countriesInfo Array of countries data @@ -28,7 +27,10 @@ public function __construct(array $countriesInfo) $this->countriesInfo = $countriesInfo; } - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + /** + * @return \Ibexa\Contracts\Core\Search\Field[] + */ + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { if (empty($field->value->data)) { return []; @@ -82,7 +84,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'idc' => new Search\FieldType\MultipleIntegerField(), diff --git a/src/lib/FieldType/Country/Type.php b/src/lib/FieldType/Country/Type.php index 9f36c3c020..5e3c9686b0 100644 --- a/src/lib/FieldType/Country/Type.php +++ b/src/lib/FieldType/Country/Type.php @@ -31,8 +31,7 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** @var array */ - protected $countriesInfo; + protected array $countriesInfo; /** * @param array $countriesInfo Array of countries data @@ -66,7 +65,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Country\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -117,7 +116,7 @@ protected function checkValueStructure(BaseValue $value) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $validationErrors = []; @@ -232,7 +231,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; diff --git a/src/lib/FieldType/Country/Value.php b/src/lib/FieldType/Country/Value.php index d72e0c44a1..a1df55a59b 100644 --- a/src/lib/FieldType/Country/Value.php +++ b/src/lib/FieldType/Country/Value.php @@ -43,7 +43,7 @@ public function __construct(array $countries = []) $this->countries = $countries; } - public function __toString() + public function __toString(): string { return implode(', ', array_column($this->countries, 'Name')); } diff --git a/src/lib/FieldType/Date/SearchField.php b/src/lib/FieldType/Date/SearchField.php index 11c28c61b3..a4eab2f700 100644 --- a/src/lib/FieldType/Date/SearchField.php +++ b/src/lib/FieldType/Date/SearchField.php @@ -18,7 +18,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { if ($field->value->data !== null) { $dateTime = new DateTime("@{$field->value->data['timestamp']}"); @@ -37,7 +37,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\DateField(), @@ -67,7 +67,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Date/Type.php b/src/lib/FieldType/Date/Type.php index 642ab8e245..5226afe366 100644 --- a/src/lib/FieldType/Date/Type.php +++ b/src/lib/FieldType/Date/Type.php @@ -65,7 +65,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Date\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -119,7 +119,7 @@ protected function checkValueStructure(BaseValue $value) * * @return mixed */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): ?int { if ($value->date === null) { return null; @@ -162,7 +162,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -198,7 +198,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; diff --git a/src/lib/FieldType/Date/Value.php b/src/lib/FieldType/Date/Value.php index 62b46e7885..f1708b3513 100644 --- a/src/lib/FieldType/Date/Value.php +++ b/src/lib/FieldType/Date/Value.php @@ -56,7 +56,7 @@ public function __construct(DateTime $dateTime = null) * * @return \Ibexa\Core\FieldType\Date\Value */ - public static function fromString($dateString) + public static function fromString($dateString): static { try { return new static(new DateTime($dateString, new DateTimeZone('UTC'))); @@ -74,7 +74,7 @@ public static function fromString($dateString) * * @return \Ibexa\Core\FieldType\Date\Value */ - public static function fromTimestamp($timestamp) + public static function fromTimestamp($timestamp): static { try { return new static(new DateTime("@{$timestamp}")); @@ -83,7 +83,7 @@ public static function fromTimestamp($timestamp) } } - public function __toString() + public function __toString(): string { if (!$this->date instanceof DateTime) { return ''; diff --git a/src/lib/FieldType/DateAndTime/SearchField.php b/src/lib/FieldType/DateAndTime/SearchField.php index 60a4b14f8c..4f6d7b32ae 100644 --- a/src/lib/FieldType/DateAndTime/SearchField.php +++ b/src/lib/FieldType/DateAndTime/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -28,7 +28,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\DateField(), @@ -58,7 +58,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/DateAndTime/Type.php b/src/lib/FieldType/DateAndTime/Type.php index cfdc9fb3c9..ccce0d98bb 100644 --- a/src/lib/FieldType/DateAndTime/Type.php +++ b/src/lib/FieldType/DateAndTime/Type.php @@ -75,7 +75,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\DateAndTime\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -129,7 +129,7 @@ protected function checkValueStructure(BaseValue $value) * * @return int|null */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): ?int { if ($value->value === null) { return null; @@ -172,7 +172,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -208,7 +208,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; diff --git a/src/lib/FieldType/DateAndTime/Value.php b/src/lib/FieldType/DateAndTime/Value.php index fe9865df65..620eff0088 100644 --- a/src/lib/FieldType/DateAndTime/Value.php +++ b/src/lib/FieldType/DateAndTime/Value.php @@ -48,7 +48,7 @@ public function __construct(DateTime $dateTime = null) * * @return \Ibexa\Core\FieldType\DateAndTime\Value */ - public static function fromString($dateString) + public static function fromString($dateString): static { try { return new static(new DateTime($dateString)); @@ -64,7 +64,7 @@ public static function fromString($dateString) * * @return \Ibexa\Core\FieldType\DateAndTime\Value */ - public static function fromTimestamp($timestamp) + public static function fromTimestamp($timestamp): static { try { return new static(new DateTime("@{$timestamp}")); @@ -73,7 +73,7 @@ public static function fromTimestamp($timestamp) } } - public function __toString() + public function __toString(): string { if (!$this->value instanceof DateTime) { return ''; diff --git a/src/lib/FieldType/EmailAddress/SearchField.php b/src/lib/FieldType/EmailAddress/SearchField.php index e61724e5ba..176286ab9e 100644 --- a/src/lib/FieldType/EmailAddress/SearchField.php +++ b/src/lib/FieldType/EmailAddress/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -41,7 +41,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\StringField(), @@ -71,7 +71,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/EmailAddress/Type.php b/src/lib/FieldType/EmailAddress/Type.php index ef0d55bda5..ee23e12eec 100644 --- a/src/lib/FieldType/EmailAddress/Type.php +++ b/src/lib/FieldType/EmailAddress/Type.php @@ -43,7 +43,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateValidatorConfiguration($validatorConfiguration) + public function validateValidatorConfiguration($validatorConfiguration): array { $validationErrors = []; $validator = new EmailAddressValidator(); @@ -114,7 +114,7 @@ public function getFieldTypeIdentifier(): string * * @return \Ibexa\Core\FieldType\EmailAddress\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } diff --git a/src/lib/FieldType/EmailAddress/Value.php b/src/lib/FieldType/EmailAddress/Value.php index c7ac67a44c..4deed9d568 100644 --- a/src/lib/FieldType/EmailAddress/Value.php +++ b/src/lib/FieldType/EmailAddress/Value.php @@ -31,7 +31,7 @@ public function __construct($email = '') $this->email = $email; } - public function __toString() + public function __toString(): string { return (string)$this->email; } diff --git a/src/lib/FieldType/FieldType.php b/src/lib/FieldType/FieldType.php index 6414b4d118..5d72512196 100644 --- a/src/lib/FieldType/FieldType.php +++ b/src/lib/FieldType/FieldType.php @@ -67,7 +67,7 @@ abstract class FieldType extends SPIFieldType implements Comparable /** * @param \Ibexa\Core\Persistence\TransformationProcessor $transformationProcessor */ - public function setTransformationProcessor(TransformationProcessor $transformationProcessor) + public function setTransformationProcessor(TransformationProcessor $transformationProcessor): void { $this->transformationProcessor = $transformationProcessor; } @@ -178,7 +178,7 @@ public function validateValidatorConfiguration($validatorConfiguration) * * @param mixed $validatorConfiguration */ - public function applyDefaultValidatorConfiguration(&$validatorConfiguration) + public function applyDefaultValidatorConfiguration(&$validatorConfiguration): void { if ($validatorConfiguration !== null && !is_array($validatorConfiguration)) { throw new InvalidArgumentType('$validatorConfiguration', 'array|null', $validatorConfiguration); @@ -237,7 +237,7 @@ public function validateFieldSettings($fieldSettings) * * @param mixed $fieldSettings */ - public function applyDefaultSettings(&$fieldSettings) + public function applyDefaultSettings(&$fieldSettings): void { if ($fieldSettings !== null && !is_array($fieldSettings)) { throw new InvalidArgumentType('$fieldSettings', 'array|null', $fieldSettings); diff --git a/src/lib/FieldType/FieldTypeRegistry.php b/src/lib/FieldType/FieldTypeRegistry.php index f19f050806..5eee49e591 100644 --- a/src/lib/FieldType/FieldTypeRegistry.php +++ b/src/lib/FieldType/FieldTypeRegistry.php @@ -21,7 +21,7 @@ class FieldTypeRegistry protected $fieldTypes; /** @var string[] */ - private $concreteFieldTypesIdentifiers; + private ?array $concreteFieldTypesIdentifiers = null; /** * @param \Ibexa\Contracts\Core\FieldType\FieldType[] $fieldTypes Hash of SPI FieldTypes where key is identifier diff --git a/src/lib/FieldType/Float/SearchField.php b/src/lib/FieldType/Float/SearchField.php index 1aba06c7fe..fccafbc1cf 100644 --- a/src/lib/FieldType/Float/SearchField.php +++ b/src/lib/FieldType/Float/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -33,7 +33,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\FloatField(), @@ -63,7 +63,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Float/Value.php b/src/lib/FieldType/Float/Value.php index fd79d55c9c..7294f8ed69 100644 --- a/src/lib/FieldType/Float/Value.php +++ b/src/lib/FieldType/Float/Value.php @@ -31,7 +31,7 @@ public function __construct($value = null) $this->value = $value; } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/src/lib/FieldType/ISBN/Type.php b/src/lib/FieldType/ISBN/Type.php index 2b56fd0435..152c8861eb 100644 --- a/src/lib/FieldType/ISBN/Type.php +++ b/src/lib/FieldType/ISBN/Type.php @@ -62,7 +62,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\ISBN\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -125,7 +125,7 @@ protected function checkValueStructure(BaseValue $value) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $validationErrors = []; if ($this->isEmptyValue($fieldValue)) { @@ -230,7 +230,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -275,7 +275,7 @@ public function validateFieldSettings($fieldSettings) * * @return bool */ - private function validateISBNChecksum($isbnNr): bool + private function validateISBNChecksum(string|array|null $isbnNr): bool { $result = 0; $isbnNr = strtoupper($isbnNr); @@ -303,7 +303,7 @@ private function validateISBNChecksum($isbnNr): bool * * @return bool */ - private function validateISBN13Checksum($isbnNr, &$error): bool + private function validateISBN13Checksum(string|array|null $isbnNr, &$error): bool { if (!$isbnNr) { return false; diff --git a/src/lib/FieldType/ISBN/Value.php b/src/lib/FieldType/ISBN/Value.php index 7b260ba7c1..642da37fb6 100644 --- a/src/lib/FieldType/ISBN/Value.php +++ b/src/lib/FieldType/ISBN/Value.php @@ -31,7 +31,7 @@ public function __construct($isbn = '') $this->isbn = $isbn; } - public function __toString() + public function __toString(): string { return (string)$this->isbn; } diff --git a/src/lib/FieldType/Image/IO/Legacy.php b/src/lib/FieldType/Image/IO/Legacy.php index f4e691cc98..9f3e28f71a 100644 --- a/src/lib/FieldType/Image/IO/Legacy.php +++ b/src/lib/FieldType/Image/IO/Legacy.php @@ -31,36 +31,27 @@ class Legacy implements IOServiceInterface { /** * Published images IO Service. - * - * @var \Ibexa\Core\IO\IOServiceInterface */ - private $publishedIOService; + private IOServiceInterface $publishedIOService; /** * Draft images IO Service. - * - * @var \Ibexa\Core\IO\IOServiceInterface */ - private $draftIOService; + private IOServiceInterface $draftIOService; /** * Prefix for published images. * Example: var/ibexa_demo_site/storage/images. - * - * @var string */ - private $publishedPrefix; + private string $publishedPrefix; /** * Prefix for draft images. * Example: var/ibexa_demo_site/storage/images-versioned. - * - * @var string */ - private $draftPrefix; + private string $draftPrefix; - /** @var \Ibexa\Core\FieldType\Image\IO\OptionsProvider */ - private $optionsProvider; + private OptionsProvider $optionsProvider; /** * @param \Ibexa\Core\FieldType\Image\IO\OptionsProvider $optionsProvider Path options. Known keys: var_dir, storage_dir, draft_images_dir, published_images_dir. @@ -81,7 +72,7 @@ public function __construct(IOServiceInterface $publishedIOService, IOServiceInt /** * Sets the IOService prefix. */ - public function setPrefix($prefix) + public function setPrefix($prefix): void { $this->publishedIOService->setPrefix($prefix); $this->draftIOService->setPrefix($prefix); @@ -90,7 +81,7 @@ public function setPrefix($prefix) /** * Computes the paths to published & draft images path using the options from the provider. */ - private function setPrefixes() + private function setPrefixes(): void { $pathArray = [$this->optionsProvider->getVarDir()]; @@ -211,7 +202,7 @@ public function getFileInputStream(BinaryFile $binaryFile) return $this->publishedIOService->getFileInputStream($binaryFile); } - public function deleteBinaryFile(BinaryFile $binaryFile) + public function deleteBinaryFile(BinaryFile $binaryFile): void { $this->publishedIOService->deleteBinaryFile($binaryFile); } @@ -221,7 +212,7 @@ public function deleteBinaryFile(BinaryFile $binaryFile) * * @param string $path */ - public function deleteDirectory($path) + public function deleteDirectory($path): void { $this->publishedIOService->deleteDirectory($path); } diff --git a/src/lib/FieldType/Image/IO/OptionsProvider.php b/src/lib/FieldType/Image/IO/OptionsProvider.php index 767bbba442..ad13e8efdf 100644 --- a/src/lib/FieldType/Image/IO/OptionsProvider.php +++ b/src/lib/FieldType/Image/IO/OptionsProvider.php @@ -14,8 +14,7 @@ */ class OptionsProvider { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; public function __construct(ConfigResolverInterface $configResolver) { @@ -29,22 +28,22 @@ protected function getSetting(string $name): ?string : null; } - public function getVarDir() + public function getVarDir(): ?string { return $this->getSetting('var_dir'); } - public function getStorageDir() + public function getStorageDir(): ?string { return $this->getSetting('storage_dir'); } - public function getDraftImagesDir() + public function getDraftImagesDir(): ?string { return $this->getSetting('image.versioned_images_dir'); } - public function getPublishedImagesDir() + public function getPublishedImagesDir(): ?string { return $this->getSetting('image.published_images_dir'); } diff --git a/src/lib/FieldType/Image/ImageStorage.php b/src/lib/FieldType/Image/ImageStorage.php index 6b62d5736c..90e6a34009 100644 --- a/src/lib/FieldType/Image/ImageStorage.php +++ b/src/lib/FieldType/Image/ImageStorage.php @@ -22,23 +22,18 @@ */ class ImageStorage extends GatewayBasedStorage { - /** @var \Ibexa\Core\IO\IOServiceInterface */ - protected $ioService; + protected IOServiceInterface $ioService; - /** @var \Ibexa\Core\FieldType\Image\PathGenerator */ - protected $pathGenerator; + protected PathGenerator $pathGenerator; - /** @var \Ibexa\Core\FieldType\Image\AliasCleanerInterface */ - protected $aliasCleaner; + protected AliasCleanerInterface $aliasCleaner; /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ protected $gateway; - /** @var \Ibexa\Core\IO\FilePathNormalizerInterface */ - protected $filePathNormalizer; + protected FilePathNormalizerInterface $filePathNormalizer; - /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator */ - protected $fileExtensionBlackListValidator; + protected FileExtensionBlackListValidator $fileExtensionBlackListValidator; public function __construct( StorageGatewayInterface $gateway, @@ -147,7 +142,7 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool return true; } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { if ($field->value->data !== null) { $field->value->data['imageId'] = $this->buildImageId($versionInfo, $field); @@ -158,7 +153,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field) } } - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { $fieldXmls = $this->gateway->getXmlForImages($versionInfo->versionNo, $fieldIds); diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index 1f9b4696a7..0d974e9f8b 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -23,8 +23,7 @@ class DoctrineStorage extends Gateway { public const IMAGE_FILE_TABLE = 'ezimagefile'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Maps database field names to property names. @@ -39,8 +38,7 @@ class DoctrineStorage extends Gateway 'data_string' => 'xml', ]; - /** @var \Ibexa\Core\IO\UrlRedecoratorInterface */ - private $redecorator; + private UrlRedecoratorInterface $redecorator; public function __construct(UrlRedecoratorInterface $redecorator, Connection $connection) { @@ -90,7 +88,7 @@ public function getNodePathString(VersionInfo $versionInfo) * @param string $uri File IO uri (not legacy) * @param int $fieldId */ - public function storeImageReference($uri, $fieldId) + public function storeImageReference($uri, $fieldId): void { // legacy stores the path to the image without a leading / $path = $this->redecorator->redecorateFromSource($uri); @@ -118,7 +116,7 @@ public function storeImageReference($uri, $fieldId) * * @return array */ - public function getXmlForImages($versionNo, array $fieldIds) + public function getXmlForImages($versionNo, array $fieldIds): array { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery diff --git a/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php b/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php index 1319a9ae42..eaf7a7b52d 100644 --- a/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php +++ b/src/lib/FieldType/Image/ImageThumbnailProxyStrategy.php @@ -17,11 +17,9 @@ final class ImageThumbnailProxyStrategy implements FieldTypeBasedThumbnailStrategy { - /** @var \Ibexa\Core\FieldType\Image\ImageThumbnailStrategy */ - private $imageThumbnailStrategy; + private ImageThumbnailStrategy $imageThumbnailStrategy; - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface */ - private $proxyGenerator; + private ProxyGeneratorInterface $proxyGenerator; public function __construct( ImageThumbnailStrategy $imageThumbnailStrategy, diff --git a/src/lib/FieldType/Image/ImageThumbnailStrategy.php b/src/lib/FieldType/Image/ImageThumbnailStrategy.php index 79b31c34b7..a3becc847c 100644 --- a/src/lib/FieldType/Image/ImageThumbnailStrategy.php +++ b/src/lib/FieldType/Image/ImageThumbnailStrategy.php @@ -25,14 +25,11 @@ class ImageThumbnailStrategy implements FieldTypeBasedThumbnailStrategy, LoggerA { use LoggerAwareTrait; - /** @var string */ - private $fieldTypeIdentifier; + private string $fieldTypeIdentifier; - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $variationHandler; + private VariationHandler $variationHandler; - /** @var string */ - private $variationName; + private string $variationName; public function __construct( string $fieldTypeIdentifier, diff --git a/src/lib/FieldType/Image/SearchField.php b/src/lib/FieldType/Image/SearchField.php index 4c9a5e52b3..b2ea984de8 100644 --- a/src/lib/FieldType/Image/SearchField.php +++ b/src/lib/FieldType/Image/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { $width = isset($field->value->data['width']) && $field->value->data['width'] !== null ? (int)$field->value->data['width'] @@ -66,7 +66,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'filename' => new Search\FieldType\StringField(), @@ -102,7 +102,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Image/Type.php b/src/lib/FieldType/Image/Type.php index b3513a0604..47eab3a632 100644 --- a/src/lib/FieldType/Image/Type.php +++ b/src/lib/FieldType/Image/Type.php @@ -53,7 +53,7 @@ class Type extends FieldType implements TranslationContainerInterface ]; /** @var \Ibexa\Core\FieldType\Validator[] */ - private $validators; + private array $validators; /** @var array */ private array $mimeTypes; @@ -94,7 +94,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Image\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -180,7 +180,7 @@ protected function checkValueStructure(BaseValue $value) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $errors = []; @@ -272,7 +272,7 @@ public function validateFieldSettings($fieldSettings): array * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateValidatorConfiguration($validatorConfiguration) + public function validateValidatorConfiguration($validatorConfiguration): array { $validationErrors = []; @@ -363,7 +363,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -391,7 +391,7 @@ public function toHash(SPIValue $value) * * @return \Ibexa\Contracts\Core\Persistence\Content\FieldValue */ - public function toPersistenceValue(SPIValue $value) + public function toPersistenceValue(SPIValue $value): FieldValue { // Store original data as external (to indicate they need to be stored) return new FieldValue( diff --git a/src/lib/FieldType/Image/Value.php b/src/lib/FieldType/Image/Value.php index 369c8ec036..c575a2d883 100644 --- a/src/lib/FieldType/Image/Value.php +++ b/src/lib/FieldType/Image/Value.php @@ -144,7 +144,7 @@ public function getFileSize() return $this->fileSize; } - public function __toString() + public function __toString(): string { return (string)$this->fileName; } diff --git a/src/lib/FieldType/ImageAsset/AssetMapper.php b/src/lib/FieldType/ImageAsset/AssetMapper.php index f1e198eb94..b4c8b813de 100644 --- a/src/lib/FieldType/ImageAsset/AssetMapper.php +++ b/src/lib/FieldType/ImageAsset/AssetMapper.php @@ -20,17 +20,13 @@ class AssetMapper { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; /** @var int */ private $contentTypeId = null; diff --git a/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php b/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php index d94bb14ff2..521dc55402 100644 --- a/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php +++ b/src/lib/FieldType/ImageAsset/ImageAssetThumbnailStrategy.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\Field\FieldTypeBasedThumbnailStrategy; +use Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy; use Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy as ContentThumbnailStrategy; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Repository\Values\Content\Thumbnail; @@ -18,14 +19,11 @@ class ImageAssetThumbnailStrategy implements FieldTypeBasedThumbnailStrategy { - /** @var string */ - private $fieldTypeIdentifier; + private string $fieldTypeIdentifier; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy */ - private $thumbnailStrategy; + private ThumbnailStrategy $thumbnailStrategy; public function __construct( string $fieldTypeIdentifier, diff --git a/src/lib/FieldType/ImageAsset/Type.php b/src/lib/FieldType/ImageAsset/Type.php index 4a362e6859..5cf949bca2 100644 --- a/src/lib/FieldType/ImageAsset/Type.php +++ b/src/lib/FieldType/ImageAsset/Type.php @@ -9,6 +9,7 @@ namespace Ibexa\Core\FieldType\ImageAsset; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -27,14 +28,11 @@ class Type extends FieldType implements TranslationContainerInterface { public const FIELD_TYPE_IDENTIFIER = 'ezimageasset'; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper */ - private $assetMapper; + private AssetMapper $assetMapper; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $handler; + private Handler $handler; public function __construct( ContentService $contentService, diff --git a/src/lib/FieldType/ImageAsset/Value.php b/src/lib/FieldType/ImageAsset/Value.php index e1510d10fa..cb132e8516 100644 --- a/src/lib/FieldType/ImageAsset/Value.php +++ b/src/lib/FieldType/ImageAsset/Value.php @@ -41,7 +41,7 @@ public function __construct($destinationContentId = null, ?string $alternativeTe /** * {@inheritdoc} */ - public function __toString() + public function __toString(): string { return (string) $this->destinationContentId; } diff --git a/src/lib/FieldType/Integer/SearchField.php b/src/lib/FieldType/Integer/SearchField.php index 750fe80722..4d4ea5cce9 100644 --- a/src/lib/FieldType/Integer/SearchField.php +++ b/src/lib/FieldType/Integer/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -33,7 +33,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\IntegerField(), @@ -63,7 +63,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Integer/Value.php b/src/lib/FieldType/Integer/Value.php index 0e533e9597..c29595627b 100644 --- a/src/lib/FieldType/Integer/Value.php +++ b/src/lib/FieldType/Integer/Value.php @@ -31,7 +31,7 @@ public function __construct($value = null) $this->value = $value; } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index 16d1d85861..aa0cbb6e37 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -18,8 +18,7 @@ class DoctrineStorage extends Gateway public const KEYWORD_TABLE = 'ezkeyword'; public const KEYWORD_ATTRIBUTE_LINK_TABLE = 'ezkeyword_attribute_link'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { @@ -32,7 +31,7 @@ public function __construct(Connection $connection) * @param \Ibexa\Contracts\Core\Persistence\Content\Field * @param int $contentTypeId */ - public function storeFieldData(Field $field, $contentTypeId) + public function storeFieldData(Field $field, $contentTypeId): void { if (empty($field->value->externalData) && !empty($field->id)) { $this->deleteFieldData($field->id, $field->versionNo); @@ -67,7 +66,7 @@ public function storeFieldData(Field $field, $contentTypeId) * * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - public function getFieldData(Field $field) + public function getFieldData(Field $field): void { $field->value->externalData = $this->getAssignedKeywords($field->id, $field->versionNo); } @@ -79,7 +78,7 @@ public function getFieldData(Field $field) * * @return int */ - public function getContentTypeId(Field $field) + public function getContentTypeId(Field $field): int { return $this->loadContentTypeId($field->fieldDefinitionId); } @@ -90,7 +89,7 @@ public function getContentTypeId(Field $field) * @param int $fieldId * @param int $versionNo */ - public function deleteFieldData($fieldId, $versionNo) + public function deleteFieldData($fieldId, $versionNo): void { $this->deleteOldKeywordAssignments($fieldId, $versionNo); $this->deleteOrphanedKeywords(); @@ -184,7 +183,7 @@ protected function loadContentTypeId($fieldDefinitionId): int * * @return int[] */ - protected function getExistingKeywords($keywordList, $contentTypeId) + protected function getExistingKeywords($keywordList, $contentTypeId): array { // Retrieving potentially existing keywords $query = $this->connection->createQueryBuilder(); @@ -240,7 +239,7 @@ protected function getExistingKeywords($keywordList, $contentTypeId) * * @return int[] */ - protected function insertKeywords(array $keywordsToInsert, $contentTypeId) + protected function insertKeywords(array $keywordsToInsert, $contentTypeId): array { $keywordIdMap = []; // Inserting keywords not yet registered diff --git a/src/lib/FieldType/Keyword/SearchField.php b/src/lib/FieldType/Keyword/SearchField.php index 26bc6d7983..0cc9687e5d 100644 --- a/src/lib/FieldType/Keyword/SearchField.php +++ b/src/lib/FieldType/Keyword/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -38,7 +38,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\MultipleStringField(), diff --git a/src/lib/FieldType/Keyword/Type.php b/src/lib/FieldType/Keyword/Type.php index da978a7794..0bc551ddf1 100644 --- a/src/lib/FieldType/Keyword/Type.php +++ b/src/lib/FieldType/Keyword/Type.php @@ -47,7 +47,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Keyword\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value([]); } @@ -105,7 +105,7 @@ protected function getSortInfo(BaseValue $value): string * * @return \Ibexa\Core\FieldType\Keyword\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value($hash); } @@ -139,7 +139,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\Persistence\Content\FieldValue */ - public function toPersistenceValue(SPIValue $value) + public function toPersistenceValue(SPIValue $value): FieldValue { return new FieldValue( [ @@ -157,7 +157,7 @@ public function toPersistenceValue(SPIValue $value) * * @return \Ibexa\Core\FieldType\Keyword\Value */ - public function fromPersistenceValue(FieldValue $fieldValue) + public function fromPersistenceValue(FieldValue $fieldValue): Value { return new Value($fieldValue->externalData); } diff --git a/src/lib/FieldType/Keyword/Value.php b/src/lib/FieldType/Keyword/Value.php index 9dc2aa2103..dc971afa25 100644 --- a/src/lib/FieldType/Keyword/Value.php +++ b/src/lib/FieldType/Keyword/Value.php @@ -49,7 +49,7 @@ public function __construct($values = null) * * @return string A comma separated list of tags, eg: "php, Ibexa, html5" */ - public function __toString() + public function __toString(): string { return implode(', ', $this->values); } diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage.php index 21b957df0a..28b149a8a4 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage.php @@ -24,12 +24,12 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field) return $this->gateway->storeFieldData($versionInfo, $field); } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $this->gateway->getFieldData($versionInfo, $field); } - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { $this->gateway->deleteFieldData($versionInfo, $fieldIds); } diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index 667be196d7..ffcf537162 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -17,8 +17,7 @@ class DoctrineStorage extends Gateway { public const MAP_LOCATION_TABLE = 'ezgmaplocation'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { @@ -134,7 +133,7 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field) * * @return array */ - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $this->loadFieldData($field->id, $versionInfo->versionNo); } @@ -208,7 +207,7 @@ protected function hasFieldData($fieldId, $versionNo): bool * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param int[] $fieldIds */ - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { if (empty($fieldIds)) { // Nothing to do diff --git a/src/lib/FieldType/MapLocation/SearchField.php b/src/lib/FieldType/MapLocation/SearchField.php index 0639d0acc6..63a415a365 100644 --- a/src/lib/FieldType/MapLocation/SearchField.php +++ b/src/lib/FieldType/MapLocation/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -41,7 +41,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value_address' => new Search\FieldType\StringField(), @@ -72,7 +72,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/MapLocation/Type.php b/src/lib/FieldType/MapLocation/Type.php index 0307fa7288..22e005d4c4 100644 --- a/src/lib/FieldType/MapLocation/Type.php +++ b/src/lib/FieldType/MapLocation/Type.php @@ -47,7 +47,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\MapLocation\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -147,7 +147,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -177,7 +177,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\Persistence\Content\FieldValue */ - public function toPersistenceValue(SPIValue $value) + public function toPersistenceValue(SPIValue $value): FieldValue { return new FieldValue( [ diff --git a/src/lib/FieldType/MapLocation/Value.php b/src/lib/FieldType/MapLocation/Value.php index 5118103b49..4bc061dafb 100644 --- a/src/lib/FieldType/MapLocation/Value.php +++ b/src/lib/FieldType/MapLocation/Value.php @@ -52,7 +52,7 @@ public function __construct(array $values = null) * * @return string A comma separated list of tags, eg: "php, Ibexa, html5" */ - public function __toString() + public function __toString(): string { if (is_array($this->address)) { return implode(', ', $this->address); diff --git a/src/lib/FieldType/Media/Type.php b/src/lib/FieldType/Media/Type.php index 99080c463e..961ed2cc42 100644 --- a/src/lib/FieldType/Media/Type.php +++ b/src/lib/FieldType/Media/Type.php @@ -37,7 +37,7 @@ class Type extends BaseType implements TranslationContainerInterface /** * Type constants for validation. */ - private static $availableTypes = [ + private static array $availableTypes = [ self::TYPE_FLASH, self::TYPE_QUICKTIME, self::TYPE_REALPLAYER, @@ -71,7 +71,7 @@ public function getFieldTypeIdentifier(): string * * @return \Ibexa\Core\FieldType\Media\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -83,7 +83,7 @@ public function getEmptyValue() * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -125,7 +125,7 @@ public function validateFieldSettings($fieldSettings) * * @return \Ibexa\Core\FieldType\Media\Value */ - protected function createValue(array $inputValue) + protected function createValue(array $inputValue): Value { $inputValue = $this->regenerateUri($inputValue); diff --git a/src/lib/FieldType/Null/Type.php b/src/lib/FieldType/Null/Type.php index 6f103b17da..1e71bd5694 100644 --- a/src/lib/FieldType/Null/Type.php +++ b/src/lib/FieldType/Null/Type.php @@ -56,7 +56,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Null\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(null); } @@ -88,7 +88,7 @@ protected function checkValueStructure(BaseValue $value) /** * {@inheritdoc} */ - protected function getSortInfo(BaseValue $value) + protected function getSortInfo(BaseValue $value): null { return null; } @@ -100,7 +100,7 @@ protected function getSortInfo(BaseValue $value) * * @return \Ibexa\Core\FieldType\Null\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value($hash); } diff --git a/src/lib/FieldType/Null/Value.php b/src/lib/FieldType/Null/Value.php index a55d5e16dc..485d6a53d7 100644 --- a/src/lib/FieldType/Null/Value.php +++ b/src/lib/FieldType/Null/Value.php @@ -31,7 +31,7 @@ public function __construct($value = null) $this->value = $value; } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/src/lib/FieldType/NullStorage.php b/src/lib/FieldType/NullStorage.php index 5b3e6a79bf..64c51a1f55 100644 --- a/src/lib/FieldType/NullStorage.php +++ b/src/lib/FieldType/NullStorage.php @@ -27,7 +27,7 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::getFieldData() */ - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { return; } @@ -63,7 +63,7 @@ public function hasFieldData(): bool * * @return bool|null Same as {@link \Ibexa\Contracts\Core\FieldType\FieldStorage::storeFieldData()}. */ - public function copyLegacyField(VersionInfo $versionInfo, Field $field, Field $originalField) + public function copyLegacyField(VersionInfo $versionInfo, Field $field, Field $originalField): void { return; } diff --git a/src/lib/FieldType/Relation/SearchField.php b/src/lib/FieldType/Relation/SearchField.php index 8ed651e69a..b8a5a22665 100644 --- a/src/lib/FieldType/Relation/SearchField.php +++ b/src/lib/FieldType/Relation/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -28,7 +28,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\StringField(), @@ -58,7 +58,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Relation/Type.php b/src/lib/FieldType/Relation/Type.php index b322db581c..0edf2ade9b 100644 --- a/src/lib/FieldType/Relation/Type.php +++ b/src/lib/FieldType/Relation/Type.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\FieldType\Relation; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -53,11 +54,9 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $handler; + private Handler $handler; - /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface */ - private $targetContentValidator; + private TargetContentValidatorInterface $targetContentValidator; public function __construct( SPIContentHandler $handler, @@ -67,7 +66,10 @@ public function __construct( $this->targetContentValidator = $targetContentValidator; } - public function validateFieldSettings($fieldSettings) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -203,7 +205,7 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) * * @return \Ibexa\Core\FieldType\Relation\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -296,7 +298,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): array { $destinationContentId = null; if ($value->destinationContentId !== null) { @@ -343,7 +345,7 @@ public function isSearchable(): bool * ) * */ - public function getRelations(SPIValue $fieldValue) + public function getRelations(SPIValue $fieldValue): array { $relations = []; if ($fieldValue->destinationContentId !== null) { diff --git a/src/lib/FieldType/Relation/Value.php b/src/lib/FieldType/Relation/Value.php index 1ad3a7f949..424d2a929b 100644 --- a/src/lib/FieldType/Relation/Value.php +++ b/src/lib/FieldType/Relation/Value.php @@ -34,7 +34,7 @@ public function __construct($destinationContentId = null) /** * Returns the related content's name. */ - public function __toString() + public function __toString(): string { return (string)$this->destinationContentId; } diff --git a/src/lib/FieldType/RelationList/SearchField.php b/src/lib/FieldType/RelationList/SearchField.php index 9cfb25a972..8f1ede735f 100644 --- a/src/lib/FieldType/RelationList/SearchField.php +++ b/src/lib/FieldType/RelationList/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -33,7 +33,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\MultipleStringField(), diff --git a/src/lib/FieldType/RelationList/Type.php b/src/lib/FieldType/RelationList/Type.php index 436f72b39a..95bee49bf0 100644 --- a/src/lib/FieldType/RelationList/Type.php +++ b/src/lib/FieldType/RelationList/Type.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\FieldType\RelationList; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -71,11 +72,9 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $handler; + private Handler $handler; - /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface */ - private $targetContentValidator; + private TargetContentValidatorInterface $targetContentValidator; public function __construct( SPIContentHandler $handler, @@ -85,7 +84,10 @@ public function __construct( $this->targetContentValidator = $targetContentValidator; } - public function validateFieldSettings($fieldSettings) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -193,7 +195,7 @@ public function validateFieldSettings($fieldSettings) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateValidatorConfiguration($validatorConfiguration) + public function validateValidatorConfiguration($validatorConfiguration): array { $validationErrors = []; @@ -335,7 +337,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\RelationList\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -412,7 +414,7 @@ protected function getSortInfo(BaseValue $value): string * * @return \Ibexa\Core\FieldType\RelationList\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value($hash['destinationContentIds']); } @@ -424,7 +426,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): array { return ['destinationContentIds' => $value->destinationContentIds]; } @@ -464,7 +466,7 @@ public function isSearchable(): bool * ) * */ - public function getRelations(SPIValue $value) + public function getRelations(SPIValue $value): array { /* @var \Ibexa\Core\FieldType\RelationList\Value $value */ return [ diff --git a/src/lib/FieldType/RelationList/Value.php b/src/lib/FieldType/RelationList/Value.php index d4f9f11524..218bceeefa 100644 --- a/src/lib/FieldType/RelationList/Value.php +++ b/src/lib/FieldType/RelationList/Value.php @@ -31,7 +31,7 @@ public function __construct(array $destinationContentIds = []) $this->destinationContentIds = $destinationContentIds; } - public function __toString() + public function __toString(): string { return implode(',', $this->destinationContentIds); } diff --git a/src/lib/FieldType/Selection/SearchField.php b/src/lib/FieldType/Selection/SearchField.php index e39d0c3a13..3b7f295356 100644 --- a/src/lib/FieldType/Selection/SearchField.php +++ b/src/lib/FieldType/Selection/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { $indexes = []; $values = []; @@ -62,7 +62,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'selected_option_value' => new Search\FieldType\MultipleStringField(), diff --git a/src/lib/FieldType/Selection/Type.php b/src/lib/FieldType/Selection/Type.php index 844632dc92..814684b986 100644 --- a/src/lib/FieldType/Selection/Type.php +++ b/src/lib/FieldType/Selection/Type.php @@ -53,7 +53,7 @@ class Type extends FieldType implements TranslationContainerInterface * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; @@ -157,7 +157,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Selection\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -208,7 +208,7 @@ protected function checkValueStructure(BaseValue $value) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $validationErrors = []; @@ -285,7 +285,7 @@ protected function getSortInfo(BaseValue $value): string * * @return \Ibexa\Core\FieldType\Selection\Value $value */ - public function fromHash($hash) + public function fromHash($hash): Value { return new Value($hash); } diff --git a/src/lib/FieldType/Selection/Value.php b/src/lib/FieldType/Selection/Value.php index e3dd36b5f5..7b2c5b7942 100644 --- a/src/lib/FieldType/Selection/Value.php +++ b/src/lib/FieldType/Selection/Value.php @@ -31,7 +31,7 @@ public function __construct(array $selection = []) $this->selection = $selection; } - public function __toString() + public function __toString(): string { return implode(',', $this->selection); } diff --git a/src/lib/FieldType/TextBlock/SearchField.php b/src/lib/FieldType/TextBlock/SearchField.php index 7ad3c94d16..59d26de328 100644 --- a/src/lib/FieldType/TextBlock/SearchField.php +++ b/src/lib/FieldType/TextBlock/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -45,7 +45,7 @@ private function extractShortText($string): string return mb_substr(strtok(trim((string)$string), "\r\n"), 0, 255); } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\StringField(), @@ -75,7 +75,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/TextLine/Value.php b/src/lib/FieldType/TextLine/Value.php index 7e135878d5..b2c68d33e8 100644 --- a/src/lib/FieldType/TextLine/Value.php +++ b/src/lib/FieldType/TextLine/Value.php @@ -26,7 +26,7 @@ public function __construct(?string $text = '') $this->text = (string)$text; } - public function __toString() + public function __toString(): string { return $this->text; } diff --git a/src/lib/FieldType/Time/SearchField.php b/src/lib/FieldType/Time/SearchField.php index b56b3275cb..025a69bbf3 100644 --- a/src/lib/FieldType/Time/SearchField.php +++ b/src/lib/FieldType/Time/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -28,7 +28,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value' => new Search\FieldType\IntegerField(), @@ -58,7 +58,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Time/Type.php b/src/lib/FieldType/Time/Type.php index f7f1bc62fc..f8e0240407 100644 --- a/src/lib/FieldType/Time/Type.php +++ b/src/lib/FieldType/Time/Type.php @@ -73,7 +73,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Time\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -198,7 +198,7 @@ public function isSearchable(): bool * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; diff --git a/src/lib/FieldType/Time/Value.php b/src/lib/FieldType/Time/Value.php index 29e9057464..57bca67f15 100644 --- a/src/lib/FieldType/Time/Value.php +++ b/src/lib/FieldType/Time/Value.php @@ -48,7 +48,7 @@ public function __construct($seconds = null) * * @return \Ibexa\Core\FieldType\Time\Value */ - public static function fromDateTime(DateTime $dateTime) + public static function fromDateTime(DateTime $dateTime): static { $dateTime = clone $dateTime; @@ -93,7 +93,7 @@ public static function fromTimestamp($timestamp) } } - public function __toString() + public function __toString(): string { if ($this->time === null) { return ''; diff --git a/src/lib/FieldType/Unindexed.php b/src/lib/FieldType/Unindexed.php index 0491c2b23a..334956899d 100644 --- a/src/lib/FieldType/Unindexed.php +++ b/src/lib/FieldType/Unindexed.php @@ -18,12 +18,12 @@ */ class Unindexed implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return []; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return []; } @@ -35,7 +35,7 @@ public function getIndexDefinition() * implementation of this interface), this method is used to define default * field for matching. Default field is typically used by Field criterion. */ - public function getDefaultMatchField() + public function getDefaultMatchField(): null { return null; } @@ -47,7 +47,7 @@ public function getDefaultMatchField() * implementation of this interface), this method is used to define default * field for sorting. Default field is typically used by Field sort clause. */ - public function getDefaultSortField() + public function getDefaultSortField(): null { return null; } diff --git a/src/lib/FieldType/Url/SearchField.php b/src/lib/FieldType/Url/SearchField.php index efe0867f21..d435b3083c 100644 --- a/src/lib/FieldType/Url/SearchField.php +++ b/src/lib/FieldType/Url/SearchField.php @@ -17,7 +17,7 @@ */ class SearchField implements Indexable { - public function getIndexData(Field $field, FieldDefinition $fieldDefinition) + public function getIndexData(Field $field, FieldDefinition $fieldDefinition): array { return [ new Search\Field( @@ -43,7 +43,7 @@ public function getIndexData(Field $field, FieldDefinition $fieldDefinition) ]; } - public function getIndexDefinition() + public function getIndexDefinition(): array { return [ 'value_url' => new Search\FieldType\StringField(), @@ -75,7 +75,7 @@ public function getDefaultMatchField(): string * * @return string */ - public function getDefaultSortField() + public function getDefaultSortField(): string { return $this->getDefaultMatchField(); } diff --git a/src/lib/FieldType/Url/Type.php b/src/lib/FieldType/Url/Type.php index c25416da71..d97a39606f 100644 --- a/src/lib/FieldType/Url/Type.php +++ b/src/lib/FieldType/Url/Type.php @@ -47,7 +47,7 @@ public function getName(SPIValue $value, FieldDefinition $fieldDefinition, strin * * @return \Ibexa\Core\FieldType\Url\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -129,7 +129,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -138,7 +138,7 @@ public function toHash(SPIValue $value) return ['link' => $value->link, 'text' => $value->text]; } - public function toPersistenceValue(SPIValue $value) + public function toPersistenceValue(SPIValue $value): FieldValue { if ($value === null) { return new FieldValue( diff --git a/src/lib/FieldType/Url/UrlStorage.php b/src/lib/FieldType/Url/UrlStorage.php index bcc76eb135..5e43d59d63 100644 --- a/src/lib/FieldType/Url/UrlStorage.php +++ b/src/lib/FieldType/Url/UrlStorage.php @@ -18,8 +18,7 @@ */ class UrlStorage extends GatewayBasedStorage { - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected ?LoggerInterface $logger; /** @var \Ibexa\Core\FieldType\Url\UrlStorage\Gateway */ protected $gateway; @@ -62,7 +61,7 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool return true; } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $id = $field->value->data['urlId']; if (empty($id)) { @@ -81,7 +80,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field) $field->value->externalData = isset($map[$id]) ? $map[$id] : ''; } - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { foreach ($fieldIds as $fieldId) { $this->gateway->unlinkUrl($fieldId, $versionInfo->versionNo); diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index c0ef8a3f18..78da762803 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -18,8 +18,7 @@ class DoctrineStorage extends Gateway public const URL_TABLE = DoctrineDatabase::URL_TABLE; public const URL_LINK_TABLE = DoctrineDatabase::URL_LINK_TABLE; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { @@ -35,7 +34,7 @@ public function __construct(Connection $connection) * * @return array An array of URLs, with ids as keys */ - public function getIdUrlMap(array $ids) + public function getIdUrlMap(array $ids): array { $map = []; @@ -68,7 +67,7 @@ public function getIdUrlMap(array $ids) * * @return array An array of URL ids, with URLs as keys */ - public function getUrlIdMap(array $urls) + public function getUrlIdMap(array $urls): array { $map = []; @@ -137,7 +136,7 @@ public function insertUrl($url): int * @param int $fieldId * @param int $versionNo */ - public function linkUrl($urlId, $fieldId, $versionNo) + public function linkUrl($urlId, $fieldId, $versionNo): void { $query = $this->connection->createQueryBuilder(); diff --git a/src/lib/FieldType/Url/Value.php b/src/lib/FieldType/Url/Value.php index ae76e5a900..7927d68f53 100644 --- a/src/lib/FieldType/Url/Value.php +++ b/src/lib/FieldType/Url/Value.php @@ -40,7 +40,7 @@ public function __construct($link = null, $text = null) $this->text = $text; } - public function __toString() + public function __toString(): string { return (string)$this->link; } diff --git a/src/lib/FieldType/User/Type.php b/src/lib/FieldType/User/Type.php index 85a0b322fa..a33ced6fe0 100644 --- a/src/lib/FieldType/User/Type.php +++ b/src/lib/FieldType/User/Type.php @@ -11,6 +11,7 @@ use DateTimeInterface; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; +use Ibexa\Contracts\Core\Persistence\User\Handler; use Ibexa\Contracts\Core\Persistence\User\Handler as SPIUserHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\PasswordHashService; @@ -91,14 +92,11 @@ class Type extends FieldType implements TranslationContainerInterface ], ]; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - private $userHandler; + private Handler $userHandler; - /** @var \Ibexa\Contracts\Core\Repository\PasswordHashService */ - private $passwordHashService; + private PasswordHashService $passwordHashService; - /** @var \Ibexa\Core\Repository\User\PasswordValidatorInterface */ - private $passwordValidator; + private PasswordValidatorInterface $passwordValidator; public function __construct( SPIUserHandler $userHandler, @@ -154,7 +152,7 @@ public function onlyEmptyInstance(): bool * * @return \Ibexa\Core\FieldType\User\Value */ - public function getEmptyValue() + public function getEmptyValue(): Value { return new Value(); } @@ -222,7 +220,7 @@ public function fromHash($hash) * * @return mixed */ - public function toHash(SPIValue $value) + public function toHash(SPIValue $value): ?array { if ($this->isEmptyValue($value)) { return null; @@ -236,7 +234,7 @@ public function toHash(SPIValue $value) return $hash; } - public function toPersistenceValue(SPIValue $value) + public function toPersistenceValue(SPIValue $value): FieldValue { $value->passwordHashType = $this->getPasswordHashTypeForPersistenceValue($value); if ($value->plainPassword) { @@ -256,7 +254,7 @@ public function toPersistenceValue(SPIValue $value) ); } - private function getPasswordHashTypeForPersistenceValue(SPIValue $value): int + private function getPasswordHashTypeForPersistenceValue(BaseValue $value): int { if (null === $value->passwordHashType) { return $this->passwordHashService->getDefaultHashType(); @@ -293,7 +291,7 @@ public function fromPersistenceValue(FieldValue $fieldValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) + public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue): array { $errors = []; @@ -426,8 +424,10 @@ public function validate(FieldDefinition $fieldDefinition, SPIValue $fieldValue) /** * {@inheritdoc} + * + * @return \Ibexa\Core\FieldType\ValidationError[] */ - public function validateValidatorConfiguration($validatorConfiguration) + public function validateValidatorConfiguration($validatorConfiguration): array { $validationErrors = []; @@ -449,8 +449,10 @@ public function validateValidatorConfiguration($validatorConfiguration) /** * {@inheritdoc} + * + * @return \Ibexa\Core\FieldType\ValidationError[] */ - public function validateFieldSettings($fieldSettings) + public function validateFieldSettings($fieldSettings): array { $validationErrors = []; diff --git a/src/lib/FieldType/User/UserStorage.php b/src/lib/FieldType/User/UserStorage.php index e09ef60329..6c436738dd 100644 --- a/src/lib/FieldType/User/UserStorage.php +++ b/src/lib/FieldType/User/UserStorage.php @@ -35,12 +35,12 @@ class UserStorage extends GatewayBasedStorage */ protected $gateway; - public function storeFieldData(VersionInfo $versionInfo, Field $field) + public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { return $this->gateway->storeFieldData($versionInfo, $field); } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $this->gateway->getFieldData($field->id); } @@ -52,7 +52,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field) * * @throws \Doctrine\DBAL\DBALException */ - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool { return $this->gateway->deleteFieldData($versionInfo, $fieldIds); } diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index c7155eb36b..544287082c 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -24,8 +24,7 @@ class DoctrineStorage extends Gateway public const USER_TABLE = 'ezuser'; public const USER_SETTING_TABLE = 'ezuser_setting'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Default values for user fields. @@ -79,7 +78,7 @@ public function getFieldData($fieldId, $userId = null) * * @return array */ - protected function getPropertyMap() + protected function getPropertyMap(): array { return [ 'has_stored_login' => [ @@ -110,7 +109,7 @@ protected function getPropertyMap() ], 'password_updated_at' => [ 'name' => 'passwordUpdatedAt', - 'cast' => static function ($timestamp) { + 'cast' => static function ($timestamp): ?int { return $timestamp ? (int)$timestamp : null; }, ], @@ -134,7 +133,7 @@ protected function getPropertyMap() * * @return array */ - protected function convertColumnsToProperties(array $databaseValues) + protected function convertColumnsToProperties(array $databaseValues): array { $propertyValues = []; $propertyMap = $this->getPropertyMap(); diff --git a/src/lib/FieldType/User/Value.php b/src/lib/FieldType/User/Value.php index 92eefb0355..bb1cb4ee8a 100644 --- a/src/lib/FieldType/User/Value.php +++ b/src/lib/FieldType/User/Value.php @@ -80,7 +80,7 @@ class Value extends BaseValue */ public $plainPassword; - public function __toString() + public function __toString(): string { return (string)$this->login; } diff --git a/src/lib/FieldType/ValidationError.php b/src/lib/FieldType/ValidationError.php index 4c47e5c382..917311fb62 100644 --- a/src/lib/FieldType/ValidationError.php +++ b/src/lib/FieldType/ValidationError.php @@ -22,8 +22,7 @@ class ValidationError implements ValidationErrorInterface /** @var string */ protected $plural; - /** @var array */ - protected $values; + protected array $values; /** * Element on which the error occurred @@ -53,7 +52,7 @@ public function __construct($singular, $plural = null, array $values = [], $targ * * @return \Ibexa\Contracts\Core\Repository\Values\Translation */ - public function getTranslatableMessage() + public function getTranslatableMessage(): Plural|Message { if (isset($this->plural)) { return new Plural( @@ -69,7 +68,7 @@ public function getTranslatableMessage() } } - public function setTarget($target) + public function setTarget($target): void { $this->target = $target; } diff --git a/src/lib/FieldType/Validator.php b/src/lib/FieldType/Validator.php index 870e9fb8bd..828b7a6f66 100644 --- a/src/lib/FieldType/Validator.php +++ b/src/lib/FieldType/Validator.php @@ -121,7 +121,7 @@ public function getMessage() * * @param array $constraints */ - public function initializeWithConstraints(array $constraints) + public function initializeWithConstraints(array $constraints): void { // Reset errors $this->errors = []; diff --git a/src/lib/FieldType/Validator/EmailAddressValidator.php b/src/lib/FieldType/Validator/EmailAddressValidator.php index 0a1f853bf8..51c5debcf8 100644 --- a/src/lib/FieldType/Validator/EmailAddressValidator.php +++ b/src/lib/FieldType/Validator/EmailAddressValidator.php @@ -36,9 +36,9 @@ class EmailAddressValidator extends Validator * * @param mixed $constraints * - * @return mixed + * @return \Ibexa\Core\FieldType\ValidationError[] */ - public function validateConstraints($constraints) + public function validateConstraints($constraints): array { $validationErrors = []; foreach ($constraints as $name => $value) { diff --git a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php index 0bee0955ca..bae387ab27 100644 --- a/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php +++ b/src/lib/FieldType/Validator/FileExtensionBlackListValidator.php @@ -39,7 +39,7 @@ public function __construct(ConfigResolverInterface $configResolver) /** * {@inheritdoc} */ - public function validateConstraints($constraints) + public function validateConstraints($constraints): array { return []; } diff --git a/src/lib/FieldType/Validator/FileSizeValidator.php b/src/lib/FieldType/Validator/FileSizeValidator.php index 3a1b744e54..69fad9ca49 100644 --- a/src/lib/FieldType/Validator/FileSizeValidator.php +++ b/src/lib/FieldType/Validator/FileSizeValidator.php @@ -30,7 +30,10 @@ class FileSizeValidator extends Validator ], ]; - public function validateConstraints($constraints) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validateConstraints($constraints): array { $validationErrors = []; diff --git a/src/lib/FieldType/Validator/ImageValidator.php b/src/lib/FieldType/Validator/ImageValidator.php index 01f371a3ac..71b0989a9c 100644 --- a/src/lib/FieldType/Validator/ImageValidator.php +++ b/src/lib/FieldType/Validator/ImageValidator.php @@ -17,7 +17,7 @@ class ImageValidator extends Validator /** * {@inheritdoc} */ - public function validateConstraints($constraints, ?FieldDefinition $fieldDefinition = null) + public function validateConstraints($constraints, ?FieldDefinition $fieldDefinition = null): array { return []; } diff --git a/src/lib/FieldType/Validator/StringLengthValidator.php b/src/lib/FieldType/Validator/StringLengthValidator.php index 85c136967e..2606863a8f 100644 --- a/src/lib/FieldType/Validator/StringLengthValidator.php +++ b/src/lib/FieldType/Validator/StringLengthValidator.php @@ -38,7 +38,10 @@ class StringLengthValidator extends Validator ], ]; - public function validateConstraints($constraints) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validateConstraints($constraints): array { $validationErrors = []; foreach ($constraints as $name => $value) { diff --git a/src/lib/FieldType/Value.php b/src/lib/FieldType/Value.php index e5d1d80079..cd2eae50b6 100644 --- a/src/lib/FieldType/Value.php +++ b/src/lib/FieldType/Value.php @@ -21,5 +21,5 @@ abstract class Value extends ValueObject implements ValueInterface * * @return string */ - abstract public function __toString(); + abstract public function __toString(): string; } diff --git a/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php b/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php index 9fcdf51393..bdcf56cd3e 100644 --- a/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php +++ b/src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php @@ -22,20 +22,15 @@ final class SymfonySerializerAdapter implements ValueSerializerInterface { private const DEFAULT_FORMAT = 'json'; - /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface */ - private $normalizer; + private NormalizerInterface $normalizer; - /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface */ - private $denormalizer; + private DenormalizerInterface $denormalizer; - /** @var \Symfony\Component\Serializer\Encoder\EncoderInterface */ - private $encoder; + private EncoderInterface $encoder; - /** @var \Symfony\Component\Serializer\Encoder\DecoderInterface */ - private $decoder; + private DecoderInterface $decoder; - /** @var string */ - private $format; + private string $format; /** * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface $normalizer diff --git a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php index 650abe4b5c..92733b556e 100644 --- a/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php +++ b/src/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoader.php @@ -18,8 +18,7 @@ */ class SudoMainLocationLoader implements ContentInfoLocationLoader { - /** @var \Ibexa\Contracts\Core\Repository\Repository|\Ibexa\Core\Repository\Repository */ - private $repository; + private Repository $repository; public function __construct(Repository $repository) { @@ -34,7 +33,7 @@ public function loadLocation(ContentInfo $contentInfo) try { return $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); diff --git a/src/lib/Helper/ContentPreviewHelper.php b/src/lib/Helper/ContentPreviewHelper.php index cc7791bf0e..f3be00a7fd 100644 --- a/src/lib/Helper/ContentPreviewHelper.php +++ b/src/lib/Helper/ContentPreviewHelper.php @@ -18,23 +18,18 @@ class ContentPreviewHelper implements SiteAccessAware { - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface */ - protected $siteAccessRouter; + protected SiteAccessRouterInterface $siteAccessRouter; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ protected $originalSiteAccess; - /** @var bool */ - private $previewActive = false; + private bool $previewActive = false; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $previewedContent; + private ?Content $previewedContent = null; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private $previewedLocation; + private ?Location $previewedLocation = null; public function __construct(EventDispatcherInterface $eventDispatcher, SiteAccessRouterInterface $siteAccessRouter) { @@ -42,7 +37,7 @@ public function __construct(EventDispatcherInterface $eventDispatcher, SiteAcces $this->siteAccessRouter = $siteAccessRouter; } - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { $this->originalSiteAccess = $siteAccess; } @@ -96,7 +91,7 @@ public function isPreviewActive() /** * @param bool $previewActive */ - public function setPreviewActive($previewActive) + public function setPreviewActive($previewActive): void { $this->previewActive = (bool)$previewActive; $this->originalSiteAccess = clone $this->originalSiteAccess; @@ -113,7 +108,7 @@ public function getPreviewedContent() /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $previewedContent */ - public function setPreviewedContent(Content $previewedContent) + public function setPreviewedContent(Content $previewedContent): void { $this->previewedContent = $previewedContent; } @@ -129,7 +124,7 @@ public function getPreviewedLocation() /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $previewedLocation */ - public function setPreviewedLocation(Location $previewedLocation) + public function setPreviewedLocation(Location $previewedLocation): void { $this->previewedLocation = $previewedLocation; } diff --git a/src/lib/Helper/FieldHelper.php b/src/lib/Helper/FieldHelper.php index 2cbfc5fa87..893bb05ebb 100644 --- a/src/lib/Helper/FieldHelper.php +++ b/src/lib/Helper/FieldHelper.php @@ -12,11 +12,9 @@ class FieldHelper { - /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */ - private $fieldTypeService; + private FieldTypeService $fieldTypeService; - /** @var TranslationHelper */ - private $translationHelper; + private TranslationHelper $translationHelper; public function __construct(TranslationHelper $translationHelper, FieldTypeService $fieldTypeService) { @@ -33,7 +31,7 @@ public function __construct(TranslationHelper $translationHelper, FieldTypeServi * * @return bool */ - public function isFieldEmpty(Content $content, $fieldDefIdentifier, $forcedLanguage = null) + public function isFieldEmpty(Content $content, $fieldDefIdentifier, $forcedLanguage = null): bool { $field = $this->translationHelper->getTranslatedField($content, $fieldDefIdentifier, $forcedLanguage); $fieldDefinition = $content->getContentType()->getFieldDefinition($fieldDefIdentifier); diff --git a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php index 016d00cbad..4ca30d153b 100644 --- a/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php +++ b/src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php @@ -19,14 +19,11 @@ */ final class ArrayTranslatorFieldsGroupsList implements FieldsGroupsList { - /** @var array */ - private $groups; + private array $groups; - /** @var string */ - private $defaultGroup; + private string $defaultGroup; - /** @var \Symfony\Contracts\Translation\TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; public function __construct(TranslatorInterface $translator, string $defaultGroup, array $groups) { @@ -35,7 +32,10 @@ public function __construct(TranslatorInterface $translator, string $defaultGrou $this->translator = $translator; } - public function getGroups() + /** + * @return mixed[] + */ + public function getGroups(): array { $translatedGroups = []; diff --git a/src/lib/Helper/PreviewLocationProvider.php b/src/lib/Helper/PreviewLocationProvider.php index 4da6a3642e..92b91b639d 100644 --- a/src/lib/Helper/PreviewLocationProvider.php +++ b/src/lib/Helper/PreviewLocationProvider.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Helper; +use Ibexa\Contracts\Core\Persistence\Content\Location\Handler; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as PersistenceLocationHandler; use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; @@ -18,11 +19,9 @@ */ class PreviewLocationProvider { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - private $locationHandler; + private Handler $locationHandler; /** * @param \Ibexa\Contracts\Core\Repository\LocationService $locationService diff --git a/src/lib/Helper/TranslationHelper.php b/src/lib/Helper/TranslationHelper.php index 27c0e84da5..2c25c684ca 100644 --- a/src/lib/Helper/TranslationHelper.php +++ b/src/lib/Helper/TranslationHelper.php @@ -24,17 +24,13 @@ */ class TranslationHelper { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - protected $contentService; + protected ContentService $contentService; - /** @var array */ - private $siteAccessesByLanguage; + private array $siteAccessesByLanguage; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private ?LoggerInterface $logger; public function __construct(ConfigResolverInterface $configResolver, ContentService $contentService, array $siteAccessesByLanguage, LoggerInterface $logger = null) { @@ -53,7 +49,7 @@ public function __construct(ConfigResolverInterface $configResolver, ContentServ * * @return string */ - public function getTranslatedContentName(Content $content, $forcedLanguage = null): string + public function getTranslatedContentName(Content $content, ?string $forcedLanguage = null): string { return $this->getTranslatedContentNameByVersionInfo( $content->getVersionInfo(), @@ -117,7 +113,7 @@ public function getTranslatedContentNameByContentInfo(ContentInfo $contentInfo, * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Field|null */ - public function getTranslatedField(Content $content, $fieldDefIdentifier, $forcedLanguage = null) + public function getTranslatedField(Content $content, string $fieldDefIdentifier, $forcedLanguage = null) { // Loop over prioritized languages to get the appropriate translated field. foreach ($this->getLanguages($forcedLanguage) as $lang) { @@ -146,7 +142,7 @@ public function getTranslatedField(Content $content, $fieldDefIdentifier, $force public function getTranslatedFieldDefinitionProperty( ContentType $contentType, $fieldDefIdentifier, - $property = 'name', + string $property = 'name', $forcedLanguage = null ) { $fieldDefinition = $contentType->getFieldDefinition($fieldDefIdentifier); @@ -274,7 +270,7 @@ public function getTranslationSiteAccess($languageCode) * * @return array */ - public function getAvailableLanguages() + public function getAvailableLanguages(): array { $translationSiteAccesses = $this->configResolver->getParameter('translation_siteaccesses'); $relatedSiteAccesses = $translationSiteAccesses ?: $this->configResolver->getParameter('related_siteaccesses'); diff --git a/src/lib/IO/ConfigScopeChangeAwareIOService.php b/src/lib/IO/ConfigScopeChangeAwareIOService.php index 1af4d53e6b..d86beba96f 100644 --- a/src/lib/IO/ConfigScopeChangeAwareIOService.php +++ b/src/lib/IO/ConfigScopeChangeAwareIOService.php @@ -16,14 +16,11 @@ class ConfigScopeChangeAwareIOService implements IOServiceInterface, ConfigScopeChangeSubscriber { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $innerIOService; + private IOServiceInterface $innerIOService; - /** @var string */ - private $prefixParameterName; + private string $prefixParameterName; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php index c4ab5a7ebb..9b85a51a56 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php @@ -15,13 +15,11 @@ /** * @internal */ -final class SiteAccessDependentBinaryDataHandler implements IOBinaryDataHandler +final class SiteAccessDependentBinaryDataHandler implements IOBinarydataHandler { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry */ - private $dataHandlerRegistry; + private HandlerRegistry $dataHandlerRegistry; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php index b0b570f2c2..b0e4e51693 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php @@ -17,11 +17,9 @@ */ final class SiteAccessDependentMetadataHandler implements IOMetadataHandler { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry */ - private $dataHandlerRegistry; + private HandlerRegistry $dataHandlerRegistry; public function __construct( ConfigResolverInterface $configResolver, diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index 79cc6dd02f..ce8df91fe8 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -10,6 +10,7 @@ use DateTime; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception; +use Ibexa\Contracts\Core\IO\BinaryFile; use Ibexa\Contracts\Core\IO\BinaryFile as SPIBinaryFile; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct as SPIBinaryFileCreateStruct; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; @@ -24,11 +25,9 @@ */ class LegacyDFSCluster implements IOMetadataHandler { - /** @var \Doctrine\DBAL\Connection */ - private $db; + private Connection $db; - /** @var \Ibexa\Core\IO\UrlDecorator */ - private $urlDecorator; + private ?UrlDecorator $urlDecorator; /** * @param \Doctrine\DBAL\Connection $connection Doctrine DBAL connection @@ -92,7 +91,7 @@ public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct) * * @param string $spiBinaryFileId */ - public function delete($spiBinaryFileId) + public function delete($spiBinaryFileId): void { $path = (string)$this->addPrefix($spiBinaryFileId); @@ -277,7 +276,7 @@ public function getMimeType($spiBinaryFileId) * * @param string $spiPath SPI Path, not prefixed by URL decoration */ - public function deleteDirectory($spiPath) + public function deleteDirectory($spiPath): void { $query = $this->db->createQueryBuilder(); $query @@ -298,7 +297,7 @@ public function deleteDirectory($spiPath) * * @return \Ibexa\Contracts\Core\IO\BinaryFile */ - protected function mapArrayToSPIBinaryFile(array $properties) + protected function mapArrayToSPIBinaryFile(array $properties): BinaryFile { $spiBinaryFile = new SPIBinaryFile(); $spiBinaryFile->id = $properties['id']; @@ -313,7 +312,7 @@ protected function mapArrayToSPIBinaryFile(array $properties) * * @return \Ibexa\Contracts\Core\IO\BinaryFile */ - protected function mapSPIBinaryFileCreateStructToSPIBinaryFile(SPIBinaryFileCreateStruct $binaryFileCreateStruct) + protected function mapSPIBinaryFileCreateStructToSPIBinaryFile(SPIBinaryFileCreateStruct $binaryFileCreateStruct): BinaryFile { $spiBinaryFile = new SPIBinaryFile(); $spiBinaryFile->id = $binaryFileCreateStruct->id; diff --git a/src/lib/IO/IOService.php b/src/lib/IO/IOService.php index c80a2822fd..9a9d66d840 100644 --- a/src/lib/IO/IOService.php +++ b/src/lib/IO/IOService.php @@ -25,17 +25,13 @@ */ class IOService implements IOServiceInterface { - /** @var \Ibexa\Core\IO\IOBinarydataHandler */ - protected $binarydataHandler; + protected IOBinarydataHandler $binarydataHandler; - /** @var \Ibexa\Core\IO\IOMetadataHandler */ - protected $metadataHandler; + protected IOMetadataHandler $metadataHandler; - /** @var \Ibexa\Contracts\Core\IO\MimeTypeDetector */ - protected $mimeTypeDetector; + protected MimeTypeDetector $mimeTypeDetector; - /** @var array */ - protected $settings; + protected array $settings; public function __construct( IOMetadataHandler $metadataHandler, @@ -49,12 +45,12 @@ public function __construct( $this->settings = $settings; } - public function setPrefix($prefix) + public function setPrefix($prefix): void { $this->settings['prefix'] = $prefix; } - public function newBinaryCreateStructFromUploadedFile(array $uploadedFile) + public function newBinaryCreateStructFromUploadedFile(array $uploadedFile): BinaryFileCreateStruct { if (!is_string($uploadedFile['tmp_name']) || empty($uploadedFile['tmp_name'])) { throw new InvalidArgumentException('uploadedFile', "uploadedFile['tmp_name'] does not exist or has invalid value"); @@ -77,7 +73,7 @@ public function newBinaryCreateStructFromUploadedFile(array $uploadedFile) return $binaryCreateStruct; } - public function newBinaryCreateStructFromLocalFile($localFile) + public function newBinaryCreateStructFromLocalFile($localFile): BinaryFileCreateStruct { if (empty($localFile) || !is_string($localFile)) { throw new InvalidArgumentException('localFile', 'localFile has an invalid value'); @@ -139,7 +135,7 @@ public function createBinaryFile(BinaryFileCreateStruct $binaryFileCreateStruct) return $this->buildDomainBinaryFileObject($spiBinaryFile); } - public function deleteBinaryFile(BinaryFile $binaryFile) + public function deleteBinaryFile(BinaryFile $binaryFile): void { $this->checkBinaryFileId($binaryFile->id); $spiUri = $this->getPrefixedUri($binaryFile->id); @@ -218,7 +214,7 @@ public function exists($binaryFileId) * * @return \Ibexa\Contracts\Core\IO\BinaryFileCreateStruct */ - protected function buildSPIBinaryFileCreateStructObject(BinaryFileCreateStruct $binaryFileCreateStruct) + protected function buildSPIBinaryFileCreateStructObject(BinaryFileCreateStruct $binaryFileCreateStruct): SPIBinaryFileCreateStruct { $spiBinaryCreateStruct = new SPIBinaryFileCreateStruct(); @@ -238,7 +234,7 @@ protected function buildSPIBinaryFileCreateStructObject(BinaryFileCreateStruct $ * * @return \Ibexa\Core\IO\Values\BinaryFile */ - protected function buildDomainBinaryFileObject(SPIBinaryFile $spiBinaryFile) + protected function buildDomainBinaryFileObject(SPIBinaryFile $spiBinaryFile): BinaryFile { return new BinaryFile( [ @@ -257,7 +253,7 @@ protected function buildDomainBinaryFileObject(SPIBinaryFile $spiBinaryFile) * * @return string */ - protected function getPrefixedUri($binaryFileId) + protected function getPrefixedUri(string $binaryFileId): string { $prefix = ''; if (isset($this->settings['prefix'])) { @@ -304,7 +300,7 @@ protected function checkBinaryFileId($binaryFileId) * * @param string $path */ - public function deleteDirectory($path) + public function deleteDirectory($path): void { $prefixedUri = $this->getPrefixedUri($path); $this->metadataHandler->deleteDirectory($prefixedUri); @@ -318,7 +314,7 @@ public function deleteDirectory($path) * * @return bool */ - protected function isAbsolutePath($path) + protected function isAbsolutePath($path): bool { return $path[0] === '/' || (PHP_OS === 'WINNT' && $path[1] === ':'); } diff --git a/src/lib/IO/TolerantIOService.php b/src/lib/IO/TolerantIOService.php index c388b8026a..7e9d821194 100644 --- a/src/lib/IO/TolerantIOService.php +++ b/src/lib/IO/TolerantIOService.php @@ -26,7 +26,7 @@ class TolerantIOService extends IOService /** @var \Psr\Log\LoggerInterface */ protected $logger; - public function setLogger(LoggerInterface $logger = null) + public function setLogger(LoggerInterface $logger = null): void { $this->logger = $logger; } @@ -39,7 +39,7 @@ public function setLogger(LoggerInterface $logger = null) * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentValue If the binary file is invalid * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException If the binary file isn't found */ - public function deleteBinaryFile(BinaryFile $binaryFile) + public function deleteBinaryFile(BinaryFile $binaryFile): void { $this->checkBinaryFileId($binaryFile->id); $spiUri = $this->getPrefixedUri($binaryFile->id); @@ -121,7 +121,7 @@ public function loadBinaryFileByUri($binaryFileUri) } } - private function logMissingFile($id) + private function logMissingFile($id): void { if (!isset($this->logger)) { return; diff --git a/src/lib/IO/UrlDecorator/Prefix.php b/src/lib/IO/UrlDecorator/Prefix.php index 64576fa977..aef42515f9 100644 --- a/src/lib/IO/UrlDecorator/Prefix.php +++ b/src/lib/IO/UrlDecorator/Prefix.php @@ -17,8 +17,7 @@ */ class Prefix implements UrlDecorator { - /** @var \Ibexa\Core\IO\IOConfigProvider */ - protected $ioConfigResolver; + protected IOConfigProvider $ioConfigResolver; public function __construct(IOConfigProvider $IOConfigResolver) { diff --git a/src/lib/IO/UrlRedecorator.php b/src/lib/IO/UrlRedecorator.php index ed4f470335..4e6b4b7659 100644 --- a/src/lib/IO/UrlRedecorator.php +++ b/src/lib/IO/UrlRedecorator.php @@ -12,11 +12,9 @@ */ class UrlRedecorator implements UrlRedecoratorInterface { - /** @var UrlDecorator */ - private $sourceDecorator; + private UrlDecorator $sourceDecorator; - /** @var UrlDecorator */ - private $targetDecorator; + private UrlDecorator $targetDecorator; public function __construct(UrlDecorator $sourceDecorator, UrlDecorator $targetDecorator) { diff --git a/src/lib/Limitation/AbstractPersistenceLimitationType.php b/src/lib/Limitation/AbstractPersistenceLimitationType.php index 61a7d19c9c..8626975af9 100644 --- a/src/lib/Limitation/AbstractPersistenceLimitationType.php +++ b/src/lib/Limitation/AbstractPersistenceLimitationType.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Limitation; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as SPIPersistenceHandler; /** @@ -14,8 +15,7 @@ */ class AbstractPersistenceLimitationType { - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistence; + protected Handler $persistence; /** * @param \Ibexa\Contracts\Core\Persistence\Handler $persistence diff --git a/src/lib/Limitation/BlockingLimitationType.php b/src/lib/Limitation/BlockingLimitationType.php index 0769837be9..e03b281af9 100644 --- a/src/lib/Limitation/BlockingLimitationType.php +++ b/src/lib/Limitation/BlockingLimitationType.php @@ -10,7 +10,9 @@ use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\MatchNone; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation as APIBlockingLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -54,7 +56,7 @@ public function __construct($identifier) * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIBlockingLimitation) { throw new InvalidArgumentType('$limitationValue', 'BlockingLimitation', $limitationValue); @@ -72,7 +74,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; if (empty($limitationValue->limitationValues)) { @@ -95,7 +97,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): BlockingLimitation { return new APIBlockingLimitation($this->identifier, $limitationValues); } @@ -132,9 +134,9 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): MatchNone { - return new Criterion\MatchNone(); + return new MatchNone(); } /** @@ -145,7 +147,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/ChangeOwnerLimitationType.php b/src/lib/Limitation/ChangeOwnerLimitationType.php index ed0005b578..7a2d2aeb93 100644 --- a/src/lib/Limitation/ChangeOwnerLimitationType.php +++ b/src/lib/Limitation/ChangeOwnerLimitationType.php @@ -113,7 +113,7 @@ public function getCriterion(Limitation $value, APIUserReference $currentUser): /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function valueSchema(): void + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/ContentTypeLimitationType.php b/src/lib/Limitation/ContentTypeLimitationType.php index 067792d2df..eb2e0c4115 100644 --- a/src/lib/Limitation/ContentTypeLimitationType.php +++ b/src/lib/Limitation/ContentTypeLimitationType.php @@ -15,8 +15,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeId; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation as APIContentTypeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -38,7 +40,7 @@ class ContentTypeLimitationType extends AbstractPersistenceLimitationType implem * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIContentTypeLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIContentTypeLimitation', $limitationValue); @@ -62,7 +64,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -90,7 +92,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ContentTypeLimitation { return new APIContentTypeLimitation(['limitationValues' => $limitationValues]); } @@ -165,7 +167,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): ContentTypeId { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -174,11 +176,11 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren if (!isset($value->limitationValues[1])) { // 1 limitation value: EQ operation - return new Criterion\ContentTypeId($value->limitationValues[0]); + return new ContentTypeId($value->limitationValues[0]); } // several limitation values: IN operation - return new Criterion\ContentTypeId($value->limitationValues); + return new ContentTypeId($value->limitationValues); } /** @@ -187,7 +189,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/LanguageLimitationType.php b/src/lib/Limitation/LanguageLimitationType.php index 818e2dc549..4ca448e842 100644 --- a/src/lib/Limitation/LanguageLimitationType.php +++ b/src/lib/Limitation/LanguageLimitationType.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Limitation\Target; use Ibexa\Contracts\Core\Limitation\Target\DestinationLocation as DestinationLocationTarget; use Ibexa\Contracts\Core\Limitation\TargetAwareType as SPITargetAwareLimitationType; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIPersistenceContentHandler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as SPIPersistenceLanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo as SPIVersionInfo; @@ -34,14 +35,12 @@ */ class LanguageLimitationType implements SPITargetAwareLimitationType { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - private $persistenceLanguageHandler; + private SPIPersistenceLanguageHandler $persistenceLanguageHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $persistenceContentHandler; + private Handler $persistenceContentHandler; /** @var \Ibexa\Core\Limitation\LanguageLimitation\VersionTargetEvaluator[] */ - private $versionTargetEvaluators; + private iterable $versionTargetEvaluators; /** * @param \Ibexa\Contracts\Core\Persistence\Content\Language\Handler $persistenceLanguageHandler diff --git a/src/lib/Limitation/LocationLimitationType.php b/src/lib/Limitation/LocationLimitationType.php index f90ec4d3e7..6d33289b08 100644 --- a/src/lib/Limitation/LocationLimitationType.php +++ b/src/lib/Limitation/LocationLimitationType.php @@ -16,8 +16,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LocationId; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation as APILocationLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -39,7 +41,7 @@ class LocationLimitationType extends AbstractPersistenceLimitationType implement * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APILocationLimitation) { throw new InvalidArgumentType('$limitationValue', 'APILocationLimitation', $limitationValue); @@ -63,7 +65,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -91,7 +93,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): LocationLimitation { return new APILocationLimitation(['limitationValues' => $limitationValues]); } @@ -111,7 +113,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool|true|false { if (!$value instanceof APILocationLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APILocationLimitation'); @@ -208,7 +210,7 @@ protected function evaluateForContentCreateStruct(APILimitationValue $value, arr * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): LocationId { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -217,11 +219,11 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren if (!isset($value->limitationValues[1])) { // 1 limitation value: EQ operation - return new Criterion\LocationId($value->limitationValues[0]); + return new LocationId($value->limitationValues[0]); } // several limitation values: IN operation - return new Criterion\LocationId($value->limitationValues); + return new LocationId($value->limitationValues); } public function valueSchema(): int diff --git a/src/lib/Limitation/MemberOfLimitationType.php b/src/lib/Limitation/MemberOfLimitationType.php index aaecc7683e..08b05c3479 100644 --- a/src/lib/Limitation/MemberOfLimitationType.php +++ b/src/lib/Limitation/MemberOfLimitationType.php @@ -55,7 +55,10 @@ public function acceptValue(APILimitationValue $limitationValue): void } } - public function validate(APILimitationValue $limitationValue) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; @@ -88,7 +91,7 @@ public function buildValue(array $limitationValues): APILimitationValue return new MemberOfLimitation(['limitationValues' => $limitationValues]); } - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): ?bool { if (!$value instanceof MemberOfLimitation) { throw new InvalidArgumentException( @@ -124,12 +127,12 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse return self::ACCESS_DENIED; } - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException('Member of Limitation Criterion'); } - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/NewObjectStateLimitationType.php b/src/lib/Limitation/NewObjectStateLimitationType.php index 2db85f5b1b..a81d5157af 100644 --- a/src/lib/Limitation/NewObjectStateLimitationType.php +++ b/src/lib/Limitation/NewObjectStateLimitationType.php @@ -17,6 +17,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation as APINewObjectStateLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -38,7 +39,7 @@ class NewObjectStateLimitationType extends AbstractPersistenceLimitationType imp * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APINewObjectStateLimitation) { throw new InvalidArgumentType('$limitationValue', 'NewObjectStateLimitation', $limitationValue); @@ -62,7 +63,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -90,7 +91,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): NewObjectStateLimitation { return new APINewObjectStateLimitation(['limitationValues' => $limitationValues]); } @@ -151,7 +152,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -162,7 +163,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/NewSectionLimitationType.php b/src/lib/Limitation/NewSectionLimitationType.php index faa03cd792..a9b6318b77 100644 --- a/src/lib/Limitation/NewSectionLimitationType.php +++ b/src/lib/Limitation/NewSectionLimitationType.php @@ -18,7 +18,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Section; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewSectionLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewSectionLimitation as APINewSectionLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -40,7 +42,7 @@ class NewSectionLimitationType extends AbstractPersistenceLimitationType impleme * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APINewSectionLimitation) { throw new InvalidArgumentType('$limitationValue', 'APINewSectionLimitation', $limitationValue); @@ -64,7 +66,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -92,7 +94,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): NewSectionLimitation { return new APINewSectionLimitation(['limitationValues' => $limitationValues]); } @@ -143,7 +145,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -154,7 +156,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } @@ -185,7 +187,7 @@ public function getCriterionByTarget(APILimitationValue $value, APIUserReference * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - private function doEvaluate(APILimitationValue $value, array $targets): bool + private function doEvaluate(NewSectionLimitation|Limitation $value, array $targets): bool { foreach ($targets as $target) { if (!$target instanceof Section && !$target instanceof SPISection) { diff --git a/src/lib/Limitation/ObjectStateLimitationType.php b/src/lib/Limitation/ObjectStateLimitationType.php index 4c4775ece7..53fbfd32c2 100644 --- a/src/lib/Limitation/ObjectStateLimitationType.php +++ b/src/lib/Limitation/ObjectStateLimitationType.php @@ -16,8 +16,11 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateId; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ObjectStateLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ObjectStateLimitation as APIObjectStateLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -41,7 +44,7 @@ class ObjectStateLimitationType extends AbstractPersistenceLimitationType implem * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIObjectStateLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIObjectStateLimitation', $limitationValue); @@ -67,7 +70,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -95,7 +98,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ObjectStateLimitation { return new APIObjectStateLimitation(['limitationValues' => $limitationValues]); } @@ -211,7 +214,7 @@ private function areObjectStatesMatchingTheLimitation( * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface|\Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalOperator */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): ObjectStateId|LogicalAnd { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -220,23 +223,23 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren if (!isset($value->limitationValues[1])) { // 1 limitation value: EQ operation - return new Criterion\ObjectStateId($value->limitationValues[0]); + return new ObjectStateId($value->limitationValues[0]); } $groupedLimitationValues = $this->groupLimitationValues($value->limitationValues); if (count($groupedLimitationValues) === 1) { // one group, several limitation values: IN operation - return new Criterion\ObjectStateId($groupedLimitationValues[0]); + return new ObjectStateId($groupedLimitationValues[0]); } // limitations from different groups require logical AND between them $criterions = []; foreach ($groupedLimitationValues as $limitationGroup) { - $criterions[] = new Criterion\ObjectStateId($limitationGroup); + $criterions[] = new ObjectStateId($limitationGroup); } - return new Criterion\LogicalAnd($criterions); + return new LogicalAnd($criterions); } /** @@ -246,7 +249,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * * @return int[][] */ - private function groupLimitationValues(array $limitationValues) + private function groupLimitationValues(array $limitationValues): array { $objectStateHandler = $this->persistence->objectStateHandler(); $stateGroups = $objectStateHandler->loadAllGroups(); @@ -268,7 +271,7 @@ private function groupLimitationValues(array $limitationValues) /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/OwnerLimitationType.php b/src/lib/Limitation/OwnerLimitationType.php index 633623b813..78d6774ac7 100644 --- a/src/lib/Limitation/OwnerLimitationType.php +++ b/src/lib/Limitation/OwnerLimitationType.php @@ -13,8 +13,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserMetadata; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\OwnerLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\OwnerLimitation as APIOwnerLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -37,7 +39,7 @@ class OwnerLimitationType extends AbstractPersistenceLimitationType implements S * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIOwnerLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIOwnerLimitation', $limitationValue); @@ -64,7 +66,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $value) { @@ -90,7 +92,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): OwnerLimitation { return new APIOwnerLimitation(['limitationValues' => $limitationValues]); } @@ -157,7 +159,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @todo Add support for $limitationValues[0] == 2 when session values can be injected somehow, or deprecate */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): UserMetadata { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -171,8 +173,8 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren ); } - return new Criterion\UserMetadata( - Criterion\UserMetadata::OWNER, + return new UserMetadata( + UserMetadata::OWNER, Criterion\Operator::EQ, $currentUser->getUserId() ); @@ -184,7 +186,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/ParentContentTypeLimitationType.php b/src/lib/Limitation/ParentContentTypeLimitationType.php index edf10d02aa..7d188e79b2 100644 --- a/src/lib/Limitation/ParentContentTypeLimitationType.php +++ b/src/lib/Limitation/ParentContentTypeLimitationType.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation as APIParentContentTypeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -39,7 +40,7 @@ class ParentContentTypeLimitationType extends AbstractPersistenceLimitationType * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIParentContentTypeLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIParentContentTypeLimitation', $limitationValue); @@ -63,7 +64,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -91,7 +92,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ParentContentTypeLimitation { return new APIParentContentTypeLimitation(['limitationValues' => $limitationValues]); } @@ -222,7 +223,7 @@ protected function evaluateForContentCreateStruct(APILimitationValue $value, arr * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -233,7 +234,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } @@ -245,7 +246,7 @@ public function valueSchema() * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - private function loadParentLocations(ContentInfo $contentInfo) + private function loadParentLocations(ContentInfo $contentInfo): array { $locations = $this->persistence->locationHandler()->loadLocationsByContent($contentInfo->id); $parentLocations = []; diff --git a/src/lib/Limitation/ParentDepthLimitationType.php b/src/lib/Limitation/ParentDepthLimitationType.php index a8be463053..bdbb78e3c0 100644 --- a/src/lib/Limitation/ParentDepthLimitationType.php +++ b/src/lib/Limitation/ParentDepthLimitationType.php @@ -17,6 +17,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation as APIParentDepthLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -37,7 +38,7 @@ class ParentDepthLimitationType extends AbstractPersistenceLimitationType implem * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIParentDepthLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIParentDepthLimitation', $limitationValue); @@ -64,7 +65,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; @@ -78,7 +79,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ParentDepthLimitation { return new APIParentDepthLimitation(['limitationValues' => $limitationValues]); } @@ -201,7 +202,7 @@ protected function evaluateForContentCreateStruct(APILimitationValue $value, arr * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -212,7 +213,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/ParentOwnerLimitationType.php b/src/lib/Limitation/ParentOwnerLimitationType.php index f839264972..8e3e2fa3df 100644 --- a/src/lib/Limitation/ParentOwnerLimitationType.php +++ b/src/lib/Limitation/ParentOwnerLimitationType.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentOwnerLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentOwnerLimitation as APIParentOwnerLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -36,7 +37,7 @@ class ParentOwnerLimitationType extends AbstractPersistenceLimitationType implem * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIParentOwnerLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIParentOwnerLimitation', $limitationValue); @@ -63,7 +64,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $value) { @@ -89,7 +90,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ParentOwnerLimitation { return new APIParentOwnerLimitation(['limitationValues' => $limitationValues]); } @@ -174,7 +175,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -185,7 +186,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/ParentUserGroupLimitationType.php b/src/lib/Limitation/ParentUserGroupLimitationType.php index 216ed26e55..d3e991837f 100644 --- a/src/lib/Limitation/ParentUserGroupLimitationType.php +++ b/src/lib/Limitation/ParentUserGroupLimitationType.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentUserGroupLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentUserGroupLimitation as APIParentUserGroupLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -36,7 +37,7 @@ class ParentUserGroupLimitationType extends AbstractPersistenceLimitationType im * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIParentUserGroupLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIParentUserGroupLimitation', $limitationValue); @@ -66,7 +67,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $value) { @@ -92,7 +93,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): ParentUserGroupLimitation { return new APIParentUserGroupLimitation(['limitationValues' => $limitationValues]); } @@ -198,7 +199,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -209,7 +210,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/RoleLimitationType.php b/src/lib/Limitation/RoleLimitationType.php index 5940e1d021..70ee36653b 100644 --- a/src/lib/Limitation/RoleLimitationType.php +++ b/src/lib/Limitation/RoleLimitationType.php @@ -54,7 +54,10 @@ public function acceptValue(APILimitationValue $limitationValue): void } } - public function validate(APILimitationValue $limitationValue) + /** + * @return \Ibexa\Core\FieldType\ValidationError[] + */ + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; @@ -84,7 +87,7 @@ public function buildValue(array $limitationValues): APILimitationValue return new UserRoleLimitation(['limitationValues' => $limitationValues]); } - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): ?bool { if (!$value instanceof UserRoleLimitation) { throw new InvalidArgumentException( @@ -123,12 +126,12 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse return self::ACCESS_DENIED; } - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException('Role Limitation Criterion'); } - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/SectionLimitationType.php b/src/lib/Limitation/SectionLimitationType.php index bf6eb784d0..cde5a1a377 100644 --- a/src/lib/Limitation/SectionLimitationType.php +++ b/src/lib/Limitation/SectionLimitationType.php @@ -14,9 +14,11 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\SectionId; use Ibexa\Contracts\Core\Repository\Values\Content\Section; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation as APISectionLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -38,7 +40,7 @@ class SectionLimitationType extends AbstractPersistenceLimitationType implements * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APISectionLimitation) { throw new InvalidArgumentType('$limitationValue', 'APISectionLimitation', $limitationValue); @@ -62,7 +64,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $id) { @@ -90,7 +92,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): SectionLimitation { return new APISectionLimitation(['limitationValues' => $limitationValues]); } @@ -110,7 +112,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): ?bool { if (!$value instanceof APISectionLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APISectionLimitation'); @@ -157,7 +159,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): SectionId { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -166,11 +168,11 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren if (!isset($value->limitationValues[1])) { // 1 limitation value: EQ operation - return new Criterion\SectionId($value->limitationValues[0]); + return new SectionId($value->limitationValues[0]); } // several limitation values: IN operation - return new Criterion\SectionId($value->limitationValues); + return new SectionId($value->limitationValues); } /** @@ -179,7 +181,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/SiteAccessLimitationType.php b/src/lib/Limitation/SiteAccessLimitationType.php index fb35007e48..125f9bea42 100644 --- a/src/lib/Limitation/SiteAccessLimitationType.php +++ b/src/lib/Limitation/SiteAccessLimitationType.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Limitation\Type as SPILimitationTypeInterface; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SiteAccessLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SiteAccessLimitation as APISiteAccessLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -17,17 +18,17 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\MVC\Symfony\SiteAccess; +use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface; /** * SiteAccessLimitation is a User limitation. */ class SiteAccessLimitationType implements SPILimitationTypeInterface { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface */ - private $siteAccessService; + private SiteAccessServiceInterface $siteAccessService; public function __construct( - SiteAccess\SiteAccessServiceInterface $siteAccessService + SiteAccessServiceInterface $siteAccessService ) { $this->siteAccessService = $siteAccessService; } @@ -49,7 +50,7 @@ public function generateSiteAccessValue(string $sa): string * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APISiteAccessLimitation) { throw new InvalidArgumentType('$limitationValue', 'APISiteAccessLimitation', $limitationValue); @@ -74,7 +75,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; $siteAccessList = $this->getSiteAccessList(); @@ -101,7 +102,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): SiteAccessLimitation { return new APISiteAccessLimitation(['limitationValues' => $limitationValues]); } @@ -155,7 +156,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException(__METHOD__); } @@ -166,7 +167,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/StatusLimitationType.php b/src/lib/Limitation/StatusLimitationType.php index 5efd8e2b47..8de92fc655 100644 --- a/src/lib/Limitation/StatusLimitationType.php +++ b/src/lib/Limitation/StatusLimitationType.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation as APIStatusLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -33,7 +34,7 @@ class StatusLimitationType implements SPILimitationTypeInterface * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIStatusLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIStatusLimitation', $limitationValue); @@ -57,7 +58,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { // For limitation values used here see \Ibexa\Contracts\Core\Persistence\Content\VersionInfo::STATUS_* constants. $availableStatusSet = [ @@ -90,7 +91,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): StatusLimitation { return new APIStatusLimitation(['limitationValues' => $limitationValues]); } @@ -146,7 +147,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): never { throw new NotImplementedException('Status Limitation Criterion'); } @@ -157,7 +158,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/Limitation/SubtreeLimitationType.php b/src/lib/Limitation/SubtreeLimitationType.php index 67ba1511fc..bae411830d 100644 --- a/src/lib/Limitation/SubtreeLimitationType.php +++ b/src/lib/Limitation/SubtreeLimitationType.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation as APISubtreeLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -40,7 +41,7 @@ class SubtreeLimitationType extends AbstractPersistenceLimitationType implements * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APISubtreeLimitation) { throw new InvalidArgumentType('$limitationValue', 'APISubtreeLimitation', $limitationValue); @@ -64,7 +65,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $path) { @@ -108,7 +109,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): SubtreeLimitation { return new APISubtreeLimitation(['limitationValues' => $limitationValues]); } @@ -128,7 +129,7 @@ public function buildValue(array $limitationValues) * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null) + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): ?bool { $targets = $targets ?? []; @@ -242,7 +243,7 @@ protected function evaluateForContentCreateStruct(APILimitationValue $value, arr * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): PermissionSubtree { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues store diff --git a/src/lib/Limitation/UserGroupLimitationType.php b/src/lib/Limitation/UserGroupLimitationType.php index b00829620a..ab435f5b84 100644 --- a/src/lib/Limitation/UserGroupLimitationType.php +++ b/src/lib/Limitation/UserGroupLimitationType.php @@ -14,8 +14,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserMetadata; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation as APILimitationValue; +use Ibexa\Contracts\Core\Repository\Values\User\Limitation\UserGroupLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\UserGroupLimitation as APIUserGroupLimitation; use Ibexa\Contracts\Core\Repository\Values\User\UserReference as APIUserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; @@ -38,7 +40,7 @@ class UserGroupLimitationType extends AbstractPersistenceLimitationType implemen * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitationValue */ - public function acceptValue(APILimitationValue $limitationValue) + public function acceptValue(APILimitationValue $limitationValue): void { if (!$limitationValue instanceof APIUserGroupLimitation) { throw new InvalidArgumentType('$limitationValue', 'APIUserGroupLimitation', $limitationValue); @@ -68,7 +70,7 @@ public function acceptValue(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\FieldType\ValidationError[] */ - public function validate(APILimitationValue $limitationValue) + public function validate(APILimitationValue $limitationValue): array { $validationErrors = []; foreach ($limitationValue->limitationValues as $key => $value) { @@ -94,7 +96,7 @@ public function validate(APILimitationValue $limitationValue) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation */ - public function buildValue(array $limitationValues) + public function buildValue(array $limitationValues): UserGroupLimitation { return new APIUserGroupLimitation(['limitationValues' => $limitationValues]); } @@ -177,7 +179,7 @@ public function evaluate(APILimitationValue $value, APIUserReference $currentUse * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface */ - public function getCriterion(APILimitationValue $value, APIUserReference $currentUser) + public function getCriterion(APILimitationValue $value, APIUserReference $currentUser): UserMetadata { if (empty($value->limitationValues)) { // A Policy should not have empty limitationValues stored @@ -204,8 +206,8 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren } } - return new Criterion\UserMetadata( - Criterion\UserMetadata::GROUP, + return new UserMetadata( + UserMetadata::GROUP, Criterion\Operator::IN, $groupIds ); @@ -217,7 +219,7 @@ public function getCriterion(APILimitationValue $value, APIUserReference $curren * @return mixed[]|int In case of array, a hash with key as valid limitations value and value as human readable name * of that option, in case of int on of VALUE_SCHEMA_ constants. */ - public function valueSchema() + public function valueSchema(): never { throw new NotImplementedException(__METHOD__); } diff --git a/src/lib/MVC/Exception/NoViewTemplateException.php b/src/lib/MVC/Exception/NoViewTemplateException.php index 62f99e6147..390908f8c4 100644 --- a/src/lib/MVC/Exception/NoViewTemplateException.php +++ b/src/lib/MVC/Exception/NoViewTemplateException.php @@ -15,8 +15,7 @@ */ class NoViewTemplateException extends Exception { - /** @var \Ibexa\Core\MVC\Symfony\View\View */ - private $view; + private View $view; public function __construct(View $view) { diff --git a/src/lib/MVC/RepositoryAware.php b/src/lib/MVC/RepositoryAware.php index a48d840963..7b7e4b5b4e 100644 --- a/src/lib/MVC/RepositoryAware.php +++ b/src/lib/MVC/RepositoryAware.php @@ -17,7 +17,7 @@ abstract class RepositoryAware implements RepositoryAwareInterface /** * @param \Ibexa\Contracts\Core\Repository\Repository $repository */ - public function setRepository(Repository $repository) + public function setRepository(Repository $repository): void { $this->repository = $repository; } diff --git a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php index 8f89e3128e..f51ff6a96a 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php @@ -18,7 +18,7 @@ abstract class AbstractPropertyWhitelistNormalizer extends PropertyNormalizer * * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize(mixed $object, string $format = null, array $context = []): array { $data = parent::normalize($object, $format, $context) ?? []; if (!is_array($data)) { diff --git a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php index 157f7cdd00..faeac138a4 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php @@ -22,7 +22,7 @@ class CompoundMatcherNormalizer extends AbstractPropertyWhitelistNormalizer impl * * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound::__sleep */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize(mixed $object, string $format = null, array $context = []): array { $data = parent::normalize($object, $format, $context); diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php index 5ce1da3e2a..2fb27cfc9c 100644 --- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php @@ -40,26 +40,19 @@ class PreviewController public const PREVIEW_PARAMETER_NAME = 'isPreview'; public const CONTENT_VIEW_ROUTE = 'ibexa.content.view'; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; - /** @var \Ibexa\Core\Helper\PreviewLocationProvider */ - private $locationProvider; + private PreviewLocationProvider $locationProvider; - /** @var \Symfony\Component\HttpKernel\HttpKernelInterface */ - private $kernel; + private HttpKernelInterface $kernel; - /** @var \Ibexa\Core\Helper\ContentPreviewHelper */ - private $previewHelper; + private ContentPreviewHelper $previewHelper; - /** @var \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface */ - private $authorizationChecker; + private AuthorizationCheckerInterface $authorizationChecker; - /** @var \Ibexa\Core\MVC\Symfony\View\CustomLocationControllerChecker */ - private $controllerChecker; + private CustomLocationControllerChecker $controllerChecker; private bool $debugMode; diff --git a/src/lib/MVC/Symfony/Controller/Content/QueryController.php b/src/lib/MVC/Symfony/Controller/Content/QueryController.php index 35fdafd6bb..7af003c2d9 100644 --- a/src/lib/MVC/Symfony/Controller/Content/QueryController.php +++ b/src/lib/MVC/Symfony/Controller/Content/QueryController.php @@ -25,11 +25,9 @@ */ class QueryController { - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - private $searchService; + private SearchService $searchService; - /** @var \Ibexa\Core\QueryType\ContentViewQueryTypeMapper */ - private $contentViewQueryTypeMapper; + private ContentViewQueryTypeMapper $contentViewQueryTypeMapper; public function __construct( ContentViewQueryTypeMapper $contentViewQueryTypeMapper, @@ -46,7 +44,7 @@ public function __construct( * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function contentQueryAction(ContentView $view) + public function contentQueryAction(ContentView $view): ContentView { $this->runQuery($view, 'findContent'); @@ -60,7 +58,7 @@ public function contentQueryAction(ContentView $view) * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function locationQueryAction(ContentView $view) + public function locationQueryAction(ContentView $view): ContentView { $this->runQuery($view, 'findLocations'); @@ -74,7 +72,7 @@ public function locationQueryAction(ContentView $view) * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function contentInfoQueryAction(ContentView $view) + public function contentInfoQueryAction(ContentView $view): ContentView { $this->runQuery($view, 'findContentInfo'); @@ -87,7 +85,7 @@ public function contentInfoQueryAction(ContentView $view) * @param \Ibexa\Core\MVC\Symfony\View\ContentView $view * @param string $method Name of the SearchService method to run. */ - private function runQuery(ContentView $view, $method) + private function runQuery(ContentView $view, string $method): void { $searchResults = $this->searchService->$method( $this->contentViewQueryTypeMapper->map($view) @@ -101,7 +99,7 @@ private function runQuery(ContentView $view, $method) * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function pagingQueryAction(ContentView $view, Request $request) + public function pagingQueryAction(ContentView $view, Request $request): ContentView { $this->runPagingQuery($view, $request); @@ -112,7 +110,7 @@ public function pagingQueryAction(ContentView $view, Request $request) * @param \Ibexa\Core\MVC\Symfony\View\ContentView $view * @param \Symfony\Component\HttpFoundation\Request $request */ - private function runPagingQuery(ContentView $view, Request $request) + private function runPagingQuery(ContentView $view, Request $request): void { $queryParameters = $view->getParameter('query'); diff --git a/src/lib/MVC/Symfony/Controller/Content/ViewController.php b/src/lib/MVC/Symfony/Controller/Content/ViewController.php index 8919ff2567..c5c88f936b 100644 --- a/src/lib/MVC/Symfony/Controller/Content/ViewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/ViewController.php @@ -56,7 +56,7 @@ public function __construct( * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function viewAction(ContentView $view) + public function viewAction(ContentView $view): ContentView { return $view; } @@ -69,7 +69,7 @@ public function viewAction(ContentView $view) * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - public function embedAction(ContentView $view) + public function embedAction(ContentView $view): ContentView { return $view; } @@ -82,7 +82,7 @@ public function embedAction(ContentView $view) * * @return \Symfony\Component\HttpFoundation\Response */ - protected function buildResponse($etag = null, DateTime $lastModified = null) + protected function buildResponse($etag = null, DateTime $lastModified = null): Response { $request = $this->getRequest(); $response = new Response(); @@ -113,7 +113,7 @@ protected function buildResponse($etag = null, DateTime $lastModified = null) return $response; } - protected function handleViewException(Response $response, $params, Exception $e, $viewType, $contentId = null, $locationId = null) + protected function handleViewException(Response $response, array $params, Exception $e, $viewType, $contentId = null, $locationId = null): Response { $event = new APIContentExceptionEvent( $e, diff --git a/src/lib/MVC/Symfony/Controller/Controller.php b/src/lib/MVC/Symfony/Controller/Controller.php index 70bdf8896a..32caf0fc09 100644 --- a/src/lib/MVC/Symfony/Controller/Controller.php +++ b/src/lib/MVC/Symfony/Controller/Controller.php @@ -19,6 +19,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Templating\EngineInterface; use Symfony\Contracts\Service\ServiceSubscriberInterface; +use Symfony\Component\Templating\TemplateReferenceInterface; abstract class Controller implements ServiceSubscriberInterface { @@ -53,7 +54,7 @@ public function getParameter($parameterName, $defaultValue = null) * * @return bool */ - public function hasParameter($parameterName) + public function hasParameter(string $parameterName) { return $this->getConfigResolver()->hasParameter($parameterName); } @@ -75,7 +76,7 @@ public function getConfigResolver() * * @return \Symfony\Component\HttpFoundation\Response */ - public function render($view, array $parameters = [], Response $response = null) + public function render(string|TemplateReferenceInterface $view, array $parameters = [], Response $response = null) { if (!isset($response)) { $response = new Response(); diff --git a/src/lib/MVC/Symfony/Controller/SecurityController.php b/src/lib/MVC/Symfony/Controller/SecurityController.php index f1143e693b..27907b01be 100644 --- a/src/lib/MVC/Symfony/Controller/SecurityController.php +++ b/src/lib/MVC/Symfony/Controller/SecurityController.php @@ -14,14 +14,11 @@ class SecurityController { - /** @var \Twig\Environment */ - protected $templateEngine; + protected Environment $templateEngine; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; - /** @var \Symfony\Component\Security\Http\Authentication\AuthenticationUtils */ - protected $authenticationUtils; + protected AuthenticationUtils $authenticationUtils; public function __construct(Environment $templateEngine, ConfigResolverInterface $configResolver, AuthenticationUtils $authenticationUtils) { @@ -30,7 +27,7 @@ public function __construct(Environment $templateEngine, ConfigResolverInterface $this->authenticationUtils = $authenticationUtils; } - public function loginAction() + public function loginAction(): LoginFormView { $view = new LoginFormView($this->configResolver->getParameter('security.login_template')); $view->setLastUsername($this->authenticationUtils->getLastUsername()); diff --git a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php index ff194fe641..5757f58164 100644 --- a/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php +++ b/src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php @@ -17,14 +17,11 @@ */ class APIContentExceptionEvent extends Event { - /** @var \Exception */ - private $apiException; + private Exception $apiException; - /** @var \Ibexa\Core\MVC\Symfony\View\View */ - private $contentView; + private ?View $contentView = null; - /** @var array */ - private $contentMeta; + private array $contentMeta; public function __construct(Exception $apiException, array $contentMeta) { @@ -46,7 +43,7 @@ public function getApiException() * * @param \Ibexa\Core\MVC\Symfony\View\View $contentView */ - public function setContentView(View $contentView) + public function setContentView(View $contentView): void { $this->contentView = $contentView; } diff --git a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php index c59c9dae1c..0e0bb42498 100644 --- a/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php +++ b/src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php @@ -16,11 +16,9 @@ */ class PostSiteAccessMatchEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; - /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private Request $request; /** * The request type the kernel is currently processing. One of diff --git a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php index 2f3382200f..b830bf66c0 100644 --- a/src/lib/MVC/Symfony/Event/PreContentViewEvent.php +++ b/src/lib/MVC/Symfony/Event/PreContentViewEvent.php @@ -35,8 +35,7 @@ */ class PreContentViewEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\View\View */ - private $contentView; + private View $contentView; public function __construct(View $contentView) { diff --git a/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php b/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php index 4b28bbd7a5..f85bda6bc3 100644 --- a/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php +++ b/src/lib/MVC/Symfony/Event/ResolveRenderOptionsEvent.php @@ -13,8 +13,7 @@ final class ResolveRenderOptionsEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\Templating\RenderOptions */ - private $renderOptions; + private RenderOptions $renderOptions; public function __construct( RenderOptions $renderOptions diff --git a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php index 09c8dd890e..2b1e33b9c7 100644 --- a/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php +++ b/src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php @@ -16,11 +16,9 @@ */ class RouteReferenceGenerationEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\Routing\RouteReference */ - private $routeReference; + private RouteReference $routeReference; - /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private Request $request; public function __construct(RouteReference $routeReference, Request $request) { @@ -47,7 +45,7 @@ public function getRouteReference() /** * @param \Ibexa\Core\MVC\Symfony\Routing\RouteReference $routeReference */ - public function setRouteReference($routeReference) + public function setRouteReference($routeReference): void { $this->routeReference = $routeReference; } diff --git a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php index c9bdd14e13..253b2321c0 100644 --- a/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php +++ b/src/lib/MVC/Symfony/Event/ScopeChangeEvent.php @@ -15,8 +15,7 @@ */ class ScopeChangeEvent extends Event { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; public function __construct(SiteAccess $siteAccess) { diff --git a/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php b/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php index e1d2b1bcff..95fb474d51 100644 --- a/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php +++ b/src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php @@ -23,14 +23,11 @@ final class ContentViewTwigVariablesSubscriber implements EventSubscriberInterfa public const PARAMETERS_KEY = 'params'; - /** @var \Ibexa\Core\MVC\Symfony\View\VariableProviderRegistry */ - private $parameterProviderRegistry; + private VariableProviderRegistry $parameterProviderRegistry; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var \Symfony\Component\ExpressionLanguage\ExpressionLanguage */ - private $expressionLanguage; + private ExpressionLanguage $expressionLanguage; public function __construct( VariableProviderRegistry $parameterProviderRegistry, diff --git a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php index 3b15bd2d8d..de6bcace42 100644 --- a/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php +++ b/src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php @@ -18,8 +18,7 @@ */ class LanguageSwitchListener implements EventSubscriberInterface { - /** @var \Ibexa\Core\Helper\TranslationHelper */ - private $translationHelper; + private TranslationHelper $translationHelper; public function __construct(TranslationHelper $translationHelper) { @@ -43,7 +42,7 @@ public static function getSubscribedEvents(): array * * @param \Ibexa\Core\MVC\Symfony\Event\RouteReferenceGenerationEvent $event */ - public function onRouteReferenceGeneration(RouteReferenceGenerationEvent $event) + public function onRouteReferenceGeneration(RouteReferenceGenerationEvent $event): void { $routeReference = $event->getRouteReference(); if (!$routeReference->has('language')) { diff --git a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php index e067fb62b2..2a07e80b13 100644 --- a/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php +++ b/src/lib/MVC/Symfony/FieldType/BinaryBase/ContentDownloadUrlGenerator.php @@ -14,11 +14,9 @@ class ContentDownloadUrlGenerator implements RouteAwarePathGenerator { - /** @var \Symfony\Component\Routing\RouterInterface */ - private $router; + private RouterInterface $router; - /** @var string */ - private $route = 'ibexa.content.download.field_id'; + private string $route = 'ibexa.content.download.field_id'; public function __construct(RouterInterface $router) { diff --git a/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php index 6ec28ddfda..8626d9bc31 100644 --- a/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProvider.php @@ -9,6 +9,8 @@ namespace Ibexa\Core\MVC\Symfony\FieldType\ImageAsset; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\FieldTypeService; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -16,14 +18,12 @@ class ParameterProvider implements ParameterProviderInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionsResolver; + private PermissionResolver $permissionsResolver; /** @var \Ibexa\Core\Repository\FieldTypeService */ - private $fieldTypeService; + private FieldTypeService $fieldTypeService; /** * @param \Ibexa\Contracts\Core\Repository\Repository $repository @@ -73,7 +73,7 @@ public function getViewParameters(Field $field): array private function loadContentInfo(int $id): ContentInfo { return $this->repository->sudo( - static function (Repository $repository) use ($id) { + static function (Repository $repository) use ($id): \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo { return $repository->getContentService()->loadContentInfo($id); } ); diff --git a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php index 8115ed1125..61909026e1 100644 --- a/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/Relation/ParameterProvider.php @@ -15,8 +15,7 @@ class ParameterProvider implements ParameterProviderInterface { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; /** * @param \Ibexa\Contracts\Core\Repository\ContentService $contentService diff --git a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php index 8217406ded..a54e880b4b 100644 --- a/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php @@ -13,8 +13,7 @@ class ParameterProvider implements ParameterProviderInterface { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; /** * @param \Ibexa\Contracts\Core\Repository\ContentService $contentService @@ -35,7 +34,7 @@ public function __construct(ContentService $contentService) * * @return array */ - public function getViewParameters(Field $field) + public function getViewParameters(Field $field): array { $ids = $field->value->destinationContentIds; $list = $this->contentService->loadContentInfoList($ids); diff --git a/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php b/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php index f6b23a38b9..7c2a0dc9f0 100644 --- a/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/User/ParameterProvider.php @@ -15,8 +15,7 @@ class ParameterProvider implements ParameterProviderInterface { - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; public function __construct(UserService $userService) { diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php index 2cb621b511..6ee28420ef 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php @@ -20,8 +20,7 @@ class LocaleParameterProvider implements ParameterProviderInterface { use RequestStackAware; - /** @var \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface */ - protected $localeConverter; + protected LocaleConverterInterface $localeConverter; public function __construct(LocaleConverterInterface $localeConverter) { @@ -38,7 +37,7 @@ public function __construct(LocaleConverterInterface $localeConverter) * * @return array */ - public function getViewParameters(Field $field) + public function getViewParameters(Field $field): array { $parameters = []; diff --git a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php index 32ddd5f3a7..3fd033d082 100644 --- a/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php +++ b/src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php @@ -49,7 +49,7 @@ public function getParameterProvider($fieldTypeIdentifier) * @param \Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProviderInterface $parameterProvider * @param string $fieldTypeIdentifier */ - public function setParameterProvider(ParameterProviderInterface $parameterProvider, $fieldTypeIdentifier) + public function setParameterProvider(ParameterProviderInterface $parameterProvider, $fieldTypeIdentifier): void { $this->providers[$fieldTypeIdentifier] = $parameterProvider; } diff --git a/src/lib/MVC/Symfony/Locale/LocaleConverter.php b/src/lib/MVC/Symfony/Locale/LocaleConverter.php index 010478b89a..4a160406df 100644 --- a/src/lib/MVC/Symfony/Locale/LocaleConverter.php +++ b/src/lib/MVC/Symfony/Locale/LocaleConverter.php @@ -14,20 +14,15 @@ class LocaleConverter implements LocaleConverterInterface /** * Conversion map, indexed by Ibexa locale. * See locale.yml. - * - * @var array */ - private $conversionMap; + private array $conversionMap; /** * Conversion map, indexed by POSIX locale. - * - * @var array */ - private $reverseConversionMap; + private array $reverseConversionMap; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; public function __construct(array $conversionMap, LoggerInterface $logger) { diff --git a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php index bc25aa132b..68da6001e7 100644 --- a/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php +++ b/src/lib/MVC/Symfony/Locale/UserLanguagePreferenceProvider.php @@ -15,17 +15,13 @@ class UserLanguagePreferenceProvider implements UserLanguagePreferenceProviderInterface { - /** @var \Symfony\Component\HttpFoundation\RequestStack */ - private $requestStack; + private RequestStack $requestStack; - /** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */ - private $userPreferenceService; + private UserPreferenceService $userPreferenceService; - /** @var array */ - private $languageCodesMap; + private array $languageCodesMap; - /** @var string */ - private $localeFallback; + private string $localeFallback; /** * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack diff --git a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php index 5402ffcc09..796d6c6225 100644 --- a/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php +++ b/src/lib/MVC/Symfony/Matcher/ClassNameMatcherFactory.php @@ -21,16 +21,13 @@ */ class ClassNameMatcherFactory implements ConfigurableMatcherFactoryInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; /** * The view configuration this matcher should use for matching. * Typically, one of the *_view siteaccess aware settings array. - * - * @var array */ - protected $matchConfig; + protected array $matchConfig; /** @var \Ibexa\Core\MVC\Symfony\Matcher\ViewMatcherInterface[] */ protected $matchers = []; diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php index 4703c40269..dbd08e0b18 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php @@ -38,7 +38,7 @@ public function matchLocation(Location $location): bool public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php index 3b4216778d..edcad3bd74 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php @@ -22,7 +22,7 @@ class ContentTypeGroup extends MultipleValued * * @return bool */ - public function matchLocation(APILocation $location) + public function matchLocation(APILocation $location): bool { return $this->matchContentTypeId($location->getContentInfo()->contentTypeId); } @@ -34,7 +34,7 @@ public function matchLocation(APILocation $location) * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { return $this->matchContentTypeId($contentInfo->contentTypeId); } @@ -51,7 +51,7 @@ public function match(View $view) /** * @return bool */ - private function matchContentTypeId($contentTypeId): bool + private function matchContentTypeId(int $contentTypeId): bool { $contentTypeGroups = $this->repository ->getContentTypeService() diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php index 1843af3e82..c8cc3e0419 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php @@ -26,7 +26,7 @@ class ParentContentType extends MultipleValued public function matchLocation(APILocation $location): bool { $parent = $this->repository->sudo( - static function (Repository $repository) use ($location) { + static function (Repository $repository) use ($location): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($location->parentLocationId); } ); @@ -41,10 +41,10 @@ static function (Repository $repository) use ($location) { * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); @@ -67,10 +67,10 @@ public function match(View $view): bool /** * @return Location */ - private function loadParentLocation($locationId) + private function loadParentLocation(int $locationId) { return $this->repository->sudo( - static function (Repository $repository) use ($locationId) { + static function (Repository $repository) use ($locationId): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($locationId); } ); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php index ff3ab61ae3..356e62ba20 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocation.php @@ -38,7 +38,7 @@ public function matchLocation(APILocation $location): bool public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php index b52ec15ee5..d1e650b8c7 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentType.php @@ -27,7 +27,7 @@ class ParentContentType extends MultipleValued public function matchLocation(APILocation $location): bool { $parentContentType = $this->repository->sudo( - static function (Repository $repository) use ($location) { + static function (Repository $repository) use ($location): \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType { $parent = $repository->getLocationService()->loadLocation($location->parentLocationId); return $repository @@ -46,10 +46,10 @@ static function (Repository $repository) use ($location) { * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php index 89f5360ecd..ce4b65b587 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Identifier/Section.php @@ -26,7 +26,7 @@ class Section extends MultipleValued public function matchLocation(Location $location): bool { $section = $this->repository->sudo( - static function (Repository $repository) use ($location) { + static function (Repository $repository) use ($location): \Ibexa\Contracts\Core\Repository\Values\Content\Section { return $repository->getSectionService()->loadSection( $location->getContentInfo()->getSectionId() ); @@ -46,7 +46,7 @@ static function (Repository $repository) use ($location) { public function matchContentInfo(ContentInfo $contentInfo): bool { $section = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Section { return $repository->getSectionService()->loadSection( $contentInfo->getSectionId() ); @@ -64,7 +64,7 @@ public function match(View $view): bool $contentInfo = $view->getContent()->contentInfo; $section = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo) { + static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Section { return $repository->getSectionService()->loadSection( $contentInfo->getSectionId() ); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php index e09fbeb10c..4f685cc35b 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php @@ -25,7 +25,7 @@ abstract class MultipleValued extends RepositoryAware implements MatcherInterfac * * @throws \InvalidArgumentException Should be thrown if $matchingConfig is not valid. */ - public function setMatchingConfig($matchingConfig) + public function setMatchingConfig($matchingConfig): void { $matchingConfig = !is_array($matchingConfig) ? [$matchingConfig] : $matchingConfig; $this->values = array_fill_keys($matchingConfig, true); diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php index 906debd877..6d40525bca 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php @@ -49,12 +49,12 @@ public function matchLocation(Location $location): bool * * @return bool */ - public function matchContentInfo(ContentInfo $contentInfo) + public function matchContentInfo(ContentInfo $contentInfo): never { throw new \RuntimeException('matchContentInfo() is not supported by the UrlAlias matcher'); } - public function setMatchingConfig($matchingConfig) + public function setMatchingConfig($matchingConfig): void { if (!is_array($matchingConfig)) { $matchingConfig = [$matchingConfig]; @@ -62,7 +62,7 @@ public function setMatchingConfig($matchingConfig) array_walk( $matchingConfig, - static function (&$item) { + static function (&$item): void { $item = trim($item, '/ '); } ); diff --git a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php index 93a2f92b6e..0d794cf587 100644 --- a/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php +++ b/src/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecorator.php @@ -15,20 +15,15 @@ */ class DynamicallyConfiguredMatcherFactoryDecorator implements MatcherFactoryInterface { - /** @var \Ibexa\Core\MVC\Symfony\Matcher\MatcherFactoryInterface|\Ibexa\Core\MVC\Symfony\Matcher\ConfigurableMatcherFactoryInterface */ - private $innerConfigurableMatcherFactory; + private MatcherFactoryInterface $innerConfigurableMatcherFactory; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var string */ - private $parameterName; + private string $parameterName; - /** @var string|null */ - private $namespace; + private ?string $namespace; - /** @var string|null */ - private $scope; + private ?string $scope; public function __construct( MatcherFactoryInterface $innerConfigurableMatcherFactory, diff --git a/src/lib/MVC/Symfony/RequestStackAware.php b/src/lib/MVC/Symfony/RequestStackAware.php index f01126caaf..68027a7374 100644 --- a/src/lib/MVC/Symfony/RequestStackAware.php +++ b/src/lib/MVC/Symfony/RequestStackAware.php @@ -29,7 +29,7 @@ public function getRequestStack() /** * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack */ - public function setRequestStack(RequestStack $requestStack) + public function setRequestStack(RequestStack $requestStack): void { $this->requestStack = $requestStack; } diff --git a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php index d5de9b41e3..596409c977 100644 --- a/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php +++ b/src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php @@ -18,8 +18,7 @@ class RouteReferenceGenerator implements RouteReferenceGeneratorInterface { use RequestStackAware; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - private $dispatcher; + private EventDispatcherInterface $dispatcher; public function __construct(EventDispatcherInterface $dispatcher) { diff --git a/src/lib/MVC/Symfony/Routing/RouteReference.php b/src/lib/MVC/Symfony/Routing/RouteReference.php index 1441d166b6..7cfc8ba380 100644 --- a/src/lib/MVC/Symfony/Routing/RouteReference.php +++ b/src/lib/MVC/Symfony/Routing/RouteReference.php @@ -11,8 +11,7 @@ class RouteReference { - /** @var \Symfony\Component\HttpFoundation\ParameterBag */ - private $params; + private ParameterBag $params; /** @var mixed Route name or resource (e.g. Location object). */ private $route; @@ -26,7 +25,7 @@ public function __construct($route, array $params = []) /** * @param mixed $route */ - public function setRoute($route) + public function setRoute($route): void { $this->route = $route; } @@ -42,7 +41,7 @@ public function getRoute() /** * @return array */ - public function getParams() + public function getParams(): array { return $this->params->all(); } @@ -53,7 +52,7 @@ public function getParams() * @param string $parameterName * @param mixed $value */ - public function set($parameterName, $value) + public function set(string $parameterName, $value): void { $this->params->set($parameterName, $value); } @@ -67,12 +66,12 @@ public function set($parameterName, $value) * * @return mixed */ - public function get($parameterName, $defaultValue = null, $deep = false) + public function get(string $parameterName, $defaultValue = null, $deep = false): mixed { return $this->params->get($parameterName, $defaultValue, $deep); } - public function has($parameterName) + public function has(string $parameterName): bool { return $this->params->has($parameterName); } @@ -82,7 +81,7 @@ public function has($parameterName) * * @param string $parameterName */ - public function remove($parameterName) + public function remove(string $parameterName): void { $this->params->remove($parameterName); } diff --git a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php index ee1dfb539f..bf50b0078c 100644 --- a/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php +++ b/src/lib/MVC/Symfony/Routing/SimplifiedRequest.php @@ -86,7 +86,7 @@ public function __construct( /** * @param array $headers */ - public function setHeaders(array $headers) + public function setHeaders(array $headers): void { $this->headers = $headers; } @@ -94,7 +94,7 @@ public function setHeaders(array $headers) /** * @param string $host */ - public function setHost($host) + public function setHost(?string $host): void { $this->host = $host; } @@ -102,7 +102,7 @@ public function setHost($host) /** * @param array $languages */ - public function setLanguages(array $languages) + public function setLanguages(array $languages): void { $this->languages = $languages; } @@ -110,7 +110,7 @@ public function setLanguages(array $languages) /** * @param string $pathinfo */ - public function setPathinfo($pathinfo) + public function setPathinfo(?string $pathinfo): void { $this->pathinfo = $pathinfo; } @@ -118,7 +118,7 @@ public function setPathinfo($pathinfo) /** * @param int $port */ - public function setPort($port) + public function setPort(?int $port): void { $this->port = $port; } @@ -126,7 +126,7 @@ public function setPort($port) /** * @param array $queryParams */ - public function setQueryParams(array $queryParams) + public function setQueryParams(array $queryParams): void { $this->queryParams = $queryParams; } @@ -134,7 +134,7 @@ public function setQueryParams(array $queryParams) /** * @param string $scheme */ - public function setScheme($scheme) + public function setScheme(?string $scheme): void { $this->scheme = $scheme; } @@ -148,7 +148,7 @@ public function setScheme($scheme) * * @return \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - public static function fromUrl($url) + public static function fromUrl($url): static { $elements = parse_url($url); $elements['pathinfo'] = isset($elements['path']) ? $elements['path'] : ''; diff --git a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php index 4eda3f9ada..d2a1c7053e 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Attribute.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Attribute.php @@ -51,7 +51,7 @@ public function __construct($module = null, $function = null, array $limitations * * @return string */ - public function __toString() + public function __toString(): string { return "EZ_ROLE_{$this->module}_{$this->function}"; } diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php index 8a58d7ef21..01c091a0af 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/CoreVoter.php @@ -14,8 +14,7 @@ class CoreVoter implements VoterInterface { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; public function __construct(PermissionResolver $permissionResolver) { diff --git a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php index 422308faff..9193d351e3 100644 --- a/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php +++ b/src/lib/MVC/Symfony/Security/Authorization/Voter/ValueObjectVoter.php @@ -17,8 +17,7 @@ */ class ValueObjectVoter implements VoterInterface { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; public function __construct(PermissionResolver $permissionResolver) { diff --git a/src/lib/MVC/Symfony/Security/User/BaseProvider.php b/src/lib/MVC/Symfony/Security/User/BaseProvider.php index a75f3e5ac6..f95cdd1a83 100644 --- a/src/lib/MVC/Symfony/Security/User/BaseProvider.php +++ b/src/lib/MVC/Symfony/Security/User/BaseProvider.php @@ -22,11 +22,9 @@ abstract class BaseProvider implements APIUserProviderInterface { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - protected $permissionResolver; + protected PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - protected $userService; + protected UserService $userService; public function __construct( UserService $userService, diff --git a/src/lib/MVC/Symfony/Security/UserChecker.php b/src/lib/MVC/Symfony/Security/UserChecker.php index 40703b4b8b..94e11bbaa8 100644 --- a/src/lib/MVC/Symfony/Security/UserChecker.php +++ b/src/lib/MVC/Symfony/Security/UserChecker.php @@ -17,8 +17,7 @@ final class UserChecker implements UserCheckerInterface { - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; public function __construct(UserService $userService) { diff --git a/src/lib/MVC/Symfony/SiteAccess.php b/src/lib/MVC/Symfony/SiteAccess.php index b7e0755de5..cdf197e4be 100644 --- a/src/lib/MVC/Symfony/SiteAccess.php +++ b/src/lib/MVC/Symfony/SiteAccess.php @@ -63,7 +63,7 @@ public function __construct( $this->groups = $groups; } - public function __toString() + public function __toString(): string { return "$this->name (matched by '$this->matchingType')"; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php index b43d6bd2cc..9162b7d20f 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php @@ -19,15 +19,13 @@ abstract class Compound implements CompoundInterface, URILexer { /** @var array Collection of rules using the Compound matcher. */ - protected $config; + protected array $config; /** * Matchers map. * Consists of an array of matchers, grouped by ruleset (so array of array of matchers). - * - * @var array */ - protected $matchersMap = []; + protected array $matchersMap; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher[] */ protected $subMatchers = []; @@ -44,7 +42,7 @@ public function __construct(array $config) $this->matchersMap = []; } - public function setMatcherBuilder(MatcherBuilderInterface $matcherBuilder) + public function setMatcherBuilder(MatcherBuilderInterface $matcherBuilder): void { $this->matcherBuilder = $matcherBuilder; foreach ($this->config as $i => $rule) { @@ -54,7 +52,7 @@ public function setMatcherBuilder(MatcherBuilderInterface $matcherBuilder) } } - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { $this->request = $request; foreach ($this->matchersMap as $ruleset) { @@ -96,7 +94,7 @@ public function getSubMatchers() return $this->subMatchers; } - public function setSubMatchers(array $subMatchers) + public function setSubMatchers(array $subMatchers): void { $this->subMatchers = $subMatchers; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php index dba77ecc6e..b1664a2ccc 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php @@ -12,15 +12,12 @@ class HostElement implements VersatileMatcher { - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - private $request; + private ?SimplifiedRequest $request = null; /** * Number of elements to take into account. - * - * @var int */ - private $elementNumber; + private int $elementNumber; /** * Host elements used for matching as an array. @@ -71,7 +68,7 @@ public function getName(): string * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { $this->request = $request; } @@ -81,7 +78,7 @@ public function getRequest() return $this->request; } - public function reverseMatch($siteAccessName) + public function reverseMatch($siteAccessName): ?self { $hostElements = explode('.', (string)$this->request->getHost()); $elementNumber = $this->elementNumber - 1; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php index 6b30b4253d..9964330763 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php @@ -61,7 +61,7 @@ public function __sleep() return ['map', 'reverseMap', 'key']; } - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { $this->request = $request; } @@ -76,7 +76,7 @@ public function getRequest() * * @param string $key */ - public function setMapKey($key) + public function setMapKey($key): void { $this->key = $key; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php index b629c409d5..dbe2d064a8 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php @@ -22,7 +22,7 @@ public function getName(): string * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { if (!$this->key) { $this->setMapKey((string)$request->getHost()); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php index 75f6d0d0d3..6969246f71 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php @@ -22,7 +22,7 @@ public function getName(): string * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { if (!$this->key) { if (!empty($request->getPort())) { diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php index a940b8bb8c..d96e0b81f3 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php @@ -18,7 +18,7 @@ class URI extends Map implements URILexer * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { if (!$this->key) { sscanf((string)$request->getPathInfo(), '/%[^/]', $key); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php index a00d04cf09..05192c8bbd 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php @@ -88,7 +88,7 @@ protected function getMatchedSiteAccess() * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { $this->request = $request; } @@ -98,7 +98,7 @@ public function setRequest(SimplifiedRequest $request) * * @param string $element */ - public function setMatchElement($element) + public function setMatchElement($element): void { $this->element = $element; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php index 49dddd748a..a71c7284a7 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php @@ -14,22 +14,17 @@ class URIElement implements VersatileMatcher, URILexer { - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - private $request; + private ?SimplifiedRequest $request = null; /** * Number of elements to take into account. - * - * @var int */ - private $elementNumber; + private int $elementNumber; /** * URI elements used for matching as an array. - * - * @var array */ - private $uriElements; + private ?array $uriElements = null; /** * Constructor. @@ -56,7 +51,7 @@ public function __sleep() * * @return string|false Siteaccess matched or false. */ - public function match() + public function match(): string|false { try { return implode('_', $this->getURIElements()); @@ -110,7 +105,7 @@ public function getName(): string * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): void { $this->request = $request; } @@ -171,7 +166,7 @@ public function analyseLink($linkUri): string * * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement|null */ - public function reverseMatch($siteAccessName) + public function reverseMatch($siteAccessName): ?self { $elements = $this->elementNumber > 1 ? explode('_', $siteAccessName) : [$siteAccessName]; if (count($elements) !== $this->elementNumber) { diff --git a/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php b/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php index 302ab528f1..23d25aad9a 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php +++ b/src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php @@ -16,7 +16,7 @@ final class ChainSiteAccessProvider implements SiteAccessProviderInterface { /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface[] */ - private $providers; + private iterable $providers; /** * @param \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface[] $providers diff --git a/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php b/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php index 3041e593e0..0999d33cc4 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php +++ b/src/lib/MVC/Symfony/SiteAccess/Provider/StaticSiteAccessProvider.php @@ -22,10 +22,10 @@ final class StaticSiteAccessProvider implements SiteAccessProviderInterface { /** @var string[] */ - private $siteAccessList; + private array $siteAccessList; /** @var string[] */ - private $groupsBySiteAccess; + private array $groupsBySiteAccess; /** * @param string[] $siteAccessList @@ -66,7 +66,7 @@ private function createSiteAccess(string $name): SiteAccess { $siteAccess = new SiteAccess($name, SiteAccess::DEFAULT_MATCHING_TYPE, null, self::class); $siteAccess->groups = array_map( - static function ($groupName) { + static function ($groupName): SiteAccessGroup { return new SiteAccessGroup($groupName); }, $this->groupsBySiteAccess[$name] ?? [] diff --git a/src/lib/MVC/Symfony/SiteAccess/Router.php b/src/lib/MVC/Symfony/SiteAccess/Router.php index 5242945875..94e44a7079 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Router.php +++ b/src/lib/MVC/Symfony/SiteAccess/Router.php @@ -51,13 +51,10 @@ class Router implements SiteAccessRouterInterface, SiteAccessAware * ) * ) * - * - * @var array */ - protected $siteAccessesConfiguration; + protected array $siteAccessesConfiguration; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface */ - protected $siteAccessProvider; + protected SiteAccessProviderInterface $siteAccessProvider; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ protected $siteAccess; @@ -65,14 +62,11 @@ class Router implements SiteAccessRouterInterface, SiteAccessAware /** @var string */ protected $siteAccessClass; - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected LoggerInterface $logger; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface */ - protected $matcherBuilder; + protected MatcherBuilderInterface $matcherBuilder; - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - protected $request; + protected SimplifiedRequest $request; /** @var bool */ protected $debug; @@ -266,7 +260,7 @@ public function getSiteAccess() /** * @param \Ibexa\Core\MVC\Symfony\SiteAccess|null $siteAccess */ - public function setSiteAccess(SiteAccess $siteAccess = null) + public function setSiteAccess(SiteAccess $siteAccess = null): void { $this->siteAccess = $siteAccess; } diff --git a/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php b/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php index a3b83e506d..2fb8699028 100644 --- a/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php +++ b/src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php @@ -15,14 +15,11 @@ class SiteAccessService implements SiteAccessServiceInterface, SiteAccessAware { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface */ - private $provider; + private SiteAccessProviderInterface $provider; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private ?SiteAccess $siteAccess = null; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct( SiteAccessProviderInterface $provider, diff --git a/src/lib/MVC/Symfony/SiteAccessGroup.php b/src/lib/MVC/Symfony/SiteAccessGroup.php index 32968d3cd9..808f44a66d 100644 --- a/src/lib/MVC/Symfony/SiteAccessGroup.php +++ b/src/lib/MVC/Symfony/SiteAccessGroup.php @@ -12,8 +12,7 @@ final class SiteAccessGroup implements JsonSerializable { - /** @var string */ - private $name; + private string $name; public function __construct(string $name) { @@ -25,7 +24,7 @@ public function getName(): string return $this->name; } - public function __toString() + public function __toString(): string { return $this->name; } diff --git a/src/lib/MVC/Symfony/Templating/GlobalHelper.php b/src/lib/MVC/Symfony/Templating/GlobalHelper.php index 83cc7cd0bd..67a0cc67ac 100644 --- a/src/lib/MVC/Symfony/Templating/GlobalHelper.php +++ b/src/lib/MVC/Symfony/Templating/GlobalHelper.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\MVC\Symfony\Templating; use Ibexa\Contracts\Core\Repository\LocationService; +use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\Helper\TranslationHelper; use Ibexa\Core\MVC\Symfony\RequestStackAware; @@ -22,17 +23,13 @@ class GlobalHelper { use RequestStackAware; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - protected $locationService; + protected LocationService $locationService; - /** @var \Symfony\Component\Routing\RouterInterface */ - protected $router; + protected RouterInterface $router; - /** @var \Ibexa\Core\Helper\TranslationHelper */ - protected $translationHelper; + protected TranslationHelper $translationHelper; public function __construct( ConfigResolverInterface $configResolver, @@ -133,7 +130,7 @@ public function getSystemUriString() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - public function getRootLocation() + public function getRootLocation(): Location { return $this->locationService->loadLocation( $this->configResolver->getParameter('content.tree_root.location_id') @@ -157,7 +154,7 @@ public function getTranslationSiteAccess($language) * * @return array */ - public function getAvailableLanguages() + public function getAvailableLanguages(): array { return $this->translationHelper->getAvailableLanguages(); } diff --git a/src/lib/MVC/Symfony/Templating/RenderOptions.php b/src/lib/MVC/Symfony/Templating/RenderOptions.php index 1170467fb9..afbecd4047 100644 --- a/src/lib/MVC/Symfony/Templating/RenderOptions.php +++ b/src/lib/MVC/Symfony/Templating/RenderOptions.php @@ -12,8 +12,7 @@ final class RenderOptions implements MutableOptionsBag { - /** @var array */ - private $options; + private array $options; public function __construct(array $options = []) { diff --git a/src/lib/MVC/Symfony/Templating/RenderStrategy.php b/src/lib/MVC/Symfony/Templating/RenderStrategy.php index fa0bf8bba5..68db200e2c 100644 --- a/src/lib/MVC/Symfony/Templating/RenderStrategy.php +++ b/src/lib/MVC/Symfony/Templating/RenderStrategy.php @@ -15,7 +15,7 @@ final class RenderStrategy implements SPIRenderStrategy { /** @var \Ibexa\Contracts\Core\MVC\Templating\RenderStrategy[] */ - private $strategies; + private iterable $strategies; public function __construct(iterable $strategies) { diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php index 4dbfd2700b..10ab906f52 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentAwareInterface; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Helper\FieldHelper; use Ibexa\Core\Helper\FieldsGroups\FieldsGroupsList; @@ -27,19 +28,15 @@ */ class ContentExtension extends AbstractExtension { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Core\Helper\TranslationHelper */ - protected $translationHelper; + protected TranslationHelper $translationHelper; - /** @var \Ibexa\Core\Helper\FieldHelper */ - protected $fieldHelper; + protected FieldHelper $fieldHelper; private FieldsGroupsList $fieldsGroupsList; - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected LoggerInterface $logger; public function __construct( Repository $repository, @@ -126,7 +123,7 @@ public function getTranslatedContentName(Content|ContentInfo|ContentAwareInterfa * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Field */ - public function getTranslatedField(Content|ContentAwareInterface $data, $fieldDefIdentifier, $forcedLanguage = null) + public function getTranslatedField(Content|ContentAwareInterface $data, string $fieldDefIdentifier, $forcedLanguage = null) { return $this->translationHelper->getTranslatedField($this->getContent($data), $fieldDefIdentifier, $forcedLanguage); } @@ -137,7 +134,7 @@ public function getTranslatedField(Content|ContentAwareInterface $data, $fieldDe * * @return mixed A primitive type or a field type Value object depending on the field type. */ - public function getTranslatedFieldValue(Content|ContentAwareInterface $data, $fieldDefIdentifier, $forcedLanguage = null) + public function getTranslatedFieldValue(Content|ContentAwareInterface $data, string $fieldDefIdentifier, $forcedLanguage = null) { return $this->translationHelper->getTranslatedField($this->getContent($data), $fieldDefIdentifier, $forcedLanguage)->value; } @@ -207,7 +204,7 @@ public function getFieldGroupName(string $identifier): ?string * * @return bool */ - public function isFieldEmpty(Content|ContentAwareInterface $data, $fieldDefIdentifier, $forcedLanguage = null) + public function isFieldEmpty(Content|ContentAwareInterface $data, $fieldDefIdentifier, $forcedLanguage = null): bool { if ($fieldDefIdentifier instanceof Field) { $fieldDefIdentifier = $fieldDefIdentifier->fieldDefIdentifier; @@ -221,7 +218,7 @@ public function isFieldEmpty(Content|ContentAwareInterface $data, $fieldDefIdent * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType|null */ - private function getContentType(Content|ContentInfo $content) + private function getContentType(Content|ContentInfo $content): ContentType { if ($content instanceof Content) { return $this->repository->getContentTypeService()->loadContentType( diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php index 973c3f6dff..8b8529d5d1 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/CoreExtension.php @@ -13,8 +13,7 @@ class CoreExtension extends AbstractExtension implements GlobalsInterface { - /** @var \Ibexa\Core\MVC\Symfony\Templating\GlobalHelper */ - private $globalHelper; + private GlobalHelper $globalHelper; public function __construct(GlobalHelper $globalHelper) { diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php index 5d909b1005..5817df7e8a 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php @@ -24,21 +24,16 @@ */ class FieldRenderingExtension extends AbstractExtension { - /** @var \Ibexa\Core\MVC\Symfony\Templating\FieldBlockRendererInterface */ - private $fieldBlockRenderer; + private FieldBlockRendererInterface $fieldBlockRenderer; - /** @var \Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProviderRegistryInterface */ - private $parameterProviderRegistry; + private ParameterProviderRegistryInterface $parameterProviderRegistry; - /** @var \Ibexa\Core\Helper\TranslationHelper */ - private $translationHelper; + private TranslationHelper $translationHelper; /** * Hash of field type identifiers (i.e. "ezstring"), indexed by field definition identifier. - * - * @var array */ - private $fieldTypeIdentifiers = []; + private array $fieldTypeIdentifiers = []; public function __construct( FieldBlockRendererInterface $fieldBlockRenderer, @@ -107,7 +102,7 @@ public function renderFieldDefinitionSettings(FieldDefinition $fieldDefinition, * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - public function renderField(Content $content, $fieldIdentifier, array $params = []) + public function renderField(Content $content, string $fieldIdentifier, array $params = []) { $field = $this->translationHelper->getTranslatedField($content, $fieldIdentifier, isset($params['lang']) ? $params['lang'] : null); if (!$field instanceof Field) { @@ -132,7 +127,7 @@ public function renderField(Content $content, $fieldIdentifier, array $params = * * @return array */ - private function getRenderFieldBlockParameters(Content $content, Field $field, array $params = []) + private function getRenderFieldBlockParameters(Content $content, Field $field, array $params = []): array { // Merging passed parameters to default ones $params += [ diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php index 08bc99da44..60173df5b8 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php @@ -24,22 +24,22 @@ class FileSizeExtension extends AbstractExtension /** * @param \Symfony\Contracts\Translation\TranslatorInterface $translator */ - protected $translator; + protected TranslatorInterface $translator; /** * @param array $suffixes */ - protected $suffixes; + protected array $suffixes; /** * @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface $configResolver */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; /** * @param \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface $localeConverter */ - protected $localeConverter; + protected LocaleConverterInterface $localeConverter; /** * @param \Symfony\Contracts\Translation\TranslatorInterface $translator diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php index 21abc9ac49..d7628b366e 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/ImageExtension.php @@ -19,11 +19,9 @@ class ImageExtension extends AbstractExtension { - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $imageVariationService; + private VariationHandler $imageVariationService; - /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper */ - protected $assetMapper; + protected AssetMapper $assetMapper; public function __construct(VariationHandler $imageVariationService, AssetMapper $assetMapper) { diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php index 5f3d465192..d1bce94c0d 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtension.php @@ -18,8 +18,7 @@ class QueryRenderingExtension extends AbstractExtension { private const VALID_TYPES = ['content', 'location']; - /** @var \Symfony\Component\HttpKernel\Fragment\FragmentHandler */ - private $fragmentHandler; + private FragmentHandler $fragmentHandler; public function __construct(FragmentHandler $fragmentHandler) { diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php index 15ddf03243..d2924b5d49 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderContentExtension.php @@ -22,11 +22,9 @@ */ final class RenderContentExtension extends AbstractExtension { - /** @var \Ibexa\Core\MVC\Symfony\Templating\RenderContentStrategy */ - private $renderContentStrategy; + private RenderContentStrategy $renderContentStrategy; - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct( RenderContentStrategy $renderContentStrategy, diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php index 9ce98040b9..0b55ce174f 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtension.php @@ -23,11 +23,9 @@ */ final class RenderExtension extends AbstractExtension { - /** @var \Ibexa\Contracts\Core\MVC\Templating\RenderStrategy */ - private $renderStrategy; + private RenderStrategy $renderStrategy; - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct( RenderStrategy $renderStrategy, diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php index c866cb5fbf..3e3d52bfd1 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RenderLocationExtension.php @@ -21,11 +21,9 @@ */ final class RenderLocationExtension extends AbstractExtension { - /** @var \Ibexa\Core\MVC\Symfony\Templating\RenderLocationStrategy */ - private $renderLocationStrategy; + private RenderLocationStrategy $renderLocationStrategy; - /** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct( RenderLocationStrategy $renderLocationStrategy, diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php index 43d5fe3cde..805c14c43f 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtension.php @@ -26,11 +26,9 @@ class RoutingExtension extends AbstractExtension { - /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator\RouteReferenceGeneratorInterface */ - private $routeReferenceGenerator; + private RouteReferenceGeneratorInterface $routeReferenceGenerator; - /** @var \Symfony\Component\Routing\Generator\UrlGeneratorInterface */ - private $urlGenerator; + private UrlGeneratorInterface $urlGenerator; public function __construct( RouteReferenceGeneratorInterface $routeReferenceGenerator, @@ -70,7 +68,7 @@ public function getFunctions(): array * * @return \Ibexa\Core\MVC\Symfony\Routing\RouteReference */ - public function getRouteReference($resource = null, $params = []): RouteReference + public function getRouteReference($resource = null, array $params = []): RouteReference { return $this->routeReferenceGenerator->generate($resource, $params); } diff --git a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php index b62dbcd58e..e19ea5cc33 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php +++ b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php @@ -36,11 +36,9 @@ class FieldBlockRenderer implements FieldBlockRendererInterface self::EDIT => 'fieldDefinitionEditResources', ]; - /** @var \Twig\Environment */ - private $twig; + private Environment $twig; - /** @var \Ibexa\Core\MVC\Symfony\Templating\Twig\ResourceProviderInterface */ - private $resourceProvider; + private ResourceProviderInterface $resourceProvider; /** * A \Twig\Template instance used to render template blocks, or path to the template to use. @@ -51,10 +49,8 @@ class FieldBlockRenderer implements FieldBlockRendererInterface /** * Template blocks. - * - * @var array */ - private $blocks; + private array $blocks; /** * @param \Twig\Environment $twig @@ -77,7 +73,7 @@ public function __construct( /** * @param \Twig\Environment $twig */ - public function setTwig(Environment $twig) + public function setTwig(Environment $twig): void { $this->twig = $twig; } @@ -102,7 +98,7 @@ public function renderContentFieldEdit(Field $field, $fieldTypeIdentifier, array * * @return string */ - private function renderContentField(Field $field, $fieldTypeIdentifier, array $params, $type): string + private function renderContentField(Field $field, $fieldTypeIdentifier, array $params, int $type): string { $localTemplate = null; if (isset($params['template'])) { @@ -149,7 +145,7 @@ public function renderFieldDefinitionEdit(FieldDefinition $fieldDefinition, arra * * @return string */ - private function renderFieldDefinition(FieldDefinition $fieldDefinition, array $params, $type): string + private function renderFieldDefinition(FieldDefinition $fieldDefinition, array $params, int $type): string { if (is_string($this->baseTemplate)) { $this->baseTemplate = $this->twig->loadTemplate( @@ -208,7 +204,7 @@ private function searchBlock(string $blockName, Template $tpl): ?array * * @return array */ - private function getBlocksByField($fieldTypeIdentifier, $type, $localTemplate = null): array + private function getBlocksByField($fieldTypeIdentifier, int $type, $localTemplate = null): array { $fieldBlockName = $this->getRenderFieldBlockName($fieldTypeIdentifier, $type); if ($localTemplate !== null) { @@ -237,7 +233,7 @@ private function getBlocksByField($fieldTypeIdentifier, $type, $localTemplate = * * @return array */ - private function getBlocksByFieldDefinition(FieldDefinition $definition, $type): array + private function getBlocksByFieldDefinition(FieldDefinition $definition, int $type): array { return $this->getBlockByName( $this->getRenderFieldDefinitionBlockName($definition->fieldTypeIdentifier, $type), @@ -254,7 +250,7 @@ private function getBlocksByFieldDefinition(FieldDefinition $definition, $type): * * @return array */ - private function getBlockByName($name, $resourcesName): array + private function getBlockByName(string $name, string $resourcesName): array { if (isset($this->blocks[$name])) { return [$name => $this->blocks[$name]]; @@ -289,7 +285,7 @@ private function getBlockByName($name, $resourcesName): array * * @return string */ - private function getRenderFieldBlockName($fieldTypeIdentifier, $type): string + private function getRenderFieldBlockName(string $fieldTypeIdentifier, $type): string { $suffix = $type === self::EDIT ? self::FIELD_EDIT_SUFFIX : self::FIELD_VIEW_SUFFIX; @@ -305,7 +301,7 @@ private function getRenderFieldBlockName($fieldTypeIdentifier, $type): string * * @return string */ - private function getRenderFieldDefinitionBlockName($fieldTypeIdentifier, $type): string + private function getRenderFieldDefinitionBlockName(string $fieldTypeIdentifier, $type): string { $suffix = $type === self::EDIT ? self::FIELD_DEFINITION_EDIT_SUFFIX : self::FIELD_DEFINITION_VIEW_SUFFIX; diff --git a/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php b/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php index 1901db6a66..04925d5c94 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php +++ b/src/lib/MVC/Symfony/Templating/Twig/ResourceProvider.php @@ -15,8 +15,7 @@ */ final class ResourceProvider implements ResourceProviderInterface { - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct(ConfigResolverInterface $configResolver) { diff --git a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php index 1d90f7cb48..0489ce1519 100644 --- a/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php +++ b/src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php @@ -9,6 +9,7 @@ use JMS\TranslationBundle\Exception\InvalidArgumentException; use JMS\TranslationBundle\Model\Message; +use JMS\TranslationBundle\Model\Message\XliffMessage; use JMS\TranslationBundle\Model\MessageCatalogue; use JMS\TranslationBundle\Translation\FileWriter; use JMS\TranslationBundle\Translation\LoaderManager; @@ -22,11 +23,9 @@ class CatalogueMapperFileWriter extends FileWriter { private const string XLF_FILE_NAME_REGEX_PATTERN = '/\.[-_a-z]+\.xlf$/i'; - /** @var \JMS\TranslationBundle\Translation\LoaderManager */ - private $loaderManager; + private LoaderManager $loaderManager; - /** @var \JMS\TranslationBundle\Translation\FileWriter */ - private $innerFileWriter; + private FileWriter $innerFileWriter; public function __construct(FileWriter $innerFileWriter, LoaderManager $loaderManager) { @@ -34,7 +33,7 @@ public function __construct(FileWriter $innerFileWriter, LoaderManager $loaderMa $this->innerFileWriter = $innerFileWriter; } - public function write(MessageCatalogue $catalogue, $domain, $filePath, $format) + public function write(MessageCatalogue $catalogue, $domain, $filePath, $format): void { $newCatalogue = new MessageCatalogue(); $newCatalogue->setLocale($catalogue->getLocale()); @@ -93,7 +92,7 @@ private function getEnglishFilePath(string $filePath): string * * @return \JMS\TranslationBundle\Model\MessageCatalogue */ - private function loadEnglishCatalogue($foreignFilePath, $domain, $format) + private function loadEnglishCatalogue(string $foreignFilePath, $domain, $format) { return $this->loaderManager->loadFile( $this->getEnglishFilePath($foreignFilePath), @@ -103,7 +102,7 @@ private function loadEnglishCatalogue($foreignFilePath, $domain, $format) ); } - private function hasEnglishCatalogue($foreignFilePath): bool + private function hasEnglishCatalogue(string $foreignFilePath): bool { return file_exists($this->getEnglishFilePath($foreignFilePath)); } @@ -111,11 +110,11 @@ private function hasEnglishCatalogue($foreignFilePath): bool /** * @param $message * - * @return Message\XliffMessage + * @return \JMS\TranslationBundle\Model\Message\XliffMessage */ - private function makeXliffMessage(Message $message) + private function makeXliffMessage(Message $message): XliffMessage { - $newMessage = new Message\XliffMessage($message->getId(), $message->getDomain()); + $newMessage = new XliffMessage($message->getId(), $message->getDomain()); $newMessage->setNew($message->isNew()); $newMessage->setLocaleString($message->getLocaleString()); $newMessage->setSources($message->getSources()); diff --git a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php index ac6715402c..0a41ae48ec 100644 --- a/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php @@ -116,7 +116,7 @@ private function getDocCommentForNode(Node $node): ?string return null; } - private function isIgnore($node): bool + private function isIgnore(Node $node): bool { if (null !== $docComment = $this->getDocCommentForNode($node)) { $annotations = $this->docParser->parse( diff --git a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php index 980e490fea..92555f244f 100644 --- a/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php +++ b/src/lib/MVC/Symfony/Translation/FieldTypesTranslationExtractor.php @@ -17,8 +17,7 @@ */ class FieldTypesTranslationExtractor implements ExtractorInterface { - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; public function __construct(FieldTypeRegistry $fieldTypeRegistry) { diff --git a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php index 40884bc9e8..be95e649e1 100644 --- a/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php +++ b/src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php @@ -63,7 +63,7 @@ public function __construct(DocParser $docParser, FileSourceFactory $fileSourceF /** * @param \Psr\Log\LoggerInterface $logger */ - public function setLogger(LoggerInterface $logger) + public function setLogger(LoggerInterface $logger): void { $this->logger = $logger; } diff --git a/src/lib/MVC/Symfony/View/BaseView.php b/src/lib/MVC/Symfony/View/BaseView.php index 237b77f8d5..87a80f4ba1 100644 --- a/src/lib/MVC/Symfony/View/BaseView.php +++ b/src/lib/MVC/Symfony/View/BaseView.php @@ -20,8 +20,7 @@ abstract class BaseView implements View */ protected $templateIdentifier; - /** @var array */ - protected $parameters = []; + protected array $parameters; /** @var array */ protected $configHash = []; @@ -29,14 +28,11 @@ abstract class BaseView implements View /** @var string */ private $viewType = 'full'; - /** @var \Symfony\Component\HttpKernel\Controller\ControllerReference */ - private $controllerReference; + private ?ControllerReference $controllerReference = null; - /** @var \Symfony\Component\HttpFoundation\Response */ - private $response; + private ?Response $response = null; - /** @var bool */ - private $isCacheEnabled = true; + private bool $isCacheEnabled = true; /** * @phpstan-param string|(\Closure(array):string) $templateIdentifier @@ -60,7 +56,7 @@ public function __construct($templateIdentifier = null, array $parameters = [], /** * @param array $parameters Hash of parameters to pass to the template/closure */ - public function setParameters(array $parameters) + public function setParameters(array $parameters): void { $this->parameters = $parameters; } @@ -70,7 +66,7 @@ public function setParameters(array $parameters) * * @param array $parameters */ - public function addParameters(array $parameters) + public function addParameters(array $parameters): void { $this->parameters = array_replace($this->parameters, $parameters); } @@ -121,7 +117,7 @@ public function getParameter($parameterName) * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType */ - public function setTemplateIdentifier($templateIdentifier) + public function setTemplateIdentifier($templateIdentifier): void { if (!is_string($templateIdentifier) && !$templateIdentifier instanceof \Closure) { throw new InvalidArgumentType('templateIdentifier', 'string or \Closure', $templateIdentifier); @@ -149,7 +145,7 @@ public function getTemplateIdentifier() * * @param array $config */ - public function setConfigHash(array $config) + public function setConfigHash(array $config): void { $this->configHash = $config; } @@ -164,7 +160,7 @@ public function getConfigHash() return $this->configHash; } - public function setViewType($viewType) + public function setViewType($viewType): void { $this->viewType = $viewType; } @@ -174,7 +170,7 @@ public function getViewType() return $this->viewType; } - public function setControllerReference(ControllerReference $controllerReference) + public function setControllerReference(ControllerReference $controllerReference): void { $this->controllerReference = $controllerReference; } @@ -197,7 +193,7 @@ protected function getInternalParameters() return []; } - public function setResponse(Response $response) + public function setResponse(Response $response): void { $this->response = $response; } @@ -207,7 +203,7 @@ public function getResponse() return $this->response; } - public function setCacheEnabled($cacheEnabled) + public function setCacheEnabled($cacheEnabled): void { $this->isCacheEnabled = (bool)$cacheEnabled; } diff --git a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php index 9b9a4c18c9..5ec2c6324d 100644 --- a/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php +++ b/src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\MVC\Symfony\View\Builder; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -28,20 +29,15 @@ */ class ContentViewBuilder implements ViewBuilder { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Core\MVC\Symfony\View\Configurator */ - private $viewConfigurator; + private Configurator $viewConfigurator; - /** @var \Ibexa\Core\MVC\Symfony\View\ParametersInjector */ - private $viewParametersInjector; + private ParametersInjector $viewParametersInjector; - /** @var \Symfony\Component\HttpFoundation\RequestStack */ - private $requestStack; + private RequestStack $requestStack; /** * Default templates, indexed per viewType (full, line, ...). @@ -50,8 +46,7 @@ class ContentViewBuilder implements ViewBuilder */ private $defaultTemplates; - /** @var \Ibexa\Core\Helper\ContentInfoLocationLoader */ - private $locationLoader; + private ?ContentInfoLocationLoader $locationLoader; public function __construct( Repository $repository, @@ -83,7 +78,7 @@ public function matches($argument): bool * If both contentId and locationId parameters are missing * @throws \Ibexa\Core\Base\Exceptions\UnauthorizedException */ - public function buildView(array $parameters) + public function buildView(array $parameters): ContentView { $view = new ContentView(null, [], $parameters['viewType']); $view->setIsEmbed($this->isEmbed($parameters)); @@ -185,7 +180,7 @@ private function resolveMainRequestLanguageCode(): ?string * * @throws \Ibexa\Core\Base\Exceptions\UnauthorizedException */ - private function loadContent($contentId, ?string $languageCode = null) + private function loadContent(int $contentId, ?string $languageCode = null): Content { return $this->repository->getContentService()->loadContent( $contentId, @@ -205,10 +200,10 @@ private function loadContent($contentId, ?string $languageCode = null) * * @throws \Ibexa\Core\Base\Exceptions\UnauthorizedException */ - private function loadEmbeddedContent($contentId, Location $location = null, ?string $languageCode = null) + private function loadEmbeddedContent(int $contentId, Location $location = null, ?string $languageCode = null) { $content = $this->repository->sudo( - static function (Repository $repository) use ($contentId, $languageCode) { + static function (Repository $repository) use ($contentId, $languageCode): \Ibexa\Contracts\Core\Repository\Values\Content\Content { return $repository->getContentService()->loadContent($contentId, $languageCode ? [$languageCode] : null); } ); @@ -239,10 +234,10 @@ static function (Repository $repository) use ($contentId, $languageCode) { * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - private function loadLocation($locationId) + private function loadLocation(int $locationId) { $location = $this->repository->sudo( - static function (Repository $repository) use ($locationId) { + static function (Repository $repository) use ($locationId): \Ibexa\Contracts\Core\Repository\Values\Content\Location { return $repository->getLocationService()->loadLocation($locationId); } ); @@ -283,7 +278,7 @@ private function canRead(Content $content, Location $location = null, bool $isEm * * @return bool */ - private function isEmbed($parameters): bool + private function isEmbed(array $parameters): bool { if ($parameters['_controller'] === 'ibexa_content::embedAction') { return true; diff --git a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php index c88679fddc..8fcfca7e30 100644 --- a/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php +++ b/src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php @@ -26,7 +26,7 @@ public static function getSubscribedEvents(): array * * @param \Ibexa\Core\MVC\Symfony\View\Event\FilterViewBuilderParametersEvent $e */ - public function addRequestAttributes(FilterViewBuilderParametersEvent $e) + public function addRequestAttributes(FilterViewBuilderParametersEvent $e): void { $parameterBag = $e->getParameters(); $parameterBag->add($e->getRequest()->attributes->all()); diff --git a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php index c6f95844b4..85f84e54e2 100644 --- a/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php +++ b/src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php @@ -16,7 +16,7 @@ class ControllerMatch implements ViewBuilderRegistry { /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilder[] */ - private $registry = []; + private array $registry = []; public function __construct(iterable $viewBuilders = []) { @@ -30,7 +30,7 @@ public function __construct(iterable $viewBuilders = []) /** * @param \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilder[] $viewBuilders */ - public function addToRegistry(array $viewBuilders) + public function addToRegistry(array $viewBuilders): void { $this->registry = array_merge($this->registry, $viewBuilders); } diff --git a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php index 22a433edd9..33deadd466 100644 --- a/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php +++ b/src/lib/MVC/Symfony/View/Configurator/ViewProvider.php @@ -19,8 +19,7 @@ */ class ViewProvider implements Configurator { - /** @var \Ibexa\Core\MVC\Symfony\View\Provider\Registry */ - private $providerRegistry; + private Registry $providerRegistry; /** * ViewProvider constructor. @@ -32,7 +31,7 @@ public function __construct(Registry $providersRegistry) $this->providerRegistry = $providersRegistry; } - public function configure(View $view) + public function configure(View $view): void { foreach ($this->providerRegistry->getViewProviders($view) as $viewProvider) { if ($providerView = $viewProvider->getView($view)) { diff --git a/src/lib/MVC/Symfony/View/ContentView.php b/src/lib/MVC/Symfony/View/ContentView.php index 1713c0ac87..ac5e1fd080 100644 --- a/src/lib/MVC/Symfony/View/ContentView.php +++ b/src/lib/MVC/Symfony/View/ContentView.php @@ -39,19 +39,16 @@ */ class ContentView extends BaseView implements View, ContentValueView, LocationValueView, EmbedView, CachableView { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $content; + private ?Content $content = null; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location|null */ - private $location; + private ?Location $location = null; - /** @var bool */ - private $isEmbed = false; + private bool $isEmbed = false; /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function setContent(Content $content) + public function setContent(Content $content): void { $this->content = $content; } @@ -69,7 +66,7 @@ public function getContent() /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ - public function setLocation(Location $location) + public function setLocation(Location $location): void { $this->location = $location; } @@ -82,7 +79,7 @@ public function getLocation() return $this->location; } - protected function getInternalParameters() + protected function getInternalParameters(): array { $parameters = ['content' => $this->content]; if ($this->location !== null) { @@ -97,7 +94,7 @@ protected function getInternalParameters() * * @param bool $value */ - public function setIsEmbed($value) + public function setIsEmbed($value): void { $this->isEmbed = (bool)$value; } diff --git a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php index a97e1c7ce4..6afc4ffe15 100644 --- a/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php +++ b/src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php @@ -16,7 +16,7 @@ class CustomLocationControllerChecker { /** @var \Ibexa\Core\MVC\Symfony\View\ViewProvider[] */ - private $viewProviders; + private ?array $viewProviders = null; /** * Tests if $location has match a view that uses a custom controller. @@ -50,7 +50,7 @@ public function usesCustomController(Content $content, Location $location, $view /** * @param \Ibexa\Core\MVC\Symfony\View\ViewProvider[] $viewProviders */ - public function addViewProviders(array $viewProviders) + public function addViewProviders(array $viewProviders): void { $this->viewProviders = $viewProviders; } diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php index 914b9f2466..b08b5ab13c 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewBuilderParametersEvent.php @@ -16,15 +16,12 @@ */ class FilterViewBuilderParametersEvent extends Event { - /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private Request $request; /** * Parameters the ViewBuilder will use. - * - * @var \Symfony\Component\HttpFoundation\ParameterBag */ - private $parameters; + private ParameterBag $parameters; public function __construct(Request $request) { diff --git a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php index 496719cd45..a13bd5b5e3 100644 --- a/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php +++ b/src/lib/MVC/Symfony/View/Event/FilterViewParametersEvent.php @@ -20,24 +20,18 @@ class FilterViewParametersEvent extends Event { /** * Copy of the view object that is being built. - * - * @var \Ibexa\Core\MVC\Symfony\View\View */ - private $view; + private View $view; /** * Parameters that were provided to the ViewBuilder. - * - * @var array */ - private $builderParameters; + private array $builderParameters; /** * ParameterBag used to manipulate the view parameters. Its contents will be injected as the view parameters. - * - * @var \Symfony\Component\HttpFoundation\ParameterBag */ - private $parameterBag; + private ParameterBag $parameterBag; public function __construct(View $view, array $builderParameters) { @@ -51,7 +45,7 @@ public function __construct(View $view, array $builderParameters) * * @return array */ - public function getViewParameters() + public function getViewParameters(): array { return $this->parameterBag->all(); } diff --git a/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php b/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php index b9c234f043..0cf5f3d5bd 100644 --- a/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php +++ b/src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php @@ -15,7 +15,7 @@ final class GenericVariableProviderRegistry implements VariableProviderRegistry { /** @var \Ibexa\Contracts\Core\MVC\View\VariableProvider[] */ - private $twigVariableProviders; + private ?array $twigVariableProviders = null; public function __construct(Traversable $twigVariableProviders) { diff --git a/src/lib/MVC/Symfony/View/LoginFormView.php b/src/lib/MVC/Symfony/View/LoginFormView.php index b8b611d521..fd95a17a5a 100644 --- a/src/lib/MVC/Symfony/View/LoginFormView.php +++ b/src/lib/MVC/Symfony/View/LoginFormView.php @@ -12,11 +12,9 @@ final class LoginFormView extends BaseView { - /** @var string */ - private $lastUsername; + private ?string $lastUsername = null; - /** @var \Symfony\Component\Security\Core\Exception\AuthenticationException|null */ - private $lastAuthenticationException; + private ?AuthenticationException $lastAuthenticationException = null; public function getLastUsername(): ?string { diff --git a/src/lib/MVC/Symfony/View/Manager.php b/src/lib/MVC/Symfony/View/Manager.php index b709740c2c..b8ee5e2a9a 100644 --- a/src/lib/MVC/Symfony/View/Manager.php +++ b/src/lib/MVC/Symfony/View/Manager.php @@ -20,17 +20,13 @@ class Manager implements ViewManagerInterface { - /** @var \Twig\Environment */ - protected $templateEngine; + protected Environment $templateEngine; - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected ?LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; /** * The base layout template to use when the view is requested to be generated @@ -40,8 +36,7 @@ class Manager implements ViewManagerInterface */ protected $viewBaseLayout; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; /** @var \Ibexa\Core\MVC\Symfony\View\Configurator */ private $viewConfigurator; diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php index 7a30313c76..f7faef2eb5 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectCustomParameters']; } - public function injectCustomParameters(FilterViewParametersEvent $event) + public function injectCustomParameters(FilterViewParametersEvent $event): void { $builderParameters = $event->getBuilderParameters(); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php index 8ae533855d..5ede4ec495 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectEmbedObjectParameters']; } - public function injectEmbedObjectParameters(FilterViewParametersEvent $event) + public function injectEmbedObjectParameters(FilterViewParametersEvent $event): void { $viewType = $event->getView()->getViewType(); if ($viewType == 'embed' || $viewType == 'embed-inline') { diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php index a3b3ce339a..7fbe317927 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php @@ -18,15 +18,14 @@ */ class EventDispatcherInjector implements ParametersInjector { - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcher; + private EventDispatcherInterface $eventDispatcher; public function __construct(EventDispatcherInterface $eventDispatcher) { $this->eventDispatcher = $eventDispatcher; } - public function injectViewParameters(View $view, array $parameters) + public function injectViewParameters(View $view, array $parameters): void { $event = new FilterViewParametersEvent($view, $parameters); $this->eventDispatcher->dispatch($event, ViewEvents::FILTER_VIEW_PARAMETERS); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php index 178aa3c828..d5b07abce9 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php @@ -21,7 +21,7 @@ public static function getSubscribedEvents(): array return [ViewEvents::FILTER_VIEW_PARAMETERS => 'injectCustomParameters']; } - public function injectCustomParameters(FilterViewParametersEvent $event) + public function injectCustomParameters(FilterViewParametersEvent $event): void { $parameters = $event->getBuilderParameters(); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php index 4221231683..c15a2dd5d3 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php @@ -23,7 +23,7 @@ public static function getSubscribedEvents(): array return [View\ViewEvents::FILTER_VIEW_PARAMETERS => 'injectValueObjectsIds']; } - public function injectValueObjectsIds(View\Event\FilterViewParametersEvent $event) + public function injectValueObjectsIds(View\Event\FilterViewParametersEvent $event): void { $view = $event->getView(); $parameterBag = $event->getParameterBag(); diff --git a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php index 715f26c870..c86f76e739 100644 --- a/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php +++ b/src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php @@ -20,8 +20,7 @@ class ViewbaseLayout implements EventSubscriberInterface /** @var string */ private $viewbaseLayout; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; public function __construct($viewbaseLayout, ConfigResolverInterface $configResolver) { @@ -39,7 +38,7 @@ private function getPageLayout(): string return $this->configResolver->getParameter('page_layout'); } - public function injectViewbaseLayout(FilterViewParametersEvent $event) + public function injectViewbaseLayout(FilterViewParametersEvent $event): void { $pageLayout = $this->getPageLayout(); diff --git a/src/lib/MVC/Symfony/View/Provider/Configured.php b/src/lib/MVC/Symfony/View/Provider/Configured.php index 4f7a38d255..32d999b99d 100644 --- a/src/lib/MVC/Symfony/View/Provider/Configured.php +++ b/src/lib/MVC/Symfony/View/Provider/Configured.php @@ -18,8 +18,7 @@ */ class Configured implements ViewProvider { - /** @var \Ibexa\Core\MVC\Symfony\Matcher\MatcherFactoryInterface */ - protected $matcherFactory; + protected MatcherFactoryInterface $matcherFactory; /** * @param \Ibexa\Core\MVC\Symfony\Matcher\MatcherFactoryInterface $matcherFactory @@ -45,7 +44,7 @@ public function getView(View $view) * * @return \Ibexa\Core\MVC\Symfony\View\ContentView */ - protected function buildContentView(array $viewConfig) + protected function buildContentView(array $viewConfig): ContentView { $view = new ContentView(); $view->setConfigHash($viewConfig); diff --git a/src/lib/MVC/Symfony/View/Provider/Registry.php b/src/lib/MVC/Symfony/View/Provider/Registry.php index ba751daf5a..738c4ccc0a 100644 --- a/src/lib/MVC/Symfony/View/Provider/Registry.php +++ b/src/lib/MVC/Symfony/View/Provider/Registry.php @@ -17,7 +17,7 @@ class Registry * * @var \Ibexa\Core\MVC\Symfony\View\ViewProvider[][] */ - private $viewProviders; + private ?array $viewProviders = null; /** * @param \Ibexa\Core\MVC\Symfony\View\View $view @@ -41,7 +41,7 @@ public function getViewProviders(View $view) * * @param array $viewProviders ['type' => [ViewProvider1, ViewProvider2]] */ - public function setViewProviders(array $viewProviders) + public function setViewProviders(array $viewProviders): void { $this->viewProviders = $viewProviders; } diff --git a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php index 91644d1664..729df5f9ac 100644 --- a/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php +++ b/src/lib/MVC/Symfony/View/Renderer/TemplateRenderer.php @@ -18,11 +18,9 @@ class TemplateRenderer implements Renderer { - /** @var \Twig\Environment */ - protected $templateEngine; + protected Environment $templateEngine; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - protected $eventDispatcher; + protected EventDispatcherInterface $eventDispatcher; public function __construct(Environment $templateEngine, EventDispatcherInterface $eventDispatcher) { diff --git a/src/lib/Persistence/Cache/AbstractHandler.php b/src/lib/Persistence/Cache/AbstractHandler.php index b90f7c3e4f..f67328d4e4 100644 --- a/src/lib/Persistence/Cache/AbstractHandler.php +++ b/src/lib/Persistence/Cache/AbstractHandler.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Cache; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface; use Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer; @@ -19,23 +20,17 @@ */ abstract class AbstractHandler { - /** @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface */ - protected $cache; + protected TagAwareAdapterInterface $cache; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger */ - protected $logger; + protected PersistenceLogger $logger; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - protected $cacheIdentifierGenerator; + protected CacheIdentifierGeneratorInterface $cacheIdentifierGenerator; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer */ - protected $cacheIdentifierSanitizer; + protected CacheIdentifierSanitizer $cacheIdentifierSanitizer; - /** @var \Ibexa\Core\Persistence\Cache\LocationPathConverter */ - protected $locationPathConverter; + protected LocationPathConverter $locationPathConverter; /** * Setups current handler with everything needed. diff --git a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php index 604d3c7f07..df47620569 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryHandler.php @@ -20,24 +20,18 @@ abstract class AbstractInMemoryHandler { /** * NOTE: Instance of this must be TransactionalInMemoryCacheAdapter in order for cache clearing to affect in-memory cache. - * - * @var \Ibexa\Core\Persistence\Cache\Adapter\TransactionAwareAdapterInterface */ - protected $cache; + protected TransactionAwareAdapterInterface $cache; - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger */ - protected $logger; + protected PersistenceLogger $logger; /** * NOTE: On purpose private as it's only supposed to be interacted with in tandem with symfony cache here, * hence the cache decorator and the reusable methods here. - * - * @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache */ - private $inMemory; + private InMemoryCache $inMemory; - /** @var \Ibexa\Core\Persistence\Cache\CacheIndicesValidatorInterface */ - private $cacheIndicesValidator; + private ?CacheIndicesValidatorInterface $cacheIndicesValidator; public function __construct( TransactionAwareAdapterInterface $cache, diff --git a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php index a412a518ff..548537af15 100644 --- a/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php +++ b/src/lib/Persistence/Cache/AbstractInMemoryPersistenceHandler.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Cache; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Core\Persistence\Cache\Adapter\TransactionAwareAdapterInterface; use Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface; @@ -20,17 +21,13 @@ */ abstract class AbstractInMemoryPersistenceHandler extends AbstractInMemoryHandler { - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - protected $cacheIdentifierGenerator; + protected CacheIdentifierGeneratorInterface $cacheIdentifierGenerator; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer */ - protected $cacheIdentifierSanitizer; + protected CacheIdentifierSanitizer $cacheIdentifierSanitizer; - /** @var \Ibexa\Core\Persistence\Cache\LocationPathConverter */ - protected $locationPathConverter; + protected LocationPathConverter $locationPathConverter; public function __construct( TransactionAwareAdapterInterface $cache, diff --git a/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php b/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php index c3960ef0ba..4136ec8c7d 100644 --- a/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php +++ b/src/lib/Persistence/Cache/Adapter/TransactionalInMemoryCacheAdapter.php @@ -60,7 +60,7 @@ public function __construct( $this->deferredItemsDeletion = empty($deferredItemsDeletion) ? [] : \array_fill_keys($deferredItemsDeletion, true); // To modify protected $isHit when items are a "miss" based on deferred delete/invalidation during transactions $this->setCacheItemAsMiss = \Closure::bind( - static function (CacheItem $item) { + static function (CacheItem $item): void { // ... Might not work for anything but new items $item->isHit = false; }, diff --git a/src/lib/Persistence/Cache/ContentHandler.php b/src/lib/Persistence/Cache/ContentHandler.php index 0bdd2a7e23..d435c4506d 100644 --- a/src/lib/Persistence/Cache/ContentHandler.php +++ b/src/lib/Persistence/Cache/ContentHandler.php @@ -68,7 +68,7 @@ protected function init(): void return $tags; }; - $this->getContentInfoKeys = function (ContentInfo $info) { + $this->getContentInfoKeys = function (ContentInfo $info): array { return [ $this->cacheIdentifierGenerator->generateKey(self::CONTENT_INFO_IDENTIFIER, [$info->id], true), $this->cacheIdentifierGenerator->generateKey( @@ -79,7 +79,7 @@ protected function init(): void ]; }; - $this->getContentTags = function (Content $content) { + $this->getContentTags = function (Content $content): array { $versionInfo = $content->versionInfo; $tags = [ $this->cacheIdentifierGenerator->generateTag( @@ -146,7 +146,7 @@ function ($id) use ($versionNo, $translations) { return $this->persistenceHandler->contentHandler()->load($id, $versionNo, $translations); }, $this->getContentTags, - function (Content $content) use ($keySuffix) { + function (Content $content) use ($keySuffix): array { // Version number & translations is part of keySuffix here and depends on what user asked for return [ $this->cacheIdentifierGenerator->generateKey( @@ -172,7 +172,7 @@ function (array $cacheMissIds) use ($translations) { return $this->persistenceHandler->contentHandler()->loadContentList($cacheMissIds, $translations); }, $this->getContentTags, - function (Content $content) use ($keySuffix) { + function (Content $content) use ($keySuffix): array { // Translations is part of keySuffix here and depends on what user asked for return [ $this->cacheIdentifierGenerator->generateKey( @@ -205,7 +205,7 @@ function ($contentId) { ); } - public function loadContentInfoList(array $contentIds) + public function loadContentInfoList(array $contentIds): array { return $this->getMultipleCacheValues( $contentIds, @@ -691,7 +691,7 @@ public function publish($contentId, $versionNo, MetadataUpdateStruct $struct) /** * {@inheritdoc} */ - public function deleteTranslationFromContent($contentId, $languageCode) + public function deleteTranslationFromContent($contentId, $languageCode): void { $this->logger->logCall( __METHOD__, @@ -764,7 +764,7 @@ function (array $cacheMissIds): array { function (VersionInfo $versionInfo): array { return $this->getCacheTagsForVersion($versionInfo); }, - function (VersionInfo $versionInfo) { + function (VersionInfo $versionInfo): array { return [ $this->cacheIdentifierGenerator->generateKey( self::CONTENT_VERSION_INFO_IDENTIFIER, diff --git a/src/lib/Persistence/Cache/ContentLanguageHandler.php b/src/lib/Persistence/Cache/ContentLanguageHandler.php index 94f90c2fa5..fffdfc30ad 100644 --- a/src/lib/Persistence/Cache/ContentLanguageHandler.php +++ b/src/lib/Persistence/Cache/ContentLanguageHandler.php @@ -28,12 +28,12 @@ class ContentLanguageHandler extends AbstractInMemoryPersistenceHandler implemen */ protected function init(): void { - $this->getTags = function (Language $language) { + $this->getTags = function (Language $language): array { return [ $this->cacheIdentifierGenerator->generateTag(self::LANGUAGE_IDENTIFIER, [$language->id]), ]; }; - $this->getKeys = function (Language $language) { + $this->getKeys = function (Language $language): array { return [ $this->cacheIdentifierGenerator->generateKey(self::LANGUAGE_IDENTIFIER, [$language->id], true), $this->cacheIdentifierGenerator->generateKey( diff --git a/src/lib/Persistence/Cache/ContentTypeHandler.php b/src/lib/Persistence/Cache/ContentTypeHandler.php index 123a0ac74f..482154a8fc 100644 --- a/src/lib/Persistence/Cache/ContentTypeHandler.php +++ b/src/lib/Persistence/Cache/ContentTypeHandler.php @@ -51,13 +51,13 @@ class ContentTypeHandler extends AbstractInMemoryPersistenceHandler implements C */ protected function init(): void { - $this->getGroupTags = function (Type\Group $group) { + $this->getGroupTags = function (Type\Group $group): array { return [ $this->cacheIdentifierGenerator->generateTag(self::TYPE_GROUP_IDENTIFIER, [$group->id]), ]; }; - $this->getGroupKeys = function (Type\Group $group) { + $this->getGroupKeys = function (Type\Group $group): array { return [ $this->cacheIdentifierGenerator->generateKey(self::CONTENT_TYPE_GROUP_IDENTIFIER, [$group->id]), $this->cacheIdentifierGenerator->generateKey( @@ -68,13 +68,13 @@ protected function init(): void ]; }; - $this->getTypeTags = function (Type $type) { + $this->getTypeTags = function (Type $type): array { return [ $this->cacheIdentifierGenerator->generateTag(self::TYPE_IDENTIFIER), // For use by deleteByUserAndStatus() as it currently lacks return value for affected type ids $this->cacheIdentifierGenerator->generateTag(self::TYPE_IDENTIFIER, [$type->id]), ]; }; - $this->getTypeKeys = function (Type $type, int $status = Type::STATUS_DEFINED) { + $this->getTypeKeys = function (Type $type, int $status = Type::STATUS_DEFINED): array { return [ $this->cacheIdentifierGenerator->generateKey(self::CONTENT_TYPE_IDENTIFIER, [$type->id], true), $this->cacheIdentifierGenerator->generateKey(self::CONTENT_TYPE_IDENTIFIER, [$type->id], true) . '-' . $status, @@ -160,7 +160,7 @@ function ($groupId) { /** * {@inheritdoc} */ - public function loadGroups(array $groupIds) + public function loadGroups(array $groupIds): array { return $this->getMultipleCacheValues( $groupIds, @@ -224,7 +224,7 @@ function () use ($groupId, $status) { $this->getTypeTags, $this->getTypeKeys, // Add tag in case of empty list - function () use ($groupId) { + function () use ($groupId): array { return [ $this->cacheIdentifierGenerator->generateTag(self::TYPE_GROUP_IDENTIFIER, [$groupId]), ]; @@ -528,7 +528,7 @@ public function removeFieldDefinition( /** * {@inheritdoc} */ - public function updateFieldDefinition($typeId, $status, FieldDefinition $struct) + public function updateFieldDefinition($typeId, $status, FieldDefinition $struct): void { $this->logger->logCall(__METHOD__, ['type' => $typeId, 'status' => $status, 'struct' => $struct]); $this->persistenceHandler->contentTypeHandler()->updateFieldDefinition( @@ -549,7 +549,7 @@ public function updateFieldDefinition($typeId, $status, FieldDefinition $struct) /** * {@inheritdoc} */ - public function publish($typeId) + public function publish($typeId): void { $this->logger->logCall(__METHOD__, ['type' => $typeId]); $this->persistenceHandler->contentTypeHandler()->publish($typeId); @@ -587,9 +587,9 @@ public function getSearchableFieldMap() function () { return $this->persistenceHandler->contentTypeHandler()->getSearchableFieldMap(); }, - static function () {return [];}, - static function () {return [];}, - function () { + static function (): array {return [];}, + static function (): array {return [];}, + function (): array { return [ $this->cacheIdentifierGenerator->generateTag(self::TYPE_MAP_IDENTIFIER), ]; diff --git a/src/lib/Persistence/Cache/Handler.php b/src/lib/Persistence/Cache/Handler.php index 36b225a107..2bd9448e12 100644 --- a/src/lib/Persistence/Cache/Handler.php +++ b/src/lib/Persistence/Cache/Handler.php @@ -32,59 +32,41 @@ */ class Handler implements PersistenceHandlerInterface { - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected PersistenceHandlerInterface $persistenceHandler; - /** @var \Ibexa\Core\Persistence\Cache\SectionHandler */ - protected $sectionHandler; + protected CacheSectionHandler $sectionHandler; - /** @var \Ibexa\Core\Persistence\Cache\ContentHandler */ - protected $contentHandler; + protected CacheContentHandler $contentHandler; - /** @var \Ibexa\Core\Persistence\Cache\ContentLanguageHandler */ - protected $contentLanguageHandler; + protected CacheContentLanguageHandler $contentLanguageHandler; - /** @var \Ibexa\Core\Persistence\Cache\ContentTypeHandler */ - protected $contentTypeHandler; + protected CacheContentTypeHandler $contentTypeHandler; - /** @var \Ibexa\Core\Persistence\Cache\LocationHandler */ - protected $locationHandler; + protected CacheLocationHandler $locationHandler; - /** @var \Ibexa\Core\Persistence\Cache\UserHandler */ - protected $userHandler; + protected CacheUserHandler $userHandler; - /** @var \Ibexa\Core\Persistence\Cache\TrashHandler */ - protected $trashHandler; + protected CacheTrashHandler $trashHandler; - /** @var \Ibexa\Core\Persistence\Cache\UrlAliasHandler */ - protected $urlAliasHandler; + protected CacheUrlAliasHandler $urlAliasHandler; - /** @var \Ibexa\Core\Persistence\Cache\ObjectStateHandler */ - protected $objectStateHandler; + protected CacheObjectStateHandler $objectStateHandler; - /** @var \Ibexa\Core\Persistence\Cache\TransactionHandler */ - protected $transactionHandler; + protected CacheTransactionHandler $transactionHandler; - /** @var \Ibexa\Core\Persistence\Cache\URLHandler */ - protected $urlHandler; + protected CacheUrlHandler $urlHandler; - /** @var \Ibexa\Core\Persistence\Cache\BookmarkHandler */ - protected $bookmarkHandler; + protected CacheBookmarkHandler $bookmarkHandler; - /** @var \Ibexa\Core\Persistence\Cache\NotificationHandler */ - protected $notificationHandler; + protected CacheNotificationHandler $notificationHandler; - /** @var \Ibexa\Core\Persistence\Cache\UserPreferenceHandler */ - protected $userPreferenceHandler; + protected CacheUserPreferenceHandler $userPreferenceHandler; - /** @var \Ibexa\Core\Persistence\Cache\UrlWildcardHandler */ - private $urlWildcardHandler; + private CacheUrlWildcardHandler $urlWildcardHandler; - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger */ - protected $logger; + protected PersistenceLogger $logger; - /** @var \Ibexa\Core\Persistence\Cache\SettingHandler */ - private $settingHandler; + private SettingHandler $settingHandler; public function __construct( PersistenceHandlerInterface $persistenceHandler, diff --git a/src/lib/Persistence/Cache/Identifier/CacheIdentifierGenerator.php b/src/lib/Persistence/Cache/Identifier/CacheIdentifierGenerator.php index f0b0233922..323b860803 100644 --- a/src/lib/Persistence/Cache/Identifier/CacheIdentifierGenerator.php +++ b/src/lib/Persistence/Cache/Identifier/CacheIdentifierGenerator.php @@ -22,14 +22,13 @@ final class CacheIdentifierGenerator implements CacheIdentifierGeneratorInterfac use LoggerAwareTrait; - /** @var string */ - private $prefix; + private string $prefix; /** @var array */ - private $tagPatterns; + private array $tagPatterns; /** @var array */ - private $keyPatterns; + private array $keyPatterns; public function __construct(string $prefix, array $tagPatterns, array $keyPatterns) { diff --git a/src/lib/Persistence/Cache/InMemory/InMemoryCache.php b/src/lib/Persistence/Cache/InMemory/InMemoryCache.php index f9fb3bbe4f..8b1a1ecfad 100644 --- a/src/lib/Persistence/Cache/InMemory/InMemoryCache.php +++ b/src/lib/Persistence/Cache/InMemory/InMemoryCache.php @@ -27,13 +27,13 @@ class InMemoryCache { /** @var float Cache Time to Live, in seconds. This is only for how long we keep cache object around in-memory. */ - private $ttl; + private int|float $ttl; /** @var int The limit of objects in cache pool at a given time */ - private $limit; + private int $limit; /** @var bool Switch for enabeling/disabling in-memory cache */ - private $enabled; + private bool $enabled; /** * Cache objects by primary key. @@ -46,14 +46,14 @@ class InMemoryCache private $cacheExpiryTime = []; /** @var int[] Access counter for individual cache (by primary key), to order by by popularity on vacuum(). */ - private $cacheAccessCount = []; + private array $cacheAccessCount = []; /** * Mapping of secondary index to primary key. * * @var string[] */ - private $cacheIndex = []; + private array $cacheIndex = []; /** * In Memory Cache constructor. diff --git a/src/lib/Persistence/Cache/LocationHandler.php b/src/lib/Persistence/Cache/LocationHandler.php index c049e15aa2..9707bcfb97 100644 --- a/src/lib/Persistence/Cache/LocationHandler.php +++ b/src/lib/Persistence/Cache/LocationHandler.php @@ -46,7 +46,7 @@ protected function init(): void return $tags; }; - $this->getLocationKeys = function (Location $location, $keySuffix = '-1') { + $this->getLocationKeys = function (Location $location, string $keySuffix = '-1'): array { return [ $this->cacheIdentifierGenerator->generateKey(self::LOCATION_IDENTIFIER, [$location->id], true) . $keySuffix, $this->cacheIdentifierGenerator->generateKey( @@ -364,7 +364,7 @@ public function swap($locationId1, $locationId2) /** * {@inheritdoc} */ - public function update(UpdateStruct $struct, $locationId) + public function update(UpdateStruct $struct, $locationId): void { $this->logger->logCall(__METHOD__, ['location' => $locationId, 'struct' => $struct]); $this->persistenceHandler->locationHandler()->update($struct, $locationId); @@ -424,7 +424,7 @@ public function deleteChildrenDrafts(int $locationId): void /** * {@inheritdoc} */ - public function setSectionForSubtree($locationId, $sectionId) + public function setSectionForSubtree($locationId, $sectionId): void { $this->logger->logCall(__METHOD__, ['location' => $locationId, 'section' => $sectionId]); $this->persistenceHandler->locationHandler()->setSectionForSubtree($locationId, $sectionId); @@ -437,7 +437,7 @@ public function setSectionForSubtree($locationId, $sectionId) /** * {@inheritdoc} */ - public function changeMainLocation($contentId, $locationId) + public function changeMainLocation($contentId, $locationId): void { $this->logger->logCall(__METHOD__, ['location' => $locationId, 'content' => $contentId]); $this->persistenceHandler->locationHandler()->changeMainLocation($contentId, $locationId); diff --git a/src/lib/Persistence/Cache/ObjectStateHandler.php b/src/lib/Persistence/Cache/ObjectStateHandler.php index a1dd875ecb..b4027cbe4c 100644 --- a/src/lib/Persistence/Cache/ObjectStateHandler.php +++ b/src/lib/Persistence/Cache/ObjectStateHandler.php @@ -61,7 +61,7 @@ function () use ($groupId): array { $this->cacheIdentifierGenerator->generateTag(self::STATE_GROUP_IDENTIFIER, [(int) $groupId]), ]; }, - function () use ($groupId) { + function () use ($groupId): array { return [ $this->cacheIdentifierGenerator->generateKey(self::STATE_GROUP_IDENTIFIER, [(int) $groupId], true), ]; diff --git a/src/lib/Persistence/Cache/PersistenceLogger.php b/src/lib/Persistence/Cache/PersistenceLogger.php index 88e427a153..af7d5c4328 100644 --- a/src/lib/Persistence/Cache/PersistenceLogger.php +++ b/src/lib/Persistence/Cache/PersistenceLogger.php @@ -23,8 +23,7 @@ class PersistenceLogger 'memory' => 0, ]; - /** @var bool */ - protected $logCalls = true; + protected bool $logCalls; /** @var array */ protected $calls = []; @@ -131,7 +130,7 @@ public function logCacheHit(array $arguments = [], int $traceOffset = 2, bool $i * @param array $trimmedBacktrace * @param string $type */ - private function collectCacheCallData($method, array $arguments, array $trimmedBacktrace, string $type): void + private function collectCacheCallData(string $method, array $arguments, array $trimmedBacktrace, string $type): void { // simplest/fastests hash possible to identify if we have already collected this before to save on memory use $callHash = \hash('adler32', $method . \serialize($arguments)); diff --git a/src/lib/Persistence/Cache/TransactionHandler.php b/src/lib/Persistence/Cache/TransactionHandler.php index 5c730f08f1..8878c1e8a8 100644 --- a/src/lib/Persistence/Cache/TransactionHandler.php +++ b/src/lib/Persistence/Cache/TransactionHandler.php @@ -17,7 +17,7 @@ class TransactionHandler extends AbstractInMemoryPersistenceHandler implements T /** * {@inheritdoc} */ - public function beginTransaction() + public function beginTransaction(): void { $this->cache->beginTransaction(); @@ -28,7 +28,7 @@ public function beginTransaction() /** * {@inheritdoc} */ - public function commit() + public function commit(): void { $this->logger->logCall(__METHOD__); $this->persistenceHandler->transactionHandler()->commit(); @@ -39,7 +39,7 @@ public function commit() /** * {@inheritdoc} */ - public function rollback() + public function rollback(): void { $this->logger->logCall(__METHOD__); $this->persistenceHandler->transactionHandler()->rollback(); diff --git a/src/lib/Persistence/Cache/TrashHandler.php b/src/lib/Persistence/Cache/TrashHandler.php index f9a870ef0d..e7912d0262 100644 --- a/src/lib/Persistence/Cache/TrashHandler.php +++ b/src/lib/Persistence/Cache/TrashHandler.php @@ -47,7 +47,7 @@ public function trashSubtree($locationId) $relationTags = []; if (!empty($reverseRelations)) { - $relationTags = array_map(function (Relation $relation) { + $relationTags = array_map(function (Relation $relation): string { return $this->cacheIdentifierGenerator->generateTag( self::CONTENT_IDENTIFIER, [$relation->destinationContentId] @@ -89,7 +89,7 @@ public function recover($trashedId, $newParentId) $relationTags = []; if (!empty($reverseRelations)) { - $relationTags = array_map(function (Relation $relation) { + $relationTags = array_map(function (Relation $relation): string { return $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$relation->destinationContentId]); }, $reverseRelations); } @@ -165,7 +165,7 @@ public function deleteTrashItem($trashedId) $reverseRelations = $this->persistenceHandler->contentHandler()->loadReverseRelations($trashed->contentId); - $relationTags = array_map(function (Relation $relation) { + $relationTags = array_map(function (Relation $relation): string { return $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$relation->sourceContentId]); }, $reverseRelations); diff --git a/src/lib/Persistence/Cache/URLHandler.php b/src/lib/Persistence/Cache/URLHandler.php index b06b007be8..7848238cc0 100644 --- a/src/lib/Persistence/Cache/URLHandler.php +++ b/src/lib/Persistence/Cache/URLHandler.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Cache; use Ibexa\Contracts\Core\Persistence\URL\Handler as URLHandlerInterface; +use Ibexa\Contracts\Core\Persistence\URL\URL; use Ibexa\Contracts\Core\Persistence\URL\URLUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; @@ -33,7 +34,7 @@ public function updateUrl($id, URLUpdateStruct $struct) ]); if ($struct->url !== null) { - $this->cache->invalidateTags(array_map(function ($id) { + $this->cache->invalidateTags(array_map(function ($id): string { return $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$id]); }, $this->persistenceHandler->urlHandler()->findUsages($id))); } @@ -82,7 +83,7 @@ public function loadById($id) /** * {@inheritdoc} */ - public function loadByUrl($url) + public function loadByUrl($url): URL { $this->logger->logCall(__METHOD__, ['url' => $url]); diff --git a/src/lib/Persistence/Cache/UrlAliasHandler.php b/src/lib/Persistence/Cache/UrlAliasHandler.php index cc04b866fa..661c6e3589 100644 --- a/src/lib/Persistence/Cache/UrlAliasHandler.php +++ b/src/lib/Persistence/Cache/UrlAliasHandler.php @@ -176,8 +176,8 @@ function (UrlAlias $alias) { return $tags; }, - static function () { return []; }, - function () use ($locationId) { + static function (): array { return []; }, + function () use ($locationId): array { return [ $this->cacheIdentifierGenerator->generateTag(self::URL_ALIAS_LOCATION_IDENTIFIER, [$locationId]), ]; @@ -394,7 +394,7 @@ public function locationSwapped($location1Id, $location1ParentId, $location2Id, /** * {@inheritdoc} */ - public function translationRemoved(array $locationIds, $languageCode) + public function translationRemoved(array $locationIds, $languageCode): void { $this->logger->logCall( __METHOD__, @@ -415,7 +415,7 @@ public function translationRemoved(array $locationIds, $languageCode) /** * {@inheritdoc} */ - public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLocationId, array $languageCodes) + public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLocationId, array $languageCodes): void { $this->logger->logCall( __METHOD__, @@ -448,7 +448,7 @@ public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLoca * * @return array */ - private function getCacheTags(UrlAlias $urlAlias, array $tags = []) + private function getCacheTags(UrlAlias $urlAlias, array $tags = []): array { $tags[] = $this->cacheIdentifierGenerator->generateTag(self::URL_ALIAS_IDENTIFIER, [$urlAlias->id]); @@ -493,7 +493,7 @@ public function deleteCorruptedUrlAliases() * @throws \Ibexa\Core\Base\Exceptions\BadStateException * @throws \Psr\Cache\InvalidArgumentException */ - public function repairBrokenUrlAliasesForLocation(int $locationId) + public function repairBrokenUrlAliasesForLocation(int $locationId): void { $this->logger->logCall(__METHOD__, ['locationId' => $locationId]); diff --git a/src/lib/Persistence/Cache/UrlWildcardHandler.php b/src/lib/Persistence/Cache/UrlWildcardHandler.php index 6eeb976552..8c347dae4d 100644 --- a/src/lib/Persistence/Cache/UrlWildcardHandler.php +++ b/src/lib/Persistence/Cache/UrlWildcardHandler.php @@ -81,7 +81,7 @@ public function update( return $urlWildcard; } - public function remove($id) + public function remove($id): void { $this->logger->logCall(__METHOD__, ['id' => $id]); diff --git a/src/lib/Persistence/Cache/UserHandler.php b/src/lib/Persistence/Cache/UserHandler.php index 744fc53cf5..a242e0c3d7 100644 --- a/src/lib/Persistence/Cache/UserHandler.php +++ b/src/lib/Persistence/Cache/UserHandler.php @@ -68,13 +68,13 @@ class UserHandler extends AbstractInMemoryPersistenceHandler implements UserHand */ public function init(): void { - $this->getUserTags = function (User $user) { + $this->getUserTags = function (User $user): array { return [ $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$user->id]), $this->cacheIdentifierGenerator->generateTag(self::USER_IDENTIFIER, [$user->id]), ]; }; - $this->getUserKeys = function (User $user) { + $this->getUserKeys = function (User $user): array { return [ $this->cacheIdentifierGenerator->generateKey(self::USER_IDENTIFIER, [$user->id], true), $this->cacheIdentifierGenerator->generateKey( @@ -89,12 +89,12 @@ public function init(): void ), ]; }; - $this->getRoleTags = function (Role $role) { + $this->getRoleTags = function (Role $role): array { return [ $this->cacheIdentifierGenerator->generateTag(self::ROLE_IDENTIFIER, [$role->id]), ]; }; - $this->getRoleKeys = function (Role $role) { + $this->getRoleKeys = function (Role $role): array { return [ $this->cacheIdentifierGenerator->generateKey(self::ROLE_IDENTIFIER, [$role->id], true), $this->cacheIdentifierGenerator->generateKey( @@ -104,14 +104,14 @@ public function init(): void ), ]; }; - $this->getRoleAssignmentTags = function (RoleAssignment $roleAssignment) { + $this->getRoleAssignmentTags = function (RoleAssignment $roleAssignment): array { return [ $this->cacheIdentifierGenerator->generateTag(self::ROLE_ASSIGNMENT_IDENTIFIER, [$roleAssignment->id]), $this->cacheIdentifierGenerator->generateTag(self::ROLE_ASSIGNMENT_GROUP_LIST_IDENTIFIER, [$roleAssignment->contentId]), $this->cacheIdentifierGenerator->generateTag(self::ROLE_ASSIGNMENT_ROLE_LIST_IDENTIFIER, [$roleAssignment->roleId]), ]; }; - $this->getRoleAssignmentKeys = function (RoleAssignment $roleAssignment) { + $this->getRoleAssignmentKeys = function (RoleAssignment $roleAssignment): array { return [ $this->cacheIdentifierGenerator->generateKey(self::ROLE_ASSIGNMENT_IDENTIFIER, [$roleAssignment->id], true), ]; @@ -121,7 +121,7 @@ public function init(): void /** * {@inheritdoc} */ - public function create(User $user) + public function create(User $user): User { $this->logger->logCall(__METHOD__, ['struct' => $user]); @@ -259,7 +259,7 @@ function (User $user) use ($hash, $getUserKeysFn) { /** * {@inheritdoc} */ - public function update(User $user) + public function update(User $user): User { $this->logger->logCall(__METHOD__, ['struct' => $user]); @@ -355,7 +355,7 @@ public function expireUserToken($hash) /** * {@inheritdoc} */ - public function delete($userId) + public function delete($userId): void { $this->logger->logCall(__METHOD__, ['user' => $userId]); @@ -487,7 +487,7 @@ function () use ($roleId) { $this->getRoleAssignmentTags, $this->getRoleAssignmentKeys, /* Role update (policies) changes role assignment id, also need list tag in case of empty result */ - function () use ($roleId) { + function () use ($roleId): array { return [ $this->cacheIdentifierGenerator->generateTag(self::ROLE_ASSIGNMENT_ROLE_LIST_IDENTIFIER, [$roleId]), $this->cacheIdentifierGenerator->generateTag(self::ROLE_IDENTIFIER, [$roleId]), @@ -585,7 +585,7 @@ function () use ($groupId, $innerHandler) { /** * {@inheritdoc} */ - public function updateRole(RoleUpdateStruct $struct) + public function updateRole(RoleUpdateStruct $struct): void { $this->logger->logCall(__METHOD__, ['struct' => $struct]); $this->persistenceHandler->userHandler()->updateRole($struct); @@ -677,7 +677,7 @@ public function updatePolicy(Policy $policy) /** * {@inheritdoc} */ - public function deletePolicy($policyId, $roleId) + public function deletePolicy($policyId, $roleId): void { $this->logger->logCall(__METHOD__, ['policy' => $policyId]); $this->persistenceHandler->userHandler()->deletePolicy($policyId, $roleId); diff --git a/src/lib/Persistence/Cache/UserPreferenceHandler.php b/src/lib/Persistence/Cache/UserPreferenceHandler.php index d1ad67fb07..0c3e416473 100644 --- a/src/lib/Persistence/Cache/UserPreferenceHandler.php +++ b/src/lib/Persistence/Cache/UserPreferenceHandler.php @@ -76,10 +76,10 @@ function ($userId) use ($name) { return self::NOT_FOUND; } }, - static function () { + static function (): array { return []; }, - function () use ($userId, $name) { + function () use ($userId, $name): array { return [ $this->cacheIdentifierGenerator->generateKey( self::USER_PREFERENCE_WITH_SUFFIX_IDENTIFIER, diff --git a/src/lib/Persistence/FieldType.php b/src/lib/Persistence/FieldType.php index c71152ebe2..604fafadda 100644 --- a/src/lib/Persistence/FieldType.php +++ b/src/lib/Persistence/FieldType.php @@ -20,10 +20,8 @@ class FieldType implements FieldTypeInterface { /** * Holds internal FieldType object. - * - * @var \Ibexa\Contracts\Core\FieldType\FieldType */ - protected $internalFieldType; + protected SPIFieldType $internalFieldType; /** * Creates a new FieldType object. diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php index 3a85904f3b..ef9c392252 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php @@ -24,8 +24,7 @@ class DoctrineDatabase extends Gateway public const COLUMN_LOCATION_ID = 'node_id'; public const COLUMN_NAME = 'name'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php index 1abc88bbb7..70bdaf18ae 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php @@ -17,10 +17,7 @@ class ExceptionConversion extends Gateway { - /** - * @var \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway - */ - protected $innerGateway; + protected Gateway $innerGateway; /** * @param \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway $innerGateway diff --git a/src/lib/Persistence/Legacy/Bookmark/Handler.php b/src/lib/Persistence/Legacy/Bookmark/Handler.php index 577de5ea55..3e74bedf2b 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Handler.php +++ b/src/lib/Persistence/Legacy/Bookmark/Handler.php @@ -18,11 +18,9 @@ */ class Handler implements HandlerInterface { - /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway */ - private $gateway; + private Gateway $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Mapper */ - private $mapper; + private Mapper $mapper; /** * Handler constructor. diff --git a/src/lib/Persistence/Legacy/Content/FieldHandler.php b/src/lib/Persistence/Legacy/Content/FieldHandler.php index 62e68c3139..a300895a9e 100644 --- a/src/lib/Persistence/Legacy/Content/FieldHandler.php +++ b/src/lib/Persistence/Legacy/Content/FieldHandler.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\Content\Field; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; @@ -23,34 +24,26 @@ class FieldHandler { /** * Content Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected Gateway $contentGateway; /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - protected $languageHandler; + protected Handler $languageHandler; /** * Content Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $mapper; + protected Mapper $mapper; /** * Storage Handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $storageHandler; + protected StorageHandler $storageHandler; /** * FieldType registry. - * - * @var \Ibexa\Core\Persistence\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; /** * Hash of SPI FieldTypes or callable callbacks to generate one. @@ -88,7 +81,7 @@ public function __construct( * @param \Ibexa\Contracts\Core\Persistence\Content $content * @param \Ibexa\Contracts\Core\Persistence\Content\Type $contentType */ - public function createNewFields(Content $content, Type $contentType) + public function createNewFields(Content $content, Type $contentType): void { $fieldsToCopy = []; $languageCodes = []; @@ -130,7 +123,7 @@ public function createNewFields(Content $content, Type $contentType) * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - protected function getEmptyField(FieldDefinition $fieldDefinition, $languageCode) + protected function getEmptyField(FieldDefinition $fieldDefinition, $languageCode): Field { $fieldType = $this->fieldTypeRegistry->getFieldType($fieldDefinition->fieldType); @@ -302,7 +295,7 @@ protected function createExistingFieldInNewVersion(Field $field, Content $conten * * @param \Ibexa\Contracts\Core\Persistence\Content $content */ - public function loadExternalFieldData(Content $content) + public function loadExternalFieldData(Content $content): void { foreach ($content->fields as $field) { $this->storageHandler->getFieldData($content->versionInfo, $field); @@ -316,7 +309,7 @@ public function loadExternalFieldData(Content $content) * @param \Ibexa\Contracts\Core\Persistence\Content\UpdateStruct $updateStruct * @param \Ibexa\Contracts\Core\Persistence\Content\Type $contentType */ - public function updateFields(Content $content, UpdateStruct $updateStruct, Type $contentType) + public function updateFields(Content $content, UpdateStruct $updateStruct, Type $contentType): void { $updatedFields = []; $fieldsToCopy = []; @@ -427,7 +420,7 @@ protected function updateCopiedField(Field $field, Field $updateField, Field $or * * @return array> */ - protected function getFieldMap(array $fields, &$languageCodes = null) + protected function getFieldMap(array $fields, &$languageCodes = null): array { $fieldMap = []; foreach ($fields as $field) { @@ -446,7 +439,7 @@ protected function getFieldMap(array $fields, &$languageCodes = null) * @param int $contentId * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo */ - public function deleteFields($contentId, VersionInfo $versionInfo) + public function deleteFields(int $contentId, VersionInfo $versionInfo): void { foreach ($this->contentGateway->getFieldIdsByType($contentId, $versionInfo->versionNo) as $fieldType => $ids) { $this->storageHandler->deleteFieldData($fieldType, $versionInfo, $ids); @@ -461,7 +454,7 @@ public function deleteFields($contentId, VersionInfo $versionInfo) * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo[] $versions * @param string $languageCode */ - public function deleteTranslationFromContentFields($contentId, array $versions, $languageCode) + public function deleteTranslationFromContentFields(int $contentId, array $versions, ?string $languageCode): void { foreach ($versions as $versionInfo) { // FT-specific implementations require VersionInfo to delete data @@ -485,7 +478,7 @@ public function deleteTranslationFromContentFields($contentId, array $versions, * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param string $languageCode */ - public function deleteTranslationFromVersionFields(VersionInfo $versionInfo, $languageCode) + public function deleteTranslationFromVersionFields(VersionInfo $versionInfo, ?string $languageCode): void { $fieldTypeIdsMap = $this->contentGateway->getFieldIdsByType( $versionInfo->contentInfo->id, diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php index 41c1191cfa..b86497b221 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php @@ -23,7 +23,7 @@ class AuthorConverter implements Converter * @throws \DOMException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = $this->generateXmlString($value->data); $storageFieldValue->sortKeyString = $value->sortKey; @@ -35,7 +35,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $this->restoreValueFromXmlString($value->dataText); $fieldValue->sortKey = $value->sortKeyString; @@ -47,7 +47,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; @@ -62,7 +62,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ @@ -138,7 +138,7 @@ private function generateXmlString(array $authorValue): string * * @return \Ibexa\Core\FieldType\Author\Value[] */ - private function restoreValueFromXmlString($xmlString) + private function restoreValueFromXmlString($xmlString): array { $dom = new DOMDocument('1.0', 'utf-8'); $authors = []; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php index abff8b5d0b..8e55da3cd6 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php @@ -42,7 +42,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $storageDef->dataInt1 = (isset($fieldDef->fieldTypeConstraints->validators['FileSizeValidator']['maxFileSize']) ? $fieldDef->fieldTypeConstraints->validators['FileSizeValidator']['maxFileSize'] @@ -55,7 +55,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints = new FieldTypeConstraints( [ @@ -79,7 +79,7 @@ public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefin * * @return string */ - public function getIndexColumn() + public function getIndexColumn(): string { // @todo: Correct? return 'sort_key_string'; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php index 190cdcc718..d016367b3b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php @@ -21,7 +21,7 @@ class CheckboxConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = (int)$value->data; $storageFieldValue->sortKeyInt = (int)$value->data; @@ -33,7 +33,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = (bool)$value->dataInt; $fieldValue->sortKey = $value->dataInt; @@ -45,7 +45,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $storageDef->dataInt3 = (int)$fieldDef->defaultValue->data; } @@ -56,7 +56,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->defaultValue->data = !empty($storageDef->dataInt3) ? (bool)$storageDef->dataInt3 : false; } diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php index 2b7e29904e..fad035d77d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php @@ -22,7 +22,7 @@ class CountryConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = empty($value->data) ? '' : implode(',', $value->data); $storageFieldValue->sortKeyString = $value->sortKey; @@ -34,7 +34,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = empty($value->dataText) ? null : explode(',', $value->dataText); $fieldValue->sortKey = $value->sortKeyString; @@ -46,7 +46,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->fieldSettings['isMultiple'])) { $storageDef->dataInt1 = (int)$fieldDef->fieldTypeConstraints->fieldSettings['isMultiple']; @@ -63,7 +63,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php index 6c31e799b9..6b88b0ef1f 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php @@ -28,7 +28,7 @@ class DateAndTimeConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { // @todo: One should additionally store the timezone here. This could // be done in a backwards compatible way, I think… @@ -42,7 +42,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { if ($value->dataInt === null) { return; @@ -61,7 +61,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; if ($fieldSettings === null) { @@ -82,7 +82,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $useSeconds = (bool)$storageDef->dataInt2; $dateInterval = $this->getDateIntervalFromXML($storageDef->dataText5); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php index 4aa0007943..7e9a941563 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php @@ -26,7 +26,7 @@ class DateConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = ($value->data !== null ? $value->data['timestamp'] : null); $storageFieldValue->sortKeyInt = (int)$value->sortKey; @@ -38,7 +38,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { if ($value->dataInt === null || $value->dataInt == 0) { return; @@ -57,7 +57,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $storageDef->dataInt1 = $fieldDef->fieldTypeConstraints->fieldSettings['defaultType'] ?? null; } @@ -68,7 +68,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php index 6157ab9293..579588d5a0 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php @@ -23,7 +23,7 @@ class EmailAddressConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = $value->data; $storageFieldValue->sortKeyString = $value->sortKey; @@ -35,7 +35,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataText; $fieldValue->sortKey = $value->sortKeyString; @@ -47,7 +47,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $storageDef->dataText1 = $fieldDef->defaultValue->data; } @@ -58,7 +58,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $validatorConstraints = [self::VALIDATOR_IDENTIFIER => []]; $fieldDef->fieldTypeConstraints->validators = $validatorConstraints; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php index 191d3d8a06..46f65b5723 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php @@ -26,7 +26,7 @@ class FloatConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataFloat = $value->data; $storageFieldValue->sortKeyString = $value->sortKey; @@ -38,7 +38,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataFloat; $fieldValue->sortKey = $value->sortKeyString; @@ -50,7 +50,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->validators[self::FLOAT_VALIDATOR_IDENTIFIER]['minFloatValue'])) { $storageDef->dataFloat1 = $fieldDef->fieldTypeConstraints->validators[self::FLOAT_VALIDATOR_IDENTIFIER]['minFloatValue']; @@ -73,7 +73,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $validatorParameters = ['minFloatValue' => null, 'maxFloatValue' => null]; if ($storageDef->dataFloat4 & self::HAS_MIN_VALUE) { diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php index 92f3721e49..872e38be8b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php @@ -22,7 +22,7 @@ class ISBNConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = $value->data; $storageFieldValue->sortKeyString = $value->sortKey; @@ -34,7 +34,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataText; $fieldValue->sortKey = $value->sortKeyString; @@ -46,7 +46,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->fieldSettings['isISBN13'])) { $storageDef->dataInt1 = $fieldDef->fieldTypeConstraints->fieldSettings['isISBN13']; @@ -63,7 +63,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php index 9077569f3d..dcd9b73bba 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php @@ -22,7 +22,7 @@ class ImageAssetConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = !empty($value->data['destinationContentId']) ? $value->data['destinationContentId'] @@ -39,7 +39,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = [ 'destinationContentId' => $value->dataInt ?: null, diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php index c6f7d01b5f..1db23aff46 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php @@ -18,11 +18,9 @@ class ImageConverter extends BinaryFileConverter { - /** @var \Ibexa\Core\IO\IOServiceInterface */ - private $imageIoService; + private IOServiceInterface $imageIoService; - /** @var \Ibexa\Core\IO\UrlRedecoratorInterface */ - private $urlRedecorator; + private UrlRedecoratorInterface $urlRedecorator; public function __construct(IOServiceInterface $imageIoService, UrlRedecoratorInterface $urlRedecorator) { @@ -36,7 +34,7 @@ public function __construct(IOServiceInterface $imageIoService, UrlRedecoratorIn * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { if (isset($value->data)) { // Determine what needs to be stored @@ -60,7 +58,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * * @return string */ - protected function createEmptyLegacyXml($contentMetaData) + protected function createEmptyLegacyXml($contentMetaData): string { return $this->fillXml( array_merge( @@ -92,7 +90,7 @@ protected function createEmptyLegacyXml($contentMetaData) * * @return string */ - protected function createLegacyXml(array $data) + protected function createLegacyXml(array $data): string { $data['uri'] = $this->urlRedecorator->redecorateFromSource($data['uri']); $pathInfo = pathinfo($data['uri']); @@ -109,7 +107,7 @@ protected function createLegacyXml(array $data) * * @return string */ - protected function fillXml($imageData, $pathInfo, $timestamp): string + protected function fillXml($imageData, array $pathInfo, $timestamp): string { $additionalData = $this->buildAdditionalDataTag($imageData['additionalData'] ?? []); @@ -171,7 +169,7 @@ private function buildAdditionalDataTag(array $imageEditorData): string * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { if (empty($value->dataText)) { // Special case for anonymous user @@ -235,7 +233,7 @@ private function getFieldSettings(StorageFieldDefinition $storageFieldDefinition * * @return array */ - protected function parseLegacyXml($xml) + protected function parseLegacyXml($xml): ?array { $extractedData = []; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php index e7ebb82364..9f4f6d576d 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php @@ -26,7 +26,7 @@ class IntegerConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = $value->data; $storageFieldValue->sortKeyInt = (int)$value->sortKey; @@ -38,7 +38,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataInt; $fieldValue->sortKey = $value->sortKeyInt; @@ -50,7 +50,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->validators[self::FLOAT_VALIDATOR_IDENTIFIER]['minIntegerValue'])) { $storageDef->dataInt1 = $fieldDef->fieldTypeConstraints->validators[self::FLOAT_VALIDATOR_IDENTIFIER]['minIntegerValue']; @@ -79,7 +79,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $validatorParameters = ['minIntegerValue' => null, 'maxIntegerValue' => null]; if ($storageDef->dataInt4 & self::HAS_MIN_VALUE) { diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php index 9d358a58be..ac834043b0 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php @@ -21,7 +21,7 @@ class KeywordConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->sortKeyString = $value->sortKey; } @@ -32,7 +32,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = []; $fieldValue->sortKey = $value->sortKeyString; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php index fa6fa7e9bd..62da184199 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php @@ -21,7 +21,7 @@ class MapLocationConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = isset($value->externalData['address']) ? 1 : 0; $storageFieldValue->dataText = ''; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php index eba013d5b4..eea5fdc87a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php @@ -20,7 +20,7 @@ class MediaConverter extends BinaryFileConverter * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { parent::toStorageFieldDefinition($fieldDef, $storageDef); @@ -35,7 +35,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { parent::toFieldDefinition($storageDef, $fieldDef); $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php index 20117f043c..6ef63daa2a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php @@ -24,7 +24,7 @@ class NullConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { // There is no contained data. All data is external. So we just do // nothing here. @@ -36,7 +36,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { // There is no contained data. All data is external. So we just do // nothing here. @@ -48,7 +48,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { // There is no contained data. All data is external. So we just do // nothing here. @@ -60,7 +60,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { // There is no contained data. All data is external. So we just do // nothing here. diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php index e33a3fbeaa..67310f1de8 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php @@ -22,7 +22,7 @@ class RelationConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = !empty($value->data['destinationContentId']) ? $value->data['destinationContentId'] @@ -36,7 +36,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = [ 'destinationContentId' => $value->dataInt ?: null, @@ -50,7 +50,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; $doc = new DOMDocument('1.0', 'utf-8'); @@ -118,7 +118,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { // default settings // use dataInt1 and dataInt2 fields as default for backward compatibility diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index 9a3dc4a568..c2a11c67de 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -23,8 +23,7 @@ class RelationListConverter implements Converter { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection) { @@ -34,7 +33,7 @@ public function __construct(Connection $connection) /** * Converts data from $value to $storageFieldValue. */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $doc = new DOMDocument('1.0', 'utf-8'); $root = $doc->createElement('related-objects'); @@ -76,7 +75,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel /** * Converts data from $value to $fieldValue. */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = ['destinationContentIds' => []]; if ($value->dataText === null) { @@ -103,7 +102,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) /** * Converts field definition data in $fieldDef into $storageFieldDef. */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; $validators = $fieldDef->fieldTypeConstraints->validators; @@ -186,7 +185,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * * */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { // default settings $fieldDef->fieldTypeConstraints->fieldSettings = [ @@ -276,7 +275,7 @@ public function getIndexColumn(): string * * @return array */ - protected function getRelationXmlHashFromDB(array $destinationContentIds) + protected function getRelationXmlHashFromDB(array $destinationContentIds): array { if (empty($destinationContentIds)) { return []; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php index 202519d46a..efacb45f0e 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php @@ -23,7 +23,7 @@ class SelectionConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->sortKeyString = $storageFieldValue->dataText = $value->sortKey; } @@ -34,7 +34,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { if ($value->dataText !== '') { $fieldValue->data = array_map( @@ -53,7 +53,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; @@ -87,7 +87,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $options = []; $multiLingualOptions = [$fieldDef->mainLanguageCode => []]; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php index 47770ed868..bb9ba1e720 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php @@ -18,8 +18,7 @@ final class SerializableConverter implements ConverterInterface { - /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface */ - private $serializer; + private ValueSerializerInterface $serializer; public function __construct(ValueSerializerInterface $serializer) { diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php index fe4dba6bc9..2fd04b135a 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php @@ -22,7 +22,7 @@ class TextBlockConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = $value->data; $storageFieldValue->sortKeyString = $value->sortKey; @@ -34,7 +34,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataText; $fieldValue->sortKey = $value->sortKeyString; @@ -46,7 +46,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->fieldSettings['textRows'])) { $storageDef->dataInt1 = $fieldDef->fieldTypeConstraints->fieldSettings['textRows']; @@ -59,7 +59,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php index a9a5a648dc..cfb5f5aaba 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php @@ -23,7 +23,7 @@ class TextLineConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = $value->data; $storageFieldValue->sortKeyString = $value->sortKey; @@ -35,7 +35,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = $value->dataText; $fieldValue->sortKey = $value->sortKeyString; @@ -47,7 +47,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { if (isset($fieldDef->fieldTypeConstraints->validators[self::STRING_LENGTH_VALIDATOR_IDENTIFIER]['maxStringLength'])) { $storageDef->dataInt1 = $fieldDef->fieldTypeConstraints->validators[self::STRING_LENGTH_VALIDATOR_IDENTIFIER]['maxStringLength']; @@ -70,7 +70,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $validatorConstraints = []; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php index 3a7923e1de..4a3537d83b 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php @@ -27,7 +27,7 @@ class TimeConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataInt = $value->data; $storageFieldValue->sortKeyInt = (int)$value->sortKey; @@ -39,7 +39,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { if ($value->dataInt === null) { return; @@ -55,7 +55,7 @@ public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef */ - public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef) + public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageFieldDefinition $storageDef): void { $fieldSettings = $fieldDef->fieldTypeConstraints->fieldSettings; @@ -71,7 +71,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { $fieldDef->fieldTypeConstraints->fieldSettings = new FieldSettings( [ diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php index c2129ce808..1bbe63aa84 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php @@ -21,7 +21,7 @@ class UrlConverter implements Converter * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $value * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $storageFieldValue */ - public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue) + public function toStorageValue(FieldValue $value, StorageFieldValue $storageFieldValue): void { $storageFieldValue->dataText = isset($value->data['text']) ? $value->data['text'] @@ -37,7 +37,7 @@ public function toStorageValue(FieldValue $value, StorageFieldValue $storageFiel * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue $value * @param \Ibexa\Contracts\Core\Persistence\Content\FieldValue $fieldValue */ - public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue) + public function toFieldValue(StorageFieldValue $value, FieldValue $fieldValue): void { $fieldValue->data = [ 'urlId' => $value->dataInt, @@ -62,7 +62,7 @@ public function toStorageFieldDefinition(FieldDefinition $fieldDef, StorageField * @param \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition $storageDef * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDef */ - public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef) + public function toFieldDefinition(StorageFieldDefinition $storageDef, FieldDefinition $fieldDef): void { // @todo: Is it possible to store a default value in the DB? $fieldDef->defaultValue = new FieldValue(); diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php index 4fee74e9ce..0b827ff8e3 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php @@ -13,10 +13,8 @@ class ConverterRegistry { /** * Map of converters. - * - * @var array */ - protected $converterMap = []; + protected array $converterMap; /** * Create converter registry with converter map. @@ -43,7 +41,7 @@ public function __construct(array $converterMap = []) * @param string $typeName * @param mixed $converter Callable or converter instance */ - public function register($typeName, $converter) + public function register($typeName, $converter): void { $this->converterMap[$typeName] = $converter; } diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 6bc9c87f5e..8826c82319 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Field; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\MetadataUpdateStruct; use Ibexa\Contracts\Core\Persistence\Content\Relation\CreateStruct as RelationCreateStruct; @@ -30,6 +31,7 @@ use Ibexa\Core\Base\Exceptions\NotFoundException as NotFound; use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder; +use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator as LanguageMaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway as SharedGateway; @@ -54,34 +56,27 @@ final class DoctrineDatabase extends Gateway * The native Doctrine connection. * * Meant to be used to transition from eZ/Zeta interface to Doctrine. - * - * @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Query builder. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase\QueryBuilder */ - protected $queryBuilder; + protected QueryBuilder $queryBuilder; /** * Caching language handler. * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler */ - protected $languageHandler; + protected Handler $languageHandler; /** * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - protected $languageMaskGenerator; + protected MaskGenerator $languageMaskGenerator; - /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway */ - private $sharedGateway; + private SharedGateway $sharedGateway; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $databasePlatform; @@ -1973,7 +1968,7 @@ private function deleteTranslationFromContentNames( int $contentId, string $languageCode, ?int $versionNo = null - ) { + ): void { $query = $this->connection->createQueryBuilder(); $query ->delete('ezcontentobject_name') @@ -2005,7 +2000,7 @@ private function deleteTranslationFromContentNames( * * @throws \Ibexa\Core\Base\Exceptions\BadStateException */ - private function deleteTranslationFromContentObject($contentId, $languageId) + private function deleteTranslationFromContentObject(int $contentId, $languageId): void { $query = $this->connection->createQueryBuilder(); $query->update('ezcontentobject') @@ -2047,7 +2042,7 @@ private function deleteTranslationFromContentVersions( int $contentId, int $languageId, ?int $versionNo = null - ) { + ): void { $query = $this->connection->createQueryBuilder(); $query->update('ezcontentobject_version') // parameter for bitwise operation has to be placed verbatim (w/o binding) for this to work cross-DBMS diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php index 5117e015af..96d085be6b 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php @@ -17,8 +17,7 @@ */ final class QueryBuilder { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php index 45ed21744c..5523674b41 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php @@ -27,10 +27,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $innerGateway; + protected Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/Handler.php b/src/lib/Persistence/Legacy/Content/Handler.php index 37538b8f9f..58407c82e0 100644 --- a/src/lib/Persistence/Legacy/Content/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Handler.php @@ -32,64 +32,47 @@ class Handler implements BaseContentHandler { /** * Content gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected Gateway $contentGateway; /** * Location gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected LocationGateway $locationGateway; /** * Mapper. - * - * @var Mapper */ - protected $mapper; + protected Mapper $mapper; /** * FieldHandler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected $fieldHandler; + protected FieldHandler $fieldHandler; /** * URL slug converter. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter */ - protected $slugConverter; + protected SlugConverter $slugConverter; /** * UrlAlias gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ - protected $urlAliasGateway; + protected UrlAliasGateway $urlAliasGateway; /** * ContentType handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected ContentTypeHandler $contentTypeHandler; /** * Tree handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler */ - protected $treeHandler; + protected TreeHandler $treeHandler; protected LanguageHandler $languageHandler; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; /** * Creates a new content handler. @@ -158,7 +141,7 @@ public function create(CreateStruct $struct) * * @return \Ibexa\Contracts\Core\Persistence\Content Content value object */ - protected function internalCreate(CreateStruct $struct, $versionNo = 1) + protected function internalCreate(CreateStruct $struct, $versionNo = 1): Content { $content = new Content(); @@ -438,7 +421,10 @@ public function loadContentInfo($contentId) return $this->treeHandler->loadContentInfo($contentId); } - public function loadContentInfoList(array $contentIds) + /** + * @return mixed[] + */ + public function loadContentInfoList(array $contentIds): array { $list = $this->mapper->extractContentInfoFromRows( $this->contentGateway->loadContentInfoList($contentIds) @@ -513,7 +499,7 @@ public function countDraftsForUser(int $userId): int * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo[] */ - public function loadDraftsForUser($userId) + public function loadDraftsForUser($userId): array { $rows = $this->contentGateway->listVersionsForUser($userId, VersionInfo::STATUS_DRAFT); if (empty($rows)) { @@ -521,7 +507,7 @@ public function loadDraftsForUser($userId) } $idVersionPairs = array_map( - static function ($row) { + static function (array $row): array { return [ 'id' => $row['ezcontentobject_version_contentobject_id'], 'version' => $row['ezcontentobject_version_version'], @@ -567,7 +553,7 @@ static function (array $row): array { * * @return bool */ - public function setStatus($contentId, $status, $version) + public function setStatus($contentId, $status, $version): bool { return $this->contentGateway->setStatus($contentId, $version, $status); } @@ -597,7 +583,7 @@ public function updateMetadata($contentId, MetadataUpdateStruct $content) * @param int $contentId * @param \Ibexa\Contracts\Core\Persistence\Content\MetadataUpdateStruct $content */ - protected function updatePathIdentificationString($contentId, MetadataUpdateStruct $content) + protected function updatePathIdentificationString(int $contentId, MetadataUpdateStruct $content) { if (isset($content->mainLanguageId)) { $contentLocationsRows = $this->locationGateway->loadLocationDataByContent($contentId); @@ -661,7 +647,7 @@ public function updateContent($contentId, $versionNo, UpdateStruct $updateStruct * * @return bool */ - public function deleteContent($contentId) + public function deleteContent($contentId): void { $contentLocations = $this->contentGateway->getAllLocationIds($contentId); if (empty($contentLocations)) { @@ -679,7 +665,7 @@ public function deleteContent($contentId) * * @param int $contentId */ - public function removeRawContent($contentId) + public function removeRawContent($contentId): void { $this->treeHandler->removeRawContent($contentId); } @@ -694,7 +680,7 @@ public function removeRawContent($contentId) * * @return bool */ - public function deleteVersion($contentId, $versionNo) + public function deleteVersion($contentId, $versionNo): void { $versionInfo = $this->loadVersionInfo($contentId, $versionNo); @@ -718,7 +704,7 @@ public function deleteVersion($contentId, $versionNo) * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo[] */ - public function listVersions($contentId, $status = null, $limit = -1) + public function listVersions($contentId, $status = null, $limit = -1): array { return $this->treeHandler->listVersions($contentId, $status, $limit); } @@ -902,7 +888,7 @@ public function loadReverseRelationList( /** * {@inheritdoc} */ - public function deleteTranslationFromContent($contentId, $languageCode) + public function deleteTranslationFromContent($contentId, $languageCode): void { $this->fieldHandler->deleteTranslationFromContentFields( $contentId, diff --git a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php index 86bc1c47d6..7401a2c36f 100644 --- a/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php +++ b/src/lib/Persistence/Legacy/Content/Language/CachingHandler.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as BaseLanguageHandler; use Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface; use Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache; @@ -27,17 +28,14 @@ class CachingHandler implements BaseLanguageHandler * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - protected $innerHandler; + protected Handler $innerHandler; /** * Language cache. - * - * @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache */ - protected $cache; + protected InMemoryCache $cache; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - protected $cacheIdentifierGenerator; + protected CacheIdentifierGeneratorInterface $cacheIdentifierGenerator; /** * Creates a caching handler around $innerHandler. @@ -76,7 +74,7 @@ public function create(CreateStruct $struct) * * @param \Ibexa\Contracts\Core\Persistence\Content\Language $language */ - public function update(Language $language) + public function update(Language $language): void { $this->innerHandler->update($language); $this->storeCache([$language]); @@ -213,7 +211,7 @@ public function loadAll() * * @param mixed $id */ - public function delete($id) + public function delete($id): void { $this->innerHandler->delete($id); // Delete by primary key will remove the object, so we don't need to clear `ez-language-code-` here. @@ -243,7 +241,7 @@ protected function storeCache(array $languages, string $listIndex = null): void $this->cache->setMulti( $languages, - static function (Language $language) use ($generator) { + static function (Language $language) use ($generator): array { return [ $generator->generateKey(self::LANGUAGE_IDENTIFIER, [$language->id], true), $generator->generateKey(self::LANGUAGE_CODE_IDENTIFIER, [$language->languageCode], true), diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php index ed0409c56c..1ce10b6745 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php @@ -26,10 +26,8 @@ final class DoctrineDatabase extends Gateway { /** * The native Doctrine connection. - * - * @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php index 4c44de5a76..0d80223091 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php @@ -19,10 +19,7 @@ */ final class ExceptionConversion extends Gateway { - /** - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Gateway - */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/Language/Handler.php b/src/lib/Persistence/Legacy/Content/Language/Handler.php index 13a37c7b16..b8e9843a8d 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Language/Handler.php @@ -20,17 +20,13 @@ class Handler implements BaseLanguageHandler { /** * Language Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Gateway */ - protected $languageGateway; + protected Gateway $languageGateway; /** * Language Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Mapper */ - protected $languageMapper; + protected Mapper $languageMapper; /** * Creates a new Language Handler. @@ -66,7 +62,7 @@ public function create(CreateStruct $struct) * * @param \Ibexa\Contracts\Core\Persistence\Content\Language $language */ - public function update(Language $language) + public function update(Language $language): void { $this->languageGateway->updateLanguage($language); } @@ -141,7 +137,7 @@ public function loadListByLanguageCodes(array $languageCodes): iterable * * @return \Ibexa\Contracts\Core\Persistence\Content\Language[] */ - public function loadAll() + public function loadAll(): array { return $this->languageMapper->extractLanguagesFromRows( $this->languageGateway->loadAllLanguagesData() @@ -155,7 +151,7 @@ public function loadAll() * * @throws \LogicException If language could not be deleted */ - public function delete($id) + public function delete($id): void { if (!$this->languageGateway->canDeleteLanguage($id)) { throw new LogicException('Cannot delete language: some content still references the language'); diff --git a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php index d5065670c2..3e977391e5 100644 --- a/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php +++ b/src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Language; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Core\Base\Exceptions\NotFoundException; @@ -20,7 +21,7 @@ class MaskGenerator * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - protected $languageHandler; + protected Handler $languageHandler; /** * Creates a new Language MaskGenerator. diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 67b84f7c06..3bd07be2d4 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -36,20 +36,16 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; - /** @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter */ - private $trashCriteriaConverter; + private CriteriaConverter $trashCriteriaConverter; - /** @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter */ - private $trashSortClauseConverter; + private SortClauseConverter $trashSortClauseConverter; /** * @throws \Doctrine\DBAL\DBALException diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 22841f85a9..3990fa5c56 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -23,10 +23,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index f4a9cd44d9..197c95a40a 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -28,38 +28,28 @@ class Handler implements BaseLocationHandler { /** * Gateway for handling location data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected LocationGateway $locationGateway; /** * Location locationMapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected LocationMapper $locationMapper; /** * Content handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Handler */ - protected $contentHandler; + protected ContentHandler $contentHandler; /** * Object state handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Handler */ - protected $objectStateHandler; + protected ObjectStateHandler $objectStateHandler; /** * Tree handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler */ - protected $treeHandler; + protected TreeHandler $treeHandler; public function __construct( LocationGateway $locationGateway, @@ -120,7 +110,7 @@ public function loadList(array $locationIds, array $translations = null, bool $u * * @return array Location ids are in the index, Content ids in the value. */ - public function loadSubtreeIds($locationId) + public function loadSubtreeIds($locationId): array { return $this->locationGateway->getSubtreeContent($locationId, true); } @@ -144,7 +134,7 @@ public function loadByRemoteId($remoteId, array $translations = null, bool $useA * * @return \Ibexa\Contracts\Core\Persistence\Content\Location[] */ - public function loadLocationsByContent($contentId, $rootLocationId = null) + public function loadLocationsByContent($contentId, $rootLocationId = null): array { $rows = $this->locationGateway->loadLocationDataByContent($contentId, $rootLocationId); @@ -161,7 +151,7 @@ public function loadLocationsByTrashContent(int $contentId, ?int $rootLocationId return $this->locationMapper->createLocationsFromRows($rows, '', new Trashed()); } - public function loadParentLocationsForDraftContent($contentId) + public function loadParentLocationsForDraftContent($contentId): array { $rows = $this->locationGateway->loadParentLocationsDataForDraftContent($contentId); @@ -173,7 +163,7 @@ public function loadParentLocationsForDraftContent($contentId) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState[] */ - protected function getDefaultContentStates() + protected function getDefaultContentStates(): array { $defaultObjectStatesMap = []; @@ -358,7 +348,7 @@ private function getSectionId($locationId) * @param \Ibexa\Contracts\Core\Persistence\Content\Location $location * @param int $sectionId */ - private function updateSubtreeSectionIfNecessary(Location $location, $sectionId) + private function updateSubtreeSectionIfNecessary(Location $location, $sectionId): void { if ($this->isMainLocation($location)) { $this->setSectionForSubtree($location->id, $sectionId); @@ -391,7 +381,7 @@ private function isMainLocation(Location $location): bool * * @return bool */ - public function move($sourceId, $destinationParentId) + public function move($sourceId, $destinationParentId): void { $sourceNodeData = $this->locationGateway->getBasicNodeData($sourceId); $destinationNodeData = $this->locationGateway->getBasicNodeData($destinationParentId); @@ -405,7 +395,7 @@ public function move($sourceId, $destinationParentId) $sourceNodeData['contentobject_id'], $sourceNodeData['parent_node_id'], $destinationParentId, - Gateway::NODE_ASSIGNMENT_OP_CODE_MOVE + LocationGateway::NODE_ASSIGNMENT_OP_CODE_MOVE ); $sourceLocation = $this->load($sourceId); @@ -423,7 +413,7 @@ public function move($sourceId, $destinationParentId) * * @param mixed $id Location ID */ - public function hide($id) + public function hide($id): void { $sourceNodeData = $this->locationGateway->getBasicNodeData($id); @@ -436,7 +426,7 @@ public function hide($id) * * @param mixed $id */ - public function unHide($id) + public function unHide($id): void { $sourceNodeData = $this->locationGateway->getBasicNodeData($id); @@ -478,7 +468,7 @@ public function setVisible(int $id): void * * @return bool */ - public function swap($locationId1, $locationId2) + public function swap($locationId1, $locationId2): void { $this->locationGateway->swap($locationId1, $locationId2); } @@ -489,7 +479,7 @@ public function swap($locationId1, $locationId2) * @param \Ibexa\Contracts\Core\Persistence\Content\Location\UpdateStruct $location * @param int $locationId */ - public function update(UpdateStruct $location, $locationId) + public function update(UpdateStruct $location, $locationId): void { $this->locationGateway->update($location, $locationId); } @@ -520,7 +510,7 @@ public function create(CreateStruct $createStruct) * * @return bool */ - public function removeSubtree($locationId) + public function removeSubtree($locationId): void { $this->treeHandler->removeSubtree($locationId); } @@ -536,7 +526,7 @@ public function deleteChildrenDrafts(int $locationId): void * @param mixed $locationId * @param mixed $sectionId */ - public function setSectionForSubtree($locationId, $sectionId) + public function setSectionForSubtree($locationId, $sectionId): void { $this->treeHandler->setSectionForSubtree($locationId, $sectionId); } @@ -549,7 +539,7 @@ public function setSectionForSubtree($locationId, $sectionId) * @param mixed $contentId * @param mixed $locationId */ - public function changeMainLocation($contentId, $locationId) + public function changeMainLocation($contentId, $locationId): void { $this->treeHandler->changeMainLocation($contentId, $locationId); } @@ -559,7 +549,7 @@ public function changeMainLocation($contentId, $locationId) * * @return int */ - public function countAllLocations() + public function countAllLocations(): int { return $this->locationGateway->countAllLocations(); } @@ -572,7 +562,7 @@ public function countAllLocations() * * @return \Ibexa\Contracts\Core\Persistence\Content\Location[] */ - public function loadAllLocations($offset, $limit) + public function loadAllLocations($offset, $limit): array { $rows = $this->locationGateway->loadAllLocationsData($offset, $limit); diff --git a/src/lib/Persistence/Legacy/Content/Location/Mapper.php b/src/lib/Persistence/Legacy/Content/Location/Mapper.php index 72730eba74..b138e633ad 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Location/Mapper.php @@ -28,7 +28,7 @@ class Mapper * * @return \Ibexa\Contracts\Core\Persistence\Content\Location */ - public function createLocationFromRow(array $data, $prefix = '', ?Location $location = null) + public function createLocationFromRow(array $data, string $prefix = '', ?Location $location = null) { $location = $location ?: new Location(); @@ -60,7 +60,7 @@ public function createLocationFromRow(array $data, $prefix = '', ?Location $loca * * @return \Ibexa\Contracts\Core\Persistence\Content\Location[] */ - public function createLocationsFromRows(array $rows, $prefix = '', ?Location $location = null): array + public function createLocationsFromRows(array $rows, string $prefix = '', ?Location $location = null): array { $locations = []; @@ -81,7 +81,7 @@ public function createLocationsFromRows(array $rows, $prefix = '', ?Location $lo * * @return \Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct */ - public function getLocationCreateStruct(array $data) + public function getLocationCreateStruct(array $data): CreateStruct { $struct = new CreateStruct(); diff --git a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php index 1fd15e816c..c86c6825b6 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php @@ -14,8 +14,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResult; use Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResultList; use Ibexa\Core\Persistence\Legacy\Content\Handler as ContentHandler; +use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway; use Ibexa\Core\Persistence\Legacy\Content\Location\Handler as LocationHandler; +use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper as LocationMapper; /** @@ -27,31 +29,23 @@ class Handler implements BaseTrashHandler /** * Location handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Handler */ - protected $locationHandler; + protected LocationHandler $locationHandler; /** * Gateway for handling location data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected Gateway $locationGateway; /** * Mapper for handling location data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected Mapper $locationMapper; /** * Content handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Handler */ - protected $contentHandler; + protected ContentHandler $contentHandler; public function __construct( LocationHandler $locationHandler, @@ -161,7 +155,7 @@ public function recover($trashedId, $newParentId) /** * {@inheritdoc}. */ - public function findTrashItems(CriterionInterface $criterion = null, $offset = 0, $limit = null, array $sort = null) + public function findTrashItems(CriterionInterface $criterion = null, $offset = 0, $limit = null, array $sort = null): TrashResult { $totalCount = $this->locationGateway->countTrashed($criterion); if ($totalCount === 0) { @@ -184,7 +178,7 @@ public function findTrashItems(CriterionInterface $criterion = null, $offset = 0 /** * {@inheritdoc} */ - public function emptyTrash() + public function emptyTrash(): TrashItemDeleteResultList { $resultList = new TrashItemDeleteResultList(); do { @@ -220,7 +214,7 @@ public function deleteTrashItem($trashedId) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Trash\TrashItemDeleteResult */ - protected function delete(Trashed $trashItem) + protected function delete(Trashed $trashItem): TrashItemDeleteResult { $result = new TrashItemDeleteResult(); $result->trashItemId = $trashItem->id; diff --git a/src/lib/Persistence/Legacy/Content/Mapper.php b/src/lib/Persistence/Legacy/Content/Mapper.php index 0eae8b2784..b9352ae89a 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Mapper.php @@ -86,7 +86,7 @@ public function __construct( * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - private function createContentInfoFromCreateStruct(CreateStruct $struct, $currentVersionNo = 1) + private function createContentInfoFromCreateStruct(CreateStruct $struct, $currentVersionNo = 1): ContentInfo { $contentInfo = new ContentInfo(); @@ -120,7 +120,7 @@ private function createContentInfoFromCreateStruct(CreateStruct $struct, $curren * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo */ - public function createVersionInfoFromCreateStruct(CreateStruct $struct, $versionNo) + public function createVersionInfoFromCreateStruct(CreateStruct $struct, $versionNo): VersionInfo { $versionInfo = new VersionInfo(); @@ -155,7 +155,7 @@ public function createVersionInfoFromCreateStruct(CreateStruct $struct, $version * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo */ - public function createVersionInfoForContent(Content $content, $versionNo, $userId, ?string $languageCode = null) + public function createVersionInfoForContent(Content $content, $versionNo, $userId, ?string $languageCode = null): VersionInfo { $versionInfo = new VersionInfo(); @@ -179,7 +179,7 @@ public function createVersionInfoForContent(Content $content, $versionNo, $userI * * @return \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue */ - public function convertToStorageValue(Field $field) + public function convertToStorageValue(Field $field): StorageFieldValue { $converter = $this->converterRegistry->getConverter( $field->type @@ -379,7 +379,7 @@ private function loadCachedVersionFieldDefinitionsPerLanguage( * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - public function extractContentInfoFromRow(array $row, $prefix = '', $treePrefix = 'ezcontentobject_tree_') + public function extractContentInfoFromRow(array $row, $prefix = '', $treePrefix = 'ezcontentobject_tree_'): ContentInfo { $contentInfo = new ContentInfo(); $contentInfo->id = (int)$row["{$prefix}id"]; @@ -409,7 +409,7 @@ public function extractContentInfoFromRow(array $row, $prefix = '', $treePrefix * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo[] */ - public function extractContentInfoFromRows(array $rows, $prefix = '', $treePrefix = 'ezcontentobject_tree_') + public function extractContentInfoFromRows(array $rows, $prefix = '', $treePrefix = 'ezcontentobject_tree_'): array { $contentInfoObjects = []; foreach ($rows as $row) { @@ -430,7 +430,7 @@ public function extractContentInfoFromRows(array $rows, $prefix = '', $treePrefi * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo */ - private function extractVersionInfoFromRow(array $row, array $names = []) + private function extractVersionInfoFromRow(array $row, array $names = []): VersionInfo { $versionInfo = new VersionInfo(); $versionInfo->id = (int)$row['ezcontentobject_version_id']; @@ -528,7 +528,7 @@ public function extractVersionInfoListFromRows(array $rows, array $nameRows): ar * * @return string[] */ - private function extractLanguageCodesFromMask(int $languageMask, array $allLanguages, &$missing = []) + private function extractLanguageCodesFromMask(int $languageMask, array $allLanguages, &$missing = []): array { $exp = 2; $result = []; @@ -553,7 +553,7 @@ private function extractLanguageCodesFromMask(int $languageMask, array $allLangu /** * @return \Ibexa\Contracts\Core\Persistence\Content\Language[] */ - private function loadAllLanguagesWithIdKey() + private function loadAllLanguagesWithIdKey(): array { $languagesById = []; foreach ($this->languageHandler->loadAll() as $language) { @@ -570,7 +570,7 @@ private function loadAllLanguagesWithIdKey() * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - protected function extractFieldFromRow(array $row) + protected function extractFieldFromRow(array $row): Field { $field = new Field(); @@ -597,7 +597,7 @@ protected function extractFieldFromRow(array $row) * @throws \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound * if the necessary converter for $type could not be found. */ - protected function extractFieldValueFromRow(array $row, $type) + protected function extractFieldValueFromRow(array $row, $type): FieldValue { $storageValue = new StorageFieldValue(); @@ -629,7 +629,7 @@ protected function extractFieldValueFromRow(array $row, $type) * * @return \Ibexa\Contracts\Core\Persistence\Content\CreateStruct */ - public function createCreateStructFromContent(Content $content) + public function createCreateStructFromContent(Content $content): CreateStruct { $struct = new CreateStruct(); $struct->name = $content->versionInfo->names; @@ -655,8 +655,10 @@ public function createCreateStructFromContent(Content $content) /** * Extracts relation objects from $rows. + * + * @return mixed[] */ - public function extractRelationsFromRows(array $rows) + public function extractRelationsFromRows(array $rows): array { $relations = []; @@ -677,7 +679,7 @@ public function extractRelationsFromRows(array $rows) * * @return \Ibexa\Contracts\Core\Persistence\Content\Relation */ - public function extractRelationFromRow(array $row) + public function extractRelationFromRow(array $row): Relation { $relation = new Relation(); $relation->id = (int)$row['ezcontentobject_link_id']; @@ -701,7 +703,7 @@ public function extractRelationFromRow(array $row) * * @return \Ibexa\Contracts\Core\Persistence\Content\Relation */ - public function createRelationFromCreateStruct(RelationCreateStruct $struct) + public function createRelationFromCreateStruct(RelationCreateStruct $struct): Relation { $relation = new Relation(); diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php index 4afaab2d80..480b64fbca 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php @@ -28,13 +28,10 @@ final class DoctrineDatabase extends Gateway { /** * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $maskGenerator; + private MaskGenerator $maskGenerator; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php index b018f7bbca..866516d442 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php @@ -22,10 +22,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php index e1db7acd40..4a8bd73d19 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Handler.php @@ -18,17 +18,13 @@ class Handler implements BaseObjectStateHandler { /** * ObjectState Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway */ - protected $objectStateGateway; + protected Gateway $objectStateGateway; /** * ObjectState Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Mapper */ - protected $objectStateMapper; + protected Mapper $objectStateMapper; /** * Creates a new ObjectState Handler. @@ -149,7 +145,7 @@ public function updateGroup($groupId, InputStruct $input) * * @param mixed $groupId */ - public function deleteGroup($groupId) + public function deleteGroup($groupId): void { $objectStates = $this->loadObjectStates($groupId); foreach ($objectStates as $objectState) { @@ -244,7 +240,7 @@ public function update($stateId, InputStruct $input) * @param mixed $stateId * @param int $priority */ - public function setPriority($stateId, $priority) + public function setPriority($stateId, $priority): void { $objectState = $this->load($stateId); $groupObjectStates = $this->loadObjectStates($objectState->groupId); @@ -274,7 +270,7 @@ public function setPriority($stateId, $priority) * * @param mixed $stateId */ - public function delete($stateId) + public function delete($stateId): void { // Get the object state first as we need group ID // to reorder the priorities and reassign content to another state in the group @@ -346,7 +342,7 @@ public function getContentState($contentId, $stateGroupId) * * @return int */ - public function getContentCount($stateId) + public function getContentCount($stateId): int { return $this->objectStateGateway->getContentCount($stateId); } diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php index 2da692301b..7fdad58868 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\ObjectState; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group; @@ -22,7 +23,7 @@ class Mapper * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - protected $languageHandler; + protected Handler $languageHandler; /** * Creates a new mapper. @@ -41,7 +42,7 @@ public function __construct(LanguageHandler $languageHandler) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState */ - public function createObjectStateFromData(array $data) + public function createObjectStateFromData(array $data): ObjectState { $objectState = new ObjectState(); @@ -78,7 +79,7 @@ public function createObjectStateFromData(array $data) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState[] */ - public function createObjectStateListFromData(array $data) + public function createObjectStateListFromData(array $data): array { $objectStates = []; @@ -96,7 +97,7 @@ public function createObjectStateListFromData(array $data) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group */ - public function createObjectStateGroupFromData(array $data) + public function createObjectStateGroupFromData(array $data): Group { $objectStateGroup = new Group(); @@ -133,7 +134,7 @@ public function createObjectStateGroupFromData(array $data) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group[] */ - public function createObjectStateGroupListFromData(array $data) + public function createObjectStateGroupListFromData(array $data): array { $objectStateGroups = []; @@ -151,7 +152,7 @@ public function createObjectStateGroupListFromData(array $data) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group */ - public function createObjectStateGroupFromInputStruct(InputStruct $input) + public function createObjectStateGroupFromInputStruct(InputStruct $input): Group { $objectStateGroup = new Group(); @@ -175,7 +176,7 @@ public function createObjectStateGroupFromInputStruct(InputStruct $input) * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState */ - public function createObjectStateFromInputStruct(InputStruct $input) + public function createObjectStateFromInputStruct(InputStruct $input): ObjectState { $objectState = new ObjectState(); diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php index b6f74d3771..b9363e13fc 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php @@ -20,8 +20,7 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php index e4a216b131..af0fb23632 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php @@ -20,10 +20,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/Section/Handler.php b/src/lib/Persistence/Legacy/Content/Section/Handler.php index aab48c4148..7da342f2e5 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Section/Handler.php @@ -19,10 +19,8 @@ class Handler implements BaseSectionHandler { /** * Section Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway */ - protected $sectionGateway; + protected Gateway $sectionGateway; /** * Creates a new Section Handler. @@ -42,7 +40,7 @@ public function __construct(Gateway $sectionGateway) * * @return \Ibexa\Contracts\Core\Persistence\Content\Section */ - public function create($name, $identifier) + public function create($name, $identifier): Section { $section = new Section(); @@ -63,7 +61,7 @@ public function create($name, $identifier) * * @return \Ibexa\Contracts\Core\Persistence\Content\Section */ - public function update($id, $name, $identifier) + public function update($id, $name, $identifier): Section { $this->sectionGateway->updateSection($id, $name, $identifier); @@ -134,7 +132,7 @@ public function loadByIdentifier($identifier) * * @return \Ibexa\Contracts\Core\Persistence\Content\Section */ - protected function createSectionFromArray(array $data) + protected function createSectionFromArray(array $data): Section { $section = new Section(); @@ -152,7 +150,7 @@ protected function createSectionFromArray(array $data) * * @return \Ibexa\Contracts\Core\Persistence\Content\Section[] */ - protected function createSectionsFromArray(array $data) + protected function createSectionsFromArray(array $data): array { $sections = []; foreach ($data as $sectionData) { @@ -171,7 +169,7 @@ protected function createSectionsFromArray(array $data) * * @param mixed $id */ - public function delete($id) + public function delete($id): void { $contentCount = $this->sectionGateway->countContentObjectsInSection($id); @@ -189,7 +187,7 @@ public function delete($id) * @param mixed $sectionId * @param mixed $contentId */ - public function assign($sectionId, $contentId) + public function assign($sectionId, $contentId): void { $this->sectionGateway->assignSectionToContent($sectionId, $contentId); } @@ -201,7 +199,7 @@ public function assign($sectionId, $contentId) * * @return int */ - public function assignmentsCount($sectionId) + public function assignmentsCount($sectionId): int { return $this->sectionGateway->countContentObjectsInSection($sectionId); } @@ -213,7 +211,7 @@ public function assignmentsCount($sectionId) * * @return int */ - public function policiesCount($sectionId) + public function policiesCount($sectionId): int { return $this->sectionGateway->countPoliciesUsingSection($sectionId); } @@ -225,7 +223,7 @@ public function policiesCount($sectionId) * * @return int */ - public function countRoleAssignmentsUsingSection($sectionId) + public function countRoleAssignmentsUsingSection($sectionId): int { return $this->sectionGateway->countRoleAssignmentsUsingSection($sectionId); } diff --git a/src/lib/Persistence/Legacy/Content/StorageHandler.php b/src/lib/Persistence/Legacy/Content/StorageHandler.php index 034773a455..fd4c0b3116 100644 --- a/src/lib/Persistence/Legacy/Content/StorageHandler.php +++ b/src/lib/Persistence/Legacy/Content/StorageHandler.php @@ -17,17 +17,13 @@ class StorageHandler { /** * Storage registry. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\StorageRegistry */ - protected $storageRegistry; + protected StorageRegistry $storageRegistry; /** * Array with database context. - * - * @var array */ - protected $context; + protected array $context; /** * Creates a new storage handler. @@ -75,7 +71,7 @@ public function copyFieldData(VersionInfo $versionInfo, Field $field, Field $ori * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { $storage = $this->storageRegistry->getStorage($field->type); if ($field->id !== null && $storage->hasFieldData()) { @@ -90,7 +86,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field) * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param mixed[] $ids */ - public function deleteFieldData($fieldType, VersionInfo $versionInfo, array $ids) + public function deleteFieldData(string $fieldType, VersionInfo $versionInfo, array $ids): void { $this->storageRegistry->getStorage($fieldType) ->deleteFieldData($versionInfo, $ids); diff --git a/src/lib/Persistence/Legacy/Content/TreeHandler.php b/src/lib/Persistence/Legacy/Content/TreeHandler.php index 6b375e376f..94df5b3dc4 100644 --- a/src/lib/Persistence/Legacy/Content/TreeHandler.php +++ b/src/lib/Persistence/Legacy/Content/TreeHandler.php @@ -21,38 +21,28 @@ class TreeHandler { /** * Gateway for handling location data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected LocationGateway $locationGateway; /** * Location Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected LocationMapper $locationMapper; /** * Content gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected ContentGateway $contentGateway; /** * Content handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected ContentMapper $contentMapper; /** * FieldHandler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected $fieldHandler; + protected FieldHandler $fieldHandler; /** * @param \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway $locationGateway @@ -84,7 +74,7 @@ public function __construct( * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - public function loadContentInfo($contentId) + public function loadContentInfo(int $contentId) { return $this->contentMapper->extractContentInfoFromRow( $this->contentGateway->loadContentInfo($contentId) @@ -98,7 +88,7 @@ public function loadContentInfo($contentId) * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function removeRawContent($contentId) + public function removeRawContent($contentId): void { $mainLocationId = $this->loadContentInfo($contentId)->mainLocationId; // there can be no Locations for Draft Content items @@ -128,7 +118,7 @@ public function removeRawContent($contentId) * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo[] */ - public function listVersions($contentId, $status = null, $limit = -1) + public function listVersions(int $contentId, ?int $status = null, int $limit = -1): array { $rows = $this->contentGateway->listVersions($contentId, $status, $limit); if (empty($rows)) { @@ -136,7 +126,7 @@ public function listVersions($contentId, $status = null, $limit = -1) } $idVersionPairs = array_map( - static function ($row) use ($contentId) { + static function (array $row) use ($contentId): array { return [ 'id' => $contentId, 'version' => $row['ezcontentobject_version_version'], @@ -163,7 +153,7 @@ static function ($row) use ($contentId) { * * @return \Ibexa\Contracts\Core\Persistence\Content\Location */ - public function loadLocation($locationId, array $translations = null, bool $useAlwaysAvailable = true) + public function loadLocation(int $locationId, array $translations = null, bool $useAlwaysAvailable = true) { $data = $this->locationGateway->getBasicNodeData($locationId, $translations, $useAlwaysAvailable); @@ -185,7 +175,7 @@ public function loadLocation($locationId, array $translations = null, bool $useA * * @return bool */ - public function removeSubtree($locationId) + public function removeSubtree($locationId): void { $locationRow = $this->locationGateway->getBasicNodeData($locationId); $contentId = $locationRow['contentobject_id']; @@ -244,7 +234,7 @@ public function deleteChildrenDrafts(int $locationId): void * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function setSectionForSubtree($locationId, $sectionId) + public function setSectionForSubtree(int $locationId, int $sectionId): void { $nodeData = $this->locationGateway->getBasicNodeData($locationId); @@ -261,7 +251,7 @@ public function setSectionForSubtree($locationId, $sectionId) * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function changeMainLocation($contentId, $locationId) + public function changeMainLocation($contentId, $locationId): void { $parentLocationId = $this->loadLocation($locationId)->parentId; diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php index 7a915f5830..0f17da7ad9 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php @@ -9,8 +9,11 @@ use Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; +use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry as Registry; +use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; +use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; @@ -21,27 +24,20 @@ class ContentUpdater { /** * Content gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected Gateway $contentGateway; /** * FieldValue converter registry. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $converterRegistry; + protected ConverterRegistry $converterRegistry; /** * Storage handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $storageHandler; + protected StorageHandler $storageHandler; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected Mapper $contentMapper; /** * Creates a new content updater. @@ -71,7 +67,7 @@ public function __construct( * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action[] */ - public function determineActions(Type $fromType, Type $toType) + public function determineActions(Type $fromType, Type $toType): array { $actions = []; foreach ($fromType->fieldDefinitions as $fieldDef) { @@ -126,7 +122,7 @@ protected function hasFieldDefinition(Type $type, FieldDefinition $fieldDef): bo * @param mixed $contentTypeId * @param \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action[] $actions */ - public function applyUpdates($contentTypeId, array $actions) + public function applyUpdates($contentTypeId, array $actions): void { if (empty($actions)) { return; @@ -146,7 +142,7 @@ public function applyUpdates($contentTypeId, array $actions) * * @return int[] */ - protected function getContentIdsByContentTypeId($contentTypeId) + protected function getContentIdsByContentTypeId(int $contentTypeId): array { return $this->contentGateway->getContentIdsByContentTypeId($contentTypeId); } diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php index 732fb22caa..8e2c5984c4 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater; +use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; /** @@ -16,10 +17,8 @@ abstract class Action { /** * Content gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected Gateway $contentGateway; /** * Creates a new action. diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php index 4cda931523..1890c31d67 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Core\Persistence\Legacy\Content\Gateway; +use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; @@ -24,27 +25,20 @@ class AddField extends Action { /** * Field definition of the field to add. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - protected $fieldDefinition; + protected FieldDefinition $fieldDefinition; /** * Storage handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $storageHandler; + protected StorageHandler $storageHandler; /** * Field value converter. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter */ - protected $fieldValueConverter; + protected Converter $fieldValueConverter; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected Mapper $contentMapper; /** * Creates a new action. @@ -74,14 +68,14 @@ public function __construct( * * @param int $contentId */ - public function apply($contentId) + public function apply($contentId): void { $versionNumbers = $this->contentGateway->listVersionNumbers($contentId); $languageCodeToFieldId = []; $nameRows = $this->contentGateway->loadVersionedNameData( array_map( - static function ($versionNo) use ($contentId) { + static function ($versionNo) use ($contentId): array { return ['id' => $contentId, 'version' => $versionNo]; }, $versionNumbers @@ -189,7 +183,7 @@ protected function insertField(Content $content, Field $field) * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - protected function createField($id, $versionNo, $languageCode) + protected function createField($id, $versionNo, $languageCode): Field { $field = new Field(); diff --git a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php index 47e7390d03..a13708b229 100644 --- a/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php +++ b/src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; +use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; @@ -20,20 +21,15 @@ class RemoveField extends Action { /** * Field definition of the field to remove. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - protected $fieldDefinition; + protected FieldDefinition $fieldDefinition; /** * Storage handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $storageHandler; + protected StorageHandler $storageHandler; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected Mapper $contentMapper; /** * Creates a new action. @@ -60,14 +56,14 @@ public function __construct( * * @param int $contentId */ - public function apply($contentId) + public function apply($contentId): void { $versionNumbers = $this->contentGateway->listVersionNumbers($contentId); $fieldIdSet = []; $nameRows = $this->contentGateway->loadVersionedNameData( array_map( - static function ($versionNo) use ($contentId) { + static function ($versionNo) use ($contentId): array { return ['id' => $contentId, 'version' => $versionNo]; }, $versionNumbers diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php index 36021566ba..36ac18d9a3 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php @@ -36,10 +36,8 @@ final class DoctrineDatabase extends Gateway { /** * Columns of database tables. - * - * @var array */ - private $columns = [ + private array $columns = [ 'ezcontentclass' => [ 'id', 'always_available', @@ -95,23 +93,18 @@ final class DoctrineDatabase extends Gateway * The native Doctrine connection. * * Meant to be used to transition from eZ/Zeta interface to Doctrine. - * - * @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; - /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway */ - private $sharedGateway; + private SharedGateway $sharedGateway; /** * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; /** * @throws \Doctrine\DBAL\DBALException diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php index e84dadec24..964860de56 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php @@ -25,10 +25,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Create a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/Type/Handler.php b/src/lib/Persistence/Legacy/Content/Type/Handler.php index ec267e3c00..4c485be942 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Type/Handler.php @@ -24,22 +24,17 @@ class Handler implements BaseContentTypeHandler { - /** @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - protected $contentTypeGateway; + protected Gateway $contentTypeGateway; /** * Mapper for Type objects. - * - * @var Mapper */ - protected $mapper; + protected Mapper $mapper; /** * Content type update handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler */ - protected $updateHandler; + protected UpdateHandler $updateHandler; private StorageDispatcherInterface $storageDispatcher; @@ -100,7 +95,7 @@ public function updateGroup(GroupUpdateStruct $struct) * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException If type group contains types * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If type group with id is not found */ - public function deleteGroup($groupId) + public function deleteGroup($groupId): void { if ($this->contentTypeGateway->countTypesInGroup($groupId) !== 0) { throw new Exception\GroupNotEmpty($groupId); @@ -130,8 +125,10 @@ public function loadGroup($groupId) /** * {@inheritdoc} + * + * @return mixed[] */ - public function loadGroups(array $groupIds) + public function loadGroups(array $groupIds): array { $groups = $this->mapper->extractGroupsFromRows( $this->contentTypeGateway->loadGroupData($groupIds) @@ -302,7 +299,7 @@ public function create(CreateStruct $createStruct) * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function internalCreate(CreateStruct $createStruct, $contentTypeId = null) + protected function internalCreate(CreateStruct $createStruct, ?int $contentTypeId = null) { foreach ($createStruct->fieldDefinitions as $fieldDef) { if (!is_int($fieldDef->position)) { @@ -538,7 +535,7 @@ public function getFieldDefinition($id, $status) * * @return int */ - public function getContentCount($contentTypeId) + public function getContentCount($contentTypeId): int { return $this->contentTypeGateway->countInstancesOfType($contentTypeId); } @@ -554,7 +551,7 @@ public function getContentCount($contentTypeId) * @param int $status One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDefinition */ - public function addFieldDefinition($contentTypeId, $status, FieldDefinition $fieldDefinition) + public function addFieldDefinition($contentTypeId, $status, FieldDefinition $fieldDefinition): void { $storageFieldDef = new StorageFieldDefinition(); $this->mapper->toStorageFieldDefinition($fieldDefinition, $storageFieldDef); @@ -609,7 +606,7 @@ public function removeFieldDefinition( * @param mixed $contentTypeId * @param \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition $fieldDefinition */ - public function updateFieldDefinition($contentTypeId, $status, FieldDefinition $fieldDefinition) + public function updateFieldDefinition($contentTypeId, $status, FieldDefinition $fieldDefinition): void { $storageFieldDef = new StorageFieldDefinition(); $this->mapper->toStorageFieldDefinition($fieldDefinition, $storageFieldDef); @@ -629,7 +626,7 @@ public function updateFieldDefinition($contentTypeId, $status, FieldDefinition $ * * @param mixed $contentTypeId */ - public function publish($contentTypeId) + public function publish($contentTypeId): void { $toType = $this->load($contentTypeId, Type::STATUS_DRAFT); @@ -647,7 +644,10 @@ public function publish($contentTypeId) } } - public function getSearchableFieldMap() + /** + * @return non-empty-array[] + */ + public function getSearchableFieldMap(): array { $fieldMap = []; $rows = $this->contentTypeGateway->getSearchableFieldMapData(); diff --git a/src/lib/Persistence/Legacy/Content/Type/Mapper.php b/src/lib/Persistence/Legacy/Content/Type/Mapper.php index d7d7cd39d5..6bc224f77d 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Type/Mapper.php @@ -27,13 +27,10 @@ class Mapper { /** * Converter registry. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $converterRegistry; + protected ConverterRegistry $converterRegistry; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $maskGenerator; + private MaskGenerator $maskGenerator; private StorageDispatcherInterface $storageDispatcher; @@ -62,7 +59,7 @@ public function __construct( * * @todo $description is not supported by database, yet */ - public function createGroupFromCreateStruct(GroupCreateStruct $struct) + public function createGroupFromCreateStruct(GroupCreateStruct $struct): Group { $group = new Group(); @@ -87,7 +84,7 @@ public function createGroupFromCreateStruct(GroupCreateStruct $struct) * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\Group[] */ - public function extractGroupsFromRows(array $rows) + public function extractGroupsFromRows(array $rows): array { $groups = []; @@ -115,7 +112,7 @@ public function extractGroupsFromRows(array $rows) * * @return array (Type) */ - public function extractTypesFromRows(array $rows, bool $keepTypeIdAsKey = false) + public function extractTypesFromRows(array $rows, bool $keepTypeIdAsKey = false): array { $types = []; $fields = []; @@ -166,7 +163,7 @@ public function extractTypesFromRows(array $rows, bool $keepTypeIdAsKey = false) public function extractMultilingualData(array $fieldDefinitionRows): array { - return array_map(static function (array $fieldData) { + return array_map(static function (array $fieldData): array { return [ 'ezcontentclass_attribute_multilingual_name' => $fieldData['ezcontentclass_attribute_multilingual_name'] ?? null, 'ezcontentclass_attribute_multilingual_description' => $fieldData['ezcontentclass_attribute_multilingual_description'] ?? null, @@ -184,7 +181,7 @@ public function extractMultilingualData(array $fieldDefinitionRows): array * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function extractTypeFromRow(array $row) + protected function extractTypeFromRow(array $row): Type { $type = new Type(); @@ -228,7 +225,7 @@ protected function extractTypeFromRow(array $row) * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - public function extractFieldFromRow(array $row, array $multilingualData = [], int $status = Type::STATUS_DEFINED) + public function extractFieldFromRow(array $row, array $multilingualData = [], int $status = Type::STATUS_DEFINED): FieldDefinition { $storageFieldDef = $this->extractStorageFieldFromRow($row, $multilingualData); @@ -271,7 +268,7 @@ public function extractFieldFromRow(array $row, array $multilingualData = [], in * * @return \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition */ - protected function extractStorageFieldFromRow(array $row, array $multilingualDataRow = []) + protected function extractStorageFieldFromRow(array $row, array $multilingualDataRow = []): StorageFieldDefinition { $storageFieldDef = new StorageFieldDefinition(); @@ -339,7 +336,7 @@ protected function extractStorageFieldFromRow(array $row, array $multilingualDat * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - public function createTypeFromCreateStruct(CreateStruct $createStruct) + public function createTypeFromCreateStruct(CreateStruct $createStruct): Type { $type = new Type(); @@ -373,7 +370,7 @@ public function createTypeFromCreateStruct(CreateStruct $createStruct) * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\CreateStruct */ - public function createCreateStructFromType(Type $type) + public function createCreateStructFromType(Type $type): CreateStruct { $createStruct = new CreateStruct(); @@ -406,7 +403,7 @@ public function createCreateStructFromType(Type $type) * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\UpdateStruct */ - public function createUpdateStructFromType(Type $type) + public function createUpdateStructFromType(Type $type): UpdateStruct { $updateStruct = new UpdateStruct(); @@ -436,7 +433,7 @@ public function createUpdateStructFromType(Type $type) public function toStorageFieldDefinition( FieldDefinition $fieldDef, StorageFieldDefinition $storageFieldDef - ) { + ): void { foreach (array_keys($fieldDef->name) as $languageCode) { $multilingualData = new MultilingualStorageFieldDefinition(); $multilingualData->name = $fieldDef->name[$languageCode]; @@ -467,7 +464,7 @@ public function toFieldDefinition( StorageFieldDefinition $storageFieldDef, FieldDefinition $fieldDef, int $status = Type::STATUS_DEFINED - ) { + ): void { $converter = $this->converterRegistry->getConverter( $fieldDef->fieldType ); diff --git a/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php index be47884bb5..625247c320 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabase.php @@ -19,8 +19,7 @@ */ final class DoctrineDatabase extends Handler { - /** @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - protected $contentTypeGateway; + protected Gateway $contentTypeGateway; public function __construct(Gateway $contentTypeGateway) { diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 4d91760184..0230bc7f48 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -13,6 +13,7 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Ibexa\Core\Base\Exceptions\BadStateException; +use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator as LanguageMaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; use RuntimeException; @@ -46,18 +47,14 @@ final class DoctrineDatabase extends Gateway 'text_md5' => ParameterType::STRING, ]; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; /** * Main URL database table name. - * - * @var string */ - private $table; + private string $table; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; @@ -1346,7 +1343,7 @@ private function filterOriginalAliases(array $urlAliasesData): array { $originalUrlAliases = array_filter( $urlAliasesData, - static function ($urlAliasData): bool { + static function (array $urlAliasData): bool { // filter is_original=true ignoring broken parent records (cleaned up elsewhere) return (bool)$urlAliasData['is_original'] && $urlAliasData['existing_parent'] !== null; } diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php index bb9a446dfe..48b3053694 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php @@ -20,10 +20,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php index 5f757fce01..d732796bf3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php @@ -49,55 +49,42 @@ class Handler implements UrlAliasHandlerInterface /** * UrlAlias Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ - protected $gateway; + protected Gateway $gateway; /** * Gateway for handling location data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected LocationGateway $locationGateway; /** * UrlAlias Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Mapper */ - protected $mapper; + protected Mapper $mapper; /** * Caching language handler. * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler */ - protected $languageHandler; + protected LanguageHandler $languageHandler; /** * URL slug converter. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter */ - protected $slugConverter; + protected SlugConverter $slugConverter; /** * Gateway for handling content data. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGateway; + protected ContentGateway $contentGateway; /** * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - protected $maskGenerator; + protected MaskGenerator $maskGenerator; - /** @var \Ibexa\Contracts\Core\Persistence\TransactionHandler */ - private $transactionHandler; + private TransactionHandler $transactionHandler; /** * Creates a new UrlAlias Handler. @@ -169,7 +156,7 @@ private function internalPublishUrlAliasForLocation( $locationId, $parentLocationId, $name, - $languageId, + int $languageId, $alwaysAvailable = false, $updatePathIdentificationString = false, $newId = null @@ -321,7 +308,7 @@ private function internalPublishUrlAliasForLocation( * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlAlias */ - public function createCustomUrlAlias($locationId, $path, $forwarding = false, $languageCode = null, $alwaysAvailable = false) + public function createCustomUrlAlias($locationId, $path, $forwarding = false, $languageCode = null, $alwaysAvailable = false): UrlAlias { return $this->createUrlAlias( 'eznode:' . $locationId, @@ -352,7 +339,7 @@ public function createCustomUrlAlias($locationId, $path, $forwarding = false, $l * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlAlias */ - public function createGlobalUrlAlias($resource, $path, $forwarding = false, $languageCode = null, $alwaysAvailable = false) + public function createGlobalUrlAlias($resource, $path, $forwarding = false, $languageCode = null, $alwaysAvailable = false): UrlAlias { return $this->createUrlAlias( $resource, @@ -482,7 +469,7 @@ protected function createUrlAlias($action, $path, $forward, $languageCode, $alwa * * @return mixed */ - protected function insertNopEntry($parentId, $text, $textMD5) + protected function insertNopEntry($parentId, $text, $textMD5): int { return $this->gateway->insertRow( [ @@ -674,7 +661,7 @@ public function locationMoved($locationId, $oldParentId, $newParentId) * @param mixed $newLocationId * @param mixed $newParentId */ - public function locationCopied($locationId, $newLocationId, $newParentId) + public function locationCopied($locationId, $newLocationId, $newParentId): void { $newParentAliasId = $this->getRealAliasId($newLocationId); $oldParentAliasId = $this->getRealAliasId($locationId); @@ -700,7 +687,7 @@ public function locationCopied($locationId, $newLocationId, $newParentId) * * @throws \Ibexa\Core\Base\Exceptions\NotFoundException */ - public function locationSwapped($location1Id, $location1ParentId, $location2Id, $location2ParentId) + public function locationSwapped($location1Id, $location1ParentId, $location2Id, $location2ParentId): void { $location1 = new SwappedLocationProperties($location1Id, $location1ParentId); $location2 = new SwappedLocationProperties($location2Id, $location2ParentId); @@ -759,7 +746,7 @@ public function locationSwapped($location1Id, $location1ParentId, $location2Id, * * @return array */ - private function getNamesForAllLanguages(array $contentInfo) + private function getNamesForAllLanguages(array $contentInfo): array { $nameDataArray = $this->contentGateway->loadVersionedNameData([ [ @@ -791,7 +778,7 @@ private function getNamesForAllLanguages(array $contentInfo) * @param array $location1Entries * @param array $location2Entries */ - private function historizeBeforeSwap($location1Entries, $location2Entries) + private function historizeBeforeSwap($location1Entries, $location2Entries): void { foreach ($location1Entries as $row) { $this->gateway->historizeBeforeSwap($row['action'], $row['lang_mask']); @@ -861,7 +848,7 @@ private function getUrlAliasesForSwappedLocations( Language $language, SwappedLocationProperties $location1, SwappedLocationProperties $location2 - ) { + ): array { $isMainLanguage1 = $language->id == $location1->mainLanguageId; $isMainLanguage2 = $language->id == $location2->mainLanguageId; $urlAliases = []; @@ -933,7 +920,7 @@ static function (array $row) use ($languageId): bool { * * @return mixed */ - protected function getRealAliasId($locationId) + protected function getRealAliasId(string $locationId) { // Absolute root location does have a url alias entry so we can skip lookup if ($locationId == self::ROOT_LOCATION_ID) { @@ -960,7 +947,7 @@ protected function getRealAliasId($locationId) * @param mixed $newParentAliasId * @param string[] $alreadyGeneratedAliases */ - protected function copySubtree($actionMap, $oldParentAliasId, $newParentAliasId, array $alreadyGeneratedAliases = []): array + protected function copySubtree(array $actionMap, $oldParentAliasId, $newParentAliasId, array $alreadyGeneratedAliases = []): array { $rows = $this->gateway->loadAutogeneratedEntries($oldParentAliasId); $newIdsMap = []; @@ -1001,7 +988,7 @@ protected function copySubtree($actionMap, $oldParentAliasId, $newParentAliasId, * * @return array */ - protected function getCopiedLocationsMap($oldParentId, $newParentId) + protected function getCopiedLocationsMap(int $oldParentId, int $newParentId): array { $originalLocations = $this->locationGateway->getSubtreeContent($oldParentId); $copiedLocations = $this->locationGateway->getSubtreeContent($newParentId); @@ -1039,7 +1026,7 @@ public function locationDeleted($locationId): array * @param int[] $locationIds all Locations of the Content that got Translation removed * @param string $languageCode language code of the removed Translation */ - public function translationRemoved(array $locationIds, $languageCode) + public function translationRemoved(array $locationIds, $languageCode): void { $languageId = $this->languageHandler->loadByLanguageCode($languageCode)->id; @@ -1059,7 +1046,7 @@ public function translationRemoved(array $locationIds, $languageCode) * @param string $action * @param mixed $original */ - protected function removeSubtree($id, $action, $original) + protected function removeSubtree(?int $id, string $action, $original) { // Remove first to avoid unnecessary recursion. if ($original) { @@ -1093,7 +1080,7 @@ protected function getHash($text): string /** * {@inheritdoc} */ - public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLocationId, array $languageCodes) + public function archiveUrlAliasesForDeletedTranslations($locationId, $parentLocationId, array $languageCodes): void { $parentId = $this->getRealAliasId($parentLocationId); @@ -1126,7 +1113,7 @@ function ($languageCode) { * * @throws \Exception */ - public function deleteCorruptedUrlAliases() + public function deleteCorruptedUrlAliases(): float|int|array { $this->transactionHandler->beginTransaction(); try { @@ -1153,7 +1140,7 @@ public function deleteCorruptedUrlAliases() * * @throws \Ibexa\Core\Base\Exceptions\BadStateException */ - public function repairBrokenUrlAliasesForLocation(int $locationId) + public function repairBrokenUrlAliasesForLocation(int $locationId): void { try { $this->gateway->repairBrokenUrlAliasesForLocation($locationId); @@ -1174,7 +1161,7 @@ private function insertAliasEntryAsNop(array $aliasEntry): void * Internal publish custom aliases method, accepting language mask to set correct language mask on url aliases * new alias ID (used when swapping Locations). */ - private function internalPublishCustomUrlAliasForLocation(SwappedLocationProperties $location, int $languageMask) + private function internalPublishCustomUrlAliasForLocation(SwappedLocationProperties $location, int $languageMask): void { foreach ($location->entries as $entry) { if ((int)$entry['is_alias'] === 0) { diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php index 91cc9cf67e..bf91b52a08 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias; use Ibexa\Contracts\Core\Persistence\Content\UrlAlias; +use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator as LanguageMaskGenerator; /** @@ -17,10 +18,8 @@ class Mapper { /** * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - protected $languageMaskGenerator; + protected MaskGenerator $languageMaskGenerator; /** * Creates a new UrlWildcard Handler. @@ -39,7 +38,7 @@ public function __construct(LanguageMaskGenerator $languageMaskGenerator) * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlAlias */ - public function extractUrlAliasFromData($data) + public function extractUrlAliasFromData($data): UrlAlias { $urlAlias = new UrlAlias(); @@ -64,7 +63,7 @@ public function extractUrlAliasFromData($data) * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlAlias[] */ - public function extractUrlAliasListFromData(array $rows) + public function extractUrlAliasListFromData(array $rows): array { $urlAliases = []; foreach ($rows as $row) { @@ -103,7 +102,7 @@ public function generateIdentityKey(int $parentId, string $hash): string * * @return array */ - protected function matchTypeAndDestination($action) + protected function matchTypeAndDestination($action): array { if (preg_match('#^([a-zA-Z0-9_]+):(.+)?$#', $action, $matches)) { $actionType = $matches[1]; @@ -142,7 +141,7 @@ protected function matchTypeAndDestination($action) * * @return array */ - protected function normalizePathData(array $pathData) + protected function normalizePathData(array $pathData): array { $normalizedPathData = []; foreach ($pathData as $level => $rows) { diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php index 3b46ec8157..87dca3977e 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php @@ -174,10 +174,8 @@ class SlugConverter /** * Transformation processor to normalize URL strings. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor */ - protected $transformationProcessor; + protected TransformationProcessor $transformationProcessor; /** @var array */ protected $configuration; @@ -262,7 +260,7 @@ public function convert($text, $defaultText = '_1', $transformation = null) * * @return int */ - public function getUniqueCounterValue($text, $isRootLevel = true) + public function getUniqueCounterValue($text, $isRootLevel = true): int { if ($isRootLevel) { foreach ($this->configuration['reservedNames'] as $reservedName) { @@ -367,7 +365,7 @@ protected function cleanupText($text, $method) * * @return string */ - protected function getWordSeparator() + protected function getWordSeparator(): string { switch ($this->configuration['wordSeparatorName']) { case 'dash': diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 71b107a646..2ada094e80 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -35,11 +35,9 @@ final class DoctrineDatabase extends Gateway */ private const MAX_LIMIT = 1073741824; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Query\CriteriaConverter */ - protected $criteriaConverter; + protected CriteriaConverter $criteriaConverter; public const SORT_DIRECTION_MAP = [ SortClause::SORT_ASC => 'ASC', diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php index 614c10609f..1a9d193f5a 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php @@ -22,10 +22,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Create a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php index 988c62195c..49806226b0 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php @@ -24,17 +24,13 @@ class Handler implements BaseUrlWildcardHandler /** * UrlWildcard Gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway */ - protected $gateway; + protected Gateway $gateway; /** * UrlWildcard Mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Mapper */ - protected $mapper; + protected Mapper $mapper; /** * Creates a new UrlWildcard Handler. @@ -101,7 +97,7 @@ public function update( * * @param mixed $id */ - public function remove($id) + public function remove($id): void { $this->gateway->deleteUrlWildcard($id); } @@ -183,7 +179,7 @@ public function translate(string $sourceUrl): UrlWildcard $rows = $this->gateway->loadUrlWildcardsData(); uasort( $rows, - static function ($row1, $row2): int { + static function (array $row1, array $row2): int { return strlen($row2['source_url']) - strlen($row1['source_url']); } ); diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php index f888fdb0b7..55d904e0f7 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php @@ -23,7 +23,7 @@ class Mapper * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard */ - public function createUrlWildcard($sourceUrl, $destinationUrl, $forward) + public function createUrlWildcard($sourceUrl, $destinationUrl, $forward): UrlWildcard { $urlWildcard = new UrlWildcard(); @@ -41,7 +41,7 @@ public function createUrlWildcard($sourceUrl, $destinationUrl, $forward) * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard */ - public function extractUrlWildcardFromRow(array $row) + public function extractUrlWildcardFromRow(array $row): UrlWildcard { $urlWildcard = new UrlWildcard(); @@ -75,7 +75,7 @@ protected function cleanUrl($url): string * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard[] */ - public function extractUrlWildcardsFromRows(array $rows) + public function extractUrlWildcardsFromRows(array $rows): array { $urlWildcards = []; diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriteriaConverter.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriteriaConverter.php index e04bd25109..31d52bf428 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriteriaConverter.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriteriaConverter.php @@ -15,7 +15,7 @@ final class CriteriaConverter { /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Query\CriterionHandler[] */ - private $handlers; + private iterable $handlers; /** * @param \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Query\CriterionHandler[] $handlers diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php index ca5272e165..c0474d404a 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/SiblingQueryBuilder.php @@ -19,8 +19,7 @@ */ final class SiblingQueryBuilder implements CriterionQueryBuilder { - /** @var \Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\LogicalAndQueryBuilder */ - private $logicalAndQueryBuilder; + private LogicalAndQueryBuilder $logicalAndQueryBuilder; /** * Sibling is internally a composite LogicalAnd criterion, so is handled by delegation. diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php index 4dee157b01..c00e84bcc4 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php @@ -19,8 +19,7 @@ */ final class LogicalAndQueryBuilder implements CriterionQueryBuilder { - /** @var \Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; public function __construct(CriterionVisitor $criterionVisitor) { diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php index 9e50ec24f4..7b62915309 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php @@ -20,8 +20,7 @@ */ final class LogicalNotQueryBuilder implements CriterionQueryBuilder { - /** @var \Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; public function __construct(CriterionVisitor $criterionVisitor) { diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php index 716e6f6cd1..f2c0ebdc50 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php @@ -19,8 +19,7 @@ */ final class LogicalOrQueryBuilder implements CriterionQueryBuilder { - /** @var \Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; public function __construct(CriterionVisitor $criterionVisitor) { diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php index 476ba50a0b..1d5dcd3a38 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/BaseUserCriterionQueryBuilder.php @@ -19,8 +19,7 @@ */ abstract class BaseUserCriterionQueryBuilder implements CriterionQueryBuilder { - /** @var \Ibexa\Core\Persistence\TransformationProcessor */ - private $transformationProcessor; + private TransformationProcessor $transformationProcessor; public function __construct(TransformationProcessor $transformationProcessor) { diff --git a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php index 58cb5a5600..1bbaf32b7f 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php @@ -20,7 +20,7 @@ final class CriterionVisitor implements FilteringCriterionVisitor { /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder[] */ - private $criterionQueryBuilders; + private iterable $criterionQueryBuilders; public function __construct(iterable $criterionQueryBuilders) { diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index 9226255e42..de1aced5b1 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -59,14 +59,11 @@ final class DoctrineGateway implements Gateway 'content_main_location_id' => 'main_location.main_node_id', ]; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\SortClauseVisitor */ - private $sortClauseVisitor; + private SortClauseVisitor $sortClauseVisitor; public function __construct( Connection $connection, diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php index ae22b35955..0c19a3a812 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; @@ -25,17 +26,13 @@ */ final class DoctrineGatewayDataMapper implements GatewayDataMapper { - /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - private $converterRegistry; + private ConverterRegistry $converterRegistry; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - private $languageHandler; + private Handler $languageHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - private $contentTypeHandler; + private ContentTypeHandler $contentTypeHandler; public function __construct( LanguageHandler $languageHandler, @@ -92,7 +89,7 @@ private function mapContentDataToPersistenceContent(array $row): Content /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - private function mapVersionDataToPersistenceVersionInfo(array $row): Content\VersionInfo + private function mapVersionDataToPersistenceVersionInfo(array $row): VersionInfo { $versionInfo = new VersionInfo(); $versionInfo->id = (int)$row['content_version_id']; @@ -124,7 +121,7 @@ private function mapFieldDataToPersistenceFieldList( int $versionNo ): array { return array_map( - function (array $row) use ($versionNo) { + function (array $row) use ($versionNo): \Ibexa\Contracts\Core\Persistence\Content\Field { $field = new Field(); $field->id = (int)$row['field_id']; $field->fieldDefinitionId = (int)$row['field_definition_id']; diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php index 2a60871cf7..bf23ff3009 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php @@ -26,14 +26,11 @@ */ final class DoctrineGateway implements Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\SortClauseVisitor */ - private $sortClauseVisitor; + private SortClauseVisitor $sortClauseVisitor; public function __construct( Connection $connection, diff --git a/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php b/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php index be975019d2..fe12116bf3 100644 --- a/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php +++ b/src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; use Ibexa\Core\Persistence\Legacy\Content\FieldHandler; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper; +use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway as FilteringGateway; /** @@ -21,14 +22,11 @@ */ final class ContentFilteringHandler implements Handler { - /** @var \Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway */ - private $gateway; + private Gateway $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper */ - private $mapper; + private GatewayDataMapper $mapper; - /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - private $fieldHandler; + private FieldHandler $fieldHandler; public function __construct( FilteringGateway $gateway, diff --git a/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php b/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php index da28228501..2e3179ee7b 100644 --- a/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php +++ b/src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php @@ -12,20 +12,19 @@ use Ibexa\Contracts\Core\Persistence\Filter\Location\Handler; use Ibexa\Contracts\Core\Persistence\Filter\Location\LazyLocationListIterator; use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; +use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper as LocationLegacyMapper; +use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper as ContentGatewayDataMapper; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway; class LocationFilteringHandler implements Handler { - /** @var \Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway */ - private $gateway; + private Gateway $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - private $locationMapper; + private Mapper $locationMapper; - /** @var \Ibexa\Core\Persistence\Legacy\Filter\Gateway\Content\GatewayDataMapper */ - private $contentGatewayDataMapper; + private GatewayDataMapper $contentGatewayDataMapper; public function __construct( Gateway $gateway, diff --git a/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php b/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php index 4c729acf82..818c4d5754 100644 --- a/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php +++ b/src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php @@ -20,7 +20,7 @@ final class SortClauseVisitor implements FilteringSortClauseVisitor { /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\SortClauseQueryBuilder[] */ - private $sortClauseQueryBuilders; + private iterable $sortClauseQueryBuilders; /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\SortClauseQueryBuilder[] */ private static $queryBuildersForSortClauses = []; diff --git a/src/lib/Persistence/Legacy/Handler.php b/src/lib/Persistence/Legacy/Handler.php index 93d740638d..d6240c3402 100644 --- a/src/lib/Persistence/Legacy/Handler.php +++ b/src/lib/Persistence/Legacy/Handler.php @@ -21,6 +21,7 @@ use Ibexa\Contracts\Core\Persistence\Handler as HandlerInterface; use Ibexa\Contracts\Core\Persistence\Notification\Handler as NotificationHandler; use Ibexa\Contracts\Core\Persistence\Setting\Handler as SettingHandler; +use Ibexa\Contracts\Core\Persistence\TransactionHandler; use Ibexa\Contracts\Core\Persistence\TransactionHandler as SPITransactionHandler; use Ibexa\Contracts\Core\Persistence\User\Handler as UserHandler; use Ibexa\Contracts\Core\Persistence\UserPreference\Handler as UserPreferenceHandler; @@ -31,53 +32,37 @@ */ class Handler implements HandlerInterface { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - protected $contentHandler; + protected ContentHandler $contentHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected ContentTypeHandler $contentTypeHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected LanguageHandler $languageHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - protected $locationHandler; + protected LocationHandler $locationHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler */ - protected $objectStateHandler; + protected ObjectStateHandler $objectStateHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Section\Handler */ - protected $sectionHandler; + protected SectionHandler $sectionHandler; - /** @var \Ibexa\Contracts\Core\Persistence\TransactionHandler */ - protected $transactionHandler; + protected TransactionHandler $transactionHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Trash\Handler */ - protected $trashHandler; + protected TrashHandler $trashHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\UrlAlias\Handler */ - protected $urlAliasHandler; + protected UrlAliasHandler $urlAliasHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard\Handler */ - protected $urlWildcardHandler; + protected UrlWildcardHandler $urlWildcardHandler; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - protected $userHandler; + protected UserHandler $userHandler; - /** @var \Ibexa\Core\Persistence\Legacy\URL\Handler */ - protected $urlHandler; + protected UrlHandler $urlHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Bookmark\Handler */ - protected $bookmarkHandler; + protected BookmarkHandler $bookmarkHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Notification\Handler */ - protected $notificationHandler; + protected NotificationHandler $notificationHandler; - /** @var \Ibexa\Contracts\Core\Persistence\UserPreference\Handler */ - protected $userPreferenceHandler; + protected UserPreferenceHandler $userPreferenceHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Setting\Handler */ - private $settingHandler; + private SettingHandler $settingHandler; public function __construct( ContentHandler $contentHandler, diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index 7a1a1083ad..13894fa087 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -25,8 +25,7 @@ class DoctrineDatabase extends Gateway public const COLUMN_CREATED = 'created'; public const COLUMN_DATA = 'data'; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** * @param \Doctrine\DBAL\Connection $connection diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php index f91b9962da..c02d594da2 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php @@ -19,10 +19,8 @@ class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\Notification\Gateway */ - protected $innerGateway; + protected Gateway $innerGateway; /** * ExceptionConversion constructor. diff --git a/src/lib/Persistence/Legacy/Notification/Handler.php b/src/lib/Persistence/Legacy/Notification/Handler.php index 9ddf7a36a4..e8084a8c33 100644 --- a/src/lib/Persistence/Legacy/Notification/Handler.php +++ b/src/lib/Persistence/Legacy/Notification/Handler.php @@ -17,11 +17,9 @@ class Handler implements HandlerInterface { - /** @var \Ibexa\Core\Persistence\Legacy\Notification\Gateway */ - protected $gateway; + protected Gateway $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Notification\Mapper */ - protected $mapper; + protected Mapper $mapper; /** * @param \Ibexa\Core\Persistence\Legacy\Notification\Gateway $gateway diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php index 8c96f3fa82..0a1799faec 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php @@ -19,8 +19,7 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php index c2c48f7b8d..adbb26332e 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php @@ -18,8 +18,7 @@ */ final class ExceptionConversion extends Gateway { - /** @var \Ibexa\Core\Persistence\Legacy\Setting\Gateway */ - private $innerGateway; + private Gateway $innerGateway; public function __construct(Gateway $innerGateway) { diff --git a/src/lib/Persistence/Legacy/Setting/Handler.php b/src/lib/Persistence/Legacy/Setting/Handler.php index 28c2809fa7..6f15397aad 100644 --- a/src/lib/Persistence/Legacy/Setting/Handler.php +++ b/src/lib/Persistence/Legacy/Setting/Handler.php @@ -13,8 +13,7 @@ class Handler implements BaseSettingHandler { - /** @var \Ibexa\Core\Persistence\Legacy\Setting\Gateway */ - protected $settingGateway; + protected Gateway $settingGateway; public function __construct(Gateway $settingGateway) { diff --git a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php index 911089fef5..9e043cbd27 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php +++ b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php @@ -17,11 +17,10 @@ */ final class GatewayFactory { - /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway */ - private $fallbackGateway; + private Gateway $fallbackGateway; /** @var \iterable|\Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway[] */ - private $gateways; + private iterable $gateways; public function __construct(Gateway $fallbackGateway, iterable $gateways) { diff --git a/src/lib/Persistence/Legacy/Token/AbstractGateway.php b/src/lib/Persistence/Legacy/Token/AbstractGateway.php index 4d8b8f9752..db7a0470bb 100644 --- a/src/lib/Persistence/Legacy/Token/AbstractGateway.php +++ b/src/lib/Persistence/Legacy/Token/AbstractGateway.php @@ -18,7 +18,7 @@ protected function getAliasedColumns( array $columns ): array { return array_map( - fn (string $column) => $this->getAliasedColumn($column, $alias), + fn (string $column): string => $this->getAliasedColumn($column, $alias), $columns ); } diff --git a/src/lib/Persistence/Legacy/TransactionHandler.php b/src/lib/Persistence/Legacy/TransactionHandler.php index 8615a57ca1..dd3247a80b 100644 --- a/src/lib/Persistence/Legacy/TransactionHandler.php +++ b/src/lib/Persistence/Legacy/TransactionHandler.php @@ -10,7 +10,9 @@ use Doctrine\DBAL\Connection; use Exception; use Ibexa\Contracts\Core\Persistence\TransactionHandler as TransactionHandlerInterface; +use Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler; use Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler as CachingLanguageHandler; +use Ibexa\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler as CachingContentTypeHandler; use RuntimeException; @@ -21,14 +23,11 @@ */ class TransactionHandler implements TransactionHandlerInterface { - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected ?MemoryCachingHandler $contentTypeHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected ?CachingHandler $languageHandler; public function __construct( Connection $connection, @@ -43,7 +42,7 @@ public function __construct( /** * Begin transaction. */ - public function beginTransaction() + public function beginTransaction(): void { $this->connection->beginTransaction(); } @@ -55,7 +54,7 @@ public function beginTransaction() * * @throws \RuntimeException If no transaction has been started */ - public function commit() + public function commit(): void { try { $this->connection->commit(); @@ -71,7 +70,7 @@ public function commit() * * @throws \RuntimeException If no transaction has been started */ - public function rollback() + public function rollback(): void { try { $this->connection->rollback(); diff --git a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php index 20f3247cc6..64d3b8b615 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php @@ -44,15 +44,12 @@ class DoctrineDatabase extends Gateway SortClause::SORT_DESC => 'DESC', ]; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Criteria converter. - * - * @var \Ibexa\Core\Persistence\Legacy\URL\Query\CriteriaConverter */ - protected $criteriaConverter; + protected CriteriaConverter $criteriaConverter; public function __construct(Connection $connection, CriteriaConverter $criteriaConverter) { @@ -63,7 +60,7 @@ public function __construct(Connection $connection, CriteriaConverter $criteriaC /** * {@inheritdoc} */ - public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true) + public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true): array { $count = $doCount ? $this->doCount($criterion) : null; if (!$doCount && $limit === 0) { @@ -137,7 +134,7 @@ public function findUsages($id): array /** * {@inheritdoc} */ - public function updateUrl(URL $url) + public function updateUrl(URL $url): void { $query = $this->connection->createQueryBuilder(); $query diff --git a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php index 1142fcb0f9..69beecda84 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php @@ -18,10 +18,8 @@ class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\URL\Gateway */ - protected $innerGateway; + protected Gateway $innerGateway; /** * ExceptionConversion constructor. diff --git a/src/lib/Persistence/Legacy/URL/Handler.php b/src/lib/Persistence/Legacy/URL/Handler.php index c9c5313454..47c8696a7c 100644 --- a/src/lib/Persistence/Legacy/URL/Handler.php +++ b/src/lib/Persistence/Legacy/URL/Handler.php @@ -18,11 +18,9 @@ */ class Handler implements HandlerInterface { - /** @var \Ibexa\Core\Persistence\Legacy\URL\Gateway */ - private $urlGateway; + private Gateway $urlGateway; - /** @var \Ibexa\Core\Persistence\Legacy\URL\Mapper */ - private $urlMapper; + private Mapper $urlMapper; /** * Handler constructor. @@ -54,7 +52,7 @@ public function updateUrl($id, URLUpdateStruct $urlUpdateStruct) /** * {@inheritdoc} */ - public function find(URLQuery $query) + public function find(URLQuery $query): array { $results = $this->urlGateway->find( $query->filter, diff --git a/src/lib/Persistence/Legacy/URL/Mapper.php b/src/lib/Persistence/Legacy/URL/Mapper.php index 9a5da221ef..c18b4572c9 100644 --- a/src/lib/Persistence/Legacy/URL/Mapper.php +++ b/src/lib/Persistence/Legacy/URL/Mapper.php @@ -22,7 +22,7 @@ class Mapper * * @return \Ibexa\Contracts\Core\Persistence\URL\URL */ - public function createURLFromUpdateStruct(URLUpdateStruct $struct) + public function createURLFromUpdateStruct(URLUpdateStruct $struct): URL { $url = new URL(); $url->url = $struct->url; @@ -41,7 +41,7 @@ public function createURLFromUpdateStruct(URLUpdateStruct $struct) * * @return \Ibexa\Contracts\Core\Persistence\URL\URL[] */ - public function extractURLsFromRows(array $rows) + public function extractURLsFromRows(array $rows): array { $urls = []; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php index bba52f757f..b041f9d3f1 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php @@ -35,7 +35,7 @@ public function __construct(array $handlers = []) * * @param \Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler $handler */ - public function addHandler(CriterionHandler $handler) + public function addHandler(CriterionHandler $handler): void { $this->handlers[] = $handler; } diff --git a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php index 6813a53cd5..f0d084a8e7 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php @@ -26,8 +26,7 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php index 0a3fc39fe3..209688081e 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php @@ -22,10 +22,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Create a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/User/Handler.php b/src/lib/Persistence/Legacy/User/Handler.php index d4d809571f..9d03fa1e97 100644 --- a/src/lib/Persistence/Legacy/User/Handler.php +++ b/src/lib/Persistence/Legacy/User/Handler.php @@ -29,27 +29,20 @@ class Handler implements BaseUserHandler { /** * Gateway for storing user data. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Gateway */ - protected $userGateway; + protected Gateway $userGateway; /** * Gateway for storing role data. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Role\Gateway */ - protected $roleGateway; + protected RoleGateway $roleGateway; /** * Mapper for user related objects. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Mapper */ - protected $mapper; + protected Mapper $mapper; - /** @var \Ibexa\Core\Persistence\Legacy\User\Role\LimitationConverter */ - protected $limitationConverter; + protected LimitationConverter $limitationConverter; /** * Construct from userGateway. @@ -77,7 +70,7 @@ public function __construct(Gateway $userGateway, RoleGateway $roleGateway, Mapp * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function create(User $user) + public function create(User $user): never { throw new NotImplementedException('This method should not be called, creation is done via content handler.'); } @@ -195,7 +188,7 @@ public function loadUserByToken($hash) * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function update(User $user) + public function update(User $user): never { throw new NotImplementedException('This method should not be called, update is done via content handler.'); } @@ -210,7 +203,7 @@ public function updatePassword(User $user): void * * @param \Ibexa\Contracts\Core\Persistence\User\UserTokenUpdateStruct $userTokenUpdateStruct */ - public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct) + public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct): void { $this->userGateway->updateUserToken($userTokenUpdateStruct); } @@ -220,7 +213,7 @@ public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct) * * @param string $hash */ - public function expireUserToken($hash) + public function expireUserToken($hash): void { $this->userGateway->expireUserToken($hash); } @@ -232,7 +225,7 @@ public function expireUserToken($hash) * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function delete($userId) + public function delete($userId): never { throw new NotImplementedException('This method should not be called, delete is done via content handler.'); } @@ -415,7 +408,7 @@ public function loadRoles() * * @param \Ibexa\Contracts\Core\Persistence\User\RoleUpdateStruct $role */ - public function updateRole(RoleUpdateStruct $role) + public function updateRole(RoleUpdateStruct $role): void { $this->roleGateway->updateRole($role); } @@ -426,7 +419,7 @@ public function updateRole(RoleUpdateStruct $role) * @param mixed $roleId * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT */ - public function deleteRole($roleId, $status = Role::STATUS_DEFINED) + public function deleteRole($roleId, $status = Role::STATUS_DEFINED): void { $role = $this->loadRole($roleId, $status); @@ -442,7 +435,7 @@ public function deleteRole($roleId, $status = Role::STATUS_DEFINED) * * @param mixed $roleDraftId */ - public function publishRoleDraft($roleDraftId) + public function publishRoleDraft($roleDraftId): void { $roleDraft = $this->loadRole($roleDraftId, Role::STATUS_DRAFT); @@ -478,7 +471,7 @@ public function publishRoleDraft($roleDraftId) * * @return \Ibexa\Contracts\Core\Persistence\User\Policy */ - public function addPolicyByRoleDraft($roleId, Policy $policy) + public function addPolicyByRoleDraft($roleId, Policy $policy): Policy { $legacyPolicy = clone $policy; $legacyPolicy->originalId = $policy->id; @@ -500,7 +493,7 @@ public function addPolicyByRoleDraft($roleId, Policy $policy) * * @return \Ibexa\Contracts\Core\Persistence\User\Policy */ - public function addPolicy($roleId, Policy $policy) + public function addPolicy($roleId, Policy $policy): Policy { $legacyPolicy = clone $policy; $this->limitationConverter->toLegacy($legacyPolicy); @@ -519,7 +512,7 @@ public function addPolicy($roleId, Policy $policy) * * @param \Ibexa\Contracts\Core\Persistence\User\Policy $policy */ - public function updatePolicy(Policy $policy) + public function updatePolicy(Policy $policy): void { $policy = clone $policy; $this->limitationConverter->toLegacy($policy); @@ -534,7 +527,7 @@ public function updatePolicy(Policy $policy) * @param mixed $policyId * @param mixed $roleId */ - public function deletePolicy($policyId, $roleId) + public function deletePolicy($policyId, $roleId): void { // Each policy can only be associated to exactly one role. Thus it is // sufficient to use the policyId for identification and just remove @@ -564,7 +557,7 @@ public function deletePolicy($policyId, $roleId) * @param mixed $roleId * @param array $limitation */ - public function assignRole($contentId, $roleId, array $limitation = null) + public function assignRole($contentId, $roleId, array $limitation = null): void { $limitation = $limitation ?: ['' => ['']]; $this->userGateway->assignRole($contentId, $roleId, $limitation); @@ -576,7 +569,7 @@ public function assignRole($contentId, $roleId, array $limitation = null) * @param mixed $contentId The user or user group Id to un-assign the role from. * @param mixed $roleId */ - public function unassignRole($contentId, $roleId) + public function unassignRole($contentId, $roleId): void { $this->userGateway->removeRole($contentId, $roleId); } @@ -586,7 +579,7 @@ public function unassignRole($contentId, $roleId) * * @param mixed $roleAssignmentId The assignment ID. */ - public function removeRoleAssignment($roleAssignmentId) + public function removeRoleAssignment($roleAssignmentId): void { $this->userGateway->removeRoleAssignmentById($roleAssignmentId); } diff --git a/src/lib/Persistence/Legacy/User/Mapper.php b/src/lib/Persistence/Legacy/User/Mapper.php index b18eb8b478..de7fc8b6f1 100644 --- a/src/lib/Persistence/Legacy/User/Mapper.php +++ b/src/lib/Persistence/Legacy/User/Mapper.php @@ -25,7 +25,7 @@ class Mapper * * @return \Ibexa\Contracts\Core\Persistence\User */ - public function mapUser(array $data) + public function mapUser(array $data): User { $user = new User(); $user->id = (int)$data['contentobject_id']; @@ -47,7 +47,7 @@ public function mapUser(array $data) * * @return \Ibexa\Contracts\Core\Persistence\User[] */ - public function mapUsers(array $data) + public function mapUsers(array $data): array { $users = []; foreach ($data as $row) { @@ -111,7 +111,7 @@ public function mapPolicies(array $data): array * * @return \Ibexa\Contracts\Core\Persistence\User\Role */ - public function mapRole(array $data) + public function mapRole(array $data): Role { $role = new Role(); @@ -135,7 +135,7 @@ public function mapRole(array $data) * * @return \Ibexa\Contracts\Core\Persistence\User\Role[] */ - public function mapRoles(array $data) + public function mapRoles(array $data): array { $roleData = []; foreach ($data as $row) { @@ -157,7 +157,7 @@ public function mapRoles(array $data) * * @return \Ibexa\Contracts\Core\Persistence\User\RoleAssignment[] */ - public function mapRoleAssignments(array $data) + public function mapRoleAssignments(array $data): array { $roleAssignmentData = []; foreach ($data as $row) { @@ -195,7 +195,7 @@ public function mapRoleAssignments(array $data) $roleAssignments = []; array_walk_recursive( $roleAssignmentData, - static function ($roleAssignment) use (&$roleAssignments) { + static function ($roleAssignment) use (&$roleAssignments): void { $roleAssignments[] = $roleAssignment; } ); @@ -210,7 +210,7 @@ static function ($roleAssignment) use (&$roleAssignments) { * * @return \Ibexa\Contracts\Core\Persistence\User\RoleCreateStruct */ - public function createCreateStructFromRole(Role $role) + public function createCreateStructFromRole(Role $role): RoleCreateStruct { $createStruct = new RoleCreateStruct(); @@ -227,7 +227,7 @@ public function createCreateStructFromRole(Role $role) * * @return \Ibexa\Contracts\Core\Persistence\User\Role */ - public function createRoleFromCreateStruct(RoleCreateStruct $createStruct) + public function createRoleFromCreateStruct(RoleCreateStruct $createStruct): Role { $role = new Role(); diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index 4943584224..f08f5893df 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -27,8 +27,7 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php index d0bb7eb64e..954ec3d5dd 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php @@ -23,10 +23,8 @@ final class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Role\Gateway */ - private $innerGateway; + private Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php index e1d485b966..532311999a 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationConverter.php @@ -34,7 +34,7 @@ public function __construct(array $limitationHandlers = []) * * @param \Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler $handler */ - public function addHandler(LimitationHandler $handler) + public function addHandler(LimitationHandler $handler): void { $this->limitationHandlers[] = $handler; } @@ -42,7 +42,7 @@ public function addHandler(LimitationHandler $handler) /** * @param \Ibexa\Contracts\Core\Persistence\User\Policy $policy */ - public function toLegacy(Policy $policy) + public function toLegacy(Policy $policy): void { foreach ($this->limitationHandlers as $limitationHandler) { $limitationHandler->toLegacy($policy); @@ -52,7 +52,7 @@ public function toLegacy(Policy $policy) /** * @param \Ibexa\Contracts\Core\Persistence\User\Policy $policy */ - public function toSPI(Policy $policy) + public function toSPI(Policy $policy): void { foreach ($this->limitationHandlers as $limitationHandler) { $limitationHandler->toSPI($policy); diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php index f3f8af0fa2..1aead038db 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler.php @@ -15,7 +15,7 @@ */ abstract class LimitationHandler { - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php index 2c004bedec..bae1729611 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php @@ -23,8 +23,7 @@ class DoctrineDatabase extends Gateway public const COLUMN_USER_ID = 'user_id'; public const COLUMN_VALUE = 'value'; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php index e9eb328208..a8ec422867 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php @@ -18,10 +18,8 @@ class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway */ - protected $innerGateway; + protected Gateway $innerGateway; /** * ExceptionConversion constructor. diff --git a/src/lib/Persistence/Legacy/UserPreference/Handler.php b/src/lib/Persistence/Legacy/UserPreference/Handler.php index 1385c968bd..ffe4f8553b 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Handler.php +++ b/src/lib/Persistence/Legacy/UserPreference/Handler.php @@ -15,11 +15,9 @@ class Handler implements HandlerInterface { - /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway */ - protected $gateway; + protected Gateway $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Mapper */ - protected $mapper; + protected Mapper $mapper; /** * @param \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway $gateway diff --git a/src/lib/Persistence/TransformationProcessor.php b/src/lib/Persistence/TransformationProcessor.php index 3b3b98f5f7..00ec586369 100644 --- a/src/lib/Persistence/TransformationProcessor.php +++ b/src/lib/Persistence/TransformationProcessor.php @@ -24,10 +24,8 @@ abstract class TransformationProcessor /** * Parsed rule files. - * - * @var array */ - protected $ruleFiles = []; + protected array $ruleFiles; /** * Compiled rules, which can directly be applied to the input strings. @@ -38,10 +36,8 @@ abstract class TransformationProcessor /** * Transformation compiler. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor\PcreCompiler */ - protected $compiler = null; + protected PcreCompiler $compiler; /** * Construct instance of TransformationProcessor. diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php index ad6ab55bce..22d64d5de0 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased.php @@ -17,10 +17,8 @@ class DefinitionBased extends TransformationProcessor { /** * Transformation parser. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor\DefinitionBased\Parser */ - protected $parser = null; + protected Parser $parser; /** * Construct instance of TransformationProcessor\DefinitionBased. diff --git a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php index 3222ddab15..a26bb765b3 100644 --- a/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php +++ b/src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php @@ -39,10 +39,8 @@ class Parser * * For readability reasons this array is created in the constructor to be * able to use temporary variables. - * - * @var array */ - protected $tokenSpecifications = null; + protected array $tokenSpecifications; /** * Construct. @@ -92,13 +90,13 @@ public function parse($file) * * @return array */ - public function parseString($string) + public function parseString($string): array { $tokens = $this->tokenize($string); $tokens = array_filter( $tokens, - static function ($token): bool { + static function (array $token): bool { return !($token['type'] === TransformationProcessor::T_WHITESPACE || $token['type'] === TransformationProcessor::T_COMMENT); } @@ -131,7 +129,7 @@ static function ($token): bool { * * @return array */ - protected function tokenize($string) + protected function tokenize($string): array { $string = preg_replace('(\\r\\n|\\r)', "\n", $string); $tokens = []; @@ -170,7 +168,7 @@ protected function tokenize($string) * * @return array */ - protected function filterValues(array $data) + protected function filterValues(array $data): array { foreach ($data as $key => $value) { if (is_int($key)) { diff --git a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php index bcbcb98462..93737953ff 100644 --- a/src/lib/Persistence/TransformationProcessor/PcreCompiler.php +++ b/src/lib/Persistence/TransformationProcessor/PcreCompiler.php @@ -19,10 +19,8 @@ class PcreCompiler { /** * Class for converting UTF-8 characters. - * - * @var \Ibexa\Core\Persistence\Utf8Converter */ - protected $converter; + protected Utf8Converter $converter; /** * Construct from UTF8Converter. @@ -45,7 +43,7 @@ public function __construct(Utf8Converter $converter) * * @return array */ - public function compile(array $ast) + public function compile(array $ast): array { $transformations = []; @@ -92,7 +90,7 @@ protected function compileRule(array $rule) * * @return array */ - protected function compileMap(array $rule) + protected function compileMap(array $rule): array { return [ 'regexp' => '(' . preg_quote($this->compileCharacter($rule['data']['src'])) . ')us', @@ -107,7 +105,7 @@ protected function compileMap(array $rule) * * @return array */ - protected function compileReplace(array $rule) + protected function compileReplace(array $rule): array { return [ 'regexp' => '([' . @@ -125,7 +123,7 @@ protected function compileReplace(array $rule) * * @return array */ - protected function compileTranspose(array $rule) + protected function compileTranspose(array $rule): array { return [ 'regexp' => '([' . @@ -143,7 +141,7 @@ protected function compileTranspose(array $rule) * * @return array */ - protected function compileTransposeModulo(array $rule) + protected function compileTransposeModulo(array $rule): array { return [ 'regexp' => '([' . @@ -235,7 +233,7 @@ protected function compileTargetCharacter($char) substr($char, 1, -1) ); - return static function ($matches) use ($string) { + return static function ($matches) use ($string): array|string { return $string; }; diff --git a/src/lib/Persistence/Utf8Converter.php b/src/lib/Persistence/Utf8Converter.php index 2317eca3a3..a8d831d448 100644 --- a/src/lib/Persistence/Utf8Converter.php +++ b/src/lib/Persistence/Utf8Converter.php @@ -84,7 +84,7 @@ public static function toUTF8Character($charCode): string * * @return int */ - public static function toUnicodeCodepoint($char) + public static function toUnicodeCodepoint(string $char): false|int { $charCode = false; // 7bits, 1 char diff --git a/src/lib/Query/QueryFactory.php b/src/lib/Query/QueryFactory.php index 991cd76ecc..5f5862cbf1 100644 --- a/src/lib/Query/QueryFactory.php +++ b/src/lib/Query/QueryFactory.php @@ -13,8 +13,7 @@ final class QueryFactory implements QueryFactoryInterface { - /** @var \Ibexa\Core\QueryType\QueryTypeRegistry */ - private $queryTypeRegistry; + private QueryTypeRegistry $queryTypeRegistry; public function __construct(QueryTypeRegistry $queryTypeRegistry) { diff --git a/src/lib/QueryType/ArrayQueryTypeRegistry.php b/src/lib/QueryType/ArrayQueryTypeRegistry.php index f0086bd6c0..b04d72e955 100644 --- a/src/lib/QueryType/ArrayQueryTypeRegistry.php +++ b/src/lib/QueryType/ArrayQueryTypeRegistry.php @@ -15,14 +15,14 @@ class ArrayQueryTypeRegistry implements QueryTypeRegistry { /** @var QueryType[] */ - private $registry = []; + private array $registry = []; - public function addQueryType($name, QueryType $queryType) + public function addQueryType($name, QueryType $queryType): void { $this->registry[$name] = $queryType; } - public function addQueryTypes(array $queryTypes) + public function addQueryTypes(array $queryTypes): void { $this->registry += $queryTypes; } diff --git a/src/lib/QueryType/BuiltIn/AbstractQueryType.php b/src/lib/QueryType/BuiltIn/AbstractQueryType.php index 28cf18b62d..f36c891814 100644 --- a/src/lib/QueryType/BuiltIn/AbstractQueryType.php +++ b/src/lib/QueryType/BuiltIn/AbstractQueryType.php @@ -25,14 +25,11 @@ abstract class AbstractQueryType extends OptionsResolverBasedQueryType { public const DEFAULT_LIMIT = 25; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected ConfigResolverInterface $configResolver; - /** @var \Ibexa\Core\QueryType\BuiltIn\SortClausesFactoryInterface */ - private $sortClausesFactory; + private SortClausesFactoryInterface $sortClausesFactory; public function __construct( Repository $repository, @@ -63,7 +60,7 @@ protected function configureOptions(OptionsResolver $resolver): void 'sort' => [], ]); - $resolver->setNormalizer('sort', function (Options $options, $value) { + $resolver->setNormalizer('sort', function (Options $options, $value): array { if (is_string($value)) { $value = $this->sortClausesFactory->createFromSpecification($value); } diff --git a/src/lib/QueryType/BuiltIn/SortClausesFactory.php b/src/lib/QueryType/BuiltIn/SortClausesFactory.php index 79da7508bb..ea3bbeca90 100644 --- a/src/lib/QueryType/BuiltIn/SortClausesFactory.php +++ b/src/lib/QueryType/BuiltIn/SortClausesFactory.php @@ -17,8 +17,7 @@ */ final class SortClausesFactory implements SortClausesFactoryInterface { - /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParserInterface */ - private $sortClauseParser; + private SortClauseParserInterface $sortClauseParser; public function __construct(SortClauseParserInterface $sortClauseArgsParser) { diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php index 481208c67c..0df9c4b7a6 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php @@ -19,7 +19,7 @@ final class DefaultSortClauseParser implements SortClauseParserInterface { /** @var string[] */ - private $valueObjectClassMap; + private array $valueObjectClassMap; public function __construct(array $valueObjectClassMap) { diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php index a843a9bb7d..3331eb038a 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php @@ -14,7 +14,7 @@ final class SortClauseParserDispatcher implements SortClauseParserInterface { /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParserInterface[] */ - private $parsers; + private iterable $parsers; public function __construct(iterable $parsers = []) { diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php index 26f5ca6d24..cf938ec073 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php @@ -17,14 +17,12 @@ final class SortSpecLexer implements SortSpecLexerInterface private const FLOAT_PATTERN = '-?[0-9]+\.[0-9]+'; private const INT_PATTERN = '-?[0-9]+'; - /** @var string */ - private $input; + private ?string $input = null; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\Token[] */ - private $tokens = []; + private array $tokens = []; - /** @var int|null */ - private $position; + private ?int $position = null; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\Token|null */ private $current; diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php index 19824ff228..0f9fc7c09c 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php @@ -32,11 +32,9 @@ final class SortSpecParser implements SortSpecParserInterface { private const DEFAULT_SORT_DIRECTION = Query::SORT_ASC; - /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortSpecLexerInterface */ - private $lexer; + private ?SortSpecLexerInterface $lexer; - /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParserInterface */ - private $sortClauseParser; + private SortClauseParserInterface $sortClauseParser; public function __construct(SortClauseParserInterface $sortClauseParser, SortSpecLexerInterface $lexer = null) { diff --git a/src/lib/QueryType/BuiltIn/SortSpec/Token.php b/src/lib/QueryType/BuiltIn/SortSpec/Token.php index 3e2376dc16..8ed3c4a834 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/Token.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/Token.php @@ -20,14 +20,11 @@ final class Token public const TYPE_FLOAT = ''; public const TYPE_EOF = ''; - /** @var string */ - private $type; + private string $type; - /** @var string */ - private $value; + private string $value; - /** @var int */ - private $position; + private int $position; public function __construct(string $type, string $value = '', int $position = -1) { diff --git a/src/lib/QueryType/OptionsResolverBasedQueryType.php b/src/lib/QueryType/OptionsResolverBasedQueryType.php index d0a0b1ee7f..7c606bd1d7 100644 --- a/src/lib/QueryType/OptionsResolverBasedQueryType.php +++ b/src/lib/QueryType/OptionsResolverBasedQueryType.php @@ -22,8 +22,7 @@ */ abstract class OptionsResolverBasedQueryType implements QueryType { - /** @var \Symfony\Component\OptionsResolver\OptionsResolver */ - private $resolver; + private ?OptionsResolver $resolver = null; /** * Configures the OptionsResolver for the QueryType. diff --git a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php index 676bf942b0..f9aec0b322 100644 --- a/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php +++ b/src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php @@ -45,7 +45,7 @@ public function map(ContentView $contentView): Query * * @return array */ - private function extractParametersFromContentView(ContentView $contentView) + private function extractParametersFromContentView(ContentView $contentView): array { $queryParameters = []; diff --git a/src/lib/Repository/BookmarkService.php b/src/lib/Repository/BookmarkService.php index 14831759bf..886037ca47 100644 --- a/src/lib/Repository/BookmarkService.php +++ b/src/lib/Repository/BookmarkService.php @@ -11,8 +11,10 @@ use Exception; use Ibexa\Contracts\Core\Persistence\Bookmark\Bookmark; use Ibexa\Contracts\Core\Persistence\Bookmark\CreateStruct; +use Ibexa\Contracts\Core\Persistence\Bookmark\Handler; use Ibexa\Contracts\Core\Persistence\Bookmark\Handler as BookmarkHandler; use Ibexa\Contracts\Core\Repository\BookmarkService as BookmarkServiceInterface; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Values\Bookmark\BookmarkList; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -20,11 +22,9 @@ class BookmarkService implements BookmarkServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Bookmark\Handler */ - protected $bookmarkHandler; + protected Handler $bookmarkHandler; /** * BookmarkService constructor. diff --git a/src/lib/Repository/ContentService.php b/src/lib/Repository/ContentService.php index 11c8d699b0..ac132f002d 100644 --- a/src/lib/Repository/ContentService.php +++ b/src/lib/Repository/ContentService.php @@ -27,6 +27,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionService; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Validator\ContentValidator; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; @@ -61,6 +62,7 @@ use Ibexa\Core\Base\Exceptions\UnauthorizedException; use Ibexa\Core\FieldType\FieldTypeRegistry; use Ibexa\Core\Repository\Collector\ContentCollector; +use Ibexa\Core\Repository\Helper\RelationProcessor; use Ibexa\Core\Repository\Mapper\ContentDomainMapper; use Ibexa\Core\Repository\Mapper\ContentMapper; use Ibexa\Core\Repository\Values\Content\Content; @@ -76,36 +78,28 @@ class ContentService implements ContentServiceInterface { /** @var \Ibexa\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; /** @var array */ protected $settings; - /** @var \Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - protected $contentDomainMapper; + protected ContentDomainMapper $contentDomainMapper; - /** @var \Ibexa\Core\Repository\Helper\RelationProcessor */ - protected $relationProcessor; + protected RelationProcessor $relationProcessor; protected NameSchemaServiceInterface $nameSchemaService; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionService $permissionResolver; - /** @var \Ibexa\Core\Repository\Mapper\ContentMapper */ - private $contentMapper; + private ContentMapper $contentMapper; - /** @var \Ibexa\Contracts\Core\Repository\Validator\ContentValidator */ - private $contentValidator; + private ContentValidator $contentValidator; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Content\Handler */ - private $contentFilteringHandler; + private ContentFilteringHandler $contentFilteringHandler; private ContentCollector $contentCollector; @@ -113,7 +107,7 @@ public function __construct( RepositoryInterface $repository, Handler $handler, ContentDomainMapper $contentDomainMapper, - Helper\RelationProcessor $relationProcessor, + RelationProcessor $relationProcessor, NameSchemaServiceInterface $nameSchemaService, FieldTypeRegistry $fieldTypeRegistry, PermissionService $permissionService, diff --git a/src/lib/Repository/ContentTypeService.php b/src/lib/Repository/ContentTypeService.php index 972f20aa7e..002aaf669c 100644 --- a/src/lib/Repository/ContentTypeService.php +++ b/src/lib/Repository/ContentTypeService.php @@ -21,6 +21,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\BadStateException as APIBadStateException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; @@ -31,6 +32,7 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupCreateStruct; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroupUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeUpdateStruct; +use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition as APIFieldDefinition; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct; @@ -45,34 +47,28 @@ use Ibexa\Core\Base\Exceptions\UnauthorizedException; use Ibexa\Core\FieldType\FieldTypeRegistry; use Ibexa\Core\FieldType\ValidationError; +use Ibexa\Core\Repository\Mapper\ContentDomainMapper; +use Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper; use Ibexa\Core\Repository\Values\ContentType\ContentTypeCreateStruct; use Ibexa\Core\Repository\Values\ContentType\ContentTypeGroup; class ContentTypeService implements ContentTypeServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - protected $userHandler; + protected UserHandler $userHandler; - /** @var array */ - protected $settings; + protected array $settings; - /** @var \Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - protected $contentDomainMapper; + protected ContentDomainMapper $contentDomainMapper; - /** @var \Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper */ - protected $contentTypeDomainMapper; + protected ContentTypeDomainMapper $contentTypeDomainMapper; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -90,8 +86,8 @@ public function __construct( RepositoryInterface $repository, Handler $contentTypeHandler, UserHandler $userHandler, - Mapper\ContentDomainMapper $contentDomainMapper, - Mapper\ContentTypeDomainMapper $contentTypeDomainMapper, + ContentDomainMapper $contentDomainMapper, + ContentTypeDomainMapper $contentTypeDomainMapper, FieldTypeRegistry $fieldTypeRegistry, PermissionResolver $permissionResolver, array $settings = [] @@ -1139,7 +1135,7 @@ public function copyContentType(APIContentType $contentType, User $creator = nul throw new UnauthorizedException('ContentType', 'create'); } - if (empty($creator)) { + if (!$creator instanceof User) { $creator = $this->permissionResolver->getCurrentUserReference(); } @@ -1361,7 +1357,7 @@ public function removeFieldDefinition(APIContentTypeDraft $contentTypeDraft, API $fieldDefinition->identifier ); - if (empty($loadedFieldDefinition) || $loadedFieldDefinition->id != $fieldDefinition->id) { + if (!$loadedFieldDefinition instanceof FieldDefinition || $loadedFieldDefinition->id != $fieldDefinition->id) { throw new InvalidArgumentException( '$fieldDefinition', 'The given Field definition does not belong to the content type' diff --git a/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php b/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php index 6592f88207..2eb1de184f 100644 --- a/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php +++ b/src/lib/Repository/EventSubscriber/DeleteUserSubscriber.php @@ -14,8 +14,7 @@ class DeleteUserSubscriber implements EventSubscriberInterface { - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; public function __construct(ContentTypeService $contentTypeService) { diff --git a/src/lib/Repository/FieldTypeService.php b/src/lib/Repository/FieldTypeService.php index 2bd95d4de2..4f6d34ce66 100644 --- a/src/lib/Repository/FieldTypeService.php +++ b/src/lib/Repository/FieldTypeService.php @@ -20,8 +20,7 @@ */ class FieldTypeService implements FieldTypeServiceInterface { - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; /** * Holds an array of FieldType objects to avoid re creating them all the time from SPI variants. diff --git a/src/lib/Repository/Helper/RelationProcessor.php b/src/lib/Repository/Helper/RelationProcessor.php index 72066bdfab..932157d128 100644 --- a/src/lib/Repository/Helper/RelationProcessor.php +++ b/src/lib/Repository/Helper/RelationProcessor.php @@ -26,8 +26,7 @@ class RelationProcessor { use LoggerAwareTrait; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -57,7 +56,7 @@ public function appendFieldRelations( SPIFieldType $fieldType, BaseValue $fieldValue, $fieldDefinitionId - ) { + ): void { foreach ($fieldType->getRelations($fieldValue) as $relationType => $destinationIds) { if ($relationType & (Relation::FIELD | Relation::ASSET)) { if (!isset($relations[$relationType][$fieldDefinitionId])) { @@ -113,7 +112,7 @@ public function processFieldRelations( $sourceContentVersionNo, ContentType $contentType, array $existingRelations = [] - ) { + ): void { // Map existing relations for easier handling $mappedRelations = []; foreach ($existingRelations as $relation) { diff --git a/src/lib/Repository/LanguageService.php b/src/lib/Repository/LanguageService.php index 539e25ba40..6e594e1e2f 100644 --- a/src/lib/Repository/LanguageService.php +++ b/src/lib/Repository/LanguageService.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Contracts\Core\Repository\LanguageService as LanguageServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Language; use Ibexa\Contracts\Core\Repository\Values\Content\LanguageCreateStruct; @@ -27,17 +28,14 @@ */ class LanguageService implements LanguageServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected Handler $languageHandler; /** @var array */ protected $settings; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -394,7 +392,7 @@ public function newLanguageCreateStruct(): LanguageCreateStruct * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Language */ - protected function buildDomainObject(SPILanguage $spiLanguage) + protected function buildDomainObject(SPILanguage $spiLanguage): Language { return new Language( [ diff --git a/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php b/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php index 221e43b83b..eb83d74093 100644 --- a/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php +++ b/src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php @@ -20,8 +20,7 @@ */ final class PermissionAwareLocationResolver implements LocationResolver { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; public function __construct(LocationService $locationService) { diff --git a/src/lib/Repository/LocationService.php b/src/lib/Repository/LocationService.php index b37a0ac5ed..0b0400c32f 100644 --- a/src/lib/Repository/LocationService.php +++ b/src/lib/Repository/LocationService.php @@ -21,6 +21,7 @@ use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Language; @@ -56,33 +57,25 @@ class LocationService implements LocationServiceInterface { /** @var \Ibexa\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var array */ - protected $settings; + protected array $settings; - /** @var \Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - protected $contentDomainMapper; + protected ContentDomainMapper $contentDomainMapper; protected NameSchemaServiceInterface $nameSchemaService; - /** @var \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver */ - protected $permissionCriterionResolver; + protected PermissionCriterionResolver $permissionCriterionResolver; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Location\Handler */ - private $locationFilteringHandler; + private LocationFilteringHandler $locationFilteringHandler; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - protected $contentTypeService; + protected ContentTypeService $contentTypeService; /** * Setups service with reference to repository object that created it & corresponding handler. diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index cba3fe720c..d15890f3f8 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -10,9 +10,11 @@ use DateTime; use Ibexa\Contracts\Core\Persistence\Content as SPIContent; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo as SPIContentInfo; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Persistence\Content\Handler as ContentHandler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; +use Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct as SPILocationCreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as LocationHandler; use Ibexa\Contracts\Core\Persistence\Content\Relation as SPIRelation; @@ -54,26 +56,19 @@ class ContentDomainMapper extends ProxyAwareDomainMapper implements LoggerAwareI public const MAX_LOCATION_PRIORITY = 2147483647; public const MIN_LOCATION_PRIORITY = -2147483648; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - protected $contentHandler; + protected Handler $contentHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - protected $locationHandler; + protected LocationHandler $locationHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected TypeHandler $contentTypeHandler; - /** @var \Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper */ - protected $contentTypeDomainMapper; + protected ContentTypeDomainMapper $contentTypeDomainMapper; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $contentLanguageHandler; + protected LanguageHandler $contentLanguageHandler; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; - /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy */ - private $thumbnailStrategy; + private ThumbnailStrategy $thumbnailStrategy; public function __construct( ContentHandler $contentHandler, @@ -112,7 +107,7 @@ public function buildContentDomainObject( ContentType $contentType, array $prioritizedLanguages = [], string $fieldAlwaysAvailableLanguage = null - ) { + ): Content { $prioritizedFieldLanguageCode = null; if (!empty($prioritizedLanguages)) { $availableFieldLanguageMap = array_fill_keys($spiContent->versionInfo->languageCodes, true); @@ -177,7 +172,7 @@ public function buildContentDomainObjectFromPersistence( * Builds a Content proxy object (lazy loaded, loads as soon as used). */ public function buildContentProxy( - SPIContent\ContentInfo $info, + SPIContentInfo $info, array $prioritizedLanguages = [], bool $useAlwaysAvailable = true ): APIContent { @@ -305,7 +300,7 @@ public function buildDomainFields( * * @return \Ibexa\Core\Repository\Values\Content\VersionInfo */ - public function buildVersionInfoDomainObject(SPIVersionInfo $spiVersionInfo, array $prioritizedLanguages = []) + public function buildVersionInfoDomainObject(SPIVersionInfo $spiVersionInfo, array $prioritizedLanguages = []): VersionInfo { // Map SPI statuses to API switch ($spiVersionInfo->status) { @@ -358,7 +353,7 @@ public function buildVersionInfoDomainObject(SPIVersionInfo $spiVersionInfo, arr * * @return \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo */ - public function buildContentInfoDomainObject(SPIContentInfo $spiContentInfo) + public function buildContentInfoDomainObject(SPIContentInfo $spiContentInfo): ContentInfo { // Map SPI statuses to API switch ($spiContentInfo->status) { @@ -418,7 +413,7 @@ public function buildRelationDomainObject( SPIRelation $spiRelation, ContentInfo $sourceContentInfo, ContentInfo $destinationContentInfo - ) { + ): Relation { $sourceFieldDefinitionIdentifier = null; if ($spiRelation->sourceFieldDefinitionId !== null) { $contentType = $this->contentTypeHandler->load($sourceContentInfo->contentTypeId); @@ -449,7 +444,7 @@ public function buildRelationDomainObject( public function buildLocationDomainObject( SPILocation $spiLocation, SPIContentInfo $contentInfo = null - ) { + ): APILocation { if ($contentInfo === null) { return $this->buildLocation($spiLocation); } @@ -568,7 +563,7 @@ private function buildRootLocation(SPILocation $spiLocation): APILocation private function mapLocation( SPILocation $spiLocation, ContentInfo $contentInfo, - APIContent $content, + APIContent|Content $content, ?APILocation $parentLocation = null ): APILocation { return new Location( @@ -601,7 +596,7 @@ private function mapLocation( * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo[] ContentInfo we did not find content for is returned. */ - public function buildContentDomainObjectsOnSearchResult(SearchResult $result, array $languageFilter) + public function buildContentDomainObjectsOnSearchResult(SearchResult $result, array $languageFilter): array { if (empty($result->searchHits)) { return []; @@ -660,7 +655,7 @@ public function buildContentDomainObjectsOnSearchResult(SearchResult $result, ar * * @return \Ibexa\Contracts\Core\Persistence\Content\Location[] Locations we did not find content info for is returned. */ - public function buildLocationDomainObjectsOnSearchResult(SearchResult $result, array $languageFilter) + public function buildLocationDomainObjectsOnSearchResult(SearchResult $result, array $languageFilter): array { if (empty($result->searchHits)) { return []; @@ -715,7 +710,7 @@ public function buildSPILocationCreateStruct( $contentId, $contentVersionNo, bool $isContentHidden - ) { + ): CreateStruct { if (!$this->isValidLocationPriority($locationCreateStruct->priority)) { throw new InvalidArgumentValue('priority', $locationCreateStruct->priority, 'LocationCreateStruct'); } @@ -840,7 +835,7 @@ public function isValidLocationPriority($priority): bool * @param mixed $list * @param string $argumentName */ - public function validateTranslatedList($list, $argumentName) + public function validateTranslatedList($list, string $argumentName): void { if (!is_array($list)) { throw new InvalidArgumentType($argumentName, 'array', $list); @@ -865,7 +860,7 @@ public function validateTranslatedList($list, $argumentName) * * @return \DateTime */ - public function getDateTime($timestamp) + public function getDateTime($timestamp): DateTime { $dateTime = new DateTime(); $dateTime->setTimestamp((int)$timestamp); diff --git a/src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php b/src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php index 2530991b36..63598cfd77 100644 --- a/src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php +++ b/src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php @@ -21,8 +21,7 @@ */ final class DecoratedLocationService extends LocationServiceDecorator { - /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\ContentLocationMapper */ - private $contentLocationMapper; + private ContentLocationMapper $contentLocationMapper; public function __construct( RepositoryLocationService $innerService, diff --git a/src/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapper.php b/src/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapper.php index 31b58b586d..8f9d08094f 100644 --- a/src/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapper.php +++ b/src/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapper.php @@ -24,7 +24,7 @@ final class InMemoryContentLocationMapper implements ContentLocationMapper { /** @var array */ - private $map; + private array $map; /** * @param int[] $map diff --git a/src/lib/Repository/Mapper/ContentMapper.php b/src/lib/Repository/Mapper/ContentMapper.php index cedce66219..f6576fb612 100644 --- a/src/lib/Repository/Mapper/ContentMapper.php +++ b/src/lib/Repository/Mapper/ContentMapper.php @@ -25,10 +25,9 @@ class ContentMapper { /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - private $contentLanguageHandler; + private Handler $contentLanguageHandler; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; public function __construct( Handler $contentLanguageHandler, @@ -308,7 +307,7 @@ public function getFieldsForUpdate(array $updatedFields, Content $content): arra !in_array($updatedField->languageCode, $content->versionInfo->languageCodes, true) ); - if (!empty($field)) { + if ($field instanceof Field) { $updatedFieldHash = md5(json_encode($fieldType->toHash($updatedFieldValue))); $contentFieldHash = md5(json_encode($fieldType->toHash($field->value))); diff --git a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php index e208c5538a..b697c5c001 100644 --- a/src/lib/Repository/Mapper/ContentTypeDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentTypeDomainMapper.php @@ -14,7 +14,9 @@ use Ibexa\Contracts\Core\Persistence\Content\Type as SPIContentType; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition as SPIFieldDefinition; use Ibexa\Contracts\Core\Persistence\Content\Type\Group as SPIContentTypeGroup; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as SPITypeHandler; +use Ibexa\Contracts\Core\Persistence\Content\Type\UpdateStruct; use Ibexa\Contracts\Core\Persistence\Content\Type\UpdateStruct as SPIContentTypeUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType as APIContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft as APIContentTypeDraft; @@ -41,14 +43,11 @@ */ class ContentTypeDomainMapper extends ProxyAwareDomainMapper { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $contentLanguageHandler; + protected SPILanguageHandler $contentLanguageHandler; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - protected $fieldTypeRegistry; + protected FieldTypeRegistry $fieldTypeRegistry; public function __construct( SPITypeHandler $contentTypeHandler, @@ -121,7 +120,7 @@ public function buildContentTypeDomainObject( * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\UpdateStruct */ - public function buildSPIContentTypeUpdateStruct(APIContentTypeDraft $contentTypeDraft, APIContentTypeUpdateStruct $contentTypeUpdateStruct, APIUserReference $user) + public function buildSPIContentTypeUpdateStruct(APIContentTypeDraft $contentTypeDraft, APIContentTypeUpdateStruct $contentTypeUpdateStruct, APIUserReference $user): UpdateStruct { $updateStruct = new SPIContentTypeUpdateStruct(); @@ -218,7 +217,7 @@ public function buildContentTypeGroupDomainObject(SPIContentTypeGroup $spiGroup, * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition */ - public function buildFieldDefinitionDomainObject(SPIFieldDefinition $spiFieldDefinition, $mainLanguageCode, array $prioritizedLanguages = []) + public function buildFieldDefinitionDomainObject(SPIFieldDefinition $spiFieldDefinition, $mainLanguageCode, array $prioritizedLanguages = []): FieldDefinition { /** @var $fieldType \Ibexa\Contracts\Core\FieldType\FieldType */ $fieldType = $this->fieldTypeRegistry->getFieldType($spiFieldDefinition->fieldType); diff --git a/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php b/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php index 30936d739c..0dcfa7f458 100644 --- a/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php +++ b/src/lib/Repository/Mapper/ProxyAwareDomainMapper.php @@ -17,8 +17,7 @@ */ abstract class ProxyAwareDomainMapper { - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperInterface */ - protected $proxyFactory; + protected ?ProxyDomainMapperInterface $proxyFactory; public function __construct(?ProxyDomainMapperInterface $proxyFactory = null) { diff --git a/src/lib/Repository/Mapper/RoleDomainMapper.php b/src/lib/Repository/Mapper/RoleDomainMapper.php index 43d4a25819..ab661a3824 100644 --- a/src/lib/Repository/Mapper/RoleDomainMapper.php +++ b/src/lib/Repository/Mapper/RoleDomainMapper.php @@ -32,8 +32,7 @@ */ class RoleDomainMapper { - /** @var \Ibexa\Core\Repository\Permission\LimitationService */ - protected $limitationService; + protected LimitationService $limitationService; /** * @param \Ibexa\Core\Repository\Permission\LimitationService $limitationService @@ -50,7 +49,7 @@ public function __construct(LimitationService $limitationService) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Role */ - public function buildDomainRoleObject(SPIRole $role) + public function buildDomainRoleObject(SPIRole $role): Role { $rolePolicies = []; foreach ($role->policies as $spiPolicy) { @@ -75,7 +74,7 @@ public function buildDomainRoleObject(SPIRole $role) * * @return \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - public function buildDomainRoleDraftObject(SPIRole $spiRole) + public function buildDomainRoleDraftObject(SPIRole $spiRole): RoleDraft { return new RoleDraft( [ @@ -91,7 +90,7 @@ public function buildDomainRoleDraftObject(SPIRole $spiRole) * * @return \Ibexa\Contracts\Core\Repository\Values\User\Policy|\Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft */ - public function buildDomainPolicyObject(SPIPolicy $spiPolicy) + public function buildDomainPolicyObject(SPIPolicy $spiPolicy): Policy|PolicyDraft { $policyLimitations = []; if ($spiPolicy->module !== '*' && $spiPolicy->function !== '*' && $spiPolicy->limitations !== '*') { @@ -127,7 +126,7 @@ public function buildDomainPolicyObject(SPIPolicy $spiPolicy) * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserRoleAssignment */ - public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, User $user, APIRole $role) + public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, User $user, APIRole $role): UserRoleAssignment { $limitation = null; if (!empty($spiRoleAssignment->limitationIdentifier)) { @@ -156,7 +155,7 @@ public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAs * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroupRoleAssignment */ - public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role) + public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role): UserGroupRoleAssignment { $limitation = null; if (!empty($spiRoleAssignment->limitationIdentifier)) { @@ -231,7 +230,7 @@ protected function fillRoleStructWithPolicies(APIRoleCreateStruct $struct): arra * * @return \Ibexa\Contracts\Core\Persistence\User\Policy */ - public function buildPersistencePolicyObject($module, $function, array $limitations) + public function buildPersistencePolicyObject($module, $function, array $limitations): SPIPolicy { $limitationsToCreate = '*'; if ($module !== '*' && $function !== '*' && !empty($limitations)) { diff --git a/src/lib/Repository/NotificationService.php b/src/lib/Repository/NotificationService.php index 146c3b22e7..75068a3826 100644 --- a/src/lib/Repository/NotificationService.php +++ b/src/lib/Repository/NotificationService.php @@ -24,11 +24,9 @@ class NotificationService implements NotificationServiceInterface { - /** @var \Ibexa\Contracts\Core\Persistence\Notification\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - protected $permissionResolver; + protected PermissionResolver $permissionResolver; /** * @param \Ibexa\Contracts\Core\Persistence\Notification\Handler $persistenceHandler @@ -50,7 +48,7 @@ public function loadNotifications(int $offset = 0, int $limit = 25): Notificatio $list = new NotificationList(); $list->totalCount = $this->persistenceHandler->countNotifications($currentUserId); if ($list->totalCount > 0) { - $list->items = array_map(function (Notification $spiNotification) { + $list->items = array_map(function (Notification $spiNotification): APINotification { return $this->buildDomainObject($spiNotification); }, $this->persistenceHandler->loadUserNotifications($currentUserId, $offset, $limit)); } diff --git a/src/lib/Repository/ObjectStateService.php b/src/lib/Repository/ObjectStateService.php index 054cb51741..57401659a8 100644 --- a/src/lib/Repository/ObjectStateService.php +++ b/src/lib/Repository/ObjectStateService.php @@ -15,6 +15,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Contracts\Core\Repository\ObjectStateService as ObjectStateServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectState as APIObjectState; @@ -35,17 +36,13 @@ */ class ObjectStateService implements ObjectStateServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler */ - protected $objectStateHandler; + protected Handler $objectStateHandler; - /** @var array */ - protected $settings; + protected array $settings; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** * Setups service with reference to repository object that created it & corresponding handler. diff --git a/src/lib/Repository/Permission/CachedPermissionService.php b/src/lib/Repository/Permission/CachedPermissionService.php index 36dabe0d14..1a2c4a9e5b 100644 --- a/src/lib/Repository/Permission/CachedPermissionService.php +++ b/src/lib/Repository/Permission/CachedPermissionService.php @@ -9,7 +9,9 @@ namespace Ibexa\Core\Repository\Permission; use Exception; +use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver as APIPermissionCriterionResolver; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\PermissionResolver as APIPermissionResolver; use Ibexa\Contracts\Core\Repository\PermissionService; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; @@ -31,21 +33,16 @@ */ class CachedPermissionService implements PermissionService { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $innerPermissionResolver; + private PermissionResolver $innerPermissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver */ - private $permissionCriterionResolver; + private PermissionCriterionResolver $permissionCriterionResolver; - /** @var int */ - private $cacheTTL; + private int $cacheTTL; /** * Counter for the current sudo nesting level {@see sudo()}. - * - * @var int */ - private $sudoNestingLevel = 0; + private int $sudoNestingLevel = 0; /** * Cached value for current user's getCriterion() result. diff --git a/src/lib/Repository/Permission/LimitationService.php b/src/lib/Repository/Permission/LimitationService.php index aec9ae9776..da70663357 100644 --- a/src/lib/Repository/Permission/LimitationService.php +++ b/src/lib/Repository/Permission/LimitationService.php @@ -22,7 +22,7 @@ class LimitationService { /** @var \Ibexa\Contracts\Core\Limitation\Type[] */ - private $limitationTypes; + private array $limitationTypes; public function __construct(?Traversable $limitationTypes = null) { diff --git a/src/lib/Repository/Permission/PermissionCriterionResolver.php b/src/lib/Repository/Permission/PermissionCriterionResolver.php index 9aa0880372..51a97c5c39 100644 --- a/src/lib/Repository/Permission/PermissionCriterionResolver.php +++ b/src/lib/Repository/Permission/PermissionCriterionResolver.php @@ -9,6 +9,7 @@ namespace Ibexa\Core\Repository\Permission; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver as APIPermissionCriterionResolver; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\PermissionResolver as PermissionResolverInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; @@ -24,11 +25,9 @@ */ class PermissionCriterionResolver implements APIPermissionCriterionResolver { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $innerPermissionResolver; + private PermissionResolver $innerPermissionResolver; - /** @var \Ibexa\Core\Repository\Permission\LimitationService */ - private $limitationService; + private LimitationService $limitationService; /** * Constructor. diff --git a/src/lib/Repository/Permission/PermissionResolver.php b/src/lib/Repository/Permission/PermissionResolver.php index 42204df748..1c570c6926 100644 --- a/src/lib/Repository/Permission/PermissionResolver.php +++ b/src/lib/Repository/Permission/PermissionResolver.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Limitation\Target; use Ibexa\Contracts\Core\Limitation\TargetAwareType; use Ibexa\Contracts\Core\Limitation\Type as LimitationType; +use Ibexa\Contracts\Core\Persistence\User\Handler; use Ibexa\Contracts\Core\Persistence\User\Handler as UserHandler; use Ibexa\Contracts\Core\Repository\PermissionResolver as PermissionResolverInterface; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; @@ -32,36 +33,26 @@ class PermissionResolver implements PermissionResolverInterface { /** * Counter for the current sudo nesting level {@see sudo()}. - * - * @var int */ - private $sudoNestingLevel = 0; + private int $sudoNestingLevel = 0; - /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper */ - private $roleDomainMapper; + private RoleDomainMapper $roleDomainMapper; - /** @var \Ibexa\Core\Repository\Permission\LimitationService */ - private $limitationService; + private LimitationService $limitationService; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - private $userHandler; + private Handler $userHandler; /** * Currently logged in user reference for permission purposes. - * - * @var \Ibexa\Contracts\Core\Repository\Values\User\UserReference */ - private $currentUserRef; + private \Ibexa\Core\Repository\Values\User\UserReference|\Ibexa\Contracts\Core\Repository\Values\User\UserReference|null $currentUserRef = null; /** * Map of system configured policies, for validation usage. - * - * @var array */ - private $policyMap; + private array $policyMap; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private ConfigResolverInterface $configResolver; /** * @param array $policyMap Map of system configured policies, for validation usage. diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php index 07f0a81cc4..2c6df7e6a3 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapper.php @@ -24,11 +24,10 @@ */ final class ProxyDomainMapper implements ProxyDomainMapperInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; /** @var \ProxyManager\Factory\LazyLoadingValueHolderFactory */ - private $proxyGenerator; + private ProxyGeneratorInterface $proxyGenerator; public function __construct(Repository $repository, ProxyGeneratorInterface $proxyGenerator) { diff --git a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php index f1c4998ad1..3c24aff0e2 100644 --- a/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php +++ b/src/lib/Repository/ProxyFactory/ProxyDomainMapperFactory.php @@ -15,8 +15,7 @@ */ final class ProxyDomainMapperFactory implements ProxyDomainMapperFactoryInterface { - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface */ - private $proxyGenerator; + private ProxyGeneratorInterface $proxyGenerator; public function __construct(ProxyGeneratorInterface $proxyGenerator) { diff --git a/src/lib/Repository/ProxyFactory/ProxyGenerator.php b/src/lib/Repository/ProxyFactory/ProxyGenerator.php index 06f6911f00..161b5159fe 100644 --- a/src/lib/Repository/ProxyFactory/ProxyGenerator.php +++ b/src/lib/Repository/ProxyFactory/ProxyGenerator.php @@ -21,11 +21,9 @@ */ final class ProxyGenerator implements ProxyGeneratorInterface { - /** @var \ProxyManager\Factory\LazyLoadingValueHolderFactory|null */ - private $lazyLoadingValueHolderFactory; + private ?LazyLoadingValueHolderFactory $lazyLoadingValueHolderFactory = null; - /** @var string */ - private $proxyCacheDir; + private string $proxyCacheDir; public function __construct(string $proxyCacheDir) { @@ -47,7 +45,7 @@ public function createProxy( public function warmUp(iterable $classes): void { foreach ($classes as $class) { - $this->createProxy($class, static function () {}); + $this->createProxy($class, static function (): void {}); } } diff --git a/src/lib/Repository/Repository.php b/src/lib/Repository/Repository.php index 4148af8227..7fd2c4ad28 100644 --- a/src/lib/Repository/Repository.php +++ b/src/lib/Repository/Repository.php @@ -11,6 +11,7 @@ use Exception; use Ibexa\Contracts\Core\Persistence\Filter\Content\Handler as ContentFilteringHandler; use Ibexa\Contracts\Core\Persistence\Filter\Location\Handler as LocationFilteringHandler; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Persistence\TransactionHandler; use Ibexa\Contracts\Core\Repository\BookmarkService as BookmarkServiceInterface; @@ -43,6 +44,10 @@ use Ibexa\Core\FieldType\FieldTypeRegistry; use Ibexa\Core\Repository\Collector\ContentCollector; use Ibexa\Core\Repository\Helper\RelationProcessor; +use Ibexa\Core\Repository\Mapper\ContentDomainMapper; +use Ibexa\Core\Repository\Mapper\ContentMapper; +use Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper; +use Ibexa\Core\Repository\Mapper\RoleDomainMapper; use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactoryInterface; use Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperInterface; @@ -59,17 +64,13 @@ class Repository implements RepositoryInterface { /** * Repository Handler object. - * - * @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; /** * Instance of main Search Handler. - * - * @var \Ibexa\Contracts\Core\Search\Handler */ - protected $searchHandler; + protected SearchHandler $searchHandler; /** * Instance of content service. @@ -148,17 +149,14 @@ class Repository implements RepositoryInterface */ protected $fieldTypeService; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; protected NameSchemaServiceInterface $nameSchemaService; /** * Instance of relation processor service. - * - * @var \Ibexa\Core\Repository\Helper\RelationProcessor */ - protected $relationProcessor; + protected RelationProcessor $relationProcessor; /** * Instance of URL alias service. @@ -209,53 +207,39 @@ class Repository implements RepositoryInterface */ protected $serviceSettings; - /** @var \Ibexa\Core\Repository\Permission\LimitationService */ - protected $limitationService; + protected LimitationService $limitationService; - /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper */ - protected $roleDomainMapper; + protected RoleDomainMapper $roleDomainMapper; - /** @var \Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - protected $contentDomainMapper; + protected ContentDomainMapper $contentDomainMapper; - /** @var \Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper */ - protected $contentTypeDomainMapper; + protected ContentTypeDomainMapper $contentTypeDomainMapper; - /** @var \Ibexa\Core\Search\Common\BackgroundIndexer|null */ - protected $backgroundIndexer; + protected BackgroundIndexer $backgroundIndexer; - /** @var \Psr\Log\LoggerInterface */ - private $logger; + private LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\Repository\PasswordHashService */ - private $passwordHashService; + private PasswordHashService $passwordHashService; /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperFactory */ - private $proxyDomainMapperFactory; + private ProxyDomainMapperFactoryInterface $proxyDomainMapperFactory; /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperInterface|null */ private $proxyDomainMapper; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - private $languageResolver; + private LanguageResolver $languageResolver; - /** @var \Ibexa\Contracts\Core\Repository\PermissionService */ - private $permissionService; + private PermissionService $permissionService; - /** @var \Ibexa\Core\Repository\Mapper\ContentMapper */ - private $contentMapper; + private ContentMapper $contentMapper; - /** @var \Ibexa\Contracts\Core\Repository\Validator\ContentValidator */ - private $contentValidator; + private ContentValidator $contentValidator; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Content\Handler */ - private $contentFilteringHandler; + private ContentFilteringHandler $contentFilteringHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Location\Handler */ - private $locationFilteringHandler; + private LocationFilteringHandler $locationFilteringHandler; - /** @var \Ibexa\Core\Repository\User\PasswordValidatorInterface */ - private $passwordValidator; + private PasswordValidatorInterface $passwordValidator; private ConfigResolverInterface $configResolver; @@ -271,10 +255,10 @@ public function __construct( FieldTypeRegistry $fieldTypeRegistry, PasswordHashService $passwordHashGenerator, ProxyDomainMapperFactoryInterface $proxyDomainMapperFactory, - Mapper\ContentDomainMapper $contentDomainMapper, - Mapper\ContentTypeDomainMapper $contentTypeDomainMapper, - Mapper\RoleDomainMapper $roleDomainMapper, - Mapper\ContentMapper $contentMapper, + ContentDomainMapper $contentDomainMapper, + ContentTypeDomainMapper $contentTypeDomainMapper, + RoleDomainMapper $roleDomainMapper, + ContentMapper $contentMapper, ContentValidator $contentValidator, LimitationService $limitationService, LanguageResolver $languageResolver, @@ -674,7 +658,7 @@ public function getRoleService(): RoleServiceInterface return $this->roleService; } - protected function getRoleDomainMapper(): Mapper\RoleDomainMapper + protected function getRoleDomainMapper(): RoleDomainMapper { return $this->roleDomainMapper; } diff --git a/src/lib/Repository/RoleService.php b/src/lib/Repository/RoleService.php index dd942f9771..ce32529f77 100644 --- a/src/lib/Repository/RoleService.php +++ b/src/lib/Repository/RoleService.php @@ -13,6 +13,8 @@ use Ibexa\Contracts\Core\Persistence\User\Role as SPIRole; use Ibexa\Contracts\Core\Persistence\User\RoleUpdateStruct as SPIRoleUpdateStruct; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; +use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\RoleService as RoleServiceInterface; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation; @@ -34,6 +36,8 @@ use Ibexa\Core\Base\Exceptions\LimitationValidationException; use Ibexa\Core\Base\Exceptions\NotFound\LimitationNotFoundException; use Ibexa\Core\Base\Exceptions\UnauthorizedException; +use Ibexa\Core\Repository\Mapper\RoleDomainMapper; +use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\Values\User\PolicyCreateStruct; use Ibexa\Core\Repository\Values\User\PolicyUpdateStruct; use Ibexa\Core\Repository\Values\User\Role; @@ -47,23 +51,18 @@ */ class RoleService implements RoleServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - protected $userHandler; + protected Handler $userHandler; - /** @var \Ibexa\Core\Repository\Permission\LimitationService */ - protected $limitationService; + protected LimitationService $limitationService; - /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper */ - protected $roleDomainMapper; + protected RoleDomainMapper $roleDomainMapper; /** @phpstan-var array{policyMap: TPolicyMap}|array{} */ protected array $settings; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -73,8 +72,8 @@ class RoleService implements RoleServiceInterface public function __construct( RepositoryInterface $repository, Handler $userHandler, - Permission\LimitationService $limitationService, - Mapper\RoleDomainMapper $roleDomainMapper, + LimitationService $limitationService, + RoleDomainMapper $roleDomainMapper, array $settings = [] ) { $this->repository = $repository; @@ -230,7 +229,7 @@ public function copyRole(APIRole $role, APIRoleCopyStruct $roleCopyStruct): APIR try { $spiRole = $this->userHandler->copyRole($spiRoleCopyStruct); $this->repository->commit(); - } catch (\Exception $e) { + } catch (Exception $e) { $this->repository->rollback(); throw $e; } diff --git a/src/lib/Repository/SearchService.php b/src/lib/Repository/SearchService.php index 625ca37c82..ba6e22a3a9 100644 --- a/src/lib/Repository/SearchService.php +++ b/src/lib/Repository/SearchService.php @@ -9,6 +9,7 @@ namespace Ibexa\Core\Repository; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\SearchService as SearchServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -35,22 +36,17 @@ class SearchService implements SearchServiceInterface { /** @var \Ibexa\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Search\Handler */ - protected $searchHandler; + protected Handler $searchHandler; - /** @var array */ - protected $settings; + protected array $settings; - /** @var \Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - protected $contentDomainMapper; + protected ContentDomainMapper $contentDomainMapper; - /** @var \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver */ - protected $permissionCriterionResolver; + protected PermissionCriterionResolver $permissionCriterionResolver; - /** @var \Ibexa\Core\Search\Common\BackgroundIndexer */ - protected $backgroundIndexer; + protected BackgroundIndexer $backgroundIndexer; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -301,7 +297,7 @@ public function findLocations(LocationQuery $query, array $languageFilter = [], * * @uses \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver::getPermissionsCriterion() */ - protected function addPermissionsCriterion(Query\CriterionInterface &$criterion): bool + protected function addPermissionsCriterion(CriterionInterface &$criterion): bool { $permissionCriterion = $this->permissionCriterionResolver->getPermissionsCriterion('content', 'read'); if ($permissionCriterion === true || $permissionCriterion === false) { diff --git a/src/lib/Repository/SectionService.php b/src/lib/Repository/SectionService.php index f49095a2a6..7af05ce09d 100644 --- a/src/lib/Repository/SectionService.php +++ b/src/lib/Repository/SectionService.php @@ -12,9 +12,12 @@ use Exception; use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as LocationHandler; use Ibexa\Contracts\Core\Persistence\Content\Section as SPISection; +use Ibexa\Contracts\Core\Persistence\Content\Section\Handler; use Ibexa\Contracts\Core\Persistence\Content\Section\Handler as SectionHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver; +use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\SectionService as SectionServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -36,23 +39,17 @@ */ class SectionService implements SectionServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - protected $permissionResolver; + protected PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver */ - protected $permissionCriterionResolver; + protected PermissionCriterionResolver $permissionCriterionResolver; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Section\Handler */ - protected $sectionHandler; + protected Handler $sectionHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - protected $locationHandler; + protected LocationHandler $locationHandler; - /** @var array */ - protected $settings; + protected array $settings; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -439,7 +436,7 @@ public function newSectionUpdateStruct(): SectionUpdateStruct * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Section */ - protected function buildDomainSectionObject(SPISection $spiSection) + protected function buildDomainSectionObject(SPISection $spiSection): Section { return new Section( [ diff --git a/src/lib/Repository/SettingService.php b/src/lib/Repository/SettingService.php index d1a8c477b7..e296f8392f 100644 --- a/src/lib/Repository/SettingService.php +++ b/src/lib/Repository/SettingService.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Repository; +use Ibexa\Contracts\Core\Persistence\Setting\Handler; use Ibexa\Contracts\Core\Persistence\Setting\Handler as SettingHandler; use Ibexa\Contracts\Core\Persistence\Setting\Setting as SPISetting; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; @@ -21,11 +22,9 @@ final class SettingService implements SettingServiceInterface { - /** @var \Ibexa\Contracts\Core\Persistence\Setting\Handler */ - private $settingHandler; + private Handler $settingHandler; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; public function __construct( SettingHandler $settingHandler, diff --git a/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php b/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php index d3e15fe2d7..de128c1b46 100644 --- a/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php +++ b/src/lib/Repository/SiteAccessAware/Config/IOConfigResolver.php @@ -15,14 +15,11 @@ */ final class IOConfigResolver implements IOConfigProvider { - /** @var string */ - private $storageDir; + private string $storageDir; - /** @var string */ - private $legacyUrlPrefix; + private string $legacyUrlPrefix; - /** @var string */ - private $urlPrefix; + private string $urlPrefix; public function __construct( string $storageDir, diff --git a/src/lib/Repository/SiteAccessAware/ContentService.php b/src/lib/Repository/SiteAccessAware/ContentService.php index ffad838ff7..cdf2968049 100644 --- a/src/lib/Repository/SiteAccessAware/ContentService.php +++ b/src/lib/Repository/SiteAccessAware/ContentService.php @@ -33,11 +33,9 @@ */ class ContentService implements ContentServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - protected $service; + protected ContentServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/ContentTypeService.php b/src/lib/Repository/SiteAccessAware/ContentTypeService.php index c173f2c8ee..8b6658a5d2 100644 --- a/src/lib/Repository/SiteAccessAware/ContentTypeService.php +++ b/src/lib/Repository/SiteAccessAware/ContentTypeService.php @@ -26,11 +26,9 @@ */ class ContentTypeService implements ContentTypeServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - protected $service; + protected ContentTypeServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php b/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php index 27ac737c61..bcfaed1401 100644 --- a/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php +++ b/src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php @@ -18,11 +18,9 @@ */ abstract class AbstractLanguageResolver implements APILanguageResolver { - /** @var bool */ - private $defaultUseAlwaysAvailable; + private bool $defaultUseAlwaysAvailable; - /** @var bool */ - private $defaultShowAllTranslations; + private bool $defaultShowAllTranslations; /** * Values typically provided by user context, will need to be set depending on your own custom logic using setter. @@ -34,7 +32,7 @@ abstract class AbstractLanguageResolver implements APILanguageResolver * * @var string|null */ - private $contextLanguage; + private ?string $contextLanguage = null; /** * @param bool $defaultUseAlwaysAvailable diff --git a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php index 449abd0f71..1af2c1423e 100644 --- a/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php +++ b/src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php @@ -17,7 +17,7 @@ final class LanguageResolver extends AbstractLanguageResolver * * @var string[] */ - private $configLanguages; + private array $configLanguages; public function __construct( array $configLanguages, diff --git a/src/lib/Repository/SiteAccessAware/LanguageService.php b/src/lib/Repository/SiteAccessAware/LanguageService.php index d55891f819..dd55efc89c 100644 --- a/src/lib/Repository/SiteAccessAware/LanguageService.php +++ b/src/lib/Repository/SiteAccessAware/LanguageService.php @@ -18,8 +18,7 @@ */ class LanguageService implements LanguageServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\LanguageService */ - protected $service; + protected LanguageServiceInterface $service; /** * Construct service object from aggregated service. diff --git a/src/lib/Repository/SiteAccessAware/LocationService.php b/src/lib/Repository/SiteAccessAware/LocationService.php index 3dc1d8ddae..f9a697483d 100644 --- a/src/lib/Repository/SiteAccessAware/LocationService.php +++ b/src/lib/Repository/SiteAccessAware/LocationService.php @@ -25,11 +25,9 @@ */ class LocationService implements LocationServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - protected $service; + protected LocationServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/NotificationService.php b/src/lib/Repository/SiteAccessAware/NotificationService.php index 37bf0b3e4e..5729d23386 100644 --- a/src/lib/Repository/SiteAccessAware/NotificationService.php +++ b/src/lib/Repository/SiteAccessAware/NotificationService.php @@ -15,8 +15,7 @@ class NotificationService implements NotificationServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\NotificationService */ - protected $service; + protected NotificationServiceInterface $service; /** * Construct service object from aggregated service. diff --git a/src/lib/Repository/SiteAccessAware/ObjectStateService.php b/src/lib/Repository/SiteAccessAware/ObjectStateService.php index e71c748a45..fe35ed441b 100644 --- a/src/lib/Repository/SiteAccessAware/ObjectStateService.php +++ b/src/lib/Repository/SiteAccessAware/ObjectStateService.php @@ -22,11 +22,9 @@ */ class ObjectStateService implements ObjectStateServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\ObjectStateService */ - protected $service; + protected ObjectStateServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/Repository.php b/src/lib/Repository/SiteAccessAware/Repository.php index 13a2d72a89..46c3982b7c 100644 --- a/src/lib/Repository/SiteAccessAware/Repository.php +++ b/src/lib/Repository/SiteAccessAware/Repository.php @@ -33,41 +33,30 @@ */ class Repository implements RepositoryInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected RepositoryInterface $repository; - /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - protected $contentService; + protected ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\SectionService */ - protected $sectionService; + protected SectionService $sectionService; - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - protected $searchService; + protected SearchService $searchService; - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - protected $userService; + protected UserService $userService; - /** @var \Ibexa\Contracts\Core\Repository\LanguageService */ - protected $languageService; + protected LanguageService $languageService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - protected $locationService; + protected LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\TrashService */ - protected $trashService; + protected TrashService $trashService; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - protected $contentTypeService; + protected ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\Repository\ObjectStateService */ - protected $objectStateService; + protected ObjectStateService $objectStateService; - /** @var \Ibexa\Contracts\Core\Repository\URLAliasService */ - protected $urlAliasService; + protected URLAliasService $urlAliasService; /** @var \Ibexa\Core\Repository\NotificationService */ - protected $notificationService; + protected NotificationService $notificationService; /** * Construct repository object from aggregated repository. diff --git a/src/lib/Repository/SiteAccessAware/SearchService.php b/src/lib/Repository/SiteAccessAware/SearchService.php index d3651a7031..b1461a4e37 100644 --- a/src/lib/Repository/SiteAccessAware/SearchService.php +++ b/src/lib/Repository/SiteAccessAware/SearchService.php @@ -21,11 +21,9 @@ */ class SearchService implements SearchServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\SearchService */ - protected $service; + protected SearchServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/SectionService.php b/src/lib/Repository/SiteAccessAware/SectionService.php index 47b7fc161a..600d53a314 100644 --- a/src/lib/Repository/SiteAccessAware/SectionService.php +++ b/src/lib/Repository/SiteAccessAware/SectionService.php @@ -22,8 +22,7 @@ */ class SectionService implements SectionServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\SectionService */ - protected $service; + protected SectionServiceInterface $service; /** * Construct service object from aggregated service. diff --git a/src/lib/Repository/SiteAccessAware/TrashService.php b/src/lib/Repository/SiteAccessAware/TrashService.php index bce91bb63b..82d1f2dddb 100644 --- a/src/lib/Repository/SiteAccessAware/TrashService.php +++ b/src/lib/Repository/SiteAccessAware/TrashService.php @@ -23,8 +23,7 @@ */ class TrashService implements TrashServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\TrashService */ - protected $service; + protected TrashServiceInterface $service; /** * Construct service object from aggregated service. diff --git a/src/lib/Repository/SiteAccessAware/URLAliasService.php b/src/lib/Repository/SiteAccessAware/URLAliasService.php index d1be047c3c..f2b7fed5c0 100644 --- a/src/lib/Repository/SiteAccessAware/URLAliasService.php +++ b/src/lib/Repository/SiteAccessAware/URLAliasService.php @@ -18,11 +18,9 @@ */ class URLAliasService implements URLAliasServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\URLAliasService */ - protected $service; + protected URLAliasServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service and LanguageResolver. diff --git a/src/lib/Repository/SiteAccessAware/UserService.php b/src/lib/Repository/SiteAccessAware/UserService.php index 5b04d386e4..8efa3cda7a 100644 --- a/src/lib/Repository/SiteAccessAware/UserService.php +++ b/src/lib/Repository/SiteAccessAware/UserService.php @@ -29,11 +29,9 @@ */ class UserService implements UserServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\UserService */ - protected $service; + protected UserServiceInterface $service; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - protected $languageResolver; + protected LanguageResolver $languageResolver; /** * Construct service object from aggregated service. diff --git a/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php index a740210302..58fd6e1974 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php @@ -19,7 +19,7 @@ final class ContentFieldStrategy implements ThumbnailStrategy { /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\Field\FieldTypeBasedThumbnailStrategy[] */ - private $strategies = []; + private array $strategies = []; /** * @param \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\Field\FieldTypeBasedThumbnailStrategy[]|\Traversable $strategies diff --git a/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php index b670cae32d..20342957cf 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php @@ -18,11 +18,9 @@ final class FirstMatchingFieldStrategy implements ThumbnailStrategy { - /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService */ - private $fieldTypeService; + private FieldTypeService $fieldTypeService; - /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\Field\ThumbnailStrategy */ - private $contentFieldStrategy; + private ContentFieldThumbnailStrategy $contentFieldStrategy; public function __construct( ContentFieldThumbnailStrategy $contentFieldStrategy, diff --git a/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php index baa837726c..de8180cb8b 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php @@ -15,8 +15,7 @@ final class StaticStrategy implements ThumbnailStrategy { - /** @var string */ - private $staticThumbnail; + private string $staticThumbnail; public function __construct(string $staticThumbnail) { diff --git a/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php b/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php index 4c19a6323f..900e20890d 100644 --- a/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php +++ b/src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php @@ -16,7 +16,7 @@ final class ThumbnailChainStrategy implements ThumbnailStrategy { /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy[] */ - private $strategies; + private iterable $strategies; /** * @param \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy[] $strategies diff --git a/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php b/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php index 4281c7b6c6..77c77f00c0 100644 --- a/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php +++ b/src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php @@ -18,7 +18,7 @@ final class ContentValidatorStrategy implements ContentValidator { /** @var \Ibexa\Contracts\Core\Repository\Validator\ContentValidator[] */ - private $contentValidators; + private iterable $contentValidators; public function __construct(iterable $contentValidators) { diff --git a/src/lib/Repository/TrashService.php b/src/lib/Repository/TrashService.php index 771fd8805c..40b71cc512 100644 --- a/src/lib/Repository/TrashService.php +++ b/src/lib/Repository/TrashService.php @@ -17,6 +17,7 @@ use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\TrashService as TrashServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -43,24 +44,19 @@ class TrashService implements TrashServiceInterface { /** @var \Ibexa\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var array */ - protected $settings; + protected array $settings; protected NameSchemaServiceInterface $nameSchemaService; - /** @var \Ibexa\Contracts\Core\Repository\PermissionCriterionResolver */ - private $permissionCriterionResolver; + private PermissionCriterionResolver $permissionCriterionResolver; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperInterface */ - private $proxyDomainMapper; + private ProxyDomainMapperInterface $proxyDomainMapper; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -386,7 +382,7 @@ protected function buildDomainTrashItemObject(Trashed $spiTrashItem, Content $co * * @return \DateTime */ - protected function getDateTime($timestamp) + protected function getDateTime($timestamp): DateTime { $dateTime = new DateTime(); $dateTime->setTimestamp($timestamp); diff --git a/src/lib/Repository/URLAliasService.php b/src/lib/Repository/URLAliasService.php index cf09650b4e..af4695a06e 100644 --- a/src/lib/Repository/URLAliasService.php +++ b/src/lib/Repository/URLAliasService.php @@ -15,6 +15,7 @@ use Ibexa\Contracts\Core\Repository\LanguageResolver; use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\URLAliasService as URLAliasServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Location; @@ -28,19 +29,15 @@ */ class URLAliasService implements URLAliasServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Content\UrlAlias\Handler */ - protected $urlAliasHandler; + protected Handler $urlAliasHandler; protected NameSchemaServiceInterface $nameSchemaService; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver */ - private $languageResolver; + private LanguageResolver $languageResolver; public function __construct( RepositoryInterface $repository, @@ -321,10 +318,10 @@ protected function selectAliasLanguageCode( */ protected function extractPath( SPIURLAlias $spiUrlAlias, - $languageCode, + ?string $languageCode, $showAllTranslations, array $prioritizedLanguageList - ) { + ): false|string { $pathData = []; $pathLevels = count($spiUrlAlias->pathData); @@ -394,7 +391,7 @@ protected function choosePrioritizedLanguageCode(array $entries, $showAllTransla * * @return array */ - protected function matchPath(SPIURLAlias $spiUrlAlias, $path, $languageCode) + protected function matchPath(SPIURLAlias $spiUrlAlias, $path, ?string $languageCode): array { $matchedPathElements = []; $matchedPathLanguageCodes = []; @@ -449,7 +446,7 @@ protected function matchLanguageCode(array $pathElementData, $pathElement) * * @return array */ - private function sortTranslationsByPrioritizedLanguages(array $translations) + private function sortTranslationsByPrioritizedLanguages(array $translations): array { $sortedTranslations = []; foreach ($this->languageResolver->getPrioritizedLanguages() as $languageCode) { @@ -623,7 +620,7 @@ public function removeAliases(array $aliasList): void * * @return \Ibexa\Contracts\Core\Persistence\Content\UrlAlias */ - protected function buildSPIUrlAlias(URLAlias $urlAlias) + protected function buildSPIUrlAlias(URLAlias $urlAlias): SPIURLAlias { return new SPIURLAlias( [ diff --git a/src/lib/Repository/URLService.php b/src/lib/Repository/URLService.php index b3c060d9f8..a70f4b40bb 100644 --- a/src/lib/Repository/URLService.php +++ b/src/lib/Repository/URLService.php @@ -11,11 +11,13 @@ use DateTime; use DateTimeInterface; use Exception; +use Ibexa\Contracts\Core\Persistence\URL\Handler; use Ibexa\Contracts\Core\Persistence\URL\Handler as URLHandler; use Ibexa\Contracts\Core\Persistence\URL\URL as SPIUrl; use Ibexa\Contracts\Core\Persistence\URL\URLUpdateStruct as SPIUrlUpdateStruct; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\URLService as URLServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -32,13 +34,11 @@ class URLService implements URLServiceInterface { /** @var \Ibexa\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\URL\Handler */ - protected $urlHandler; + protected Handler $urlHandler; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; public function __construct( RepositoryInterface $repository, diff --git a/src/lib/Repository/URLWildcardService.php b/src/lib/Repository/URLWildcardService.php index 3623370c99..5840ab5dc4 100644 --- a/src/lib/Repository/URLWildcardService.php +++ b/src/lib/Repository/URLWildcardService.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard as SPIUrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard\Handler; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\URLWildcardService as URLWildcardServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard; @@ -31,17 +32,13 @@ */ class URLWildcardService implements URLWildcardServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard\Handler */ - protected $urlWildcardHandler; + protected Handler $urlWildcardHandler; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var array */ - protected $settings; + protected array $settings; /** * Setups service with reference to repository object that created it & corresponding handler. @@ -77,7 +74,7 @@ public function __construct( * * @return \Ibexa\Contracts\Core\Repository\Values\Content\UrlWildcard */ - public function create(string $sourceUrl, string $destinationUrl, bool $forward = false): UrlWildcard + public function create(string $sourceUrl, string $destinationUrl, bool $forward = false): URLWildcard { if (false === $this->permissionResolver->hasAccess('content', 'urltranslator')) { throw new UnauthorizedException('content', 'urltranslator'); @@ -177,7 +174,7 @@ public function remove(URLWildcard $urlWildcard): void * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Core\Base\Exceptions\UnauthorizedException */ - public function load(int $id): UrlWildcard + public function load(int $id): URLWildcard { return $this->buildUrlWildcardDomainObject( $this->urlWildcardHandler->load($id) diff --git a/src/lib/Repository/UserPreferenceService.php b/src/lib/Repository/UserPreferenceService.php index e7af68563f..a1631cbdb0 100644 --- a/src/lib/Repository/UserPreferenceService.php +++ b/src/lib/Repository/UserPreferenceService.php @@ -9,9 +9,11 @@ namespace Ibexa\Core\Repository; use Exception; +use Ibexa\Contracts\Core\Persistence\UserPreference\Handler; use Ibexa\Contracts\Core\Persistence\UserPreference\Handler as UserPreferenceHandler; use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreference; use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\UserPreferenceService as UserPreferenceServiceInterface; use Ibexa\Contracts\Core\Repository\Values\UserPreference\UserPreference as APIUserPreference; @@ -20,11 +22,9 @@ class UserPreferenceService implements UserPreferenceServiceInterface { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\UserPreference\Handler */ - private $userPreferenceHandler; + private Handler $userPreferenceHandler; /** * @param \Ibexa\Contracts\Core\Repository\Repository $repository @@ -47,7 +47,7 @@ public function loadUserPreferences(int $offset = 0, int $limit = 25): UserPrefe $list->totalCount = $this->userPreferenceHandler->countUserPreferences($currentUserId); if ($list->totalCount > 0) { - $list->items = array_map(function (UserPreference $spiUserPreference) { + $list->items = array_map(function (UserPreference $spiUserPreference): APIUserPreference { return $this->buildDomainObject($spiUserPreference); }, $this->userPreferenceHandler->loadUserPreferences($currentUserId, $offset, $limit)); } @@ -74,7 +74,7 @@ public function setUserPreference(array $userPreferenceSetStructs): void try { $value = (string)$userPreferenceSetStruct->value; - } catch (\Exception $exception) { + } catch (Exception $exception) { throw new InvalidArgumentException('value', 'Cannot convert value to string at index ' . $key); } diff --git a/src/lib/Repository/UserService.php b/src/lib/Repository/UserService.php index 7a97184b0d..5ea59dbd1f 100644 --- a/src/lib/Repository/UserService.php +++ b/src/lib/Repository/UserService.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Persistence\User\UserTokenUpdateStruct as SPIUserTokenUpdateStruct; use Ibexa\Contracts\Core\Repository\PasswordHashService; use Ibexa\Contracts\Core\Repository\PermissionResolver; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Repository as RepositoryInterface; use Ibexa\Contracts\Core\Repository\UserService as UserServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; @@ -64,14 +65,11 @@ class UserService implements UserServiceInterface { private const USER_FIELD_TYPE_NAME = 'ezuser'; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - protected $repository; + protected Repository $repository; - /** @var \Ibexa\Contracts\Core\Persistence\User\Handler */ - protected $userHandler; + protected Handler $userHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler */ - private $locationHandler; + private LocationHandler $locationHandler; /** @var array */ protected $settings; @@ -79,18 +77,15 @@ class UserService implements UserServiceInterface /** @var \Psr\Log\LoggerInterface|null */ protected $logger; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; - /** @var \Ibexa\Contracts\Core\Repository\PasswordHashService */ - private $passwordHashService; + private PasswordHashService $passwordHashService; - /** @var \Ibexa\Core\Repository\User\PasswordValidatorInterface */ - private $passwordValidator; + private PasswordValidatorInterface $passwordValidator; private ConfigResolverInterface $configResolver; - public function setLogger(LoggerInterface $logger = null) + public function setLogger(LoggerInterface $logger = null): void { $this->logger = $logger; } diff --git a/src/lib/Repository/Validator/ContentCreateStructValidator.php b/src/lib/Repository/Validator/ContentCreateStructValidator.php index 2f69e7d5de..39af8e848b 100644 --- a/src/lib/Repository/Validator/ContentCreateStructValidator.php +++ b/src/lib/Repository/Validator/ContentCreateStructValidator.php @@ -21,11 +21,9 @@ */ final class ContentCreateStructValidator implements ContentValidator { - /** @var \Ibexa\Core\Repository\Mapper\ContentMapper */ - private $contentMapper; + private ContentMapper $contentMapper; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; public function __construct( ContentMapper $contentMapper, diff --git a/src/lib/Repository/Validator/ContentUpdateStructValidator.php b/src/lib/Repository/Validator/ContentUpdateStructValidator.php index 4c49c84c31..0691f1684b 100644 --- a/src/lib/Repository/Validator/ContentUpdateStructValidator.php +++ b/src/lib/Repository/Validator/ContentUpdateStructValidator.php @@ -23,14 +23,12 @@ */ final class ContentUpdateStructValidator implements ContentValidator { - /** @var \Ibexa\Core\Repository\Mapper\ContentMapper */ - private $contentMapper; + private ContentMapper $contentMapper; - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\Handler */ - private $contentLanguageHandler; + private Handler $contentLanguageHandler; public function __construct( ContentMapper $contentMapper, diff --git a/src/lib/Repository/Validator/TargetContentValidator.php b/src/lib/Repository/Validator/TargetContentValidator.php index 0efcc870a9..64ed28b500 100644 --- a/src/lib/Repository/Validator/TargetContentValidator.php +++ b/src/lib/Repository/Validator/TargetContentValidator.php @@ -9,6 +9,7 @@ namespace Ibexa\Core\Repository\Validator; use Ibexa\Contracts\Core\Persistence\Content; +use Ibexa\Contracts\Core\Persistence\Content\Handler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Core\FieldType\ValidationError; @@ -19,14 +20,12 @@ */ final class TargetContentValidator implements TargetContentValidatorInterface { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $contentHandler; + private Handler $contentHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - private $contentTypeHandler; + private Content\Type\Handler $contentTypeHandler; public function __construct( - Content\Handler $contentHandler, + Handler $contentHandler, Content\Type\Handler $contentTypeHandler ) { $this->contentHandler = $contentHandler; diff --git a/src/lib/Repository/Validator/UserPasswordValidator.php b/src/lib/Repository/Validator/UserPasswordValidator.php index a802df09ef..10d97ba30c 100644 --- a/src/lib/Repository/Validator/UserPasswordValidator.php +++ b/src/lib/Repository/Validator/UserPasswordValidator.php @@ -24,8 +24,7 @@ class UserPasswordValidator private const AT_LEAST_ONE_NUMERIC_CHARACTER_REGEX = '/\pN/u'; private const AT_LEAST_ONE_NON_ALPHANUMERIC_CHARACTER_REGEX = '/[^\p{Ll}\p{Lu}\pL\pN]/u'; - /** @var array */ - private $constraints; + private array $constraints; /** * @param array $constraints diff --git a/src/lib/Repository/Validator/VersionValidator.php b/src/lib/Repository/Validator/VersionValidator.php index 231addad70..68bec3623e 100644 --- a/src/lib/Repository/Validator/VersionValidator.php +++ b/src/lib/Repository/Validator/VersionValidator.php @@ -21,8 +21,7 @@ */ final class VersionValidator implements ContentValidator { - /** @var \Ibexa\Core\FieldType\FieldTypeRegistry */ - private $fieldTypeRegistry; + private FieldTypeRegistry $fieldTypeRegistry; public function __construct( FieldTypeRegistry $fieldTypeRegistry diff --git a/src/lib/Repository/Values/Content/Content.php b/src/lib/Repository/Values/Content/Content.php index 83a362ca29..207cff8d09 100644 --- a/src/lib/Repository/Values/Content/Content.php +++ b/src/lib/Repository/Values/Content/Content.php @@ -50,7 +50,7 @@ class Content extends APIContent * * @var array> */ - private $fieldDefinitionTranslationMap = []; + private array $fieldDefinitionTranslationMap = []; /** * The first matched field language among user provided prioritized languages. diff --git a/src/lib/Repository/Values/ContentType/ContentType.php b/src/lib/Repository/Values/ContentType/ContentType.php index b9c8f02e97..fdd04dfd7b 100644 --- a/src/lib/Repository/Values/ContentType/ContentType.php +++ b/src/lib/Repository/Values/ContentType/ContentType.php @@ -51,10 +51,8 @@ class ContentType extends APIContentType /** * Contains the content type field definitions from this type. - * - * @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCollection */ - protected $fieldDefinitions; + protected FieldDefinitionCollection $fieldDefinitions; public function __construct(array $data = []) { diff --git a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php index 38c76a59c0..f7fab366b6 100644 --- a/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php +++ b/src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php @@ -19,10 +19,10 @@ final class FieldDefinitionCollection implements FieldDefinitionCollectionInterface { /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition[] */ - private $fieldDefinitions; + private array $fieldDefinitions; /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition[] */ - private $fieldDefinitionsByIdentifier; + private array $fieldDefinitionsByIdentifier; /** * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition[] diff --git a/src/lib/Repository/Values/ContentType/FieldType.php b/src/lib/Repository/Values/ContentType/FieldType.php index 73892d38c4..2818d4d582 100644 --- a/src/lib/Repository/Values/ContentType/FieldType.php +++ b/src/lib/Repository/Values/ContentType/FieldType.php @@ -27,7 +27,7 @@ class FieldType implements FieldTypeInterface * * @var \Ibexa\Core\FieldType\FieldType */ - protected $internalFieldType; + protected SPIFieldTypeInterface $internalFieldType; /** * @param \Ibexa\Contracts\Core\FieldType\FieldType $fieldType diff --git a/src/lib/Repository/Values/User/PolicyDraft.php b/src/lib/Repository/Values/User/PolicyDraft.php index 7bf74b2049..ba92515cb7 100644 --- a/src/lib/Repository/Values/User/PolicyDraft.php +++ b/src/lib/Repository/Values/User/PolicyDraft.php @@ -22,10 +22,8 @@ class PolicyDraft extends APIPolicyDraft /** * Set of properties that are specific to PolicyDraft. - * - * @var array */ - private $draftProperties = ['originalId' => true]; + private array $draftProperties = ['originalId' => true]; public function __get($property) { diff --git a/src/lib/Repository/Values/User/UserReference.php b/src/lib/Repository/Values/User/UserReference.php index 0a0aba4027..bea8516de6 100644 --- a/src/lib/Repository/Values/User/UserReference.php +++ b/src/lib/Repository/Values/User/UserReference.php @@ -17,8 +17,7 @@ */ class UserReference implements APIUserReference { - /** @var int */ - private $userId; + private int $userId; public function __construct(int $userId) { diff --git a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php index 78ae7a695a..2425d03cdd 100644 --- a/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/AbstractSearchEventSubscriber.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Common\EventSubscriber; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; +use Ibexa\Contracts\Core\Search\Handler; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; /** @@ -15,11 +16,9 @@ */ abstract class AbstractSearchEventSubscriber { - /** @var \Ibexa\Contracts\Core\Search\Handler */ - protected $searchHandler; + protected Handler $searchHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected PersistenceHandler $persistenceHandler; public function __construct( SearchHandler $searchHandler, diff --git a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php index a15ffd61c8..a75b0221b4 100644 --- a/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php @@ -33,7 +33,7 @@ public static function getSubscribedEvents(): array ]; } - public function onCopyContent(CopyContentEvent $event) + public function onCopyContent(CopyContentEvent $event): void { $this->searchHandler->indexContent( $this->persistenceHandler->contentHandler()->load( @@ -51,7 +51,7 @@ public function onCopyContent(CopyContentEvent $event) } } - public function onDeleteContent(DeleteContentEvent $event) + public function onDeleteContent(DeleteContentEvent $event): void { $this->searchHandler->deleteContent($event->getContentInfo()->id); @@ -60,7 +60,7 @@ public function onDeleteContent(DeleteContentEvent $event) } } - public function onDeleteTranslation(DeleteTranslationEvent $event) + public function onDeleteTranslation(DeleteTranslationEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getContentInfo()->id @@ -93,7 +93,7 @@ public function onDeleteTranslation(DeleteTranslationEvent $event) } } - public function onHideContent(HideContentEvent $event) + public function onHideContent(HideContentEvent $event): void { $locations = $this->persistenceHandler->locationHandler()->loadLocationsByContent($event->getContentInfo()->id); foreach ($locations as $location) { @@ -101,7 +101,7 @@ public function onHideContent(HideContentEvent $event) } } - public function onPublishVersion(PublishVersionEvent $event) + public function onPublishVersion(PublishVersionEvent $event): void { $this->searchHandler->indexContent( $this->persistenceHandler->contentHandler()->load($event->getContent()->id, $event->getContent()->getVersionInfo()->versionNo) @@ -113,7 +113,7 @@ public function onPublishVersion(PublishVersionEvent $event) } } - public function onRevealContent(RevealContentEvent $event) + public function onRevealContent(RevealContentEvent $event): void { $locations = $this->persistenceHandler->locationHandler()->loadLocationsByContent($event->getContentInfo()->id); foreach ($locations as $location) { @@ -121,7 +121,7 @@ public function onRevealContent(RevealContentEvent $event) } } - public function onUpdateContentMetadata(UpdateContentMetadataEvent $event) + public function onUpdateContentMetadata(UpdateContentMetadataEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($event->getContent()->id); if ($contentInfo->status !== ContentInfo::STATUS_PUBLISHED) { diff --git a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php index 37ba9c7e45..25affda515 100644 --- a/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php @@ -36,12 +36,12 @@ public static function getSubscribedEvents(): array ]; } - public function onCopySubtree(CopySubtreeEvent $event) + public function onCopySubtree(CopySubtreeEvent $event): void { $this->indexSubtree($event->getLocation()->id); } - public function onCreateLocation(CreateLocationEvent $event) + public function onCreateLocation(CreateLocationEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getContentInfo()->id @@ -61,7 +61,7 @@ public function onCreateLocation(CreateLocationEvent $event) ); } - public function onDeleteLocation(DeleteLocationEvent $event) + public function onDeleteLocation(DeleteLocationEvent $event): void { $this->searchHandler->deleteLocation( $event->getLocation()->id, @@ -69,24 +69,24 @@ public function onDeleteLocation(DeleteLocationEvent $event) ); } - public function onHideLocation(HideLocationEvent $event) + public function onHideLocation(HideLocationEvent $event): void { $this->indexSubtree($event->getHiddenLocation()->id); } - public function onMoveSubtree(MoveSubtreeEvent $event) + public function onMoveSubtree(MoveSubtreeEvent $event): void { $this->indexSubtree($event->getLocation()->id); } - public function onSwapLocation(SwapLocationEvent $event) + public function onSwapLocation(SwapLocationEvent $event): void { $locations = [ $event->getLocation1(), $event->getLocation2(), ]; - array_walk($locations, function (Location $location) { + array_walk($locations, function (Location $location): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($location->contentId); $this->searchHandler->indexContent( @@ -102,12 +102,12 @@ public function onSwapLocation(SwapLocationEvent $event) }); } - public function onUnhideLocation(UnhideLocationEvent $event) + public function onUnhideLocation(UnhideLocationEvent $event): void { $this->indexSubtree($event->getRevealedLocation()->id); } - public function onUpdateLocation(UpdateLocationEvent $event) + public function onUpdateLocation(UpdateLocationEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getLocation()->contentId diff --git a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php index b679eeb487..cae26cb27a 100644 --- a/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php @@ -19,7 +19,7 @@ public static function getSubscribedEvents(): array ]; } - public function onSetContentState(SetContentStateEvent $event) + public function onSetContentState(SetContentStateEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($event->getContentInfo()->id); diff --git a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php index 22ea6630b7..010ffeb141 100644 --- a/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php @@ -19,7 +19,7 @@ public static function getSubscribedEvents(): array ]; } - public function onAssignSection(AssignSectionEvent $event) + public function onAssignSection(AssignSectionEvent $event): void { $contentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo($event->getContentInfo()->id); $this->searchHandler->indexContent( diff --git a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php index dfc798bbc6..4fc646b86b 100644 --- a/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php @@ -26,12 +26,12 @@ public static function getSubscribedEvents(): array ]; } - public function onRecover(RecoverEvent $event) + public function onRecover(RecoverEvent $event): void { $this->indexSubtree($event->getLocation()->id); } - public function onTrash(TrashEvent $event) + public function onTrash(TrashEvent $event): void { if ($event->getTrashItem() instanceof TrashItem) { $this->searchHandler->deleteContent( diff --git a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php index 2a1c880622..077e8b8adc 100644 --- a/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php +++ b/src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php @@ -38,7 +38,7 @@ public static function getSubscribedEvents(): array ]; } - public function onCreateUser(CreateUserEvent $event) + public function onCreateUser(CreateUserEvent $event): void { $userContentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getUser()->id @@ -60,7 +60,7 @@ public function onCreateUser(CreateUserEvent $event) } } - public function onCreateUserGroup(CreateUserGroupEvent $event) + public function onCreateUserGroup(CreateUserGroupEvent $event): void { $userGroupContentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getUserGroup()->id @@ -82,7 +82,7 @@ public function onCreateUserGroup(CreateUserGroupEvent $event) } } - public function onDeleteUser(DeleteUserEvent $event) + public function onDeleteUser(DeleteUserEvent $event): void { $this->searchHandler->deleteContent($event->getUser()->id); @@ -91,7 +91,7 @@ public function onDeleteUser(DeleteUserEvent $event) } } - public function onDeleteUserGroup(DeleteUserGroupEvent $event) + public function onDeleteUserGroup(DeleteUserGroupEvent $event): void { $this->searchHandler->deleteContent($event->getUserGroup()->id); @@ -100,7 +100,7 @@ public function onDeleteUserGroup(DeleteUserGroupEvent $event) } } - public function onMoveUserGroup(MoveUserGroupEvent $event) + public function onMoveUserGroup(MoveUserGroupEvent $event): void { $userGroupContentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getUserGroup()->id @@ -109,7 +109,7 @@ public function onMoveUserGroup(MoveUserGroupEvent $event) $this->indexSubtree($userGroupContentInfo->mainLocationId); } - public function onUpdateUser(UpdateUserEvent $event) + public function onUpdateUser(UpdateUserEvent $event): void { $userContentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getUser()->id @@ -131,7 +131,7 @@ public function onUpdateUser(UpdateUserEvent $event) } } - public function onUpdateUserGroup(UpdateUserGroupEvent $event) + public function onUpdateUserGroup(UpdateUserGroupEvent $event): void { $userContentInfo = $this->persistenceHandler->contentHandler()->loadContentInfo( $event->getUserGroup()->id diff --git a/src/lib/Search/Common/FieldNameGenerator.php b/src/lib/Search/Common/FieldNameGenerator.php index 696c646096..11fc9c34c2 100644 --- a/src/lib/Search/Common/FieldNameGenerator.php +++ b/src/lib/Search/Common/FieldNameGenerator.php @@ -33,10 +33,8 @@ class FieldNameGenerator * ... * ) * - * - * @var array */ - protected $fieldNameMapping; + protected array $fieldNameMapping; public function __construct(array $fieldNameMapping) { diff --git a/src/lib/Search/Common/FieldNameResolver.php b/src/lib/Search/Common/FieldNameResolver.php index 1e24e5f968..e071e7cfd8 100644 --- a/src/lib/Search/Common/FieldNameResolver.php +++ b/src/lib/Search/Common/FieldNameResolver.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Common; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -22,24 +23,18 @@ class FieldNameResolver { /** * Field registry. - * - * @var \Ibexa\Core\Search\Common\FieldRegistry */ - protected $fieldRegistry; + protected FieldRegistry $fieldRegistry; /** * Content type handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; /** * Field name generator. - * - * @var \Ibexa\Core\Search\Common\FieldNameGenerator */ - protected $nameGenerator; + protected FieldNameGenerator $nameGenerator; /** * Create from search field registry, content type handler and field name generator. @@ -105,7 +100,7 @@ public function getFieldTypes( $fieldDefinitionIdentifier, $fieldTypeIdentifier = null, $name = null - ) { + ): array { $fieldMap = $this->getSearchableFieldMap(); $fieldTypeNameMap = []; @@ -166,7 +161,7 @@ public function getSortFieldName( $contentTypeIdentifier, $fieldDefinitionIdentifier, $name = null - ) { + ): ?false { $fieldMap = $this->getSearchableFieldMap(); // First check if field exists in type, there is nothing to do if it doesn't @@ -202,10 +197,10 @@ public function getIndexFieldName( $criterionOrSortClause, $contentTypeIdentifier, $fieldDefinitionIdentifier, - $fieldTypeIdentifier, + string $fieldTypeIdentifier, $name, $isSortField - ) { + ): array { // If criterion or sort clause implements CustomFieldInterface and custom field is set for // ContentType/FieldDefinition, return it if ( diff --git a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php index c1e2aa3d9b..b6ae18b3e7 100644 --- a/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/IntegerMapper.php @@ -21,7 +21,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof IntegerField; } - public function map(Field $field) + public function map(Field $field): int { return $this->convert($field->getValue()); } diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php index 11b9e7a1f9..866170c592 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleBooleanMapper.php @@ -21,7 +21,10 @@ public function canMap(Field $field): bool return $field->getType() instanceof MultipleBooleanField; } - public function map(Field $field) + /** + * @return bool[] + */ + public function map(Field $field): array { $values = []; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php index 7260c96b7e..32a68739a3 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php @@ -25,9 +25,9 @@ public function canMap(Field $field): bool * * @param \Ibexa\Contracts\Core\Search\Field $field * - * @return mixed + * @return mixed[] */ - public function map(Field $field) + public function map(Field $field): array { $values = []; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php index 60dad1d0af..f0f0300735 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php @@ -20,7 +20,10 @@ public function canMap(Field $field): bool return $field->getType() instanceof MultipleIntegerField; } - public function map(Field $field) + /** + * @return int[] + */ + public function map(Field $field): array { $values = []; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php index e0001b7480..fddc8402e6 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php @@ -20,7 +20,10 @@ public function canMap(Field $field): bool return $field->getType() instanceof MultipleRemoteIdentifierField; } - public function map(Field $field) + /** + * @return string[] + */ + public function map(Field $field): array { $values = []; diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php index 0d2d6bcfb1..7e6a56605b 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php @@ -32,7 +32,7 @@ public function canMap(Field $field): bool * * @return array */ - public function map(Field $field) + public function map(Field $field): array { $values = []; diff --git a/src/lib/Search/Common/FieldValueMapper/StringMapper.php b/src/lib/Search/Common/FieldValueMapper/StringMapper.php index 137d1f0e55..949046b331 100644 --- a/src/lib/Search/Common/FieldValueMapper/StringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/StringMapper.php @@ -24,7 +24,7 @@ public function canMap(Field $field): bool return $field->getType() instanceof FieldType\StringField; } - public function map(Field $field) + public function map(Field $field): string { return $this->convert($field->getValue()); } diff --git a/src/lib/Search/Common/Indexer.php b/src/lib/Search/Common/Indexer.php index 064af65d46..48317de863 100644 --- a/src/lib/Search/Common/Indexer.php +++ b/src/lib/Search/Common/Indexer.php @@ -10,6 +10,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\Statement; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; +use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; @@ -21,17 +22,13 @@ */ abstract class Indexer { - /** @var \Psr\Log\LoggerInterface */ - protected $logger; + protected LoggerInterface $logger; - /** @var \Ibexa\Contracts\Core\Persistence\Handler */ - protected $persistenceHandler; + protected Handler $persistenceHandler; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; - /** @var \Ibexa\Contracts\Core\Search\Handler */ - protected $searchHandler; + protected SearchHandler $searchHandler; public function __construct( LoggerInterface $logger, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php index 5aab74e911..4b480b2887 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php @@ -39,7 +39,7 @@ public function __construct(array $handlers = []) * * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler $handler */ - public function addHandler(CriterionHandler $handler) + public function addHandler(CriterionHandler $handler): void { $this->handlers[] = $handler; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php index cbf0535df6..24eda511fe 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php @@ -30,8 +30,7 @@ abstract class CriterionHandler Operator::LIKE => 'like', ]; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform|null */ protected $dbPlatform; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php index bb8118e84e..a311f39398 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -9,6 +9,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -25,15 +26,10 @@ class ContentTypeIdentifier extends CriterionHandler { /** * Content type handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; - /** - * @var \Psr\Log\LoggerInterface - */ - protected $logger; + protected LoggerInterface $logger; public function __construct( Connection $connection, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index ef02608d96..ee45ec705f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -14,10 +14,12 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry as Registry; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Ibexa\Core\Persistence\TransformationProcessor; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; +use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter as FieldValueConverter; /** @@ -27,24 +29,18 @@ class Field extends FieldBase { /** * Field converter registry. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $fieldConverterRegistry; + protected ConverterRegistry $fieldConverterRegistry; /** * Field value converter. - * - * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Converter */ - protected $fieldValueConverter; + protected Converter $fieldValueConverter; /** * Transformation processor. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor */ - protected $transformationProcessor; + protected TransformationProcessor $transformationProcessor; public function __construct( Connection $connection, @@ -80,7 +76,7 @@ public function accept(CriterionInterface $criterion): bool * @throws \RuntimeException if no converter is found * @throws \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound */ - protected function getFieldsInformation($fieldIdentifier) + protected function getFieldsInformation($fieldIdentifier): array { $fieldMapArray = []; $fieldMap = $this->contentTypeHandler->getSearchableFieldMap(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php index 7ab13f6662..727d108bd2 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php @@ -11,6 +11,7 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; @@ -22,17 +23,13 @@ abstract class FieldBase extends CriterionHandler { /** * Content type handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; /** * Language handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected LanguageHandler $languageHandler; /** * @throws \Doctrine\DBAL\DBALException diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php index 9a6dd3ac77..dc2e7859db 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php @@ -16,6 +16,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry as Registry; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; @@ -27,15 +28,10 @@ class FieldEmpty extends FieldBase { /** * Field converter registry. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $fieldConverterRegistry; + protected ConverterRegistry $fieldConverterRegistry; - /** - * @var \Ibexa\Contracts\Core\Repository\FieldTypeService - */ - protected $fieldTypeService; + protected FieldTypeService $fieldTypeService; public function __construct( Connection $connection, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index d2ac6395ec..a5fc72dba7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -45,7 +45,7 @@ public function accept(CriterionInterface $criterion): bool * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException If no searchable fields are found for the given $fieldIdentifier. */ - protected function getFieldDefinitionsIds($fieldDefinitionIdentifier) + protected function getFieldDefinitionsIds($fieldDefinitionIdentifier): array { $fieldDefinitionIdList = []; $fieldMap = $this->contentTypeHandler->getSearchableFieldMap(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php index 2bed57d87c..c9811368f9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php @@ -18,17 +18,13 @@ class Converter { /** * Criterion field value handler registry. - * - * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\HandlerRegistry */ - protected $registry; + protected HandlerRegistry $registry; /** * Default Criterion field value handler. - * - * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler */ - protected $defaultHandler; + protected ?Handler $defaultHandler; /** * Construct from an array of Criterion field value handlers. diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php index 1142398ea2..8025e5f90e 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php @@ -21,8 +21,7 @@ */ abstract class Handler { - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Map of criterion operators to the respective function names @@ -40,10 +39,8 @@ abstract class Handler /** * Transformation processor. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor */ - protected $transformationProcessor; + protected TransformationProcessor $transformationProcessor; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform|null */ protected $dbPlatform; @@ -76,7 +73,7 @@ public function handle( Criterion $criterion, string $column ) { - if (is_array($criterion->value) && Criterion\Operator::isUnary($criterion->operator)) { + if (is_array($criterion->value) && CriterionOperator::isUnary($criterion->operator)) { if (count($criterion->value) > 1) { throw new InvalidArgumentException('$criterion->value', "Too many arguments for unary operator '$criterion->operator'"); } @@ -85,7 +82,7 @@ public function handle( } switch ($criterion->operator) { - case Criterion\Operator::IN: + case CriterionOperator::IN: $values = array_map([$this, 'prepareParameter'], $criterion->value); $filter = $subQuery->expr()->in( $column, @@ -96,7 +93,7 @@ public function handle( ); break; - case Criterion\Operator::BETWEEN: + case CriterionOperator::BETWEEN: $filter = $this->dbPlatform->getBetweenExpression( $column, $outerQuery->createNamedParameter($this->lowerCase($criterion->value[0])), @@ -104,11 +101,11 @@ public function handle( ); break; - case Criterion\Operator::EQ: - case Criterion\Operator::GT: - case Criterion\Operator::GTE: - case Criterion\Operator::LT: - case Criterion\Operator::LTE: + case CriterionOperator::EQ: + case CriterionOperator::GT: + case CriterionOperator::GTE: + case CriterionOperator::LT: + case CriterionOperator::LTE: $operatorFunction = $this->comparatorMap[$criterion->operator]; $filter = $subQuery->expr()->{$operatorFunction}( $column, @@ -116,7 +113,7 @@ public function handle( ); break; - case Criterion\Operator::LIKE: + case CriterionOperator::LIKE: $value = str_replace('*', '%', $this->prepareLikeString($criterion->value)); $filter = $subQuery->expr()->like( @@ -125,7 +122,7 @@ public function handle( ); break; - case Criterion\Operator::CONTAINS: + case CriterionOperator::CONTAINS: $filter = $subQuery->expr()->like( $column, $outerQuery->createNamedParameter( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php index 590737cac0..520f1e34b3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php @@ -25,10 +25,8 @@ class Collection extends Handler { /** * Character separating indexed values. - * - * @var string */ - protected $separator; + protected string $separator; public function __construct( Connection $connection, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php index 7128991443..49f76280a8 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php @@ -41,7 +41,7 @@ public function __construct(array $map = []) * @param string $fieldTypeIdentifier * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue\Handler $handler */ - public function register($fieldTypeIdentifier, $handler) + public function register($fieldTypeIdentifier, $handler): void { $this->map[$fieldTypeIdentifier] = $handler; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index b6e2bb0cee..cea1b2b9f7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -26,10 +26,8 @@ class FullText extends CriterionHandler { /** * Full text search configuration options. - * - * @var array */ - protected $configuration = [ + protected array $configuration = [ // @see getStopWordThresholdValue() 'stopWordThresholdFactor' => 0.66, 'enableWildcards' => true, @@ -70,21 +68,16 @@ class FullText extends CriterionHandler ]; /** - * @var int|null - * * @see getStopWordThresholdValue() */ - private $stopWordThresholdValue; + private ?int $stopWordThresholdValue = null; /** * Transformation processor to normalize search strings. - * - * @var \Ibexa\Core\Persistence\TransformationProcessor */ - protected $processor; + protected TransformationProcessor $processor; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; /** * @param array $configuration diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php index 8375c77e6b..b4461149d5 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php @@ -20,8 +20,7 @@ */ class LanguageCode extends CriterionHandler { - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $maskGenerator; + private MaskGenerator $maskGenerator; public function __construct(Connection $connection, MaskGenerator $maskGenerator) { diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index f8945726b9..53e8adf500 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -45,7 +45,7 @@ public function accept(CriterionInterface $criterion): bool * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException If no searchable fields are found for the given $fieldIdentifier. */ - protected function getFieldDefinitionIds($fieldIdentifier) + protected function getFieldDefinitionIds($fieldIdentifier): array { $fieldDefinitionIdList = []; $fieldMap = $this->contentTypeHandler->getSearchableFieldMap(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php index 8ce58368ee..941d87906d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php @@ -18,8 +18,7 @@ class UserEmail extends CriterionHandler { - /** @var \Ibexa\Core\Persistence\TransformationProcessor */ - private $transformationProcessor; + private TransformationProcessor $transformationProcessor; public function __construct( Connection $connection, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php index 443fef7ae9..c1b28ca6ad 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php @@ -18,8 +18,7 @@ class UserLogin extends CriterionHandler { - /** @var \Ibexa\Core\Persistence\TransformationProcessor */ - private $transformationProcessor; + private TransformationProcessor $transformationProcessor; public function __construct( Connection $connection, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php index 053eb7eb10..0cc3d424ab 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php @@ -45,7 +45,7 @@ public function __construct(array $handlers = []) * * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler $handler */ - public function addHandler(SortClauseHandler $handler) + public function addHandler(SortClauseHandler $handler): void { $this->handlers[] = $handler; } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php index 7d9c68cce2..0fcde0177c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php @@ -16,8 +16,7 @@ */ abstract class SortClauseHandler { - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform|null */ protected $dbPlatform; diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php index 9a03bf68b3..c9ba29c83f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php @@ -15,10 +15,9 @@ class RandomSortClauseHandlerFactory { /** @var iterable|\Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom[] */ - private $randomSortClauseGateways = []; + private iterable $randomSortClauseGateways; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection, iterable $randomSortClauseGateways) { diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php index 367120fdef..d7aa888ab6 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php @@ -10,6 +10,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; @@ -24,17 +25,13 @@ class Field extends SortClauseHandler { /** * Language handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected Handler $languageHandler; /** * Content type handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected ContentTypeHandler $contentTypeHandler; public function __construct( Connection $connection, @@ -158,7 +155,7 @@ public function applyJoin( protected function getFieldCondition( QueryBuilder $query, array $languageSettings, - $fieldTableName + string $fieldTableName ) { // 1. Use main language(s) by default if (empty($languageSettings['languages'])) { diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 30113aad04..446dd7f117 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -12,6 +12,7 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; @@ -27,32 +28,25 @@ */ final class DoctrineDatabase extends Gateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; /** * Criteria converter. - * - * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter */ - private $criteriaConverter; + private CriteriaConverter $criteriaConverter; /** * Sort clause converter. - * - * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter */ - private $sortClauseConverter; + private SortClauseConverter $sortClauseConverter; /** * Language handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - private $languageHandler; + private Handler $languageHandler; /** * @throws \Doctrine\DBAL\DBALException diff --git a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php index 6415ac3b87..b104ffcea3 100644 --- a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php @@ -19,10 +19,7 @@ */ class ExceptionConversion extends Gateway { - /** - * @var \Ibexa\Core\Search\Legacy\Content\Gateway - */ - protected $innerGateway; + protected Gateway $innerGateway; public function __construct(Gateway $innerGateway) { diff --git a/src/lib/Search/Legacy/Content/Handler.php b/src/lib/Search/Legacy/Content/Handler.php index ccf685cce0..72d2d041ec 100644 --- a/src/lib/Search/Legacy/Content/Handler.php +++ b/src/lib/Search/Legacy/Content/Handler.php @@ -21,6 +21,7 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper as LocationMapper; +use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Search\Legacy\Content\Location\Gateway as LocationGateway; use Ibexa\Core\Search\Legacy\Content\Mapper\FullTextMapper; @@ -53,52 +54,38 @@ class Handler implements SearchHandlerInterface { /** * Content locator gateway. - * - * @var \Ibexa\Core\Search\Legacy\Content\Gateway */ - protected $gateway; + protected Gateway $gateway; /** * Location locator gateway. - * - * @var \Ibexa\Core\Search\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected LocationGateway $locationGateway; /** * Word indexer gateway. - * - * @var \Ibexa\Core\Search\Legacy\Content\WordIndexer\Gateway */ - protected $indexerGateway; + protected WordIndexerGateway $indexerGateway; /** * Content mapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected Mapper $contentMapper; /** * Location locationMapper. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected LocationMapper $locationMapper; /** * Language handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $languageHandler; + protected LanguageHandler $languageHandler; /** * FullText mapper. - * - * @var \Ibexa\Core\Search\Legacy\Content\Mapper\FullTextMapper */ - protected $mapper; + protected FullTextMapper $mapper; public function __construct( Gateway $gateway, @@ -257,7 +244,7 @@ public function findLocations(LocationQuery $query, array $languageFilter = []): * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ - public function suggest($prefix, $fieldPaths = [], $limit = 10, Criterion $filter = null) + public function suggest($prefix, $fieldPaths = [], $limit = 10, Criterion $filter = null): never { throw new NotImplementedException('Suggestions are not supported by Legacy search engine.'); } @@ -267,7 +254,7 @@ public function suggest($prefix, $fieldPaths = [], $limit = 10, Criterion $filte * * @param \Ibexa\Contracts\Core\Persistence\Content $content */ - public function indexContent(Content $content) + public function indexContent(Content $content): void { $fullTextValue = $this->mapper->mapContent($content); @@ -280,7 +267,7 @@ public function indexContent(Content $content) * @param \Ibexa\Contracts\Core\Persistence\Content[] $contentList * @param callable $errorCallback (Content $content, NotFoundException $e) */ - public function bulkIndex(array $contentList, callable $errorCallback) + public function bulkIndex(array $contentList, callable $errorCallback): void { $fullTextBulkData = []; foreach ($contentList as $content) { @@ -297,7 +284,7 @@ public function bulkIndex(array $contentList, callable $errorCallback) /** * @param \Ibexa\Contracts\Core\Persistence\Content\Location $location */ - public function indexLocation(Location $location) + public function indexLocation(Location $location): void { // Not needed with Legacy Storage/Search Engine } @@ -308,7 +295,7 @@ public function indexLocation(Location $location) * @param int $contentId * @param int|null $versionId */ - public function deleteContent($contentId, $versionId = null) + public function deleteContent($contentId, $versionId = null): void { $this->indexerGateway->remove($contentId, $versionId); } @@ -324,7 +311,7 @@ public function deleteTranslation(int $contentId, string $languageCode): void * @param mixed $locationId * @param mixed $contentId */ - public function deleteLocation($locationId, $contentId) + public function deleteLocation($locationId, $contentId): void { // Not needed with Legacy Storage/Search Engine } @@ -332,7 +319,7 @@ public function deleteLocation($locationId, $contentId) /** * Purges all contents from the index. */ - public function purgeIndex() + public function purgeIndex(): void { $this->indexerGateway->purgeIndex(); } @@ -342,7 +329,7 @@ public function purgeIndex() * * @param bool $flush */ - public function commit($flush = false) + public function commit($flush = false): void { // Not needed with Legacy Storage/Search Engine } diff --git a/src/lib/Search/Legacy/Content/Indexer.php b/src/lib/Search/Legacy/Content/Indexer.php index 51d013a7de..72c927425b 100644 --- a/src/lib/Search/Legacy/Content/Indexer.php +++ b/src/lib/Search/Legacy/Content/Indexer.php @@ -32,7 +32,7 @@ public function getName(): string return 'Ibexa Legacy (SQL) Search Engine'; } - public function updateSearchIndex(array $contentIds, $commit) + public function updateSearchIndex(array $contentIds, $commit): void { $contentHandler = $this->persistenceHandler->contentHandler(); foreach ($contentIds as $contentId) { @@ -57,7 +57,7 @@ public function updateSearchIndex(array $contentIds, $commit) } } - public function purge() + public function purge(): void { $this->searchHandler->purgeIndex(); } diff --git a/src/lib/Search/Legacy/Content/IndexerGateway.php b/src/lib/Search/Legacy/Content/IndexerGateway.php index db4a5e4403..9aa1bbaf84 100644 --- a/src/lib/Search/Legacy/Content/IndexerGateway.php +++ b/src/lib/Search/Legacy/Content/IndexerGateway.php @@ -22,8 +22,7 @@ */ final class IndexerGateway implements SPIIndexerGateway { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection) { diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsBookmarked.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsBookmarked.php index e5263adb52..fb44040e0b 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsBookmarked.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsBookmarked.php @@ -47,7 +47,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { if (!is_array($criterion->value)) { throw new LogicException(sprintf( 'Expected %s Criterion value to be an array, %s received', diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 45a687a0ee..59ab7aad38 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -10,6 +10,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; @@ -29,21 +30,16 @@ final class DoctrineDatabase extends Gateway */ public const MAX_LIMIT = 1073741824; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; - /** @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter */ - private $criteriaConverter; + private CriteriaConverter $criteriaConverter; - /** @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter */ - private $sortClauseConverter; + private SortClauseConverter $sortClauseConverter; /** * Language handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - private $languageHandler; + private Handler $languageHandler; /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ private $dbPlatform; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php index a01350b25e..12296dad9f 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -20,10 +20,8 @@ class ExceptionConversion extends Gateway { /** * The wrapped gateway. - * - * @var \Ibexa\Core\Search\Legacy\Content\Location\Gateway */ - protected $innerGateway; + protected Gateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. diff --git a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php index c3c75d702f..9f16ed9e62 100644 --- a/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php +++ b/src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\Content\Type; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as ContentTypeHandler; use Ibexa\Contracts\Core\Search\Field; use Ibexa\Contracts\Core\Search\FieldType; @@ -24,17 +25,13 @@ class FullTextMapper { /** * Field registry. - * - * @var \Ibexa\Core\Search\Common\FieldRegistry */ - protected $fieldRegistry; + protected FieldRegistry $fieldRegistry; /** * Content type handler. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $contentTypeHandler; + protected Handler $contentTypeHandler; /** * @param \Ibexa\Core\Search\Common\FieldRegistry $fieldRegistry @@ -55,7 +52,7 @@ public function __construct( * * @return \Ibexa\Core\Search\Legacy\Content\FullTextData */ - public function mapContent(Content $content) + public function mapContent(Content $content): FullTextData { return new FullTextData( [ @@ -84,7 +81,7 @@ protected function getFullTextValues(Content $content): array foreach ($content->fields as $field) { $fieldDefinition = $this->contentTypeHandler->getFieldDefinition( $field->fieldDefinitionId, - Content\Type::STATUS_DEFINED + Type::STATUS_DEFINED ); if (!$fieldDefinition->isSearchable) { continue; diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 729388af3e..9044dd2939 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\WordIndexer\Gateway; use Doctrine\DBAL\Connection; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as SPITypeHandler; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator; use Ibexa\Core\Persistence\TransformationProcessor; @@ -27,45 +28,35 @@ class DoctrineDatabase extends Gateway */ public const DB_INT_MAX = 2147483647; - /** @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; /** * Persistence content type handler. * * Need this for being able to pick fields that are searchable. - * - * @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - protected $typeHandler; + protected Handler $typeHandler; /** * Transformation processor. * * Need this for being able to transform text to searchable value - * - * @var \Ibexa\Core\Persistence\TransformationProcessor */ - protected $transformationProcessor; + protected TransformationProcessor $transformationProcessor; /** * LegacySearchService. * * Need this for queries on ezsearch* tables - * - * @var \Ibexa\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex */ - protected $searchIndex; + protected SearchIndex $searchIndex; - /** @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - private $languageMaskGenerator; + private MaskGenerator $languageMaskGenerator; /** * Full text search configuration options. - * - * @var array */ - protected $fullTextSearchConfiguration; + protected array $fullTextSearchConfiguration; public function __construct( Connection $connection, @@ -92,7 +83,7 @@ public function __construct( * * @param \Ibexa\Core\Search\Legacy\Content\FullTextData $fullTextData */ - public function index(FullTextData $fullTextData) + public function index(FullTextData $fullTextData): void { $indexArray = []; $indexArrayOnlyWords = []; @@ -177,7 +168,7 @@ public function index(FullTextData $fullTextData) * * @param \Ibexa\Core\Search\Legacy\Content\FullTextData[] $fullTextBulkData */ - public function bulkIndex(array $fullTextBulkData) + public function bulkIndex(array $fullTextBulkData): void { foreach ($fullTextBulkData as $fullTextData) { $this->index($fullTextData); @@ -218,7 +209,7 @@ public function remove($contentId, $versionId = null): bool /** * Remove entire search index. */ - public function purgeIndex() + public function purgeIndex(): void { $this->searchIndex->purge(); } @@ -237,7 +228,7 @@ public function purgeIndex() * * @return int last placement */ - private function indexWords(FullTextData $fullTextData, array $indexArray, array $wordIDArray, $placement = 0) + private function indexWords(FullTextData $fullTextData, array $indexArray, array $wordIDArray, int $placement = 0): int { $contentId = $fullTextData->id; @@ -298,7 +289,7 @@ private function indexWords(FullTextData $fullTextData, array $indexArray, array * * @return array wordIDArray */ - private function buildWordIDArray(array $indexArrayOnlyWords) + private function buildWordIDArray(array $indexArrayOnlyWords): array { $wordCount = count($indexArrayOnlyWords); $wordIDArray = []; diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php index f1dc58039a..685c524c86 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php @@ -20,7 +20,7 @@ class SearchIndex public const SEARCH_WORD_TABLE = 'ezsearch_word'; public const SEARCH_OBJECT_WORD_LINK_TABLE = 'ezsearch_object_word_link'; - protected $connection; + protected Connection $connection; public function __construct(Connection $connection) { diff --git a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php index 40918937fb..f0267b5c96 100644 --- a/tests/bundle/Core/ApiLoader/CacheFactoryTest.php +++ b/tests/bundle/Core/ApiLoader/CacheFactoryTest.php @@ -18,9 +18,9 @@ final class CacheFactoryTest extends TestCase { - private ConfigResolverInterface&MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - private ContainerInterface&MockObject $container; + private ContainerInterface & MockObject $container; protected function setUp(): void { @@ -44,7 +44,7 @@ public function providerGetService(): array /** * @dataProvider providerGetService */ - public function testGetService($name, $expected): void + public function testGetService(string $name, string $expected): void { $this->configResolver ->expects(self::once()) diff --git a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php index 606beeff6b..971c30c149 100644 --- a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php +++ b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php @@ -10,15 +10,16 @@ use Ibexa\Bundle\Core\Cache\Warmer\ProxyCacheWarmer; use Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class ProxyCacheWarmerTest extends TestCase { /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $proxyGenerator; + private MockObject $proxyGenerator; /** @var \Ibexa\Bundle\Core\Cache\Warmer\ProxyCacheWarmer */ - private $proxyCacheWarmer; + private ProxyCacheWarmer $proxyCacheWarmer; protected function setUp(): void { diff --git a/tests/bundle/Core/ChainConfigResolverTest.php b/tests/bundle/Core/ChainConfigResolverTest.php index 0c46cedae0..be4dd79aa6 100644 --- a/tests/bundle/Core/ChainConfigResolverTest.php +++ b/tests/bundle/Core/ChainConfigResolverTest.php @@ -10,6 +10,7 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Exception\ParameterNotFoundException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -18,14 +19,14 @@ class ChainConfigResolverTest extends TestCase { /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver */ - private $chainResolver; + private ChainConfigResolver $chainResolver; protected function setUp(): void { $this->chainResolver = new ChainConfigResolver(); } - public function testPriority() + public function testPriority(): void { self::assertEquals([], $this->chainResolver->getAllResolvers()); @@ -47,7 +48,7 @@ public function testPriority() * Resolvers are supposed to be sorted only once. * This test will check that by trying to get all resolvers several times. */ - public function testSortResolvers() + public function testSortResolvers(): void { list($low, $medium, $high) = $this->createResolverMocks(); // We're using a mock here and not $this->chainResolver because we need to ensure that the sorting operation is done only once. @@ -77,7 +78,7 @@ public function testSortResolvers() /** * This test ensures that if a resolver is being added on the fly, the sorting is reset. */ - public function testReSortResolvers() + public function testReSortResolvers(): void { list($low, $medium, $high) = $this->createResolverMocks(); $highest = clone $high; @@ -120,14 +121,14 @@ public function testReSortResolvers() ); } - public function testGetDefaultNamespace() + public function testGetDefaultNamespace(): void { $this->expectException(\LogicException::class); $this->chainResolver->getDefaultNamespace(); } - public function testSetDefaultNamespace() + public function testSetDefaultNamespace(): void { $namespace = 'foo'; foreach ($this->createResolverMocks() as $i => $resolver) { @@ -141,7 +142,7 @@ public function testSetDefaultNamespace() $this->chainResolver->setDefaultNamespace($namespace); } - public function testGetParameterInvalid() + public function testGetParameterInvalid(): void { $this->expectException(ParameterNotFoundException::class); @@ -168,7 +169,7 @@ public function testGetParameterInvalid() * @param string $scope * @param mixed $expectedValue */ - public function testGetParameter($paramName, $namespace, $scope, $expectedValue) + public function testGetParameter(string $paramName, string $namespace, string $scope, string|bool|array $expectedValue): void { $resolver = $this->createMock(ConfigResolverInterface::class); $resolver @@ -181,7 +182,7 @@ public function testGetParameter($paramName, $namespace, $scope, $expectedValue) self::assertSame($expectedValue, $this->chainResolver->getParameter($paramName, $namespace, $scope)); } - public function getParameterProvider() + public function getParameterProvider(): array { return [ ['foo', 'namespace', 'scope', 'someValue'], @@ -191,7 +192,7 @@ public function getParameterProvider() ]; } - public function testHasParameterTrue() + public function testHasParameterTrue(): void { $paramName = 'foo'; $namespace = 'yetAnotherNamespace'; @@ -222,7 +223,7 @@ public function testHasParameterTrue() self::assertTrue($this->chainResolver->hasParameter($paramName, $namespace, $scope)); } - public function testHasParameterFalse() + public function testHasParameterFalse(): void { $paramName = 'foo'; $namespace = 'yetAnotherNamespace'; @@ -242,7 +243,7 @@ public function testHasParameterFalse() /** * @return \PHPUnit\Framework\MockObject\MockObject[] */ - private function createResolverMocks() + private function createResolverMocks(): array { return [ $this->createMock(ConfigResolverInterface::class), @@ -251,7 +252,7 @@ private function createResolverMocks() ]; } - private function buildMock($class, array $methods = []) + private function buildMock(string $class, array $methods = []): MockObject { return $this ->getMockBuilder($class) diff --git a/tests/bundle/Core/ConfigResolverTest.php b/tests/bundle/Core/ConfigResolverTest.php index a4a63d205e..57203b4c97 100644 --- a/tests/bundle/Core/ConfigResolverTest.php +++ b/tests/bundle/Core/ConfigResolverTest.php @@ -10,16 +10,17 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; use Ibexa\Core\MVC\Exception\ParameterNotFoundException; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerInterface; class ConfigResolverTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $containerMock; + private MockObject $containerMock; protected function setUp(): void { @@ -35,7 +36,7 @@ protected function setUp(): void * * @return \Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver */ - private function getResolver($defaultNS = 'ibexa.site_access.config', $undefinedStrategy = ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION, array $groupsBySiteAccess = []) + private function getResolver(string $defaultNS = 'ibexa.site_access.config', int $undefinedStrategy = ConfigResolver::UNDEFINED_STRATEGY_EXCEPTION, array $groupsBySiteAccess = []): ConfigResolver { $configResolver = new ConfigResolver( $this->containerMock, @@ -49,7 +50,7 @@ private function getResolver($defaultNS = 'ibexa.site_access.config', $undefined return $configResolver; } - public function testGetSetUndefinedStrategy() + public function testGetSetUndefinedStrategy(): void { $strategy = ConfigResolver::UNDEFINED_STRATEGY_NULL; $defaultNS = 'ibexa.site_access.config'; @@ -64,7 +65,7 @@ public function testGetSetUndefinedStrategy() self::assertSame('anotherNamespace', $resolver->getDefaultNamespace()); } - public function testGetParameterFailedWithException() + public function testGetParameterFailedWithException(): void { $this->expectException(ParameterNotFoundException::class); @@ -72,13 +73,13 @@ public function testGetParameterFailedWithException() $resolver->getParameter('foo'); } - public function testGetParameterFailedNull() + public function testGetParameterFailedNull(): void { $resolver = $this->getResolver('ibexa.site_access.config', ConfigResolver::UNDEFINED_STRATEGY_NULL); self::assertNull($resolver->getParameter('foo')); } - public function parameterProvider() + public function parameterProvider(): array { return [ ['foo', 'bar'], @@ -108,7 +109,7 @@ public function parameterProvider() /** * @dataProvider parameterProvider */ - public function testGetParameterGlobalScope($paramName, $expectedValue) + public function testGetParameterGlobalScope(string $paramName, string|bool|array $expectedValue): void { $globalScopeParameter = "ibexa.site_access.config.global.$paramName"; $this->containerMock @@ -128,7 +129,7 @@ public function testGetParameterGlobalScope($paramName, $expectedValue) /** * @dataProvider parameterProvider */ - public function testGetParameterRelativeScope($paramName, $expectedValue) + public function testGetParameterRelativeScope(string $paramName, string|bool|array $expectedValue): void { $relativeScopeParameter = "ibexa.site_access.config.{$this->siteAccess->name}.$paramName"; $this->containerMock @@ -154,7 +155,7 @@ public function testGetParameterRelativeScope($paramName, $expectedValue) /** * @dataProvider parameterProvider */ - public function testGetParameterSpecificScope($paramName, $expectedValue) + public function testGetParameterSpecificScope(string $paramName, string|bool|array $expectedValue): void { $scope = 'some_siteaccess'; $relativeScopeParameter = "ibexa.site_access.config.$scope.$paramName"; @@ -184,7 +185,7 @@ public function testGetParameterSpecificScope($paramName, $expectedValue) /** * @dataProvider parameterProvider */ - public function testGetParameterDefaultScope($paramName, $expectedValue) + public function testGetParameterDefaultScope(string $paramName, string|bool|array $expectedValue): void { $defaultScopeParameter = "ibexa.site_access.config.default.$paramName"; $relativeScopeParameter = "ibexa.site_access.config.{$this->siteAccess->name}.$paramName"; @@ -209,7 +210,7 @@ public function testGetParameterDefaultScope($paramName, $expectedValue) self::assertSame($expectedValue, $this->getResolver()->getParameter($paramName)); } - public function hasParameterProvider() + public function hasParameterProvider(): array { return [ [true, true, true, true, true], @@ -226,7 +227,7 @@ public function hasParameterProvider() /** * @dataProvider hasParameterProvider */ - public function testHasParameterNoNamespace($defaultMatch, $groupMatch, $scopeMatch, $globalMatch, $expectedResult) + public function testHasParameterNoNamespace(bool $defaultMatch, bool $groupMatch, bool $scopeMatch, bool $globalMatch, bool $expectedResult): void { $paramName = 'foo.bar'; $groupName = 'my_group'; @@ -255,7 +256,7 @@ public function testHasParameterNoNamespace($defaultMatch, $groupMatch, $scopeMa /** * @dataProvider hasParameterProvider */ - public function testHasParameterWithNamespaceAndScope($defaultMatch, $groupMatch, $scopeMatch, $globalMatch, $expectedResult) + public function testHasParameterWithNamespaceAndScope(bool $defaultMatch, bool $groupMatch, bool $scopeMatch, bool $globalMatch, bool $expectedResult): void { $paramName = 'foo.bar'; $namespace = 'my.namespace'; @@ -286,7 +287,7 @@ public function testHasParameterWithNamespaceAndScope($defaultMatch, $groupMatch self::assertSame($expectedResult, $configResolver->hasParameter($paramName, $namespace, $scope)); } - public function testGetSetDefaultScope() + public function testGetSetDefaultScope(): void { $newDefaultScope = 'bar'; $configResolver = $this->getResolver(); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php index 5d79973cdd..33faca094e 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php @@ -42,7 +42,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void * * @dataProvider addResolverProvider */ - public function testAddResolver($declaredPriority, $expectedPriority) + public function testAddResolver(?int $declaredPriority, int $expectedPriority): void { $resolverDef = new Definition(); $serviceId = 'some_service_id'; @@ -63,7 +63,7 @@ public function testAddResolver($declaredPriority, $expectedPriority) ); } - public function addResolverProvider() + public function addResolverProvider(): array { return [ [null, 0], diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php index a97122ffd3..3dcec2c386 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php @@ -44,7 +44,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void * * @dataProvider addRouterProvider */ - public function testAddRouter($declaredPriority, $expectedPriority) + public function testAddRouter(?int $declaredPriority, int $expectedPriority): void { $resolverDef = new Definition(); $serviceId = 'some_service_id'; @@ -70,7 +70,7 @@ public function testAddRouter($declaredPriority, $expectedPriority) * * @dataProvider addRouterProvider */ - public function testAddRouterWithDefaultRouter($declaredPriority, $expectedPriority) + public function testAddRouterWithDefaultRouter(?int $declaredPriority, int $expectedPriority): void { $defaultRouter = new Definition(); $this->setDefinition('router.default', $defaultRouter); @@ -124,7 +124,7 @@ public function testAddRouterWithDefaultRouter($declaredPriority, $expectedPrior ); } - public function addRouterProvider() + public function addRouterProvider(): array { return [ [null, 0], diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php index 9e19239e81..f30b1a16f5 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php @@ -36,7 +36,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void /** * @dataProvider tagsProvider */ - public function testRegisterFieldType(string $tag) + public function testRegisterFieldType(string $tag): void { $fieldTypeIdentifier = 'field_type_identifier'; $serviceId = 'service_id'; @@ -58,7 +58,7 @@ public function testRegisterFieldType(string $tag) * * @param string $tag */ - public function testRegisterFieldTypeNoAlias(string $tag) + public function testRegisterFieldTypeNoAlias(string $tag): void { $this->expectException(\LogicException::class); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php index 6616520948..72c78331d0 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php @@ -24,7 +24,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new FragmentPass()); } - public function testProcess() + public function testProcess(): void { $inlineRendererDef = new Definition(InlineFragmentRenderer::class); $inlineRendererDef->addTag('kernel.fragment_renderer'); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php index eb87e94e90..a230b50584 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php @@ -31,7 +31,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new NotificationRendererPass()); } - public function testAddRenderer() + public function testAddRenderer(): void { $definition = new Definition(); $definition->addTag(NotificationRendererPass::TAG_NAME, [ @@ -48,7 +48,7 @@ public function testAddRenderer() ); } - public function testAddRendererWithoutAliasThrowsLogicException() + public function testAddRendererWithoutAliasThrowsLogicException(): void { $this->expectException(\LogicException::class); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php index 9c174c56bd..fad1abddc1 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php @@ -30,7 +30,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new PlaceholderProviderPass()); } - public function testAddProvider() + public function testAddProvider(): void { $definition = new Definition(); $definition->addTag(PlaceholderProviderPass::TAG_NAME, ['type' => self::PROVIDER_TYPE]); @@ -45,7 +45,7 @@ public function testAddProvider() ); } - public function testAddProviderWithoutType() + public function testAddProviderWithoutType(): void { $this->expectException(\LogicException::class); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php index 2b298c9b24..be60023985 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php @@ -34,7 +34,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new RegisterStorageEnginePass()); } - public function testRegisterStorageEngine() + public function testRegisterStorageEngine(): void { $storageEngineDef = new Definition(); $storageEngineIdentifier = 'i_am_a_storage_engine'; @@ -51,7 +51,7 @@ public function testRegisterStorageEngine() ); } - public function testRegisterDefaultStorageEngine() + public function testRegisterDefaultStorageEngine(): void { $storageEngineDef = new Definition(); $storageEngineIdentifier = 'i_am_a_storage_engine'; @@ -70,7 +70,7 @@ public function testRegisterDefaultStorageEngine() ); } - public function testRegisterStorageEngineNoAlias() + public function testRegisterStorageEngineNoAlias(): void { $this->expectException(\LogicException::class); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php index b679a7aa2c..f1d5be4893 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php @@ -38,13 +38,13 @@ public function testMergeConfigurations( array $commandsToAdd, array $existingOldParameters, array $expectedCommands - ) { + ): void { $definition = new Definition(SlugConverter::class); $definition->setArgument(0, $this->createMock(TransformationProcessor::class)); $definition->setArgument(1, $existingOldParameters); $definition->setPublic(true); - $this->setDefinition(\Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter::class, $definition); + $this->setDefinition(SlugConverter::class, $definition); $this->setParameter('ibexa.url_alias.slug_converter', [ 'transformation' => 'urlalias', @@ -62,7 +62,7 @@ public function testMergeConfigurations( $slugConverterRef = new ReflectionClass(SlugConverter::class); $configurationPropertyRef = $slugConverterRef->getProperty('configuration'); $configurationPropertyRef->setAccessible(true); - $configuration = $configurationPropertyRef->getValue($this->container->get(\Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter::class)); + $configuration = $configurationPropertyRef->getValue($this->container->get(SlugConverter::class)); self::assertEquals('urlalias', $configuration['transformation']); self::assertEquals('underscore', $configuration['wordSeparatorName']); @@ -70,7 +70,7 @@ public function testMergeConfigurations( self::assertEquals('url_cleanup', $configuration['transformationGroups']['urlalias']['cleanupMethod']); } - public function configurationProvider() + public function configurationProvider(): array { $injectedBySemanticCommands = [ 'new_command_to_add', diff --git a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php index 50a459809a..1ec5924d83 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php @@ -27,7 +27,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new URLHandlerPass()); } - public function testRegisterURLHandler() + public function testRegisterURLHandler(): void { $serviceId = 'service_id'; $scheme = 'http'; @@ -44,7 +44,7 @@ public function testRegisterURLHandler() ); } - public function testRegisterURLHandlerNoScheme() + public function testRegisterURLHandlerNoScheme(): void { $this->expectException(\LogicException::class); diff --git a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php index 8cfa5c4418..3527b18573 100644 --- a/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php +++ b/tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php @@ -36,7 +36,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void /** * @dataProvider addViewProviderProvider */ - public function testAddViewProvider($declaredPriority, $expectedPriority) + public function testAddViewProvider(?int $declaredPriority, int $expectedPriority): void { $def = new Definition(); @@ -58,7 +58,7 @@ public function testAddViewProvider($declaredPriority, $expectedPriority) ); } - public function addViewProviderProvider() + public function addViewProviderProvider(): array { return [ [null, 0], diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php index a2c60061cf..80c1a859bc 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php @@ -13,7 +13,7 @@ class ComplexSettingParserTest extends TestCase { /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ComplexSettings\ComplexSettingParser */ - private $parser; + private ComplexSettingParser $parser; protected function setUp(): void { @@ -23,7 +23,7 @@ protected function setUp(): void /** * @dataProvider provideSettings */ - public function testContainsDynamicSettings($setting, $expected) + public function testContainsDynamicSettings(string $setting, array $expected): void { self::assertEquals($expected[0], $this->parser->containsDynamicSettings($setting), 'string'); } @@ -31,12 +31,12 @@ public function testContainsDynamicSettings($setting, $expected) /** * @dataProvider provideSettings */ - public function testParseComplexSetting($setting, $expected) + public function testParseComplexSetting(string $setting, array $expected): void { self::assertEquals($expected[1], $this->parser->parseComplexSetting($setting), 'string'); } - public function provideSettings() + public function provideSettings(): array { // array( setting, array( isDynamicSetting, containsDynamicSettings ) ) return [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php index 4afa862ff5..effa5c4085 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php @@ -12,7 +12,7 @@ class ComplexSettingValueResolverTest extends TestCase { - public function testGetArgumentValue() + public function testGetArgumentValue(): void { $resolver = new ComplexSettingValueResolver(); self::assertEquals( diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php index ea0d2ec768..6881621258 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php @@ -11,13 +11,14 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\ParserInterface; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; use Symfony\Component\Config\Definition\Builder\NodeBuilder; class ConfigParserTest extends TestCase { - public function testConstructWrongInnerParser() + public function testConstructWrongInnerParser(): void { $this->expectException(InvalidArgumentType::class); @@ -29,7 +30,7 @@ public function testConstructWrongInnerParser() ); } - public function testConstruct() + public function testConstruct(): void { $innerParsers = [ $this->getConfigurationParserMock(), @@ -40,7 +41,7 @@ public function testConstruct() self::assertSame($innerParsers, $configParser->getConfigParsers()); } - public function testGetSetInnerParsers() + public function testGetSetInnerParsers(): void { $configParser = new ConfigParser(); self::assertSame([], $configParser->getConfigParsers()); @@ -54,7 +55,7 @@ public function testGetSetInnerParsers() self::assertSame($innerParsers, $configParser->getConfigParsers()); } - public function testMapConfig() + public function testMapConfig(): void { $parsers = [ $this->getConfigurationParserMock(), @@ -80,7 +81,7 @@ public function testMapConfig() $configParser->mapConfig($scopeSettings, $currentScope, $contextualizer); } - public function testPrePostMap() + public function testPrePostMap(): void { $parsers = [ $this->getConfigurationParserMock(), @@ -110,7 +111,7 @@ public function testPrePostMap() $configParser->postMap($config, $contextualizer); } - public function testAddSemanticConfig() + public function testAddSemanticConfig(): void { $parsers = [ $this->getConfigurationParserMock(), @@ -131,7 +132,7 @@ public function testAddSemanticConfig() $configParser->addSemanticConfig($nodeBuilder); } - protected function getConfigurationParserMock() + protected function getConfigurationParserMock(): MockObject { return $this->createMock(ParserInterface::class); } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php index 727ece69e9..1aca2a44b6 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php @@ -17,6 +17,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\Provider\StaticSiteAccessProvider; use Ibexa\Core\MVC\Symfony\SiteAccessGroup; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use function sprintf; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -33,10 +34,10 @@ class ChainConfigResolverTest extends TestCase private const SCOPE_GLOBAL = 'global'; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess|\PHPUnit\Framework\MockObject\MockObject */ - private $siteAccess; + private SiteAccess $siteAccess; /** @var \Symfony\Component\DependencyInjection\ContainerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $containerMock; + private MockObject $containerMock; protected function setUp(): void { @@ -49,7 +50,7 @@ protected function setUp(): void /** * @dataProvider parameterProvider */ - public function testGetParameterDefaultScope(string $paramName, $expectedValue): void + public function testGetParameterDefaultScope(string $paramName, string|bool|array $expectedValue): void { $globalScopeParameter = $this->getParameter($paramName, self::SCOPE_GLOBAL); $relativeScopeParameter = $this->getParameter($paramName, $this->siteAccess->name); @@ -80,7 +81,7 @@ public function testGetParameterDefaultScope(string $paramName, $expectedValue): /** * @dataProvider parameterProvider */ - public function testGetParameterRelativeScope(string $paramName, $expectedValue): void + public function testGetParameterRelativeScope(string $paramName, string|bool|array $expectedValue): void { $globalScopeParameter = $this->getParameter($paramName, self::SCOPE_GLOBAL); $relativeScopeParameter = $this->getParameter($paramName, $this->siteAccess->name); @@ -107,7 +108,7 @@ public function testGetParameterRelativeScope(string $paramName, $expectedValue) /** * @dataProvider parameterProvider */ - public function testGetParameterSpecificScope(string $paramName, $expectedValue): void + public function testGetParameterSpecificScope(string $paramName, string|bool|array $expectedValue): void { $specificScopeParameter = $this->getParameter($paramName, self::FIRST_SA_NAME); $this->containerMock @@ -136,7 +137,7 @@ public function testGetParameterSpecificScope(string $paramName, $expectedValue) /** * @dataProvider parameterProvider */ - public function testGetParameterGlobalScope(string $paramName, $expectedValue): void + public function testGetParameterGlobalScope(string $paramName, string|bool|array $expectedValue): void { $globalScopeParameter = $this->getParameter($paramName, self::SCOPE_GLOBAL); $this->containerMock diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php index 304979e394..a1d33a9cba 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Exception\ParameterNotFoundException; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -26,7 +27,7 @@ abstract class ConfigResolverTest extends TestCase protected $siteAccess; /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\DependencyInjection\ContainerInterface */ - protected $containerMock; + protected MockObject $containerMock; protected function setUp(): void { @@ -61,7 +62,7 @@ public function testGetParameterFailedWithException(): void /** * @dataProvider parameterProvider */ - public function testGetParameterGlobalScope(string $paramName, $expectedValue): void + public function testGetParameterGlobalScope(string $paramName, string|bool|array $expectedValue): void { $globalScopeParameter = sprintf('%s.%s.%s', $this->getNamespace(), $this->getScope(), $paramName); $this->containerMock diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php index c9ef77c888..795894670f 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php @@ -46,7 +46,7 @@ protected function setUp(): void * @param string $scope SiteAccess name, group, default or global * @param bool $assertSame Set to false if you want to use assertEquals() instead of assertSame() */ - protected function assertConfigResolverParameterValue($parameterName, $expectedValue, $scope, $assertSame = true) + protected function assertConfigResolverParameterValue(string $parameterName, $expectedValue, ?string $scope, $assertSame = true) { $chainConfigResolver = $this->getConfigResolver(); $assertMethod = $assertSame ? 'assertSame' : 'assertEquals'; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php index 057b5da634..3c4c2bb3ed 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php @@ -25,7 +25,7 @@ protected function getMinimalConfiguration(): array return $this->minimalConfig = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); } - public function testIndexPage() + public function testIndexPage(): void { $indexPage1 = '/Getting-Started'; $indexPage2 = '/Contact-Us'; @@ -42,7 +42,7 @@ public function testIndexPage() $this->assertConfigResolverParameterValue('index_page', null, self::EMPTY_SA_GROUP); } - public function testDefaultPage() + public function testDefaultPage(): void { $defaultPage1 = '/Getting-Started'; $defaultPage2 = '/Foo/bar'; @@ -62,7 +62,7 @@ public function testDefaultPage() /** * Test defaults. */ - public function testNonExistentSettings() + public function testNonExistentSettings(): void { $this->load(); $this->assertConfigResolverParameterValue('url_alias_router', true, 'ibexa_demo_site'); @@ -75,7 +75,7 @@ public function testNonExistentSettings() $this->assertConfigResolverParameterValue('index_page', null, 'ibexa_demo_site'); } - public function testMiscSettings() + public function testMiscSettings(): void { $cachePoolName = 'cache_foo'; $varDir = 'var/foo/bar'; @@ -116,7 +116,7 @@ public function testMiscSettings() $this->assertConfigResolverParameterValue('anonymous_user_id', $anonymousUserId, 'ibexa_demo_site'); } - public function testApiKeysSettings() + public function testApiKeysSettings(): void { $key = 'my_key'; $this->load( @@ -135,7 +135,7 @@ public function testApiKeysSettings() $this->assertConfigResolverParameterValue('api_keys.google_maps', $key, 'ibexa_demo_site'); } - public function testUserSettings() + public function testUserSettings(): void { $layout = 'somelayout.html.twig'; $loginTemplate = 'login_template.html.twig'; @@ -156,7 +156,7 @@ public function testUserSettings() $this->assertConfigResolverParameterValue('security.login_template', $loginTemplate, 'ibexa_demo_site'); } - public function testNoUserSettings() + public function testNoUserSettings(): void { $this->load(); $this->assertConfigResolverParameterValue( @@ -174,7 +174,7 @@ public function testNoUserSettings() /** * @dataProvider sessionSettingsProvider */ - public function testSessionSettings(array $inputParams, array $expected) + public function testSessionSettings(array $inputParams, array $expected): void { $this->load( [ @@ -187,7 +187,7 @@ public function testSessionSettings(array $inputParams, array $expected) $this->assertConfigResolverParameterValue('session', $expected['session'], 'ibexa_demo_site'); } - public function sessionSettingsProvider() + public function sessionSettingsProvider(): array { return [ [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php index c38e81bf37..eb10a6317b 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php @@ -25,7 +25,7 @@ protected function getMinimalConfiguration(): array return Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); } - public function testDefaultContentSettings() + public function testDefaultContentSettings(): void { $this->load(); @@ -37,7 +37,7 @@ public function testDefaultContentSettings() /** * @dataProvider contentSettingsProvider */ - public function testContentSettings(array $config, array $expected) + public function testContentSettings(array $config, array $expected): void { $this->load( [ @@ -52,7 +52,7 @@ public function testContentSettings(array $config, array $expected) } } - public function contentSettingsProvider() + public function contentSettingsProvider(): array { return [ [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php index 7925544598..518d025776 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php @@ -24,7 +24,7 @@ protected function getContainerExtensions(): array ]; } - public function testDefaultImageAssetSettings() + public function testDefaultImageAssetSettings(): void { $this->load(); @@ -43,7 +43,7 @@ public function testDefaultImageAssetSettings() /** * @dataProvider imageAssetSettingsProvider */ - public function testImageAssetSettings(array $config, array $expected) + public function testImageAssetSettings(array $config, array $expected): void { $this->load( [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php index 2b2ea2a995..2c2992e897 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php @@ -36,7 +36,7 @@ protected function getMinimalConfiguration(): array return $this->minimalConfig = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); } - public function testHandlersConfig() + public function testHandlersConfig(): void { $config = [ 'system' => [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php index 22bf92734c..ba06a2f6bb 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php @@ -44,7 +44,7 @@ protected function getContainerExtensions(): array ]; } - public function testVariations() + public function testVariations(): void { $this->load(); @@ -72,7 +72,7 @@ public function testVariations() ); } - public function testPrePostParameters() + public function testPrePostParameters(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php index 6a4508862e..bd3b753fa7 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php @@ -23,7 +23,7 @@ protected function getMinimalConfiguration(): array return Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_minimal.yml')); } - public function testLanguagesSingleSiteaccess() + public function testLanguagesSingleSiteaccess(): void { $langDemoSite = ['eng-GB']; $langFre = ['fre-FR', 'eng-GB']; @@ -58,7 +58,7 @@ public function testLanguagesSingleSiteaccess() $this->assertConfigResolverParameterValue('languages', [], 'ibexa_demo_site_admin'); } - public function testLanguagesSiteaccessGroup() + public function testLanguagesSiteaccessGroup(): void { $langDemoSite = ['eng-US', 'eng-GB']; $config = [ @@ -83,7 +83,7 @@ public function testLanguagesSiteaccessGroup() $this->assertConfigResolverParameterValue('languages', [], 'ibexa_demo_site_admin'); } - public function testTranslationSiteAccesses() + public function testTranslationSiteAccesses(): void { $translationSAsDemoSite = ['foo', 'bar']; $translationSAsFre = ['foo2', 'bar2']; @@ -101,7 +101,7 @@ public function testTranslationSiteAccesses() $this->assertConfigResolverParameterValue('translation_siteaccesses', [], self::EMPTY_SA_GROUP); } - public function testTranslationSiteAccessesWithGroup() + public function testTranslationSiteAccessesWithGroup(): void { $translationSAsDemoSite = ['ibexa_demo_site', 'fre']; $config = [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php index 2907e3398b..93c573de4b 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php @@ -32,7 +32,7 @@ protected function getMinimalConfiguration(): array return $this->config = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_templates.yml')); } - public function testFieldTemplates() + public function testFieldTemplates(): void { $this->load(); $fixedUpConfig = $this->getExpectedConfigFieldTemplates($this->config); @@ -95,7 +95,7 @@ protected function getSiteAccessProviderMock(): SiteAccessProviderInterface * * @return array */ - private function getExpectedConfigFieldTemplates(array $config) + private function getExpectedConfigFieldTemplates(array $config): array { foreach ($config['system']['ibexa_demo_frontend_group']['field_templates'] as &$block) { if (!isset($block['priority'])) { @@ -106,7 +106,7 @@ private function getExpectedConfigFieldTemplates(array $config) return $config; } - public function testFieldDefinitionSettingsTemplates() + public function testFieldDefinitionSettingsTemplates(): void { $this->load(); $fixedUpConfig = $this->getExpectedConfigFieldDefinitionSettingsTemplates($this->config); @@ -149,7 +149,7 @@ public function testFieldDefinitionSettingsTemplates() * * @return array */ - private function getExpectedConfigFieldDefinitionSettingsTemplates(array $config) + private function getExpectedConfigFieldDefinitionSettingsTemplates(array $config): array { foreach ($config['system']['ibexa_demo_frontend_group']['fielddefinition_settings_templates'] as &$block) { if (!isset($block['priority'])) { diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php index be7546142f..ee795a6f86 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php @@ -28,7 +28,7 @@ protected function getMinimalConfiguration(): array return $this->config = Yaml::parse(file_get_contents(__DIR__ . '/../../Fixtures/ezpublish_view.yml')); } - public function testLocationView() + public function testLocationView(): void { $this->load(); $expectedLocationView = $this->config['system']['ibexa_demo_frontend_group']['location_view']; @@ -50,7 +50,7 @@ public function testLocationView() $this->assertConfigResolverParameterValue('location_view', [], 'ibexa_demo_site_admin', false); } - public function testContentView() + public function testContentView(): void { $this->load(); $expectedContentView = $this->config['system']['ibexa_demo_frontend_group']['content_view']; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php index 16470bc09b..3f9433cdbc 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php @@ -11,13 +11,14 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ConfigurationProcessor; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\HookableConfigurationMapperInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; use Symfony\Component\DependencyInjection\ContainerInterface; class ConfigurationProcessorTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $namespace = 'ibexa_test'; $siteAccessNodeName = 'foo'; @@ -43,7 +44,7 @@ public function testConstruct() self::assertSame($groupsBySa, $contextualizer->getGroupsBySiteAccess()); } - public function testGetSetContextualizer() + public function testGetSetContextualizer(): void { $namespace = 'ibexa_test'; $siteAccessNodeName = 'foo'; @@ -60,7 +61,7 @@ public function testGetSetContextualizer() self::assertSame($newContextualizer, $processor->getContextualizer()); } - public function testMapConfigWrongMapper() + public function testMapConfigWrongMapper(): void { $this->expectException(\InvalidArgumentException::class); @@ -72,7 +73,7 @@ public function testMapConfigWrongMapper() $processor->mapConfig([], new stdClass()); } - public function testMapConfigClosure() + public function testMapConfigClosure(): void { $namespace = 'ibexa_test'; $saNodeName = 'foo'; @@ -103,7 +104,7 @@ public function testMapConfigClosure() ], ]; - $mapperClosure = static function (array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) use ($config, $availableSAs, $saNodeName, $expectedContextualizer) { + $mapperClosure = static function (array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer) use ($config, $availableSAs, $saNodeName, $expectedContextualizer): void { self::assertTrue(isset($availableSAs[$currentScope])); self::assertSame($config[$saNodeName][$currentScope], $scopeSettings); self::assertSame($expectedContextualizer, $contextualizer); @@ -111,7 +112,7 @@ public function testMapConfigClosure() $processor->mapConfig($config, $mapperClosure); } - public function testMapConfigMapperObject() + public function testMapConfigMapperObject(): void { $namespace = 'ibexa_test'; $saNodeName = 'foo'; @@ -157,7 +158,7 @@ public function testMapConfigMapperObject() $processor->mapConfig($config, $mapper); } - public function testMapConfigHookableMapperObject() + public function testMapConfigHookableMapperObject(): void { $namespace = 'ibexa_test'; $saNodeName = 'foo'; @@ -211,7 +212,7 @@ public function testMapConfigHookableMapperObject() $processor->mapConfig($config, $mapper); } - public function testMapSetting() + public function testMapSetting(): void { $namespace = 'ibexa_test'; $saNodeName = 'foo'; @@ -247,7 +248,7 @@ public function testMapSetting() $processor->mapSetting('foo', $config); } - public function testMapConfigArray() + public function testMapConfigArray(): void { $namespace = 'ibexa_test'; $saNodeName = 'foo'; @@ -283,12 +284,12 @@ public function testMapConfigArray() $processor->mapConfigArray('hello', $config, ContextualizerInterface::MERGE_FROM_SECOND_LEVEL); } - protected function getContainerMock() + protected function getContainerMock(): MockObject { return $this->createMock(ContainerInterface::class); } - protected function getContextualizerMock() + protected function getContextualizerMock(): MockObject { return $this->createMock(ContextualizerInterface::class); } diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php index fbf3613d1a..1406abe349 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php @@ -10,6 +10,7 @@ use Ibexa\Bundle\Core\DependencyInjection\Configuration\ConfigResolver; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Contextualizer; use Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\ContextualizerInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,32 +18,27 @@ class ContextualizerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $container; + private MockObject $container; - /** @var string */ - private $namespace = 'ibexa_test'; + private string $namespace = 'ibexa_test'; - /** @var string */ - private $saNodeName = 'heyho'; + private string $saNodeName = 'heyho'; - /** @var array */ - private $availableSAs = ['sa1', 'sa2', 'sa3']; + private array $availableSAs = ['sa1', 'sa2', 'sa3']; - /** @var array */ - private $availableSiteAccessGroups = [ + private array $availableSiteAccessGroups = [ 'sa_group1' => ['sa1', 'sa2', 'sa3'], 'sa_group2' => ['sa1'], ]; - /** @var array */ - private $groupsBySA = [ + private array $groupsBySA = [ 'sa1' => ['sa_group1', 'sa_group2'], 'sa2' => ['sa_group1'], 'sa3' => ['sa_group1'], ]; /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\SiteAccessAware\Contextualizer */ - private $contextualizer; + private Contextualizer $contextualizer; protected function setUp(): void { @@ -61,7 +57,7 @@ protected function setUp(): void /** * @dataProvider setContextualParameterProvider */ - public function testSetContextualParameter($parameterName, $scope, $value) + public function testSetContextualParameter(string $parameterName, string $scope, string|int|bool|array $value): void { $this->container ->expects(self::once()) @@ -71,7 +67,7 @@ public function testSetContextualParameter($parameterName, $scope, $value) $this->contextualizer->setContextualParameter($parameterName, $scope, $value); } - public function setContextualParameterProvider() + public function setContextualParameterProvider(): array { return [ ['my_parameter', 'sa1', 'foobar'], @@ -83,7 +79,7 @@ public function setContextualParameterProvider() ]; } - public function testMapSetting() + public function testMapSetting(): void { $fooSa1 = 'bar'; $planetsSa1 = ['Earth']; @@ -131,7 +127,7 @@ public function testMapSetting() self::assertSame($boolSa2, $container->getParameter("$this->namespace.sa2.a_bool")); } - public function testMapConfigArray() + public function testMapConfigArray(): void { $containerBuilder = new ContainerBuilder(); $this->contextualizer->setContainer($containerBuilder); @@ -233,7 +229,7 @@ public function testMapConfigArray() ); } - public function testMapConfigArraySecondLevel() + public function testMapConfigArraySecondLevel(): void { $containerBuilder = new ContainerBuilder(); $this->contextualizer->setContainer($containerBuilder); @@ -343,7 +339,7 @@ public function testMapConfigArraySecondLevel() ); } - public function testMapConfigArrayUnique() + public function testMapConfigArrayUnique(): void { $containerBuilder = new ContainerBuilder(); $this->contextualizer->setContainer($containerBuilder); @@ -396,7 +392,7 @@ public function testMapConfigArrayUnique() ); } - public function testGetSetContainer() + public function testGetSetContainer(): void { self::assertSame($this->container, $this->contextualizer->getContainer()); $containerBuilder = new ContainerBuilder(); @@ -404,7 +400,7 @@ public function testGetSetContainer() self::assertSame($containerBuilder, $this->contextualizer->getContainer()); } - public function testGetSetSANodeName() + public function testGetSetSANodeName(): void { $nodeName = 'foobarbaz'; self::assertSame($this->saNodeName, $this->contextualizer->getSiteAccessNodeName()); @@ -412,7 +408,7 @@ public function testGetSetSANodeName() self::assertSame($nodeName, $this->contextualizer->getSiteAccessNodeName()); } - public function testGetSetNamespace() + public function testGetSetNamespace(): void { $ns = 'ibexa'; self::assertSame($this->namespace, $this->contextualizer->getNamespace()); @@ -420,7 +416,7 @@ public function testGetSetNamespace() self::assertSame($ns, $this->contextualizer->getNamespace()); } - public function testGetSetAvailableSiteAccesses() + public function testGetSetAvailableSiteAccesses(): void { self::assertSame($this->availableSAs, $this->contextualizer->getAvailableSiteAccesses()); $sa = ['foo', 'bar', 'baz']; @@ -428,7 +424,7 @@ public function testGetSetAvailableSiteAccesses() self::assertSame($sa, $this->contextualizer->getAvailableSiteAccesses()); } - public function testGetSetGroupsBySA() + public function testGetSetGroupsBySA(): void { self::assertSame($this->groupsBySA, $this->contextualizer->getGroupsBySiteAccess()); $groups = ['foo' => ['bar', 'baz'], 'group2' => ['some', 'thing']]; @@ -443,7 +439,7 @@ public function testGetSetGroupsBySA() * @dataProvider fullMapConfigArrayProvider */ public function testFullMapConfigArray( - $testId, + string $testId, $siteaccess, array $groups, array $defaultValue, @@ -452,7 +448,7 @@ public function testFullMapConfigArray( $options, array $expected, $customSANodeKey = null - ) { + ): void { $this->contextualizer->setAvailableSiteAccesses($config['siteaccess']['list']); $this->contextualizer->setGroupsBySiteAccess([$siteaccess => $groups]); @@ -502,7 +498,10 @@ public function testFullMapConfigArray( $this->contextualizer->mapConfigArray($testId, $config, $options); } - public function fullMapConfigArrayProvider() + /** + * @return \non-empty-list, (0|1|2|'customBaseKey'|'krondor'|'location_view'|'wizards'|array<(array<(literal-string&non-falsy-string), non-empty-array<(int<0, max>|(literal-string&lowercase-string&non-falsy-string)), ('dwarve.html.twig'|'krondor'|'moredhel.html.twig'|'moredhel2.html.twig'|'sorcerer.html.twig'|'sorcerer2.html.twig'|'sorcerer3.html.twig'|'warrior.html.twig'|'wizard.html.twig'|non-empty-array<(int<0, max>|(literal-string&lowercase-string&non-falsy-string)), ('krondor'|'Kulgan'|'Macros the Black'|'Pug'|'Rogen'|'William'|non-empty-array<(literal-string&non-falsy-string), non-empty-array<(literal-string&lowercase-string&non-falsy-string), ('dwarve.html.twig'|'moredhel.html.twig'|'moredhel2.html.twig'|'sorcerer.html.twig'|'sorcerer2.html.twig'|'sorcerer3.html.twig'|'warrior.html.twig'|'wizard.html.twig')>>)>)>>|non-empty-string)>)>> + */ + public function fullMapConfigArrayProvider(): array { $testId = 'wizards'; $siteaccess = 'krondor'; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php index ebd5991120..7088723857 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php @@ -15,13 +15,13 @@ class DynamicSettingParserTest extends TestCase /** * @dataProvider isDynamicSettingProvider */ - public function testIsDynamicSetting($setting, $expected) + public function testIsDynamicSetting(string $setting, bool $expected): void { $parser = new DynamicSettingParser(); self::assertSame($expected, $parser->isDynamicSetting($setting)); } - public function isDynamicSettingProvider() + public function isDynamicSettingProvider(): array { return [ ['foo', false], @@ -40,7 +40,7 @@ public function isDynamicSettingProvider() ]; } - public function testParseDynamicSettingFail() + public function testParseDynamicSettingFail(): void { $this->expectException(\OutOfBoundsException::class); @@ -51,13 +51,13 @@ public function testParseDynamicSettingFail() /** * @dataProvider parseDynamicSettingProvider */ - public function testParseDynamicSetting($setting, array $expected) + public function testParseDynamicSetting(string $setting, array $expected): void { $parser = new DynamicSettingParser(); self::assertSame($expected, $parser->parseDynamicSetting($setting)); } - public function parseDynamicSettingProvider() + public function parseDynamicSettingProvider(): array { return [ [ diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php index abfdf4e7a8..97cbc9233c 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php @@ -13,7 +13,7 @@ class SuggestionCollectorTest extends TestCase { - public function testAddHasGetSuggestions() + public function testAddHasGetSuggestions(): void { $collector = new SuggestionCollector(); $suggestions = [new ConfigSuggestion(), new ConfigSuggestion(), new ConfigSuggestion()]; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php index b16db5268a..591f4c60f6 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php @@ -12,7 +12,7 @@ class ConfigSuggestionTest extends TestCase { - public function testEmptyConstructor() + public function testEmptyConstructor(): void { $suggestion = new ConfigSuggestion(); self::assertNull($suggestion->getMessage()); @@ -20,7 +20,7 @@ public function testEmptyConstructor() self::assertFalse($suggestion->isMandatory()); } - public function testConfigSuggestion() + public function testConfigSuggestion(): void { $message = 'some message'; $configArray = ['foo' => 'bar']; diff --git a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php index c818e73bda..cf4b1ce7a7 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php @@ -13,7 +13,7 @@ class YamlSuggestionFormatterTest extends TestCase { - public function testFormat() + public function testFormat(): void { $message = <<format($suggestion))); } - public function testFormatNoSuggestion() + public function testFormatNoSuggestion(): void { $message = 'This is a message'; $suggestion = new ConfigSuggestion($message); diff --git a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php index 912da421af..454624d0c0 100644 --- a/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php +++ b/tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php @@ -35,10 +35,9 @@ class IbexaCoreExtensionTest extends AbstractExtensionTestCase { private $minimalConfig = []; - private $siteaccessConfig = []; + private array $siteaccessConfig = []; - /** @var \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension */ - private $extension; + private ?IbexaCoreExtension $extension = null; protected function setUp(): void { @@ -87,7 +86,7 @@ protected function getMinimalConfiguration(): array return $this->minimalConfig = Yaml::parse(file_get_contents(__DIR__ . '/Fixtures/ezpublish_minimal_no_siteaccess.yml')); } - public function testSiteAccessConfiguration() + public function testSiteAccessConfiguration(): void { $this->load($this->siteaccessConfig); $this->assertContainerBuilderHasParameter( @@ -120,7 +119,7 @@ public function testSiteAccessConfiguration() } } - public function testSiteAccessNoConfiguration() + public function testSiteAccessNoConfiguration(): void { $this->load(); $this->assertContainerBuilderHasParameter('ibexa.site_access.list', ['setup']); @@ -130,7 +129,7 @@ public function testSiteAccessNoConfiguration() $this->assertContainerBuilderHasParameter('ibexa.site_access.match_config', null); } - public function testImageMagickConfigurationBasic() + public function testImageMagickConfigurationBasic(): void { if (!isset($_ENV['imagemagickConvertPath']) || !is_executable($_ENV['imagemagickConvertPath'])) { self::markTestSkipped('Missing or mis-configured Imagemagick convert path.'); @@ -187,7 +186,7 @@ public function translationsConfigurationProvider(): iterable ]; } - public function testImageMagickConfigurationFilters() + public function testImageMagickConfigurationFilters(): void { if (!isset($_ENV['imagemagickConvertPath']) || !is_executable($_ENV['imagemagickConvertPath'])) { self::markTestSkipped('Missing or mis-configured Imagemagick convert path.'); @@ -214,7 +213,7 @@ public function testImageMagickConfigurationFilters() self::assertSame($customFilters['wow'], $filters['wow']); } - public function testImagePlaceholderConfiguration() + public function testImagePlaceholderConfiguration(): void { $this->load([ 'image_placeholder' => [ @@ -249,7 +248,7 @@ public function testImagePlaceholderConfiguration() ], $this->container->getParameter('ibexa.io.images.alias.placeholder_provider')); } - public function testRoutingConfiguration() + public function testRoutingConfiguration(): void { $this->load(); $this->assertContainerBuilderHasAlias('router', ChainRouter::class); @@ -267,14 +266,14 @@ public function testRoutingConfiguration() * @param array $customCacheConfig * @param string $expectedPurgeType */ - public function testCacheConfiguration(array $customCacheConfig, $expectedPurgeType) + public function testCacheConfiguration(array $customCacheConfig, string $expectedPurgeType): void { $this->load($customCacheConfig); $this->assertContainerBuilderHasParameter('ibexa.http_cache.purge_type', $expectedPurgeType); } - public function cacheConfigurationProvider() + public function cacheConfigurationProvider(): array { return [ [[], 'local'], @@ -311,7 +310,7 @@ public function cacheConfigurationProvider() ]; } - public function testCacheConfigurationCustomPurgeService() + public function testCacheConfigurationCustomPurgeService(): void { $serviceId = 'foobar'; $this->setDefinition($serviceId, new Definition()); @@ -324,7 +323,7 @@ public function testCacheConfigurationCustomPurgeService() $this->assertContainerBuilderHasParameter('ibexa.http_cache.purge_type', 'foobar'); } - public function testLocaleConfiguration() + public function testLocaleConfiguration(): void { $this->load(['locale_conversion' => ['foo' => 'bar']]); $conversionMap = $this->container->getParameter('ibexa.locale.conversion_map'); @@ -332,7 +331,7 @@ public function testLocaleConfiguration() self::assertSame('bar', $conversionMap['foo']); } - public function testRepositoriesConfiguration() + public function testRepositoriesConfiguration(): void { $repositories = [ 'main' => [ @@ -385,7 +384,7 @@ public function testRepositoriesConfiguration() /** * @dataProvider repositoriesConfigurationFieldGroupsProvider */ - public function testRepositoriesConfigurationFieldGroups($repositories, $expectedRepositories) + public function testRepositoriesConfigurationFieldGroups(array $repositories, array $expectedRepositories): void { $this->load(['repositories' => $repositories]); self::assertTrue($this->container->hasParameter('ibexa.repositories')); @@ -400,7 +399,7 @@ public function testRepositoriesConfigurationFieldGroups($repositories, $expecte } } - public function repositoriesConfigurationFieldGroupsProvider() + public function repositoriesConfigurationFieldGroupsProvider(): array { return [ //empty config @@ -520,7 +519,7 @@ public function repositoriesConfigurationFieldGroupsProvider() ]; } - public function testRepositoriesConfigurationEmpty() + public function testRepositoriesConfigurationEmpty(): void { $repositories = [ 'main' => null, @@ -556,7 +555,7 @@ public function testRepositoriesConfigurationEmpty() ); } - public function testRepositoriesConfigurationStorageEmpty() + public function testRepositoriesConfigurationStorageEmpty(): void { $repositories = [ 'main' => [ @@ -597,7 +596,7 @@ public function testRepositoriesConfigurationStorageEmpty() ); } - public function testRepositoriesConfigurationSearchEmpty() + public function testRepositoriesConfigurationSearchEmpty(): void { $repositories = [ 'main' => [ @@ -638,7 +637,7 @@ public function testRepositoriesConfigurationSearchEmpty() ); } - public function testRepositoriesConfigurationCompatibility() + public function testRepositoriesConfigurationCompatibility(): void { $repositories = [ 'main' => [ @@ -709,7 +708,7 @@ public function testRepositoriesConfigurationCompatibility() ); } - public function testRepositoriesConfigurationCompatibility2() + public function testRepositoriesConfigurationCompatibility2(): void { $repositories = [ 'main' => [ @@ -748,7 +747,7 @@ public function testRepositoriesConfigurationCompatibility2() ); } - public function testRegisteredPolicies() + public function testRegisteredPolicies(): void { $this->load(); $this->assertContainerBuilderHasParameter('ibexa.api.role.policy_map'); @@ -800,7 +799,7 @@ public function testRegisteredPolicies() self::assertEquals($expectedPolicies, $this->container->getParameter('ibexa.api.role.policy_map')); } - public function testUrlAliasConfiguration() + public function testUrlAliasConfiguration(): void { $configuration = [ 'transformation' => 'urlalias_lowercase', diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php index 4914843b4c..d5f15fb258 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php @@ -57,7 +57,7 @@ public function policiesConfigProvider(): array ]; } - public function testAddResource() + public function testAddResource(): void { $containerBuilder = new ContainerBuilder(); $configBuilder = new PoliciesConfigBuilder($containerBuilder); diff --git a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php index 74285ddb49..cfc0a9fefd 100644 --- a/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php +++ b/tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php @@ -14,7 +14,7 @@ class YamlPolicyProviderTest extends TestCase { - public function testSingleYaml() + public function testSingleYaml(): void { $files = [__DIR__ . '/../../Fixtures/policies1.yml']; $provider = new StubYamlPolicyProvider($files); @@ -44,7 +44,7 @@ public function testSingleYaml() $provider->addPolicies($configBuilder); } - public function testMultipleYaml() + public function testMultipleYaml(): void { $file1 = __DIR__ . '/../../Fixtures/policies1.yml'; $file2 = __DIR__ . '/../../Fixtures/policies2.yml'; diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php index 7e0d2c1433..ad060a74fe 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php @@ -16,15 +16,14 @@ */ class StubPolicyProvider implements PolicyProviderInterface { - /** @var array */ - private $policies; + private array $policies; public function __construct(array $policies) { $this->policies = $policies; } - public function addPolicies(ConfigBuilderInterface $configBuilder) + public function addPolicies(ConfigBuilderInterface $configBuilder): void { $configBuilder->addConfig($this->policies); } diff --git a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php index c3c77190ef..572507316a 100644 --- a/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php +++ b/tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php @@ -11,8 +11,7 @@ class StubYamlPolicyProvider extends YamlPolicyProvider { - /** @var array */ - private $files; + private array $files; public function __construct(array $files) { diff --git a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php index 9de34fb626..499746ca0b 100644 --- a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php +++ b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php @@ -14,6 +14,9 @@ use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; use Ibexa\Core\Base\Exceptions\NotFoundException; +use PHPUnit\Framework\MockObject\MockObject; +use PHPUnit\Framework\MockObject\Stub\Exception; +use PHPUnit\Framework\MockObject\Stub\ReturnStub; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\Console\ConsoleEvents; @@ -25,10 +28,10 @@ class BackgroundIndexingTerminateListenerTest extends TestCase protected $listener; /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $persistenceMock; + protected MockObject $persistenceMock; /** @var \Ibexa\Contracts\Core\Search\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $searchMock; + protected MockObject $searchMock; protected function setUp(): void { @@ -47,7 +50,7 @@ protected function tearDown(): void parent::tearDown(); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -59,7 +62,7 @@ public function testGetSubscribedEvents() ); } - public function indexingProvider() + public function indexingProvider(): array { $info = new ContentInfo(['id' => 33]); $location = new Location(['id' => 44, 'contentId' => 33]); @@ -82,7 +85,7 @@ public function indexingProvider() * @param array|null $value * @param \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject|null $logger */ - public function testIndexing(array $values = null, $logger = null) + public function testIndexing(array $values = null, MockObject&LoggerInterface $logger = null): void { $contentHandlerMock = $this->createMock(Content\Handler::class); $this->persistenceMock @@ -140,7 +143,7 @@ public function testIndexing(array $values = null, $logger = null) $this->listener->reindex(); } - public function indexDeleteProvider() + public function indexDeleteProvider(): array { $location = new Location(['id' => 44, 'contentId' => 33]); $info = new ContentInfo(['id' => 33, 'currentVersionNo' => 2, 'status' => ContentInfo::STATUS_PUBLISHED]); @@ -167,7 +170,7 @@ public function indexDeleteProvider() * @param \PHPUnit\Framework\MockObject\Stub $infoReturn * @param \PHPUnit\Framework\MockObject\Stub|null $contentReturn */ - public function testIndexDelete($value, $infoReturn, $contentReturn = null) + public function testIndexDelete(Location|ContentInfo $value, ReturnStub|Exception $infoReturn, Exception $contentReturn = null): void { $contentHandlerMock = $this->createMock(Content\Handler::class); $this->persistenceMock diff --git a/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php b/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php index c42ce15f20..d713f86dbd 100644 --- a/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php @@ -33,7 +33,7 @@ final class BackwardCompatibleCommandListenerTest extends TestCase ]; /** @var \Ibexa\Bundle\Core\EventListener\BackwardCompatibleCommandListener */ - private $listener; + private BackwardCompatibleCommandListener $listener; protected function setUp(): void { @@ -115,7 +115,7 @@ private function createBackwardCompatibleCommand(string $name, array $aliases = { return new class($name, $aliases) extends Command implements BackwardCompatibleCommand { /** @var string[] */ - private $deprecatedAliases; + private array $deprecatedAliases; public function __construct(string $name, array $deprecatedAliases) { diff --git a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php index 868d52185a..95314d80fb 100644 --- a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php +++ b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php @@ -14,18 +14,19 @@ use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Tests\Bundle\Core\EventListener\Stubs\ViewManager; use Ibexa\Tests\Bundle\Core\EventListener\Stubs\ViewProvider; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ConfigScopeListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $viewManager; + private MockObject $viewManager; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $viewProviders; + private array $viewProviders; protected function setUp(): void { @@ -38,7 +39,7 @@ protected function setUp(): void ]; } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -49,7 +50,7 @@ public function testGetSubscribedEvents() ); } - public function testOnConfigScopeChange() + public function testOnConfigScopeChange(): void { $siteAccess = new SiteAccess('test'); $event = new ScopeChangeEvent($siteAccess); diff --git a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php index 511a6547db..c085e3aeb9 100644 --- a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php @@ -11,6 +11,7 @@ use Ibexa\Core\MVC\Exception\InvalidSiteAccessException; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Tests\Bundle\Core\EventListener\Stubs\TestOutput; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\ConsoleEvents; @@ -26,22 +27,22 @@ class ConsoleCommandListenerTest extends TestCase private const INVALID_SA_NAME = 'foo'; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $dispatcher; + private MockObject $dispatcher; /** @var \Ibexa\Bundle\Core\EventListener\ConsoleCommandListener */ - private $listener; + private ConsoleCommandListener $listener; /** @var \Symfony\Component\Console\Input\InputDefinition */ - private $inputDefinition; + private InputDefinition $inputDefinition; /** @var \Symfony\Component\Console\Output\Output */ - private $testOutput; + private TestOutput $testOutput; /** @var \Symfony\Component\Console\Command\Command|\PHPUnit\Framework\MockObject\MockObject */ - private $command; + private MockObject $command; protected function setUp(): void { @@ -56,7 +57,7 @@ protected function setUp(): void $this->command = $this->createMock(Command::class); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -66,7 +67,7 @@ public function testGetSubscribedEvents() ); } - public function testInvalidSiteAccessDev() + public function testInvalidSiteAccessDev(): void { $this->expectException(InvalidSiteAccessException::class); $this->expectExceptionMessageMatches('/^Invalid SiteAccess \'foo\', matched by .+\\. Valid SiteAccesses are/'); @@ -79,7 +80,7 @@ public function testInvalidSiteAccessDev() $this->listener->onConsoleCommand($event); } - public function testInvalidSiteAccessProd() + public function testInvalidSiteAccessProd(): void { $this->expectException(InvalidSiteAccessException::class); $this->expectExceptionMessageMatches('/^Invalid SiteAccess \'foo\', matched by .+\\.$/'); @@ -92,7 +93,7 @@ public function testInvalidSiteAccessProd() $this->listener->onConsoleCommand($event); } - public function testValidSiteAccess() + public function testValidSiteAccess(): void { $this->dispatcher->expects(self::once()) ->method('dispatch'); @@ -102,7 +103,7 @@ public function testValidSiteAccess() self::assertEquals(new SiteAccess('site1', 'cli'), $this->siteAccess); } - public function testDefaultSiteAccess() + public function testDefaultSiteAccess(): void { $this->dispatcher->expects(self::once()) ->method('dispatch'); diff --git a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php index d33fa227d8..26ca98dffd 100644 --- a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php +++ b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php @@ -16,6 +16,7 @@ use Ibexa\Core\MVC\Symfony\Routing\RouteReference; use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use stdClass; use Symfony\Component\HttpFoundation\Request; @@ -23,14 +24,14 @@ class ContentDownloadRouteReferenceListenerTest extends TestCase { /** @var \Ibexa\Core\Helper\TranslationHelper|\PHPUnit\Framework\MockObject\MockObject */ - protected $translationHelperMock; + protected MockObject $translationHelperMock; protected function setUp(): void { $this->translationHelperMock = $this->createMock(TranslationHelper::class); } - public function testIgnoresOtherRoutes() + public function testIgnoresOtherRoutes(): void { $routeReference = new RouteReference('some_route'); $event = new RouteReferenceGenerationEvent($routeReference, new Request()); @@ -41,7 +42,7 @@ public function testIgnoresOtherRoutes() self::assertEquals('some_route', $routeReference->getRoute()); } - public function testThrowsExceptionOnBadContentParameter() + public function testThrowsExceptionOnBadContentParameter(): void { $this->expectException(\InvalidArgumentException::class); @@ -58,7 +59,7 @@ public function testThrowsExceptionOnBadContentParameter() $eventListener->onRouteReferenceGeneration($event); } - public function testThrowsExceptionOnBadFieldIdentifier() + public function testThrowsExceptionOnBadFieldIdentifier(): void { $this->expectException(\InvalidArgumentException::class); @@ -86,7 +87,7 @@ public function testThrowsExceptionOnBadFieldIdentifier() $eventListener->onRouteReferenceGeneration($event); } - public function testGeneratesCorrectRouteReference() + public function testGeneratesCorrectRouteReference(): void { $content = $this->getCompleteContent(); @@ -112,7 +113,7 @@ public function testGeneratesCorrectRouteReference() self::assertEquals('Test-file.pdf', $routeReference->get(ContentDownloadRouteReferenceListener::OPT_DOWNLOAD_NAME)); } - public function testDownloadNameOverrideWorks() + public function testDownloadNameOverrideWorks(): void { $content = $this->getCompleteContent(); @@ -135,7 +136,7 @@ public function testDownloadNameOverrideWorks() /** * @return \Ibexa\Core\Repository\Values\Content\Content */ - protected function getCompleteContent() + protected function getCompleteContent(): Content { return new Content( [ @@ -157,7 +158,7 @@ protected function getCompleteContent() ); } - protected function getListener() + protected function getListener(): ContentDownloadRouteReferenceListener { return new ContentDownloadRouteReferenceListener($this->translationHelperMock); } diff --git a/tests/bundle/Core/EventListener/ExceptionListenerTest.php b/tests/bundle/Core/EventListener/ExceptionListenerTest.php index d84680b4e6..a232502b43 100644 --- a/tests/bundle/Core/EventListener/ExceptionListenerTest.php +++ b/tests/bundle/Core/EventListener/ExceptionListenerTest.php @@ -24,6 +24,7 @@ use Ibexa\Core\Base\Exceptions\NotFound\LimitationNotFoundException; use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\Base\Exceptions\UnauthorizedException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -39,10 +40,10 @@ class ExceptionListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Contracts\Translation\TranslatorInterface */ - private $translator; + private MockObject $translator; /** @var \Ibexa\Bundle\Core\EventListener\ExceptionListener */ - private $listener; + private ExceptionListener $listener; protected function setUp(): void { @@ -51,7 +52,7 @@ protected function setUp(): void $this->listener = new ExceptionListener($this->translator); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [KernelEvents::EXCEPTION => ['onKernelException', 10]], @@ -64,7 +65,7 @@ public function testGetSubscribedEvents() * * @return \Symfony\Component\HttpKernel\Event\ExceptionEvent */ - private function generateExceptionEvent(Exception $exception) + private function generateExceptionEvent(Exception $exception): ExceptionEvent { return new ExceptionEvent( $this->createMock(HttpKernelInterface::class), @@ -74,7 +75,7 @@ private function generateExceptionEvent(Exception $exception) ); } - public function testNotFoundException() + public function testNotFoundException(): void { $messageTemplate = 'some message template'; $translationParams = ['some' => 'thing']; @@ -97,7 +98,7 @@ public function testNotFoundException() self::assertSame($translatedMessage, $convertedException->getMessage()); } - public function testUnauthorizedException() + public function testUnauthorizedException(): void { $messageTemplate = 'some message template'; $translationParams = ['some' => 'thing']; @@ -125,7 +126,7 @@ public function testUnauthorizedException() * * @param \Exception|\Ibexa\Core\Base\Translatable $exception */ - public function testBadRequestException(Exception $exception) + public function testBadRequestException(Exception $exception): void { $messageTemplate = 'some message template'; $translationParams = ['some' => 'thing']; @@ -147,7 +148,7 @@ public function testBadRequestException(Exception $exception) self::assertSame($translatedMessage, $convertedException->getMessage()); } - public function badRequestExceptionProvider() + public function badRequestExceptionProvider(): array { return [ [new BadStateException('foo', 'bar')], @@ -162,7 +163,7 @@ public function badRequestExceptionProvider() * * @param \Exception|\Ibexa\Core\Base\Translatable $exception */ - public function testOtherRepositoryException(Exception $exception) + public function testOtherRepositoryException(Exception $exception): void { $messageTemplate = 'some message template'; $translationParams = ['some' => 'thing']; @@ -185,7 +186,7 @@ public function testOtherRepositoryException(Exception $exception) self::assertSame(Response::HTTP_INTERNAL_SERVER_ERROR, $convertedException->getStatusCode()); } - public function otherExceptionProvider() + public function otherExceptionProvider(): array { return [ [new ForbiddenException('foo')], @@ -200,7 +201,7 @@ public function otherExceptionProvider() ]; } - public function testUntouchedException() + public function testUntouchedException(): void { $exception = new \RuntimeException('foo'); $event = $this->generateExceptionEvent($exception); diff --git a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php index 854bcc1947..68d39dd13d 100644 --- a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php @@ -9,6 +9,7 @@ use Ibexa\Bundle\Core\EventListener\IndexRequestListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -18,19 +19,19 @@ class IndexRequestListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Bundle\Core\EventListener\IndexRequestListener */ - private $indexRequestEventListener; + private IndexRequestListener $indexRequestEventListener; /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private MockObject $request; /** @var \Symfony\Component\HttpKernel\Event\RequestEvent */ - private $event; + private RequestEvent $event; /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $httpKernel; + private MockObject $httpKernel; protected function setUp(): void { @@ -53,7 +54,7 @@ protected function setUp(): void ); } - public function testSubscribedEvents() + public function testSubscribedEvents(): void { self::assertSame( [ @@ -68,7 +69,7 @@ public function testSubscribedEvents() /** * @dataProvider indexPageProvider */ - public function testOnKernelRequestIndexOnIndexPage($requestPath, $configuredIndexPath, $expectedIndexPath) + public function testOnKernelRequestIndexOnIndexPage(string $requestPath, string $configuredIndexPath, string $expectedIndexPath): void { $this->configResolver ->expects(self::once()) @@ -81,7 +82,7 @@ public function testOnKernelRequestIndexOnIndexPage($requestPath, $configuredInd self::assertTrue($this->request->attributes->get('needsRedirect')); } - public function indexPageProvider() + public function indexPageProvider(): array { return [ ['/', '/foo', '/foo'], @@ -94,7 +95,7 @@ public function indexPageProvider() ]; } - public function testOnKernelRequestIndexNotOnIndexPage() + public function testOnKernelRequestIndexNotOnIndexPage(): void { $this->request->attributes->set('semanticPathinfo', '/anyContent'); $this->indexRequestEventListener->onKernelRequestIndex($this->event); diff --git a/tests/bundle/Core/EventListener/LocaleListenerTest.php b/tests/bundle/Core/EventListener/LocaleListenerTest.php index a54dd44da1..3aad97cf38 100644 --- a/tests/bundle/Core/EventListener/LocaleListenerTest.php +++ b/tests/bundle/Core/EventListener/LocaleListenerTest.php @@ -10,6 +10,7 @@ use Ibexa\Bundle\Core\EventListener\LocaleListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; @@ -21,13 +22,13 @@ class LocaleListenerTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $localeConverter; + private MockObject $localeConverter; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $requestStack; + private RequestStack $requestStack; protected function setUp(): void { @@ -47,7 +48,7 @@ protected function setUp(): void /** * @dataProvider onKernelRequestProvider */ - public function testOnKernelRequest(array $configuredLanguages, array $convertedLocalesValueMap, $expectedLocale): void + public function testOnKernelRequest(array $configuredLanguages, array $convertedLocalesValueMap, ?string $expectedLocale): void { $this->configResolver ->expects(self::once()) diff --git a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php index 049931a944..be3066121c 100644 --- a/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/OriginalRequestListenerTest.php @@ -17,7 +17,7 @@ class OriginalRequestListenerTest extends TestCase { - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -27,7 +27,7 @@ public function testGetSubscribedEvents() ); } - public function testOnKernelRequestNotMaster() + public function testOnKernelRequestNotMaster(): void { $request = new Request(); $event = new RequestEvent( @@ -41,7 +41,7 @@ public function testOnKernelRequestNotMaster() self::assertFalse($request->attributes->has('_ez_original_request')); } - public function testOnKernelRequestNoOriginalRequest() + public function testOnKernelRequestNoOriginalRequest(): void { $request = new Request(); $event = new RequestEvent( @@ -55,7 +55,7 @@ public function testOnKernelRequestNoOriginalRequest() self::assertFalse($request->attributes->has('_ez_original_request')); } - public function testOnKernelRequestWithOriginalRequest() + public function testOnKernelRequestWithOriginalRequest(): void { ClockMock::withClockMock(true); diff --git a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php index a3e50db59a..fa946750a6 100644 --- a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php +++ b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php @@ -9,6 +9,7 @@ namespace Ibexa\Tests\Bundle\Core\EventListener; use Ibexa\Bundle\Core\EventListener\RejectExplicitFrontControllerRequestsListener; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\RequestEvent; @@ -19,10 +20,10 @@ class RejectExplicitFrontControllerRequestsListenerTest extends TestCase { /** @var \Ibexa\Bundle\Core\EventListener\RejectExplicitFrontControllerRequestsListener */ - private $eventListener; + private RejectExplicitFrontControllerRequestsListener $eventListener; /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $httpKernel; + private MockObject $httpKernel; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/RequestEventListenerTest.php b/tests/bundle/Core/EventListener/RequestEventListenerTest.php index f3bbd9d5d7..4a7086815a 100644 --- a/tests/bundle/Core/EventListener/RequestEventListenerTest.php +++ b/tests/bundle/Core/EventListener/RequestEventListenerTest.php @@ -10,6 +10,7 @@ use Ibexa\Bundle\Core\EventListener\RequestEventListener; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Bridge\PhpUnit\ClockMock; @@ -24,25 +25,25 @@ class RequestEventListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $router; + private MockObject $router; /** @var \PHPUnit\Framework\MockObject\MockObject|\Psr\Log\LoggerInterface */ - private $logger; + private MockObject $logger; /** @var \Ibexa\Bundle\Core\EventListener\RequestEventListener */ - private $requestEventListener; + private RequestEventListener $requestEventListener; /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private MockObject $request; /** @var \Symfony\Component\HttpKernel\Event\RequestEvent */ - private $event; + private RequestEvent $event; /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $httpKernel; + private MockObject $httpKernel; protected function setUp(): void { @@ -67,7 +68,7 @@ protected function setUp(): void ); } - public function testSubscribedEvents() + public function testSubscribedEvents(): void { self::assertSame( [ @@ -80,7 +81,7 @@ public function testSubscribedEvents() ); } - public function testOnKernelRequestForwardSubRequest() + public function testOnKernelRequestForwardSubRequest(): void { $this->httpKernel ->expects(self::never()) @@ -90,7 +91,7 @@ public function testOnKernelRequestForwardSubRequest() $this->requestEventListener->onKernelRequestForward($event); } - public function testOnKernelRequestForward() + public function testOnKernelRequestForward(): void { ClockMock::withClockMock(true); @@ -121,14 +122,14 @@ public function testOnKernelRequestForward() ClockMock::withClockMock(false); } - public function testOnKernelRequestRedirectSubRequest() + public function testOnKernelRequestRedirectSubRequest(): void { $event = new RequestEvent($this->httpKernel, new Request(), HttpKernelInterface::SUB_REQUEST); $this->requestEventListener->onKernelRequestRedirect($event); self::assertFalse($event->hasResponse()); } - public function testOnKernelRequestRedirect() + public function testOnKernelRequestRedirect(): void { $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; @@ -149,7 +150,7 @@ public function testOnKernelRequestRedirect() self::assertTrue($event->isPropagationStopped()); } - public function testOnKernelRequestRedirectWithLocationId() + public function testOnKernelRequestRedirectWithLocationId(): void { $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; @@ -172,7 +173,7 @@ public function testOnKernelRequestRedirectWithLocationId() self::assertTrue($event->isPropagationStopped()); } - public function testOnKernelRequestRedirectPrependSiteaccess() + public function testOnKernelRequestRedirectPrependSiteaccess(): void { $queryParameters = ['some' => 'thing']; $cookieParameters = ['cookie' => 'value']; diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index 76663ac22f..dd4e753407 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\MVC\Symfony\MVCEvents; use Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; @@ -21,13 +22,13 @@ class RoutingListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $urlAliasRouter; + private MockObject $urlAliasRouter; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $urlAliasGenerator; + private MockObject $urlAliasGenerator; protected function setUp(): void { @@ -37,7 +38,7 @@ protected function setUp(): void $this->urlAliasGenerator = $this->createMock(UrlAliasGenerator::class); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { $listener = new RoutingListener($this->configResolver, $this->urlAliasRouter, $this->urlAliasGenerator); self::assertSame( @@ -48,7 +49,7 @@ public function testGetSubscribedEvents() ); } - public function testOnSiteAccessMatch() + public function testOnSiteAccessMatch(): void { $rootLocationId = 123; $excludedUriPrefixes = ['/foo/bar', '/baz']; diff --git a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php index 618a167d3c..930be9d6b8 100644 --- a/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php +++ b/tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php @@ -100,7 +100,7 @@ public function testOnSiteAccessMatchNonNativeSessionStorage(): void /** * @dataProvider onSiteAccessMatchProvider */ - public function testOnSiteAccessMatch(SiteAccess $siteAccess, $configuredSessionStorageOptions, array $expectedSessionStorageOptions): void + public function testOnSiteAccessMatch(SiteAccess $siteAccess, array $configuredSessionStorageOptions, array $expectedSessionStorageOptions): void { $request = new Request(); $request->setSession(new Session(new MockArraySessionStorage())); diff --git a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php index 164d6dbfec..568b144ca3 100644 --- a/tests/bundle/Core/EventListener/SiteAccessListenerTest.php +++ b/tests/bundle/Core/EventListener/SiteAccessListenerTest.php @@ -19,10 +19,10 @@ class SiteAccessListenerTest extends TestCase { /** @var \Ibexa\Bundle\Core\EventListener\SiteAccessListener */ - private $listener; + private SiteAccessListener $listener; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $defaultSiteaccess; + private SiteAccess $defaultSiteaccess; protected function setUp(): void { @@ -32,7 +32,7 @@ protected function setUp(): void $this->listener = new SiteAccessListener($this->defaultSiteaccess); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [ @@ -42,7 +42,7 @@ public function testGetSubscribedEvents() ); } - public function siteAccessMatchProvider() + public function siteAccessMatchProvider(): array { return [ ['/foo/bar', '/foo/bar', '', []], @@ -64,11 +64,11 @@ public function siteAccessMatchProvider() * @dataProvider siteAccessMatchProvider */ public function testOnSiteAccessMatchMasterRequest( - $uri, - $expectedSemanticPathinfo, - $expectedVPString, + string $uri, + string $expectedSemanticPathinfo, + string $expectedVPString, array $expectedVPArray - ) { + ): void { $uri = rawurldecode($uri); $semanticPathinfoPos = strpos($uri, $expectedSemanticPathinfo); if ($semanticPathinfoPos !== 0) { @@ -100,7 +100,7 @@ public function testOnSiteAccessMatchMasterRequest( /** * @dataProvider siteAccessMatchProvider */ - public function testOnSiteAccessMatchSubRequest($uri, $semanticPathinfo, $vpString, $expectedViewParameters) + public function testOnSiteAccessMatchSubRequest(string $uri, string $semanticPathinfo, string $vpString, array $expectedViewParameters): void { $siteAccess = new SiteAccess('test', 'test', $this->createMock(SiteAccess\Matcher::class)); $request = Request::create($uri); diff --git a/tests/bundle/Core/EventListener/Stubs/TestOutput.php b/tests/bundle/Core/EventListener/Stubs/TestOutput.php index 3243bac942..89595d21be 100644 --- a/tests/bundle/Core/EventListener/Stubs/TestOutput.php +++ b/tests/bundle/Core/EventListener/Stubs/TestOutput.php @@ -16,7 +16,7 @@ class TestOutput extends Output { public $output = ''; - public function clear() + public function clear(): void { $this->output = ''; } diff --git a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php index f9744862d4..f7ce3e0be3 100644 --- a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php +++ b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php @@ -15,6 +15,7 @@ use Ibexa\Core\MVC\Symfony\View\ContentView; use Ibexa\Core\MVC\Symfony\View\Event\FilterViewBuilderParametersEvent; use Ibexa\Core\MVC\Symfony\View\ViewEvents; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -28,31 +29,31 @@ class ViewControllerListenerTest extends TestCase { /** @var \Symfony\Component\HttpKernel\Controller\ControllerResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $controllerResolver; + private MockObject $controllerResolver; /** @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $logger; + private MockObject $logger; /** @var \Ibexa\Bundle\Core\EventListener\ViewControllerListener */ - private $controllerListener; + private ViewControllerListener $controllerListener; /** @var \Symfony\Component\HttpKernel\Event\ControllerEvent */ private $event; /** @var \Symfony\Component\HttpFoundation\Request */ - private $request; + private Request $request; /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilderRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private $viewBuilderRegistry; + private MockObject $viewBuilderRegistry; /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ private $viewConfigurator; /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilder|\PHPUnit\Framework\MockObject\MockObject */ - private $viewBuilderMock; + private MockObject $viewBuilderMock; /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $eventDispatcher; + private MockObject $eventDispatcher; protected function setUp(): void { @@ -74,7 +75,7 @@ protected function setUp(): void $this->viewBuilderMock = $this->createMock(ViewBuilder::class); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [KernelEvents::CONTROLLER => ['getController', 10]], @@ -82,7 +83,7 @@ public function testGetSubscribedEvents() ); } - public function testGetControllerNoBuilder() + public function testGetControllerNoBuilder(): void { $initialController = 'Foo::bar'; $this->request->attributes->set('_controller', $initialController); @@ -96,9 +97,9 @@ public function testGetControllerNoBuilder() $this->controllerListener->getController($this->event); } - public function testGetControllerWithClosure() + public function testGetControllerWithClosure(): void { - $initialController = static function () {}; + $initialController = static function (): void {}; $this->request->attributes->set('_controller', $initialController); $this->viewBuilderRegistry @@ -110,7 +111,7 @@ public function testGetControllerWithClosure() $this->controllerListener->getController($this->event); } - public function testGetControllerMatchedView() + public function testGetControllerMatchedView(): void { $contentId = 12; $locationId = 123; @@ -144,7 +145,7 @@ public function testGetControllerMatchedView() $this->controllerResolver ->expects(self::once()) ->method('getController') - ->will(self::returnValue(static function () {})); + ->will(self::returnValue(static function (): void {})); $this->controllerListener->getController($this->event); self::assertEquals($customController, $this->request->attributes->get('_controller')); @@ -192,11 +193,11 @@ public function testGetControllerEmitsProperEvents(): void /** * @return \Symfony\Component\HttpKernel\Event\ControllerEvent */ - protected function createEvent() + protected function createEvent(): ControllerEvent { return new ControllerEvent( $this->createMock(HttpKernelInterface::class), - static function () {}, + static function (): void {}, $this->request, HttpKernelInterface::MAIN_REQUEST ); diff --git a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php index 2a6e88ab9a..a1aa2f5424 100644 --- a/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php +++ b/tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php @@ -18,7 +18,7 @@ class CrowdinRequestLocaleSubscriberTest extends TestCase /** * @dataProvider testSetRequestsProvider */ - public function testSetLocale(Request $request, $shouldHaveCustomLocale) + public function testSetLocale(Request $request, bool $shouldHaveCustomLocale): void { $event = new RequestEvent( $this->getMockBuilder(HttpKernelInterface::class)->getMock(), @@ -36,7 +36,7 @@ public function testSetLocale(Request $request, $shouldHaveCustomLocale) ); } - public function testSetRequestsProvider() + public function testSetRequestsProvider(): array { return [ 'with_ez_in_context_translation_cookie' => [ diff --git a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php index 68b1d656e8..57becf6b5c 100644 --- a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php @@ -59,7 +59,7 @@ public function testSubRequestBuilding(): void $controllerResolver ->method('getController') - ->willReturn(static function () { + ->willReturn(static function (): Response { return new Response('response_body'); }); @@ -76,7 +76,7 @@ public function testControllerResponse(): void $controllerResolver ->method('getController') - ->willReturn(static function () { + ->willReturn(static function (): Response { return new Response('response_body'); }); @@ -95,7 +95,7 @@ public function testControllerViewResponse(): void $controllerResolverMock = $this->getControllerResolverInterfaceMock(); $controllerResolverMock ->method('getController') - ->willReturn(static function (...$args) use ($contentView) { + ->willReturn(static function (...$args) use ($contentView): \Ibexa\Core\MVC\Symfony\View\ContentView { $contentView->setParameters($args); return $contentView; @@ -141,7 +141,7 @@ public function testControllerUnhandledStringResponse(): void $controllerResolver ->method('getController') - ->willReturn(static function (...$args) { + ->willReturn(static function (...$args): array { return ['some_array' => $args]; }); diff --git a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php index 678c4b817c..8a32541611 100644 --- a/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php +++ b/tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php @@ -20,7 +20,7 @@ class FragmentListenerFactoryTest extends TestCase /** * @dataProvider buildFragmentListenerProvider */ - public function testBuildFragmentListener($requestUri, $isFragmentCandidate) + public function testBuildFragmentListener(string $requestUri, bool $isFragmentCandidate): void { $listenerClass = FragmentListener::class; $uriSigner = new UriSigner('my_precious_secret'); @@ -44,7 +44,7 @@ public function testBuildFragmentListener($requestUri, $isFragmentCandidate) } } - public function buildFragmentListenerProvider() + public function buildFragmentListenerProvider(): array { return [ ['/foo/bar', false], @@ -56,7 +56,7 @@ public function buildFragmentListenerProvider() ]; } - public function testBuildFragmentListenerNoRequest() + public function testBuildFragmentListenerNoRequest(): void { $factory = new FragmentListenerFactory(); $factory->setRequestStack(new RequestStack()); diff --git a/tests/bundle/Core/Imagine/AliasCleanerTest.php b/tests/bundle/Core/Imagine/AliasCleanerTest.php index 596e2381f2..1035a93a40 100644 --- a/tests/bundle/Core/Imagine/AliasCleanerTest.php +++ b/tests/bundle/Core/Imagine/AliasCleanerTest.php @@ -9,15 +9,16 @@ use Ibexa\Bundle\Core\Imagine\AliasCleaner; use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class AliasCleanerTest extends TestCase { /** @var \Ibexa\Bundle\Core\Imagine\AliasCleaner */ - private $aliasCleaner; + private AliasCleaner $aliasCleaner; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $resolver; + private MockObject $resolver; protected function setUp(): void { @@ -26,7 +27,7 @@ protected function setUp(): void $this->aliasCleaner = new AliasCleaner($this->resolver); } - public function testRemoveAliases() + public function testRemoveAliases(): void { $originalPath = 'foo/bar/test.jpg'; $this->resolver diff --git a/tests/bundle/Core/Imagine/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/AliasGeneratorTest.php index f022df510a..bf4d423d08 100644 --- a/tests/bundle/Core/Imagine/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/AliasGeneratorTest.php @@ -9,6 +9,7 @@ use Ibexa\Bundle\Core\Imagine\AliasGenerator; use Ibexa\Bundle\Core\Imagine\Variation\ImagineAwareAliasGenerator; +use Ibexa\Contracts\Core\FieldType\Value; use Ibexa\Contracts\Core\FieldType\Value as FieldTypeValue; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidVariationException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; @@ -30,46 +31,47 @@ use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration; use Liip\ImagineBundle\Imagine\Filter\FilterManager; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; class AliasGeneratorTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Binary\Loader\LoaderInterface */ - private $dataLoader; + private MockObject $dataLoader; /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Filter\FilterManager */ - private $filterManager; + private MockObject $filterManager; /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $ioResolver; + private MockObject $ioResolver; /** @var \Liip\ImagineBundle\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; /** @var \PHPUnit\Framework\MockObject\MockObject|\Psr\Log\LoggerInterface */ - private $logger; + private MockObject $logger; /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\ImagineInterface */ - private $imagine; + private MockObject $imagine; /** @var \Ibexa\Bundle\Core\Imagine\AliasGenerator */ - private $aliasGenerator; + private AliasGenerator $aliasGenerator; /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ - private $decoratedAliasGenerator; + private ImagineAwareAliasGenerator $decoratedAliasGenerator; /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\BoxInterface */ - private $box; + private MockObject $box; /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\ImageInterface */ - private $image; + private MockObject $image; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\IO\IOServiceInterface */ - private $ioService; + private MockObject $ioService; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Variation\VariationPathGenerator */ - private $variationPathGenerator; + private MockObject $variationPathGenerator; protected function setUp(): void { @@ -108,7 +110,7 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\FieldType\Value $value * @param bool $isSupported */ - public function testSupportsValue($value, $isSupported) + public function testSupportsValue((Value&MockObject)|TextLineValue|ImageValue $value, bool $isSupported): void { self::assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); } @@ -122,7 +124,7 @@ public function testSupportsValue($value, $isSupported) * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function supportsValueProvider() + public function supportsValueProvider(): array { return [ [$this->createMock(FieldTypeValue::class), false], @@ -132,7 +134,7 @@ public function supportsValueProvider() ]; } - public function testGetVariationWrongValue() + public function testGetVariationWrongValue(): void { $this->expectException(\InvalidArgumentException::class); @@ -145,7 +147,7 @@ public function testGetVariationWrongValue() * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType */ - public function testGetVariationNotStored() + public function testGetVariationNotStored(): void { $originalPath = 'foo/bar/image.jpg'; $variationName = 'my_variation'; @@ -191,7 +193,7 @@ public function testGetVariationNotStored() ); } - public function testGetVariationOriginal() + public function testGetVariationOriginal(): void { $originalPath = 'foo/bar/image.jpg'; $variationName = 'original'; @@ -245,7 +247,7 @@ public function testGetVariationOriginal() * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType */ - public function testGetVariationNotStoredHavingReferences() + public function testGetVariationNotStoredHavingReferences(): void { $originalPath = 'foo/bar/image.jpg'; $variationName = 'my_variation'; @@ -316,7 +318,7 @@ public function testGetVariationNotStoredHavingReferences() * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType */ - public function testGetVariationAlreadyStored() + public function testGetVariationAlreadyStored(): void { $originalPath = 'foo/bar/image.jpg'; $variationName = 'my_variation'; @@ -355,7 +357,7 @@ public function testGetVariationAlreadyStored() ); } - public function testGetVariationOriginalNotFound() + public function testGetVariationOriginalNotFound(): void { $this->expectException(SourceImageNotFoundException::class); @@ -368,7 +370,7 @@ public function testGetVariationOriginalNotFound() $this->aliasGenerator->getVariation($field, new VersionInfo(), 'foo'); } - public function testGetVariationInvalidVariation() + public function testGetVariationInvalidVariation(): void { $this->expectException(InvalidVariationException::class); diff --git a/tests/bundle/Core/Imagine/BinaryLoaderTest.php b/tests/bundle/Core/Imagine/BinaryLoaderTest.php index feddb12766..c515d29b88 100644 --- a/tests/bundle/Core/Imagine/BinaryLoaderTest.php +++ b/tests/bundle/Core/Imagine/BinaryLoaderTest.php @@ -15,16 +15,17 @@ use Ibexa\Core\IO\Values\MissingBinaryFile; use Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException; use Liip\ImagineBundle\Model\Binary; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Mime\MimeTypes; class BinaryLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; /** @var \Ibexa\Bundle\Core\Imagine\BinaryLoader */ - private $binaryLoader; + private BinaryLoader $binaryLoader; protected function setUp(): void { @@ -33,9 +34,9 @@ protected function setUp(): void $this->binaryLoader = new BinaryLoader($this->ioService, new MimeTypes()); } - public function testFindNotFound() + public function testFindNotFound(): void { - $this->expectException(\Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException::class); + $this->expectException(NotLoadableException::class); $path = 'something.jpg'; $this->ioService @@ -47,9 +48,9 @@ public function testFindNotFound() $this->binaryLoader->find($path); } - public function testFindMissing() + public function testFindMissing(): void { - $this->expectException(\Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException::class); + $this->expectException(NotLoadableException::class); $path = 'something.jpg'; $this->ioService @@ -61,7 +62,7 @@ public function testFindMissing() $this->binaryLoader->find($path); } - public function testFindBadPathRoot() + public function testFindBadPathRoot(): void { $path = 'var/site/storage/images/1/2/3/123-name/name.png'; $this->ioService diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php index 0f53eea8d3..c87108cca5 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php @@ -9,18 +9,19 @@ use Ibexa\Bundle\Core\Imagine\Cache\Resolver\ProxyResolver; use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ProxyResolverTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $resolver; + private MockObject $resolver; /** @var string */ - private $path; + private string $path; /** @var string */ - private $filter; + private string $filter; protected function setUp(): void { @@ -30,7 +31,7 @@ protected function setUp(): void $this->filter = 'medium'; } - public function testResolveUsingProxyHostWithTrailingSlash() + public function testResolveUsingProxyHostWithTrailingSlash(): void { $hosts = ['http://ezplatform.com/']; $proxyResolver = new ProxyResolver($this->resolver, $hosts); @@ -48,7 +49,7 @@ public function testResolveUsingProxyHostWithTrailingSlash() self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } - public function testResolveAndRemovePortUsingProxyHost() + public function testResolveAndRemovePortUsingProxyHost(): void { $hosts = ['http://ibexa.co']; $proxyResolver = new ProxyResolver($this->resolver, $hosts); @@ -66,7 +67,7 @@ public function testResolveAndRemovePortUsingProxyHost() self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); } - public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash() + public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash(): void { $hosts = ['http://ibexa.co']; $proxyResolver = new ProxyResolver($this->resolver, $hosts); diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php index 1d41a4f323..9a9f414b7f 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php @@ -9,12 +9,13 @@ use Ibexa\Bundle\Core\Imagine\Cache\Resolver\RelativeResolver; use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class RelativeResolverTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $liipResolver; + private MockObject $liipResolver; protected function setUp(): void { @@ -22,7 +23,7 @@ protected function setUp(): void $this->liipResolver = $this->getMockBuilder(ResolverInterface::class)->getMock(); } - public function testResolve() + public function testResolve(): void { $resolver = new RelativeResolver($this->liipResolver); diff --git a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php index 32c17cf66c..05235b4ad6 100644 --- a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php +++ b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php @@ -12,18 +12,19 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Liip\ImagineBundle\Imagine\Cache\Resolver\ProxyResolver; use Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ResolverFactoryTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private $resolver; + private MockObject $resolver; /** @var \Ibexa\Bundle\Core\Imagine\Cache\ResolverFactory */ - private $factory; + private ResolverFactory $factory; protected function setUp(): void { @@ -38,7 +39,7 @@ protected function setUp(): void ); } - public function testCreateProxyCacheResolver() + public function testCreateProxyCacheResolver(): void { $this->configResolver ->expects(self::at(0)) @@ -59,7 +60,7 @@ public function testCreateProxyCacheResolver() self::assertEquals($expected, $this->factory->createCacheResolver()); } - public function testCreateRelativeCacheResolver() + public function testCreateRelativeCacheResolver(): void { $this->configResolver ->expects(self::at(0)) diff --git a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php index 4f4ef7ca3f..b79e6e9d7d 100644 --- a/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Bundle\Core\Imagine\Filter; use Ibexa\Bundle\Core\Imagine\Filter\AbstractFilter; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class AbstractFilterTest extends TestCase @@ -21,12 +22,12 @@ protected function setUp(): void $this->filter = $this->getFilter(); } - protected function getFilter() + protected function getFilter(): MockObject { return $this->getMockForAbstractClass(AbstractFilter::class); } - public function testGetSetOptions() + public function testGetSetOptions(): void { self::assertSame([], $this->filter->getOptions()); $options = ['foo' => 'bar', 'some' => ['thing']]; @@ -37,7 +38,7 @@ public function testGetSetOptions() /** * @dataProvider getSetOptionNoDefaulValueProvider */ - public function testGetSetOptionNoDefaultValue($optionName, $value) + public function testGetSetOptionNoDefaultValue(string $optionName, string|int|bool|\stdClass|array $value): void { self::assertFalse($this->filter->hasOption($optionName)); self::assertNull($this->filter->getOption($optionName)); @@ -46,7 +47,7 @@ public function testGetSetOptionNoDefaultValue($optionName, $value) self::assertSame($value, $this->filter->getOption($optionName)); } - public function getSetOptionNoDefaulValueProvider() + public function getSetOptionNoDefaulValueProvider(): array { return [ ['foo', 'bar'], @@ -61,7 +62,7 @@ public function getSetOptionNoDefaulValueProvider() /** * @dataProvider getSetOptionWithDefaulValueProvider */ - public function testGetSetOptionWithDefaultValue($optionName, $value, $defaultValue) + public function testGetSetOptionWithDefaultValue(string $optionName, string|int|bool|\stdClass|array $value, string|int|bool|\stdClass|array $defaultValue): void { self::assertFalse($this->filter->hasOption($optionName)); self::assertSame($defaultValue, $this->filter->getOption($optionName, $defaultValue)); @@ -70,7 +71,7 @@ public function testGetSetOptionWithDefaultValue($optionName, $value, $defaultVa self::assertSame($value, $this->filter->getOption($optionName)); } - public function getSetOptionWithDefaulValueProvider() + public function getSetOptionWithDefaulValueProvider(): array { return [ ['foo', 'bar', 'default'], diff --git a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php index fe9cf8af97..e57ddd8ab0 100644 --- a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php +++ b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php @@ -9,15 +9,16 @@ use Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class FilterConfigurationTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; protected function setUp(): void { @@ -27,7 +28,7 @@ protected function setUp(): void $this->filterConfiguration->setConfigResolver($this->configResolver); } - public function testGetOnlyImagineFilters() + public function testGetOnlyImagineFilters(): void { $fooConfig = ['fooconfig']; $barConfig = ['barconfig']; @@ -44,7 +45,7 @@ public function testGetOnlyImagineFilters() self::assertSame($barConfig, $this->filterConfiguration->get('bar')); } - public function testGetNoEzVariationInvalidImagineFilter() + public function testGetNoEzVariationInvalidImagineFilter(): void { $this->expectException(\RuntimeException::class); @@ -90,7 +91,7 @@ public function testGetWithEzVariationNullConfiguration(): void ); } - public function testGetEzVariationNoReference() + public function testGetEzVariationNoReference(): void { $fooConfig = ['fooconfig']; $barConfig = ['barconfig']; @@ -119,7 +120,7 @@ public function testGetEzVariationNoReference() ); } - public function testGetEzVariationWithReference() + public function testGetEzVariationWithReference(): void { $fooConfig = ['fooconfig']; $barConfig = ['barconfig']; @@ -149,7 +150,7 @@ public function testGetEzVariationWithReference() ); } - public function testGetEzVariationImagineFilters() + public function testGetEzVariationImagineFilters(): void { $filters = ['some_filter' => []]; $imagineConfig = ['filters' => $filters]; @@ -177,7 +178,7 @@ public function testGetEzVariationImagineFilters() ); } - public function testGetEzVariationImagineOptions() + public function testGetEzVariationImagineOptions(): void { $imagineConfig = [ 'foo_option' => 'foo', @@ -210,7 +211,7 @@ public function testGetEzVariationImagineOptions() ); } - public function testAll() + public function testAll(): void { $fooConfig = ['fooconfig']; $barConfig = ['barconfig']; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php index 3dc1640763..9f48a0d443 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php @@ -21,7 +21,7 @@ class BorderFilterLoaderTest extends TestCase /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); @@ -29,7 +29,7 @@ public function testLoadInvalidOptions(array $options) $loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -38,7 +38,7 @@ public function loadInvalidProvider() ]; } - public function testLoadDefaultColor() + public function testLoadDefaultColor(): void { $image = $this->createMock(ImageInterface::class); $options = [10, 10]; @@ -85,7 +85,7 @@ public function testLoadDefaultColor() /** * @dataProvider loadProvider */ - public function testLoad($thickX, $thickY, $color) + public function testLoad(int $thickX, int $thickY, string $color): void { $image = $this->createMock(ImageInterface::class); $options = [$thickX, $thickY, $color]; @@ -129,7 +129,7 @@ public function testLoad($thickX, $thickY, $color) self::assertSame($image, $loader->load($image, $options)); } - public function loadProvider() + public function loadProvider(): array { return [ [10, 10, '#fff'], diff --git a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php index e937182c95..afc08e26de 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class CropFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\CropFilterLoader */ - private $loader; + private CropFilterLoader $loader; protected function setUp(): void { @@ -32,14 +33,14 @@ protected function setUp(): void /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -50,7 +51,7 @@ public function loadInvalidProvider() ]; } - public function testLoad() + public function testLoad(): void { $width = 123; $height = 789; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php index eaa18287ba..3dfdb86762 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php @@ -14,7 +14,7 @@ class GrayscaleFilterLoaderTest extends TestCase { - public function testLoad() + public function testLoad(): void { $image = $this->createMock(ImageInterface::class); $effects = $this->createMock(EffectsInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php index b4a6eb2942..a7c1e4064b 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php @@ -11,15 +11,16 @@ use Ibexa\Bundle\Core\Imagine\Filter\Loader\ReduceNoiseFilterLoader; use Imagine\Exception\NotSupportedException; use Imagine\Image\ImageInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ReduceNoiseFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $filter; + private MockObject $filter; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ReduceNoiseFilterLoader */ - private $loader; + private ReduceNoiseFilterLoader $loader; protected function setUp(): void { @@ -28,7 +29,7 @@ protected function setUp(): void $this->loader = new ReduceNoiseFilterLoader($this->filter); } - public function testLoadInvalidDriver() + public function testLoadInvalidDriver(): void { $this->expectException(NotSupportedException::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php index c120b142ab..6ec42370a1 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleDownOnlyFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleDownOnlyFilterLoader */ - private $loader; + private ScaleDownOnlyFilterLoader $loader; protected function setUp(): void { @@ -32,14 +33,14 @@ protected function setUp(): void /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -48,7 +49,7 @@ public function loadInvalidProvider() ]; } - public function testLoad() + public function testLoad(): void { $options = [123, 456]; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php index 273b6dd972..774683c5ff 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleExactFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleExactFilterLoader */ - private $loader; + private ScaleExactFilterLoader $loader; protected function setUp(): void { @@ -32,14 +33,14 @@ protected function setUp(): void /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -48,7 +49,7 @@ public function loadInvalidProvider() ]; } - public function testLoad() + public function testLoad(): void { $options = [123, 456]; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php index 873eb0d0fc..1ae0ea2d9a 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php @@ -12,15 +12,16 @@ use Imagine\Image\Box; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleFilterLoader */ - private $loader; + private ScaleFilterLoader $loader; protected function setUp(): void { @@ -33,14 +34,14 @@ protected function setUp(): void /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -49,7 +50,7 @@ public function loadInvalidProvider() ]; } - public function testLoadHeighten() + public function testLoadHeighten(): void { $width = 900; $height = 400; @@ -72,7 +73,7 @@ public function testLoadHeighten() self::assertSame($image, $this->loader->load($image, [$width, $height])); } - public function testLoadWiden() + public function testLoadWiden(): void { $width = 900; $height = 600; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php index 840cca4006..35dfb68288 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleHeightDownOnlyFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightDownOnlyFilterLoader */ - private $loader; + private ScaleHeightDownOnlyFilterLoader $loader; protected function setUp(): void { @@ -29,14 +30,14 @@ protected function setUp(): void $this->loader->setInnerLoader($this->innerLoader); } - public function testLoadInvalid() + public function testLoadInvalid(): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), []); } - public function testLoad() + public function testLoad(): void { $height = 123; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php index 9b36149c03..0e4b406555 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleHeightFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightFilterLoader */ - private $loader; + private ScaleHeightFilterLoader $loader; protected function setUp(): void { @@ -29,14 +30,14 @@ protected function setUp(): void $this->loader->setInnerLoader($this->innerLoader); } - public function testLoadFail() + public function testLoadFail(): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class, [])); } - public function testLoad() + public function testLoad(): void { $height = 123; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php index 762ec807e8..36310382a7 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php @@ -12,15 +12,16 @@ use Imagine\Image\Box; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScalePercentFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScalePercentFilterLoader */ - private $loader; + private ScalePercentFilterLoader $loader; protected function setUp(): void { @@ -33,14 +34,14 @@ protected function setUp(): void /** * @dataProvider loadInvalidProvider */ - public function testLoadInvalidOptions(array $options) + public function testLoadInvalidOptions(array $options): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), $options); } - public function loadInvalidProvider() + public function loadInvalidProvider(): array { return [ [[]], @@ -49,7 +50,7 @@ public function loadInvalidProvider() ]; } - public function testLoad() + public function testLoad(): void { $widthPercent = 40; $heightPercent = 125; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php index 4ad49d493d..f99b13cada 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleWidthDownOnlyFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthDownOnlyFilterLoader */ - private $loader; + private ScaleWidthDownOnlyFilterLoader $loader; protected function setUp(): void { @@ -29,14 +30,14 @@ protected function setUp(): void $this->loader->setInnerLoader($this->innerLoader); } - public function testLoadInvalid() + public function testLoadInvalid(): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class), []); } - public function testLoad() + public function testLoad(): void { $width = 123; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php index 78fb82b9e0..743cfa8ba8 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php @@ -11,15 +11,16 @@ use Imagine\Exception\InvalidArgumentException; use Imagine\Image\ImageInterface; use Liip\ImagineBundle\Imagine\Filter\Loader\LoaderInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ScaleWidthFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerLoader; + private MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthFilterLoader */ - private $loader; + private ScaleWidthFilterLoader $loader; protected function setUp(): void { @@ -29,14 +30,14 @@ protected function setUp(): void $this->loader->setInnerLoader($this->innerLoader); } - public function testLoadFail() + public function testLoadFail(): void { $this->expectException(InvalidArgumentException::class); $this->loader->load($this->createMock(ImageInterface::class, [])); } - public function testLoad() + public function testLoad(): void { $width = 123; $image = $this->createMock(ImageInterface::class); diff --git a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php index 4af693b48b..9300fcd990 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php @@ -10,15 +10,16 @@ use Ibexa\Bundle\Core\Imagine\Filter\FilterInterface; use Ibexa\Bundle\Core\Imagine\Filter\Loader\SwirlFilterLoader; use Imagine\Image\ImageInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class SwirlFilterLoaderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $filter; + private MockObject $filter; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\SwirlFilterLoader */ - private $loader; + private SwirlFilterLoader $loader; protected function setUp(): void { @@ -27,7 +28,7 @@ protected function setUp(): void $this->loader = new SwirlFilterLoader($this->filter); } - public function testLoadNoOption() + public function testLoadNoOption(): void { $image = $this->createMock(ImageInterface::class); $this->filter @@ -46,7 +47,7 @@ public function testLoadNoOption() /** * @dataProvider loadWithOptionProvider */ - public function testLoadWithOption($degrees) + public function testLoadWithOption(int|float $degrees): void { $image = $this->createMock(ImageInterface::class); $this->filter @@ -63,7 +64,7 @@ public function testLoadWithOption($degrees) self::assertSame($image, $this->loader->load($image, [$degrees])); } - public function loadWithOptionProvider() + public function loadWithOptionProvider(): array { return [ [10], diff --git a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php index 6076a2a83b..b24742b68f 100644 --- a/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php +++ b/tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php @@ -13,7 +13,7 @@ class UnsupportedFilterTest extends AbstractFilterTest { - public function testLoad() + public function testLoad(): void { $this->expectException(NotSupportedException::class); diff --git a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php index 804150e77b..c7c80df017 100644 --- a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php +++ b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php @@ -19,6 +19,7 @@ use Ibexa\Core\IO\Values\MissingBinaryFile; use Liip\ImagineBundle\Exception\Imagine\Cache\Resolver\NotResolvableException; use Liip\ImagineBundle\Model\Binary; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\RequestContext; @@ -26,25 +27,25 @@ class IORepositoryResolverTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; /** @var \Symfony\Component\Routing\RequestContext */ - private $requestContext; + private RequestContext $requestContext; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Bundle\Core\Imagine\IORepositoryResolver */ - private $imageResolver; + private IORepositoryResolver $imageResolver; /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration */ - private $filterConfiguration; + private FilterConfiguration $filterConfiguration; /** @var \Ibexa\Contracts\Core\Variation\VariationPurger|\PHPUnit\Framework\MockObject\MockObject */ - protected $variationPurger; + protected MockObject $variationPurger; /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $variationPathGenerator; + protected MockObject $variationPathGenerator; protected function setUp(): void { @@ -68,7 +69,7 @@ protected function setUp(): void /** * @dataProvider getFilePathProvider */ - public function testGetFilePath($path, $filter, $expected) + public function testGetFilePath(string $path, string $filter, string $expected): void { $this->variationPathGenerator ->expects(self::once()) @@ -78,7 +79,7 @@ public function testGetFilePath($path, $filter, $expected) self::assertSame($expected, $this->imageResolver->getFilePath($path, $filter)); } - public function getFilePathProvider() + public function getFilePathProvider(): array { return [ ['Tardis/bigger/in-the-inside/RiverSong.jpg', 'thumbnail', 'Tardis/bigger/in-the-inside/RiverSong_thumbnail.jpg'], @@ -88,7 +89,7 @@ public function getFilePathProvider() ]; } - public function testIsStoredImageExists() + public function testIsStoredImageExists(): void { $filter = 'thumbnail'; $path = 'Tardis/bigger/in-the-inside/RiverSong.jpg'; @@ -109,7 +110,7 @@ public function testIsStoredImageExists() self::assertTrue($this->imageResolver->isStored($path, $filter)); } - public function testIsStoredImageDoesntExist() + public function testIsStoredImageDoesntExist(): void { $filter = 'thumbnail'; $path = 'Tardis/bigger/in-the-inside/RiverSong.jpg'; @@ -133,7 +134,7 @@ public function testIsStoredImageDoesntExist() /** * @dataProvider resolveProvider */ - public function testResolve($path, $filter, $variationPath, $requestUrl, $expected) + public function testResolve(string $path, string $filter, string $variationPath, ?string $requestUrl, string $expected): void { if ($requestUrl) { $this->requestContext->fromRequest(Request::create($requestUrl)); @@ -153,7 +154,7 @@ public function testResolve($path, $filter, $variationPath, $requestUrl, $expect self::assertSame($expected, $result); } - public function testResolveMissing() + public function testResolveMissing(): void { $this->expectException(NotResolvableException::class); @@ -167,7 +168,7 @@ public function testResolveMissing() $this->imageResolver->resolve($path, 'some_filter'); } - public function testResolveNotFound() + public function testResolveNotFound(): void { $this->expectException(NotResolvableException::class); @@ -181,7 +182,7 @@ public function testResolveNotFound() $this->imageResolver->resolve($path, 'some_filter'); } - public function resolveProvider() + public function resolveProvider(): array { return [ [ @@ -236,7 +237,7 @@ public function resolveProvider() ]; } - public function testStore() + public function testStore(): void { $filter = 'thumbnail'; $path = 'Tardis/bigger/in-the-inside/RiverSong.jpg'; @@ -256,7 +257,7 @@ public function testStore() $this->imageResolver->store($binary, $path, $filter); } - public function testRemoveEmptyFilters() + public function testRemoveEmptyFilters(): void { $originalPath = 'foo/bar/test.jpg'; $filters = ['filter1' => true, 'filter2' => true, 'chaud_cacao' => true]; @@ -309,7 +310,7 @@ public function testRemoveEmptyFilters() $this->imageResolver->remove([$originalPath], []); } - public function testRemoveWithFilters() + public function testRemoveWithFilters(): void { $originalPath = 'foo/bar/test.jpg'; $filters = ['filter1', 'filter2', 'chaud_cacao']; diff --git a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php index dac3ff147d..c780344d34 100644 --- a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php @@ -17,21 +17,22 @@ use Ibexa\Core\FieldType\ImageAsset; use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class AliasGeneratorTest extends TestCase { /** @var \Ibexa\Bundle\Core\Imagine\ImageAsset\AliasGenerator */ - private $aliasGenerator; + private AliasGenerator $aliasGenerator; /** @var \Ibexa\Contracts\Core\Variation\VariationHandler|\PHPUnit\Framework\MockObject\MockObject */ - private $innerAliasGenerator; + private MockObject $innerAliasGenerator; /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private $contentService; + private MockObject $contentService; /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper|\PHPUnit\Framework\MockObject\MockObject */ - private $assetMapper; + private MockObject $assetMapper; protected function setUp(): void { @@ -46,7 +47,7 @@ protected function setUp(): void ); } - public function testGetVariationOfImageAsset() + public function testGetVariationOfImageAsset(): void { $assetField = new Field([ 'value' => new ImageAsset\Value(486), @@ -96,7 +97,7 @@ public function testGetVariationOfImageAsset() self::assertEquals($expectedVariation, $actualVariation); } - public function testGetVariationOfNonImageAsset() + public function testGetVariationOfNonImageAsset(): void { $imageField = new Field([ 'value' => new Image\Value([ @@ -134,7 +135,7 @@ public function testGetVariationOfNonImageAsset() self::assertEquals($expectedVariation, $actualVariation); } - public function testSupport() + public function testSupport(): void { self::assertTrue($this->aliasGenerator->supportsValue(new ImageAsset\Value())); self::assertFalse($this->aliasGenerator->supportsValue(new Image\Value())); diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php index d1e84f2a66..cc00c7b838 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php @@ -24,7 +24,7 @@ class PlaceholderAliasGeneratorConfiguratorTest extends TestCase 'c' => 'C', ]; - public function testConfigure() + public function testConfigure(): void { $configResolver = $this->createMock(ConfigResolverInterface::class); $configResolver diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php index 0feac2fa72..4876586811 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php @@ -24,27 +24,28 @@ use Ibexa\Core\IO\Values\BinaryFileCreateStruct; use Ibexa\Core\Repository\Values\Content\VersionInfo; use Liip\ImagineBundle\Exception\Imagine\Cache\Resolver\NotResolvableException; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class PlaceholderAliasGeneratorTest extends TestCase { /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderAliasGenerator */ - private $aliasGenerator; + private PlaceholderAliasGenerator $aliasGenerator; /** @var \Ibexa\Contracts\Core\Variation\VariationHandler|\PHPUnit\Framework\MockObject\MockObject */ - private $innerAliasGenerator; + private MockObject $innerAliasGenerator; /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; /** @var \Ibexa\Bundle\Core\Imagine\IORepositoryResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $ioResolver; + private MockObject $ioResolver; /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderProvider|\PHPUnit\Framework\MockObject\MockObject */ - private $placeholderProvider; + private MockObject $placeholderProvider; /** @var array */ - private $placeholderOptions; + private array $placeholderOptions; protected function setUp(): void { @@ -64,7 +65,7 @@ protected function setUp(): void ); } - public function testGetVariationWrongValue() + public function testGetVariationWrongValue(): void { $this->expectException(\InvalidArgumentException::class); @@ -82,7 +83,7 @@ public function testGetVariationWrongValue() /** * @dataProvider getVariationProvider */ - public function testGetVariationSkipsPlaceholderGeneration(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters) + public function testGetVariationSkipsPlaceholderGeneration(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters): void { $expectedVariation = $this->createMock(ImageVariation::class); @@ -115,7 +116,7 @@ public function testGetVariationSkipsPlaceholderGeneration(Field $field, APIVers /** * @dataProvider getVariationProvider */ - public function testGetVariationOriginalFound(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters) + public function testGetVariationOriginalFound(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters): void { $expectedVariation = $this->createMock(ImageVariation::class); @@ -148,7 +149,7 @@ public function testGetVariationOriginalFound(Field $field, APIVersionInfo $vers /** * @dataProvider getVariationProvider */ - public function testGetVariationOriginalNotFound(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters) + public function testGetVariationOriginalNotFound(Field $field, APIVersionInfo $versionInfo, string $variationName, array $parameters): void { $placeholderPath = '/tmp/placeholder.jpg'; $binaryCreateStruct = new BinaryFileCreateStruct(); @@ -273,7 +274,7 @@ public function testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable( /** * @dataProvider supportsValueProvider */ - public function testSupportsValue(Value $value, bool $isSupported) + public function testSupportsValue(Value $value, bool $isSupported): void { self::assertSame($isSupported, $this->aliasGenerator->supportsValue($value)); } diff --git a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php index def720c8ad..f73e559cc1 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php @@ -22,7 +22,7 @@ class GenericProviderTest extends TestCase /** * @dataProvider getPlaceholderDataProvider */ - public function testGetPlaceholder(ImageValue $value, $expectedText, array $options = []) + public function testGetPlaceholder(ImageValue $value, string $expectedText, array $options = []): void { $font = $this->createMock(AbstractFont::class); @@ -30,7 +30,7 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti $imagine ->expects(self::atLeastOnce()) ->method('font') - ->willReturnCallback(function ($fontpath, $fontsize, ColorInterface $foreground) use ($options, $font) { + ->willReturnCallback(function ($fontpath, $fontsize, ColorInterface $foreground) use ($options, $font): \PHPUnit\Framework\MockObject\MockObject { $this->assertEquals($options['fontpath'], $fontpath); $this->assertEquals($options['fontsize'], $fontsize); $this->assertColorEquals($options['foreground'], $foreground); @@ -48,7 +48,7 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti $imagine ->expects(self::atLeastOnce()) ->method('create') - ->willReturnCallback(function (BoxInterface $size, ColorInterface $background) use ($value, $options, $image) { + ->willReturnCallback(function (BoxInterface $size, ColorInterface $background) use ($value, $options, $image): \PHPUnit\Framework\MockObject\MockObject { $this->assertSizeEquals([$value->width, $value->height], $size); $this->assertColorEquals($options['background'], $background); @@ -70,7 +70,7 @@ public function testGetPlaceholder(ImageValue $value, $expectedText, array $opti $provider->getPlaceholder($value, $options); } - public function getPlaceholderDataProvider() + public function getPlaceholderDataProvider(): array { return [ [ @@ -91,13 +91,13 @@ public function getPlaceholderDataProvider() ]; } - private function assertSizeEquals(array $expected, BoxInterface $actual) + private function assertSizeEquals(array $expected, BoxInterface $actual): void { self::assertEquals($expected[0], $actual->getWidth()); self::assertEquals($expected[1], $actual->getHeight()); } - private function assertColorEquals($expected, ColorInterface $actual) + private function assertColorEquals($expected, ColorInterface $actual): void { self::assertEquals(strtolower($expected), strtolower((string)$actual)); } diff --git a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php index c5b421f6a3..e274026c54 100644 --- a/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php @@ -22,7 +22,7 @@ class PlaceholderProviderRegistryTest extends TestCase /** * @depends testGetProviderKnown */ - public function testConstructor() + public function testConstructor(): void { $providers = [ self::FOO => $this->getPlaceholderProviderMock(), @@ -48,7 +48,7 @@ public function testAddProvider(): void self::assertSame($provider, $registry->getProvider(self::FOO)); } - public function testSupports() + public function testSupports(): void { $registry = new PlaceholderProviderRegistry([ 'supported' => $this->getPlaceholderProviderMock(), @@ -58,7 +58,7 @@ public function testSupports() self::assertFalse($registry->supports('unsupported')); } - public function testGetProviderKnown() + public function testGetProviderKnown(): void { $provider = $this->getPlaceholderProviderMock(); @@ -69,7 +69,7 @@ public function testGetProviderKnown() self::assertEquals($provider, $registry->getProvider(self::FOO)); } - public function testGetProviderUnknown() + public function testGetProviderUnknown(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php index fa6ecbec97..45b8288d21 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php @@ -12,7 +12,7 @@ class AliasDirectoryVariationPathGeneratorTest extends TestCase { - public function testGetVariationPath() + public function testGetVariationPath(): void { $generator = new AliasDirectoryVariationPathGenerator(); diff --git a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php index 88edae38c2..5c3dcc9f87 100644 --- a/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php +++ b/tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php @@ -12,7 +12,7 @@ class OriginalDirectoryVariationPathGeneratorTest extends TestCase { - public function testGetVariationPath() + public function testGetVariationPath(): void { $generator = new OriginalDirectoryVariationPathGenerator(); self::assertEquals( diff --git a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php index 66111770e4..10c40d91b8 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php @@ -12,15 +12,16 @@ use Ibexa\Contracts\Core\Variation\VariationPathGenerator; use Ibexa\Core\IO\IOServiceInterface; use Ibexa\Core\IO\Values\BinaryFile; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ImageFileVariationPurgerTest extends TestCase { /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $ioServiceMock; + protected MockObject $ioServiceMock; /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $pathGeneratorMock; + protected MockObject $pathGeneratorMock; /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileVariationPurger */ protected $purger; @@ -31,7 +32,7 @@ protected function setUp(): void $this->pathGeneratorMock = $this->createMock(VariationPathGenerator::class); } - public function testIteratesOverItems() + public function testIteratesOverItems(): void { $purger = $this->createPurger( [ @@ -53,7 +54,7 @@ public function testIteratesOverItems() $purger->purge(['large', 'gallery']); } - public function testPurgesExistingItem() + public function testPurgesExistingItem(): void { $purger = $this->createPurger( ['path/to/file.png'] @@ -82,7 +83,7 @@ public function testPurgesExistingItem() $purger->purge(['large']); } - public function testDoesNotPurgeNotExistingItem() + public function testDoesNotPurgeNotExistingItem(): void { $purger = $this->createPurger( ['path/to/file.png'] @@ -109,7 +110,7 @@ public function testDoesNotPurgeNotExistingItem() $purger->purge(['large']); } - private function createPurger(array $fileList) + private function createPurger(array $fileList): ImageFileVariationPurger { return new ImageFileVariationPurger(new ArrayIterator($fileList), $this->ioServiceMock, $this->pathGeneratorMock); } diff --git a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php index 73b77a6638..74dd6c18f7 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php @@ -12,21 +12,22 @@ use Ibexa\Bundle\Core\Imagine\VariationPurger\LegacyStorageImageFileList; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\IO\IOConfigProvider; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class LegacyStorageImageFileListTest extends TestCase { /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileRowReader|\PHPUnit\Framework\MockObject\MockObject */ - protected $rowReaderMock; + protected MockObject $rowReaderMock; /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\LegacyStorageImageFileList */ protected $fileList; /** @var \Ibexa\Core\IO\IOConfigProvider|\PHPUnit\Framework\MockObject\MockObject */ - private $ioConfigResolverMock; + private MockObject $ioConfigResolverMock; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolverMock; + private MockObject $configResolverMock; protected function setUp(): void { @@ -48,7 +49,7 @@ protected function setUp(): void ); } - public function testIterator() + public function testIterator(): void { $expected = [ 'path/to/1st/image.jpg', @@ -64,7 +65,7 @@ public function testIterator() /** * Tests that the iterator transforms the ezimagefile value into a binaryfile id. */ - public function testImageIdTransformation() + public function testImageIdTransformation(): void { $this->configureRowReaderMock(['var/ibexa_demo_site/storage/images/path/to/1st/image.jpg']); foreach ($this->fileList as $file) { @@ -72,7 +73,7 @@ public function testImageIdTransformation() } } - private function configureRowReaderMock(array $fileList) + private function configureRowReaderMock(array $fileList): void { $mockInvocator = $this->rowReaderMock->expects(self::any())->method('getRow'); call_user_func_array([$mockInvocator, 'willReturnOnConsecutiveCalls'], $fileList); diff --git a/tests/bundle/Core/Routing/DefaultRouterTest.php b/tests/bundle/Core/Routing/DefaultRouterTest.php index cd3a45a3a3..816489fe23 100644 --- a/tests/bundle/Core/Routing/DefaultRouterTest.php +++ b/tests/bundle/Core/Routing/DefaultRouterTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionObject; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -23,10 +24,10 @@ class DefaultRouterTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\DependencyInjection\ContainerInterface */ - protected $container; + protected MockObject $container; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected $configResolver; + protected MockObject $configResolver; /** @var \Symfony\Component\Routing\RequestContext */ protected $requestContext; @@ -65,7 +66,7 @@ protected function generateRouter(array $mockedMethods = []) return $router; } - public function testMatchRequestWithSemanticPathinfo() + public function testMatchRequestWithSemanticPathinfo(): void { $pathinfo = '/siteaccess/foo/bar'; $semanticPathinfo = '/foo/bar'; @@ -90,7 +91,7 @@ public function testMatchRequestWithSemanticPathinfo() self::assertSame($matchedParameters, $router->matchRequest($request)); } - public function testMatchRequestRegularPathinfo() + public function testMatchRequestRegularPathinfo(): void { $matchedParameters = ['_controller' => 'AcmeBundle:myAction']; $pathinfo = '/siteaccess/foo/bar'; @@ -119,7 +120,7 @@ public function testMatchRequestRegularPathinfo() /** * @dataProvider providerGenerateNoSiteAccess */ - public function testGenerateNoSiteAccess($url) + public function testGenerateNoSiteAccess(string $url): void { $generator = $this->createMock(UrlGeneratorInterface::class); $generator @@ -138,7 +139,7 @@ public function testGenerateNoSiteAccess($url) self::assertSame($url, $router->generate(__METHOD__)); } - public function providerGenerateNoSiteAccess() + public function providerGenerateNoSiteAccess(): array { return [ ['/foo/bar'], @@ -159,7 +160,7 @@ public function providerGenerateNoSiteAccess() * @param int $referenceType The type of reference to be generated (one of the constants) * @param string $routeName */ - public function testGenerateWithSiteAccess($urlGenerated, $relevantUri, $expectedUrl, $saName, $isMatcherLexer, $referenceType, $routeName) + public function testGenerateWithSiteAccess(string $urlGenerated, string $relevantUri, string $expectedUrl, string $saName, bool $isMatcherLexer, int $referenceType, ?string $routeName): void { $routeName = $routeName ?: __METHOD__; $nonSiteAccessAwareRoutes = ['_dontwantsiteaccess']; @@ -220,7 +221,7 @@ public function testGenerateWithSiteAccess($urlGenerated, $relevantUri, $expecte self::assertSame($expectedUrl, $router->generate($routeName, [], $referenceType)); } - public function providerGenerateWithSiteAccess() + public function providerGenerateWithSiteAccess(): array { return [ ['/foo/bar', '/foo/bar', '/foo/bar', 'test_siteaccess', false, UrlGeneratorInterface::ABSOLUTE_PATH, null], @@ -238,7 +239,7 @@ public function providerGenerateWithSiteAccess() ]; } - public function testGenerateReverseSiteAccessMatch() + public function testGenerateReverseSiteAccessMatch(): void { $routeName = 'some_route_name'; $urlGenerated = 'http://phoenix-rises.fm/foo/bar'; @@ -292,7 +293,7 @@ public function testGenerateReverseSiteAccessMatch() * * @param string $uri */ - public function testGetContextBySimplifiedRequest($uri) + public function testGetContextBySimplifiedRequest(string $uri): void { $this->getExpectedRequestContext($uri); @@ -311,7 +312,7 @@ public function testGetContextBySimplifiedRequest($uri) * * @phpstan-return array */ - public function providerGetContextBySimplifiedRequest() + public function providerGetContextBySimplifiedRequest(): array { return [ ['/foo/bar'], @@ -323,7 +324,7 @@ public function providerGetContextBySimplifiedRequest() ]; } - private function getExpectedRequestContext($uri) + private function getExpectedRequestContext(string $uri): RequestContext { $requestContext = new RequestContext(); $uriComponents = parse_url($uri); diff --git a/tests/bundle/Core/Routing/UrlAliasRouterTest.php b/tests/bundle/Core/Routing/UrlAliasRouterTest.php index e3eb1d401e..15787b4e81 100644 --- a/tests/bundle/Core/Routing/UrlAliasRouterTest.php +++ b/tests/bundle/Core/Routing/UrlAliasRouterTest.php @@ -18,13 +18,14 @@ use Ibexa\Core\MVC\Symfony\View\Manager as ViewManager; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Tests\Core\MVC\Symfony\Routing\UrlAliasRouterTest as BaseUrlAliasRouterTest; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\RequestContext; class UrlAliasRouterTest extends BaseUrlAliasRouterTest { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; protected function setUp(): void { @@ -44,7 +45,7 @@ protected function setUp(): void parent::setUp(); } - protected function getRouter(LocationService $locationService, URLAliasService $urlAliasService, ContentService $contentService, UrlAliasGenerator $urlAliasGenerator, RequestContext $requestContext) + protected function getRouter(LocationService $locationService, URLAliasService $urlAliasService, ContentService $contentService, UrlAliasGenerator $urlAliasGenerator, RequestContext $requestContext): UrlAliasRouter { $router = new UrlAliasRouter($locationService, $urlAliasService, $contentService, $urlAliasGenerator, $requestContext); $router->setConfigResolver($this->configResolver); @@ -61,7 +62,7 @@ protected function resetConfigResolver() $this->router->setConfigResolver($this->configResolver); } - public function testMatchRequestDeactivatedUrlAlias() + public function testMatchRequestDeactivatedUrlAlias(): void { $this->expectException(ResourceNotFoundException::class); @@ -79,7 +80,7 @@ public function testMatchRequestDeactivatedUrlAlias() $this->router->matchRequest($this->getRequestByPathInfo('/foo')); } - public function testMatchRequestWithRootLocation() + public function testMatchRequestWithRootLocation(): void { $rootLocationId = 123; $this->resetConfigResolver(); @@ -135,7 +136,7 @@ public function testMatchRequestWithRootLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationCaseRedirectWithRootLocation() + public function testMatchRequestLocationCaseRedirectWithRootLocation(): void { $rootLocationId = 123; $this->resetConfigResolver(); @@ -193,7 +194,7 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationCaseRedirectWithRootRootLocation() + public function testMatchRequestLocationCaseRedirectWithRootRootLocation(): void { $rootLocationId = 123; $this->resetConfigResolver(); @@ -251,7 +252,7 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestResourceCaseRedirectWithRootLocation() + public function testMatchRequestResourceCaseRedirectWithRootLocation(): void { $rootLocationId = 123; $this->resetConfigResolver(); @@ -299,7 +300,7 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestVirtualCaseRedirectWithRootLocation() + public function testMatchRequestVirtualCaseRedirectWithRootLocation(): void { $rootLocationId = 123; $this->resetConfigResolver(); @@ -345,7 +346,7 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestWithRootLocationAndExclusion() + public function testMatchRequestWithRootLocationAndExclusion(): void { $this->resetConfigResolver(); $this->configResolver @@ -373,7 +374,7 @@ public function testMatchRequestWithRootLocationAndExclusion() $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, ] diff --git a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php index cf6b8a1586..04456c055f 100644 --- a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php +++ b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php @@ -13,6 +13,7 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -23,10 +24,10 @@ class IOConfigResolverTest extends TestCase private const DEFAULT_NAMESPACE = 'ibexa.site_access.config'; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService|\PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessService; + private MockObject $siteAccessService; protected function setUp(): void { diff --git a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php index 66bc2bebab..f00c99e9a2 100644 --- a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php +++ b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php @@ -12,6 +12,7 @@ use Ibexa\Bundle\Core\SiteAccess\SiteAccessMatcherRegistryInterface; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -20,7 +21,7 @@ class MatcherBuilderTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessMatcherRegistry; + private MockObject $siteAccessMatcherRegistry; protected function setUp(): void { @@ -28,7 +29,7 @@ protected function setUp(): void $this->siteAccessMatcherRegistry = $this->createMock(SiteAccessMatcherRegistryInterface::class); } - public function testBuildMatcherNoService() + public function testBuildMatcherNoService(): void { $this->siteAccessMatcherRegistry ->expects(self::never()) @@ -39,7 +40,7 @@ public function testBuildMatcherNoService() self::assertInstanceOf(get_class($matcher), $builtMatcher); } - public function testBuildMatcherServiceWrongInterface() + public function testBuildMatcherServiceWrongInterface(): void { $this->expectException(\TypeError::class); @@ -53,7 +54,7 @@ public function testBuildMatcherServiceWrongInterface() $matcherBuilder->buildMatcher("@$serviceId", [], new SimplifiedRequest()); } - public function testBuildMatcherService() + public function testBuildMatcherService(): void { $serviceId = 'foo'; $matcher = $this->createMock(CoreMatcher::class); diff --git a/tests/bundle/Core/URLChecker/URLCheckerTest.php b/tests/bundle/Core/URLChecker/URLCheckerTest.php index e0d6be90ec..dcbc435af2 100644 --- a/tests/bundle/Core/URLChecker/URLCheckerTest.php +++ b/tests/bundle/Core/URLChecker/URLCheckerTest.php @@ -15,19 +15,20 @@ use Ibexa\Contracts\Core\Repository\Values\URL\URL; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; use Ibexa\Contracts\Core\Repository\Values\URL\URLUpdateStruct; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; class URLCheckerTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\URLService|\PHPUnit\Framework\MockObject\MockObject */ - private $urlService; + private MockObject $urlService; /** @var \Ibexa\Bundle\Core\URLChecker\URLHandlerRegistryInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $handlerRegistry; + private MockObject $handlerRegistry; /** @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $logger; + private MockObject $logger; protected function setUp(): void { @@ -35,7 +36,7 @@ protected function setUp(): void $this->urlService ->expects(self::any()) ->method('createUpdateStruct') - ->willReturnCallback(static function () { + ->willReturnCallback(static function (): URLUpdateStruct { return new URLUpdateStruct(); }); @@ -43,7 +44,7 @@ protected function setUp(): void $this->logger = $this->createMock(LoggerInterface::class); } - public function testCheck() + public function testCheck(): void { $query = new URLQuery(); $groups = $this->createGroupedUrls(['http', 'https']); @@ -63,7 +64,7 @@ public function testCheck() $handler ->expects(self::once()) ->method('validate') - ->willReturnCallback(function (array $urls) use ($scheme, $groups) { + ->willReturnCallback(function (array $urls) use ($scheme, $groups): void { $this->assertEqualsCanonicalizing($groups[$scheme], $urls); }); } @@ -74,7 +75,7 @@ public function testCheck() $urlChecker->check($query); } - public function testCheckUnsupported() + public function testCheckUnsupported(): void { $query = new URLQuery(); $groups = $this->createGroupedUrls(['http', 'https'], 10); @@ -98,7 +99,7 @@ public function testCheckUnsupported() $handler ->expects(self::once()) ->method('validate') - ->willReturnCallback(function (array $urls) use ($scheme, $groups) { + ->willReturnCallback(function (array $urls) use ($scheme, $groups): void { $this->assertEqualsCanonicalizing($groups[$scheme], $urls); }); } @@ -109,7 +110,7 @@ public function testCheckUnsupported() $urlChecker->check($query); } - private function configureUrlHandlerRegistry(array $schemes) + private function configureUrlHandlerRegistry(array $schemes): void { $this->handlerRegistry ->method('supported') @@ -124,7 +125,7 @@ private function configureUrlHandlerRegistry(array $schemes) }); } - private function createSearchResults(array &$urls) + private function createSearchResults(array &$urls): SearchResult { $input = array_reduce($urls, 'array_merge', []); @@ -136,7 +137,10 @@ private function createSearchResults(array &$urls) ]); } - private function createGroupedUrls(array $schemes, $n = 10) + /** + * @return \list<\Ibexa\Contracts\Core\Repository\Values\URL\URL>[] + */ + private function createGroupedUrls(array $schemes, int $n = 10): array { $results = []; @@ -156,7 +160,7 @@ private function createGroupedUrls(array $schemes, $n = 10) /** * @return \Ibexa\Bundle\Core\URLChecker\URLChecker */ - private function createUrlChecker() + private function createUrlChecker(): URLChecker { $urlChecker = new URLChecker( $this->urlService, diff --git a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php index 01cda5dd7e..26ce28e321 100644 --- a/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php +++ b/tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php @@ -9,6 +9,7 @@ use Exception; use Ibexa\Bundle\Debug\Collector\IbexaCoreCollector; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -17,7 +18,7 @@ class IbexaCoreCollectorTest extends TestCase { /** @var \Ibexa\Bundle\Debug\Collector\IbexaCoreCollector */ - private $mainCollector; + private IbexaCoreCollector $mainCollector; protected function setUp(): void { @@ -25,7 +26,7 @@ protected function setUp(): void $this->mainCollector = new IbexaCoreCollector(); } - public function testAddGetCollector() + public function testAddGetCollector(): void { $collector = $this->getDataCollectorMock(); $name = 'foobar'; @@ -38,7 +39,7 @@ public function testAddGetCollector() self::assertSame($collector, $this->mainCollector->getCollector($name)); } - public function testGetInvalidCollector() + public function testGetInvalidCollector(): void { $this->expectException(\InvalidArgumentException::class); @@ -47,7 +48,7 @@ public function testGetInvalidCollector() self::assertSame($collector, $this->mainCollector->getCollector('foo')); } - public function testGetAllCollectors() + public function testGetAllCollectors(): void { $collector1 = $this->getDataCollectorMock(); $nameCollector1 = 'collector1'; @@ -74,7 +75,7 @@ public function testGetAllCollectors() self::assertSame($allCollectors, $this->mainCollector->getAllCollectors()); } - public function testGetToolbarTemplateNothing() + public function testGetToolbarTemplateNothing(): void { $collector = $this->getDataCollectorMock(); $name = 'foobar'; @@ -86,7 +87,7 @@ public function testGetToolbarTemplateNothing() self::assertNull($this->mainCollector->getToolbarTemplate($name)); } - public function testGetToolbarTemplate() + public function testGetToolbarTemplate(): void { $collector = $this->getDataCollectorMock(); $name = 'foobar'; @@ -100,7 +101,7 @@ public function testGetToolbarTemplate() self::assertSame($toolbarTemplate, $this->mainCollector->getToolbarTemplate($name)); } - public function testGetPanelTemplateNothing() + public function testGetPanelTemplateNothing(): void { $collector = $this->getDataCollectorMock(); $name = 'foobar'; @@ -112,7 +113,7 @@ public function testGetPanelTemplateNothing() self::assertNull($this->mainCollector->getPanelTemplate($name)); } - public function testGetPanelTemplate() + public function testGetPanelTemplate(): void { $collector = $this->getDataCollectorMock(); $name = 'foobar'; @@ -126,7 +127,7 @@ public function testGetPanelTemplate() self::assertSame($panelTemplate, $this->mainCollector->getPanelTemplate($name)); } - public function testCollect() + public function testCollect(): void { $collector1 = $this->getDataCollectorMock(); $nameCollector1 = 'collector1'; @@ -162,7 +163,7 @@ public function testCollect() $this->mainCollector->collect($request, $response, $exception); } - protected function getDataCollectorMock() + protected function getDataCollectorMock(): MockObject { return $this->createMock(DataCollectorInterface::class); } diff --git a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php index ea85c51778..800657e474 100644 --- a/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php +++ b/tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php @@ -27,7 +27,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new DataCollectorPass()); } - public function testAddCollector() + public function testAddCollector(): void { $defA = new Definition(); $defA->addTag('ibexa.debug.data_collector', [ diff --git a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php index 28855e616b..bde32bd420 100644 --- a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php +++ b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php @@ -11,6 +11,7 @@ use Ibexa\Bundle\IO\DependencyInjection\Compiler\IOConfigurationPass; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; @@ -18,10 +19,10 @@ class IOConfigurationPassTest extends AbstractCompilerPassTestCase { /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $metadataConfigurationFactoryMock; + protected ?MockObject $metadataConfigurationFactoryMock = null; /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected $binarydataConfigurationFactoryMock; + protected ?MockObject $binarydataConfigurationFactoryMock = null; protected function setUp(): void { @@ -55,7 +56,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void /** * Tests that the default handlers are available when nothing is configured. */ - public function testDefaultHandlers() + public function testDefaultHandlers(): void { $this->compile(); @@ -72,7 +73,7 @@ public function testDefaultHandlers() ); } - public function testBinarydataHandler() + public function testBinarydataHandler(): void { $this->container->setParameter( 'ibexa.io.binarydata_handlers', @@ -92,7 +93,7 @@ public function testBinarydataHandler() ); } - public function testMetadataHandler() + public function testMetadataHandler(): void { $this->container->setParameter( 'ibexa.io.metadata_handlers', @@ -112,7 +113,7 @@ public function testMetadataHandler() ); } - public function testUnknownMetadataHandler() + public function testUnknownMetadataHandler(): void { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Unknown handler'); @@ -125,7 +126,7 @@ public function testUnknownMetadataHandler() $this->compile(); } - public function testUnknownBinarydataHandler() + public function testUnknownBinarydataHandler(): void { $this->expectException(InvalidConfigurationException::class); $this->expectExceptionMessage('Unknown handler'); diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php index 2544b5d773..098248bc04 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php @@ -13,9 +13,9 @@ abstract class BaseFlysystemTest extends ConfigurationFactoryTest { - private $flysystemAdapterServiceId = 'oneup_flysystem.test_adapter'; + private string $flysystemAdapterServiceId = 'oneup_flysystem.test_adapter'; - private $filesystemServiceId = 'ezpublish.core.io.flysystem.my_test_handler_filesystem'; + private string $filesystemServiceId = 'ezpublish.core.io.flysystem.my_test_handler_filesystem'; public function provideHandlerConfiguration() { @@ -31,7 +31,7 @@ public function provideParentServiceDefinition() return new Definition(null, [null]); } - public function validateConfiguredHandler($handlerDefinitionId) + public function validateConfiguredHandler($handlerDefinitionId): void { self::assertContainerBuilderHasServiceDefinitionWithArgument( $handlerDefinitionId, @@ -40,7 +40,7 @@ public function validateConfiguredHandler($handlerDefinitionId) ); } - public function validateConfiguredContainer() + public function validateConfiguredContainer(): void { self::assertContainerBuilderHasService( $this->filesystemServiceId diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php index fb745f670d..fc1072a76d 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/FlysystemTest.php @@ -16,7 +16,7 @@ class FlysystemTest * * @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\Flysystem */ - public function provideTestedFactory() + public function provideTestedFactory(): Flysystem { return new Flysystem(); } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php index 384e18f1df..8d7ac71a44 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php @@ -18,7 +18,7 @@ class LegacyDFSClusterTest extends ConfigurationFactoryTest * * @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory */ - public function provideTestedFactory() + public function provideTestedFactory(): LegacyDFSCluster { return new LegacyDFSCluster(); } @@ -28,12 +28,12 @@ public function provideExpectedParentServiceId(): string return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; } - public function provideParentServiceDefinition() + public function provideParentServiceDefinition(): Definition { return new Definition(null, [null]); } - public function provideHandlerConfiguration() + public function provideHandlerConfiguration(): array { return ['connection' => 'doctrine.dbal.test_connection']; } @@ -45,7 +45,7 @@ public function provideHandlerConfiguration() * * @param string $handlerServiceId id of the service that was registered by the compiler pass */ - public function validateConfiguredHandler($handlerServiceId) + public function validateConfiguredHandler($handlerServiceId): void { self::assertContainerBuilderHasServiceDefinitionWithArgument( $handlerServiceId, diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php index e8b8273553..2730326f7e 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php @@ -29,7 +29,7 @@ protected function setUp(): void $this->factory = $this->provideTestedFactory(); } - public function testGetParentServiceId() + public function testGetParentServiceId(): void { self::assertEquals( $this->provideExpectedParentServiceId(), @@ -37,7 +37,7 @@ public function testGetParentServiceId() ); } - public function testAddConfiguration() + public function testAddConfiguration(): void { $node = new ArrayNodeDefinition('handler'); $this->factory->addConfiguration($node); @@ -46,7 +46,7 @@ public function testAddConfiguration() // @todo customized testing of configuration node ? } - public function testConfigureHandler() + public function testConfigureHandler(): void { $handlerConfiguration = $this->provideHandlerConfiguration() + diff --git a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php index ea3f5356b2..984e4f1d9c 100644 --- a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php +++ b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php @@ -31,7 +31,7 @@ protected function getContainerExtensions(): array return [$extension]; } - public function testParametersWithoutConfiguration() + public function testParametersWithoutConfiguration(): void { $this->load(); @@ -39,7 +39,7 @@ public function testParametersWithoutConfiguration() $this->assertContainerBuilderHasParameter('ibexa.io.binarydata_handlers', []); } - public function testParametersWithMetadataHandler() + public function testParametersWithMetadataHandler(): void { $config = [ 'metadata_handlers' => [ @@ -55,7 +55,7 @@ public function testParametersWithMetadataHandler() ); } - public function testParametersWithBinarydataHandler() + public function testParametersWithBinarydataHandler(): void { $config = [ 'binarydata_handlers' => [ diff --git a/tests/bundle/IO/Migration/FileMigratorTest.php b/tests/bundle/IO/Migration/FileMigratorTest.php index 34e1dcb176..c98cef10b2 100644 --- a/tests/bundle/IO/Migration/FileMigratorTest.php +++ b/tests/bundle/IO/Migration/FileMigratorTest.php @@ -14,30 +14,31 @@ use Ibexa\Contracts\Core\IO\BinaryFile; use Ibexa\Core\IO\IOBinarydataHandler; use Ibexa\Core\IO\IOMetadataHandler; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class FileMigratorTest extends TestCase { /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private $metadataHandlerRegistry; + private MockObject $metadataHandlerRegistry; /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private $binaryHandlerRegistry; + private MockObject $binaryHandlerRegistry; /** @var \Ibexa\Bundle\IO\Migration\FileMigratorInterface */ - private $fileMigrator; + private FileMigrator $fileMigrator; /** @var \Ibexa\Core\IO\IOMetadataHandler\Flysystem */ - private $metadataFlysystem; + private MockObject $metadataFlysystem; /** @var \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster */ - private $metadataLegacyDFSCluster; + private MockObject $metadataLegacyDFSCluster; /** @var \Ibexa\Core\IO\IOBinarydataHandler\Flysystem */ - private $binaryFlysystemFrom; + private MockObject $binaryFlysystemFrom; /** @var \Ibexa\Core\IO\IOBinarydataHandler\Flysystem */ - private $binaryFlysystemTo; + private MockObject $binaryFlysystemTo; protected function setUp(): void { diff --git a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php index 2386599759..6f4e3c08b9 100644 --- a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php +++ b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php @@ -32,13 +32,13 @@ class BinaryBaseStorageTest extends BaseCoreFieldTypeIntegrationTest protected PathGeneratorInterface&MockObject $pathGeneratorMock; /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $ioServiceMock; + protected MockObject $ioServiceMock; /** @var \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage|\PHPUnit\Framework\MockObject\MockObject */ - protected $storage; + protected MockObject $storage; /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator&\PHPUnit\Framework\MockObject\MockObject */ - protected $fileExtensionBlackListValidatorMock; + protected MockObject $fileExtensionBlackListValidatorMock; protected function setUp(): void { diff --git a/tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldType.php b/tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldType.php index d786ac5fa9..75b3ea4a69 100644 --- a/tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldType.php +++ b/tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldType.php @@ -46,7 +46,7 @@ protected function checkValueStructure(Value $value): void // Nothing to do here. } - public function toHash(Value $value) + public function toHash(Value $value): null { return null; } diff --git a/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php b/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php index a283a4be03..91f19ef984 100644 --- a/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php +++ b/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php @@ -23,32 +23,33 @@ use Ibexa\Core\IO\Values\BinaryFile; use Ibexa\Core\IO\Values\BinaryFileCreateStruct; use Ibexa\Tests\Integration\Core\BaseCoreFieldTypeIntegrationTest; +use PHPUnit\Framework\MockObject\MockObject; final class ImageStorageTest extends BaseCoreFieldTypeIntegrationTest { /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ - private $gateway; + private DoctrineStorage $gateway; /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $redecorator; + private MockObject $redecorator; /** @var \Ibexa\Core\FieldType\Image\PathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - private $pathGenerator; + private MockObject $pathGenerator; /** @var \Ibexa\Core\FieldType\Image\AliasCleanerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $aliasCleaner; + private MockObject $aliasCleaner; /** @var \Ibexa\Core\IO\FilePathNormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $filePathNormalizer; + private MockObject $filePathNormalizer; /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; /** @var \Ibexa\Core\FieldType\Image\ImageStorage */ - private $storage; + private ImageStorage $storage; /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator&\PHPUnit\Framework\MockObject\MockObject */ - private $fileExtensionBlackListValidator; + private MockObject $fileExtensionBlackListValidator; protected function setUp(): void { diff --git a/tests/integration/Core/Limitation/MemberOfLimitationTest.php b/tests/integration/Core/Limitation/MemberOfLimitationTest.php index 08318cb5cb..14211d5ff3 100644 --- a/tests/integration/Core/Limitation/MemberOfLimitationTest.php +++ b/tests/integration/Core/Limitation/MemberOfLimitationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\MemberOfLimitation; +use Ibexa\Contracts\Core\Repository\Values\User\UserGroup; use Ibexa\Core\Limitation\MemberOfLimitationType; use Ibexa\Tests\Integration\Core\Repository\Limitation\PermissionResolver\BaseLimitationIntegrationTest; @@ -63,7 +64,7 @@ public function testCanUserAssignRoleToUser(array $limitations, bool $expectedRe 'assign', $limitations, $repository->sudo( - static function (Repository $repository) { + static function (Repository $repository): UserGroup { return $repository->getUserService()->loadUserGroup(self::USERS_GROUP_ID); }, $repository diff --git a/tests/integration/Core/Limitation/RoleLimitationTest.php b/tests/integration/Core/Limitation/RoleLimitationTest.php index 91035a9ad8..cd728cbf96 100644 --- a/tests/integration/Core/Limitation/RoleLimitationTest.php +++ b/tests/integration/Core/Limitation/RoleLimitationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\UserRoleLimitation; +use Ibexa\Contracts\Core\Repository\Values\User\UserGroup; use Ibexa\Tests\Integration\Core\Repository\Limitation\PermissionResolver\BaseLimitationIntegrationTest; final class RoleLimitationTest extends BaseLimitationIntegrationTest @@ -58,7 +59,7 @@ public function testCanUserAssignRole(array $limitations, bool $expectedResult): 'assign', $limitations, $repository->sudo( - static function (Repository $repository) { + static function (Repository $repository): UserGroup { return $repository->getUserService()->loadUserGroup(self::USERS_GROUP_ID); }, $repository diff --git a/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php b/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php index ba52bbb698..e3f28f3610 100644 --- a/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php +++ b/tests/integration/Core/Persistence/Filter/Doctrine/FilteringQueryBuilderTest.php @@ -17,7 +17,7 @@ class FilteringQueryBuilderTest extends TestCase { /** @var \Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder */ - private $queryBuilder; + private FilteringQueryBuilder $queryBuilder; protected function setUp(): void { diff --git a/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php b/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php index 7e5741aaa8..b8c419de7f 100644 --- a/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php +++ b/tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php @@ -20,7 +20,7 @@ final class IndexerGatewayTest extends BaseGatewayTest { /** @var \Ibexa\Core\Search\Legacy\Content\IndexerGateway */ - private $gateway; + private IndexerGateway $gateway; /** * @throws \ErrorException diff --git a/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php b/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php index 748e137b73..3e79cd28fa 100644 --- a/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php +++ b/tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php @@ -20,7 +20,7 @@ public function getVariation( VersionInfo $versionInfo, $variationName, array $parameters = [] - ) { + ): Variation { return new Variation([ 'uri' => $field->value . '-in-memory-test', ]); diff --git a/tests/integration/Core/Repository/BaseContentServiceTest.php b/tests/integration/Core/Repository/BaseContentServiceTest.php index 284d805c8c..7e6c06e157 100644 --- a/tests/integration/Core/Repository/BaseContentServiceTest.php +++ b/tests/integration/Core/Repository/BaseContentServiceTest.php @@ -70,8 +70,8 @@ protected function createContentVersion1EmptyBinaryField() */ protected function createContentDraftVersion1( $locationId = 56, - $contentTypeIdentifier = 'forum', - $contentFieldNameIdentifier = 'name', + string $contentTypeIdentifier = 'forum', + string $contentFieldNameIdentifier = 'name', User $contentOwner = null ) { $repository = $this->getRepository(); @@ -345,9 +345,9 @@ protected function createMultipleLanguageContentVersion2() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content Content Draft */ protected function createMultilingualContentDraft( - $contentTypeIdentifier, + string $contentTypeIdentifier, $parentLocationId, - $mainLanguageCode, + string $mainLanguageCode, array $multilingualFieldValues ) { $repository = $this->getRepository(); @@ -397,7 +397,7 @@ protected function createMultilingualContentDraft( * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content Content Draft */ protected function createContentDraft( - $contentTypeIdentifier, + string $contentTypeIdentifier, $parentLocationId, array $fieldValues ) { diff --git a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php index f5c4b9a9fa..f1a85c3071 100644 --- a/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php @@ -122,7 +122,7 @@ protected function createContentType() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createTestContent($mainLanguageCode, array $fieldValues) + protected function createTestContent(string $mainLanguageCode, array $fieldValues) { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index 457da2dee2..7f0c67409e 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -42,8 +42,7 @@ abstract class BaseTest extends TestCase */ public const DB_INT_MAX = 2147483647; - /** @var \Ibexa\Contracts\Core\Test\Repository\SetupFactory */ - private $setupFactory; + private ?object $setupFactory = null; /** @var \Ibexa\Contracts\Core\Repository\Repository */ private $repository; @@ -261,7 +260,7 @@ protected function assertStructPropertiesCorrect(ValueObject $expectedValues, Va * * @param array $items An array of scalar values */ - private function sortItems(array &$items) + private function sortItems(array &$items): void { $sorter = function ($a, $b): int { if (!is_scalar($a) || !is_scalar($b)) { @@ -273,7 +272,7 @@ private function sortItems(array &$items) usort($items, $sorter); } - private function assertPropertiesEqual($propertyName, $expectedValue, $actualValue, $sortArray = false) + private function assertPropertiesEqual($propertyName, $expectedValue, $actualValue, bool $sortArray = false): void { if ($expectedValue instanceof ArrayObject) { $expectedValue = $expectedValue->getArrayCopy(); @@ -326,7 +325,7 @@ protected function createUserVersion1( $userCreate->setField('first_name', 'Example'); $userCreate->setField('last_name', 'User'); - if (!empty($contentType)) { + if ($contentType instanceof ContentType) { $userCreate->contentType = $contentType; } @@ -388,10 +387,10 @@ protected function createCustomUserVersion1($userGroupName, $roleIdentifier, Rol * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ protected function createCustomUserWithLogin( - $login, - $email, + string $login, + string $email, $userGroupName, - $roleIdentifier, + string $roleIdentifier, RoleLimitation $roleLimitation = null ) { $repository = $this->getRepository(); @@ -448,7 +447,7 @@ protected function createCustomUserWithLogin( * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - protected function createUser($login, $firstName, $lastName, UserGroup $userGroup = null) + protected function createUser(string $login, $firstName, $lastName, UserGroup $userGroup = null) { $repository = $this->getRepository(); @@ -487,7 +486,7 @@ protected function createUser($login, $firstName, $lastName, UserGroup $userGrou */ public function createDateTime($timestamp = null) { - $dateTime = new \DateTime(); + $dateTime = new DateTime(); if ($timestamp !== null) { $dateTime->setTimestamp($timestamp); } @@ -545,7 +544,7 @@ protected function isLegacySearchEngineSetup(): bool * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function createRoleWithPolicies($roleName, array $policiesData) + public function createRoleWithPolicies(string $roleName, array $policiesData) { $repository = $this->getRepository(false); $roleService = $repository->getRoleService(); @@ -586,7 +585,7 @@ public function createRoleWithPolicies($roleName, array $policiesData) * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function createUserWithPolicies($login, array $policiesData, RoleLimitation $roleLimitation = null) + public function createUserWithPolicies(string $login, array $policiesData, RoleLimitation $roleLimitation = null) { $repository = $this->getRepository(false); $roleService = $repository->getRoleService(); @@ -646,7 +645,7 @@ protected function getRawDatabaseConnection(): Connection * * @return mixed the return result of the given callback */ - public function performRawDatabaseOperation(callable $callback) + public function performRawDatabaseOperation(callable $callback): void { $repository = $this->getRepository(false); $repository->beginTransaction(); diff --git a/tests/integration/Core/Repository/BookmarkServiceTest.php b/tests/integration/Core/Repository/BookmarkServiceTest.php index 0009ab2b74..dbeeb2caf6 100644 --- a/tests/integration/Core/Repository/BookmarkServiceTest.php +++ b/tests/integration/Core/Repository/BookmarkServiceTest.php @@ -24,7 +24,7 @@ class BookmarkServiceTest extends BaseTest /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::isBookmarked */ - public function testIsBookmarked() + public function testIsBookmarked(): void { $repository = $this->getRepository(); @@ -39,7 +39,7 @@ public function testIsBookmarked() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::isBookmarked */ - public function testIsNotBookmarked() + public function testIsNotBookmarked(): void { $repository = $this->getRepository(); @@ -54,7 +54,7 @@ public function testIsNotBookmarked() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::createBookmark */ - public function testCreateBookmark() + public function testCreateBookmark(): void { $repository = $this->getRepository(); @@ -77,7 +77,7 @@ public function testCreateBookmark() * * @depends testCreateBookmark */ - public function testCreateBookmarkThrowsInvalidArgumentException() + public function testCreateBookmarkThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -95,7 +95,7 @@ public function testCreateBookmarkThrowsInvalidArgumentException() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::deleteBookmark */ - public function testDeleteBookmark() + public function testDeleteBookmark(): void { $repository = $this->getRepository(); @@ -119,7 +119,7 @@ public function testDeleteBookmark() * * @depends testDeleteBookmark */ - public function testDeleteBookmarkThrowsInvalidArgumentException() + public function testDeleteBookmarkThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -137,7 +137,7 @@ public function testDeleteBookmarkThrowsInvalidArgumentException() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::loadBookmarks */ - public function testLoadBookmarks() + public function testLoadBookmarks(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/Common/SlugConverter.php b/tests/integration/Core/Repository/Common/SlugConverter.php index a8d72a44d7..2e645db4ff 100644 --- a/tests/integration/Core/Repository/Common/SlugConverter.php +++ b/tests/integration/Core/Repository/Common/SlugConverter.php @@ -20,7 +20,7 @@ class SlugConverter extends LegacySlugConverter * @param string $key * @param string $value */ - public function setConfigurationValue($key, $value) + public function setConfigurationValue($key, $value): void { $this->configuration[$key] = $value; } diff --git a/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php b/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php index 718a0c3a49..6c7ad56178 100644 --- a/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php +++ b/tests/integration/Core/Repository/ContentService/VersionValidatorTest.php @@ -8,6 +8,8 @@ namespace Ibexa\Tests\Integration\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; @@ -28,13 +30,13 @@ final class VersionValidatorTest extends BaseTest private const GER_DE = 'ger-DE'; /** @var \Ibexa\Core\Repository\Validator\VersionValidator */ - private $validator; + private VersionValidator $validator; /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService */ - private $contentTypeService; + private ContentTypeService $contentTypeService; protected function setUp(): void { diff --git a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php index 94710f5c9a..53760f2920 100644 --- a/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentServiceAuthorizationTest.php @@ -7,14 +7,18 @@ namespace Ibexa\Tests\Integration\Core\Repository; +use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\Relation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\LanguageLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation; +use Ibexa\Contracts\Core\Repository\Values\User\User; /** * Test case for operations in the ContentServiceAuthorization using in memory storage. @@ -29,22 +33,22 @@ class ContentServiceAuthorizationTest extends BaseContentServiceTest { /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $administratorUser; + private User $administratorUser; /** @var \Ibexa\Contracts\Core\Repository\Values\User\User */ - private $anonymousUser; + private User $anonymousUser; /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** @var \Ibexa\Contracts\Core\Repository\UserService */ - private $userService; + private UserService $userService; /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; public function setUp(): void { @@ -69,7 +73,7 @@ public function setUp(): void * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent */ - public function testCreateContentThrowsUnauthorizedException() + public function testCreateContentThrowsUnauthorizedException(): void { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); @@ -96,7 +100,7 @@ public function testCreateContentThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContent */ - public function testCreateContentThrowsUnauthorizedExceptionWithSecondParameter() + public function testCreateContentThrowsUnauthorizedExceptionWithSecondParameter(): void { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); @@ -113,7 +117,7 @@ public function testCreateContentThrowsUnauthorizedExceptionWithSecondParameter( * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo */ - public function testLoadContentInfoThrowsUnauthorizedException() + public function testLoadContentInfoThrowsUnauthorizedException(): void { $contentId = $this->generateId('object', 10); $this->setRestrictedEditorUser(); @@ -132,13 +136,13 @@ public function testLoadContentInfoThrowsUnauthorizedException() * * @depends testLoadContentInfoThrowsUnauthorizedException */ - public function testSudo() + public function testSudo(): void { $repository = $this->getRepository(); $contentId = $this->generateId('object', 10); $this->setRestrictedEditorUser(); - $contentInfo = $repository->sudo(static function (Repository $repository) use ($contentId) { + $contentInfo = $repository->sudo(static function (Repository $repository) use ($contentId): \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo { return $repository->getContentService()->loadContentInfo($contentId); }); @@ -155,7 +159,7 @@ public function testSudo() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfoList */ - public function testLoadContentInfoListSkipsUnauthorizedItems() + public function testLoadContentInfoListSkipsUnauthorizedItems(): void { $contentId = $this->generateId('object', 10); $this->setRestrictedEditorUser(); @@ -170,7 +174,7 @@ public function testLoadContentInfoListSkipsUnauthorizedItems() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfoByRemoteId */ - public function testLoadContentInfoByRemoteIdThrowsUnauthorizedException() + public function testLoadContentInfoByRemoteIdThrowsUnauthorizedException(): void { $anonymousRemoteId = 'faaeb9be3bd98ed09f606fc16d144eca'; @@ -189,7 +193,7 @@ public function testLoadContentInfoByRemoteIdThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfo */ - public function testLoadVersionInfoThrowsUnauthorizedException() + public function testLoadVersionInfoThrowsUnauthorizedException(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -208,7 +212,7 @@ public function testLoadVersionInfoThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoWithSecondParameter */ - public function testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParameter(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -227,7 +231,7 @@ public function testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParamete * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoById */ - public function testLoadVersionInfoByIdThrowsUnauthorizedException() + public function testLoadVersionInfoByIdThrowsUnauthorizedException(): void { $anonymousUserId = $this->generateId('user', 10); $this->setRestrictedEditorUser(); @@ -245,7 +249,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoByIdWithSecondParameter */ - public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondParameter(): void { $anonymousUserId = $this->generateId('user', 10); $this->setRestrictedEditorUser(); @@ -263,7 +267,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondPara * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersionInfoById */ - public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft() + public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft(): void { $contentDraft = $this->createContentDraftVersion1(); @@ -286,7 +290,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft( * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfo */ - public function testLoadContentByContentInfoThrowsUnauthorizedException() + public function testLoadContentByContentInfoThrowsUnauthorizedException(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -305,7 +309,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfoWithLanguageParameters */ - public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecondParameter(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -324,7 +328,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecon * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByContentInfoWithVersionNumberParameter */ - public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThirdParameter() + public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThirdParameter(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -343,7 +347,7 @@ public function testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThird * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByVersionInfo */ - public function testLoadContentByVersionInfoThrowsUnauthorizedException() + public function testLoadContentByVersionInfoThrowsUnauthorizedException(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -364,7 +368,7 @@ public function testLoadContentByVersionInfoThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByVersionInfoWithSecondParameter */ - public function testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecondParameter(): void { $contentInfo = $this->getContentInfoForAnonymousUser(); @@ -385,7 +389,7 @@ public function testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecon * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ - public function testLoadContentThrowsUnauthorizedException() + public function testLoadContentThrowsUnauthorizedException(): void { $anonymousUserId = $this->generateId('user', 10); $this->setRestrictedEditorUser(); @@ -403,7 +407,7 @@ public function testLoadContentThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentWithPrioritizedLanguages */ - public function testLoadContentThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadContentThrowsUnauthorizedExceptionWithSecondParameter(): void { $anonymousUserId = $this->generateId('user', 10); $this->setRestrictedEditorUser(); @@ -421,7 +425,7 @@ public function testLoadContentThrowsUnauthorizedExceptionWithSecondParameter() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentWithThirdParameter */ - public function testLoadContentThrowsUnauthorizedExceptionWithThirdParameter() + public function testLoadContentThrowsUnauthorizedExceptionWithThirdParameter(): void { $anonymousUserId = $this->generateId('user', 10); $this->setRestrictedEditorUser(); @@ -439,7 +443,7 @@ public function testLoadContentThrowsUnauthorizedExceptionWithThirdParameter() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ - public function testLoadContentThrowsUnauthorizedExceptionOnDrafts() + public function testLoadContentThrowsUnauthorizedExceptionOnDrafts(): void { $editorUser = $this->createUserVersion1(); @@ -467,7 +471,7 @@ public function testLoadContentThrowsUnauthorizedExceptionOnDrafts() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContent */ - public function testLoadContentThrowsUnauthorizedExceptionsOnArchives() + public function testLoadContentThrowsUnauthorizedExceptionsOnArchives(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -512,7 +516,7 @@ public function testLoadContentThrowsUnauthorizedExceptionsOnArchives() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteId */ - public function testLoadContentByRemoteIdThrowsUnauthorizedException() + public function testLoadContentByRemoteIdThrowsUnauthorizedException(): void { $anonymousRemoteId = 'faaeb9be3bd98ed09f606fc16d144eca'; @@ -531,7 +535,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteIdWithSecondParameter */ - public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondParameter() + public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondParameter(): void { $anonymousRemoteId = 'faaeb9be3bd98ed09f606fc16d144eca'; @@ -550,7 +554,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondPa * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentByRemoteIdWithThirdParameter */ - public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdParameter() + public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdParameter(): void { $anonymousRemoteId = 'faaeb9be3bd98ed09f606fc16d144eca'; @@ -569,7 +573,7 @@ public function testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdPar * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testUpdateContentMetadata */ - public function testUpdateContentMetadataThrowsUnauthorizedException() + public function testUpdateContentMetadataThrowsUnauthorizedException(): void { $content = $this->createContentVersion1(); @@ -601,7 +605,7 @@ public function testUpdateContentMetadataThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteContent */ - public function testDeleteContentThrowsUnauthorizedException() + public function testDeleteContentThrowsUnauthorizedException(): void { $contentVersion2 = $this->createContentVersion2(); @@ -672,7 +676,7 @@ public function testDeleteContentWithLanguageLimitation(): void * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContentDraft */ - public function testCreateContentDraftThrowsUnauthorizedException() + public function testCreateContentDraftThrowsUnauthorizedException(): void { $content = $this->createContentVersion1(); @@ -693,7 +697,7 @@ public function testCreateContentDraftThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCreateContentDraftWithSecondParameter */ - public function testCreateContentDraftThrowsUnauthorizedExceptionWithSecondParameter() + public function testCreateContentDraftThrowsUnauthorizedExceptionWithSecondParameter(): void { $content = $this->createContentVersion1(); @@ -713,7 +717,7 @@ public function testCreateContentDraftThrowsUnauthorizedExceptionWithSecondParam * * @covers \Ibexa\Contracts\Core\Repository\ContentService::countContentDrafts() */ - public function testCountContentDraftsReturnZero() + public function testCountContentDraftsReturnZero(): void { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); @@ -726,7 +730,7 @@ public function testCountContentDraftsReturnZero() * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts */ - public function testLoadContentDraftsThrowsUnauthorizedException() + public function testLoadContentDraftsThrowsUnauthorizedException(): void { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); @@ -741,7 +745,7 @@ public function testLoadContentDraftsThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentDrafts */ - public function testLoadContentDraftsThrowsUnauthorizedExceptionWithUser() + public function testLoadContentDraftsThrowsUnauthorizedExceptionWithUser(): void { $this->permissionResolver->setCurrentUserReference($this->anonymousUser); @@ -758,7 +762,7 @@ public function testLoadContentDraftsThrowsUnauthorizedExceptionWithUser() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testUpdateContent */ - public function testUpdateContentThrowsUnauthorizedException() + public function testUpdateContentThrowsUnauthorizedException(): void { $draftVersion2 = $this->createContentDraftVersion2(); @@ -787,7 +791,7 @@ public function testUpdateContentThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testPublishVersion */ - public function testPublishVersionThrowsUnauthorizedException() + public function testPublishVersionThrowsUnauthorizedException(): void { $draft = $this->createContentDraftVersion1(); @@ -806,7 +810,7 @@ public function testPublishVersionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteVersion */ - public function testDeleteVersionThrowsUnauthorizedException() + public function testDeleteVersionThrowsUnauthorizedException(): void { $draft = $this->createContentDraftVersion1(); @@ -825,7 +829,7 @@ public function testDeleteVersionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadVersions */ - public function testLoadVersionsThrowsUnauthorizedException() + public function testLoadVersionsThrowsUnauthorizedException(): void { $contentVersion2 = $this->createContentVersion2(); @@ -846,7 +850,7 @@ public function testLoadVersionsThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCopyContent */ - public function testCopyContentThrowsUnauthorizedException() + public function testCopyContentThrowsUnauthorizedException(): void { $parentLocationId = $this->generateId('location', 52); @@ -883,7 +887,7 @@ public function testCopyContentThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testCopyContentWithGivenVersion */ - public function testCopyContentThrowsUnauthorizedExceptionWithGivenVersion() + public function testCopyContentThrowsUnauthorizedExceptionWithGivenVersion(): void { $parentLocationId = $this->generateId('location', 52); @@ -917,7 +921,7 @@ public function testCopyContentThrowsUnauthorizedExceptionWithGivenVersion() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadRelationList */ - public function testLoadRelationsThrowsUnauthorizedException() + public function testLoadRelationsThrowsUnauthorizedException(): void { $mediaEditor = $this->createMediaUserVersion1(); @@ -944,7 +948,7 @@ public function testLoadRelationsThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadRelationList */ - public function testLoadRelationsForDraftVersionThrowsUnauthorizedException() + public function testLoadRelationsForDraftVersionThrowsUnauthorizedException(): void { $draft = $this->createContentDraftVersion1(); @@ -963,7 +967,7 @@ public function testLoadRelationsForDraftVersionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadReverseRelations */ - public function testLoadReverseRelationsThrowsUnauthorizedException() + public function testLoadReverseRelationsThrowsUnauthorizedException(): void { $mediaEditor = $this->createMediaUserVersion1(); @@ -986,7 +990,7 @@ public function testLoadReverseRelationsThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testAddRelation */ - public function testAddRelationThrowsUnauthorizedException() + public function testAddRelationThrowsUnauthorizedException(): void { $mediaRemoteId = 'a6e35cbcb7cd6ae4b691f3eee30cd262'; @@ -1014,7 +1018,7 @@ public function testAddRelationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testDeleteRelation */ - public function testDeleteRelationThrowsUnauthorizedException() + public function testDeleteRelationThrowsUnauthorizedException(): void { $mediaRemoteId = 'a6e35cbcb7cd6ae4b691f3eee30cd262'; $demoDesignRemoteId = '8b8b22fe3c6061ed500fbd2b377b885f'; @@ -1044,7 +1048,7 @@ public function testDeleteRelationThrowsUnauthorizedException() * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - private function createAnonymousWithEditorRole() + private function createAnonymousWithEditorRole(): User { $roleService = $this->repository->getRoleService(); @@ -1074,7 +1078,7 @@ private function createAnonymousWithEditorRole() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testAddRelation */ - public function testLoadRelationsWithUnauthorizedRelations() + public function testLoadRelationsWithUnauthorizedRelations(): void { $mainLanguage = 'eng-GB'; @@ -1232,7 +1236,7 @@ public function testLoadRelationsWithUnauthorizedRelations() /** * Test copying Content to the authorized Location (limited by policies). */ - public function testCopyContentToAuthorizedLocation() + public function testCopyContentToAuthorizedLocation(): void { $locationService = $this->repository->getLocationService(); $roleService = $this->repository->getRoleService(); @@ -1276,7 +1280,7 @@ public function testCopyContentToAuthorizedLocation() /** * Test copying Content to the authorized Location (limited by policies). */ - public function testCopyContentToAuthorizedLocationWithSubtreeLimitation() + public function testCopyContentToAuthorizedLocationWithSubtreeLimitation(): void { $locationService = $this->repository->getLocationService(); diff --git a/tests/integration/Core/Repository/ContentServiceTest.php b/tests/integration/Core/Repository/ContentServiceTest.php index 2fd9ac4728..5b0e1e61e8 100644 --- a/tests/integration/Core/Repository/ContentServiceTest.php +++ b/tests/integration/Core/Repository/ContentServiceTest.php @@ -14,6 +14,8 @@ use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException as APIInvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; +use Ibexa\Contracts\Core\Repository\LocationService; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -69,13 +71,13 @@ class ContentServiceTest extends BaseContentServiceTest private const ENG_GB = 'eng-GB'; /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver */ - private $permissionResolver; + private PermissionResolver $permissionResolver; /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; public function setUp(): void { @@ -97,7 +99,7 @@ public function setUp(): void * @group user * @group field-type */ - public function testNewContentCreateStruct() + public function testNewContentCreateStruct(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); $contentType = $contentTypeService->loadContentTypeByIdentifier(self::FORUM_IDENTIFIER); @@ -221,7 +223,7 @@ public function testCreateContentSetsContentInfo($content) * * @depends testCreateContentSetsContentInfo */ - public function testCreateContentSetsExpectedContentInfo($content) + public function testCreateContentSetsExpectedContentInfo($content): void { $permissionResolver = $this->getRepository()->getPermissionResolver(); @@ -281,7 +283,7 @@ public function testCreateContentSetsVersionInfo($content) * * @depends testCreateContentSetsVersionInfo */ - public function testCreateContentSetsExpectedVersionInfo($content) + public function testCreateContentSetsExpectedVersionInfo($content): void { $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -313,7 +315,7 @@ public function testCreateContentSetsExpectedVersionInfo($content) * * @depends testCreateContent */ - public function testCreateContentSetsExpectedContentType($content) + public function testCreateContentSetsExpectedContentType($content): void { $contentType = $content->getContentType(); @@ -367,7 +369,7 @@ public function testCreateContentWithContentTypeDefaultOptions(): void * * @depends testCreateContent */ - public function testCreateContentThrowsInvalidArgumentException() + public function testCreateContentThrowsInvalidArgumentException(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -399,7 +401,7 @@ public function testCreateContentThrowsInvalidArgumentException() * * @depends testCreateContent */ - public function testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() + public function testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAccept(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -420,7 +422,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAcc * * @depends testCreateContent */ - public function testCreateContentThrowsContentFieldValidationException() + public function testCreateContentThrowsContentFieldValidationException(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -444,7 +446,7 @@ public function testCreateContentThrowsContentFieldValidationException() * * @depends testCreateContent */ - public function testCreateContentRequiredFieldMissing() + public function testCreateContentRequiredFieldMissing(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); $contentType = $contentTypeService->loadContentTypeByIdentifier(self::FORUM_IDENTIFIER); @@ -471,7 +473,7 @@ public function testCreateContentRequiredFieldMissing() * * @group user */ - public function testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately() + public function testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately(): void { $this->createContentDraftVersion1(); @@ -488,7 +490,7 @@ public function testCreateContentWithLocationCreateParameterDoesNotCreateLocatio * * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately */ - public function testCreateContentThrowsInvalidArgumentExceptionWithLocationCreateParameter() + public function testCreateContentThrowsInvalidArgumentExceptionWithLocationCreateParameter(): void { $parentLocationId = $this->generateId('location', 56); // $parentLocationId is a valid location ID @@ -564,7 +566,7 @@ public function testLoadContentInfo() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ - public function testLoadContentInfoSetsExpectedContentInfo(ContentInfo $contentInfo) + public function testLoadContentInfoSetsExpectedContentInfo(ContentInfo $contentInfo): void { $this->assertPropertiesCorrectUnsorted( $this->getExpectedMediaContentInfoProperties(), @@ -654,7 +656,7 @@ public function testLoadContentInfoSetsExpectedOwnerProxy(ContentInfo $contentIn * * @depends testLoadContentInfo */ - public function testLoadContentInfoThrowsNotFoundException() + public function testLoadContentInfoThrowsNotFoundException(): void { $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); @@ -668,7 +670,7 @@ public function testLoadContentInfoThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentInfoList() */ - public function testLoadContentInfoList() + public function testLoadContentInfoList(): void { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); $list = iterator_to_array($this->contentService->loadContentInfoList([$mediaFolderId])); @@ -688,7 +690,7 @@ public function testLoadContentInfoList() * * @depends testLoadContentInfoList */ - public function testLoadContentInfoListSkipsNotFoundItems() + public function testLoadContentInfoListSkipsNotFoundItems(): void { $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); $list = $this->contentService->loadContentInfoList([$nonExistentContentId]); @@ -720,7 +722,7 @@ public function testLoadContentInfoByRemoteId() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ - public function testLoadContentInfoByRemoteIdSetsExpectedContentInfo(ContentInfo $contentInfo) + public function testLoadContentInfoByRemoteIdSetsExpectedContentInfo(ContentInfo $contentInfo): void { $this->assertPropertiesCorrectUnsorted( [ @@ -749,7 +751,7 @@ public function testLoadContentInfoByRemoteIdSetsExpectedContentInfo(ContentInfo * * @depends testLoadContentInfoByRemoteId */ - public function testLoadContentInfoByRemoteIdThrowsNotFoundException() + public function testLoadContentInfoByRemoteIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -765,7 +767,7 @@ public function testLoadContentInfoByRemoteIdThrowsNotFoundException() * * @group user */ - public function testLoadVersionInfo() + public function testLoadVersionInfo(): void { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); // $mediaFolderId contains the ID of the "Media" folder @@ -812,7 +814,7 @@ public function testLoadVersionInfoById() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ - public function testLoadVersionInfoByIdSetsExpectedVersionInfo(VersionInfo $versionInfo) + public function testLoadVersionInfoByIdSetsExpectedVersionInfo(VersionInfo $versionInfo): void { $this->assertPropertiesCorrect( [ @@ -888,7 +890,7 @@ public function testLoadVersionInfoByIdGetLanguages(VersionInfo $versionInfo): v * * @depends testLoadVersionInfoById */ - public function testLoadVersionInfoByIdThrowsNotFoundException() + public function testLoadVersionInfoByIdThrowsNotFoundException(): void { $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); @@ -904,7 +906,7 @@ public function testLoadVersionInfoByIdThrowsNotFoundException() * * @depends testLoadContentInfo */ - public function testLoadContentByContentInfo() + public function testLoadContentByContentInfo(): void { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); // $mediaFolderId contains the ID of the "Media" folder @@ -928,7 +930,7 @@ public function testLoadContentByContentInfo() * * @depends testLoadVersionInfo */ - public function testLoadContentByVersionInfo() + public function testLoadContentByVersionInfo(): void { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); // $mediaFolderId contains the ID of the "Media" folder @@ -956,7 +958,7 @@ public function testLoadContentByVersionInfo() * @group user * @group field-type */ - public function testLoadContent() + public function testLoadContent(): void { $mediaFolderId = $this->generateId('object', self::MEDIA_CONTENT_ID); // $mediaFolderId contains the ID of the "Media" folder @@ -977,7 +979,7 @@ public function testLoadContent() * * @depends testLoadContent */ - public function testLoadContentThrowsNotFoundException() + public function testLoadContentThrowsNotFoundException(): void { $nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); @@ -991,7 +993,7 @@ public function testLoadContentThrowsNotFoundException() * * @return array */ - public function contentRemoteIdVersionLanguageProvider() + public function contentRemoteIdVersionLanguageProvider(): array { return [ ['f5c88a2209584891056f987fd965b0ba', null, null], @@ -1016,7 +1018,7 @@ public function contentRemoteIdVersionLanguageProvider() * @param array|null $languages * @param int $versionNo */ - public function testLoadContentByRemoteId($remoteId, $languages, $versionNo) + public function testLoadContentByRemoteId($remoteId, $languages, $versionNo): void { $content = $this->contentService->loadContentByRemoteId($remoteId, $languages, $versionNo); @@ -1039,7 +1041,7 @@ public function testLoadContentByRemoteId($remoteId, $languages, $versionNo) * * @depends testLoadContentByRemoteId */ - public function testLoadContentByRemoteIdThrowsNotFoundException() + public function testLoadContentByRemoteIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -1089,7 +1091,7 @@ public function testPublishVersion() * * @depends testPublishVersion */ - public function testPublishVersionSetsExpectedContentInfo($content) + public function testPublishVersionSetsExpectedContentInfo($content): void { $userReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -1131,7 +1133,7 @@ public function testPublishVersionSetsExpectedContentInfo($content) * * @depends testPublishVersion */ - public function testPublishVersionSetsExpectedVersionInfo($content) + public function testPublishVersionSetsExpectedVersionInfo($content): void { $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -1171,7 +1173,7 @@ public function testPublishVersionSetsExpectedVersionInfo($content) * * @depends testPublishVersion */ - public function testPublishVersionSetsExpectedContentType($content) + public function testPublishVersionSetsExpectedContentType($content): void { $contentType = $content->getContentType(); @@ -1220,7 +1222,7 @@ public function testPublishVersionCreatesLocationsDefinedOnCreate(): array * * @depends testPublishVersionCreatesLocationsDefinedOnCreate */ - public function testCreateContentWithLocationCreateParameterCreatesExpectedLocation(array $testData) + public function testCreateContentWithLocationCreateParameterCreatesExpectedLocation(array $testData): void { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */ @@ -1254,7 +1256,7 @@ public function testCreateContentWithLocationCreateParameterCreatesExpectedLocat * * @depends testPublishVersion */ - public function testPublishVersionThrowsBadStateException() + public function testPublishVersionThrowsBadStateException(): void { $draft = $this->createContentDraftVersion1(); @@ -1272,7 +1274,7 @@ public function testPublishVersionThrowsBadStateException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::publishVersion */ - public function testPublishVersionDoesNotChangePublishedDate() + public function testPublishVersionDoesNotChangePublishedDate(): void { $publishedContent = $this->createContentVersion1(); @@ -1326,7 +1328,7 @@ public function testCreateContentDraft() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft */ - public function testCreateContentDraftInOtherLanguage() + public function testCreateContentDraftInOtherLanguage(): void { $content = $this->createContentVersion1(); @@ -1356,7 +1358,7 @@ public function testCreateContentDraftInOtherLanguage() * * @group user */ - public function testCreateContentDraftAndLoadAccess() + public function testCreateContentDraftAndLoadAccess(): void { $user = $this->createUserVersion1(); @@ -1381,7 +1383,7 @@ public function testCreateContentDraftAndLoadAccess() * * @depends testCreateContentDraft */ - public function testCreateContentDraftSetsExpectedProperties($draft) + public function testCreateContentDraftSetsExpectedProperties($draft): void { self::assertEquals( [ @@ -1404,7 +1406,7 @@ public function testCreateContentDraftSetsExpectedProperties($draft) * * @depends testCreateContentDraft */ - public function testCreateContentDraftSetsContentInfo($draft) + public function testCreateContentDraftSetsContentInfo($draft): void { $contentInfo = $draft->contentInfo; $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -1440,7 +1442,7 @@ public function testCreateContentDraftSetsContentInfo($draft) * * @depends testCreateContentDraft */ - public function testCreateContentDraftSetsVersionInfo($draft) + public function testCreateContentDraftSetsVersionInfo($draft): void { $versionInfo = $draft->getVersionInfo(); $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -1476,7 +1478,7 @@ public function testCreateContentDraftSetsVersionInfo($draft) * @depends testCreateContentDraft * @depends testLoadVersionInfo */ - public function testCreateContentDraftLoadVersionInfoStillLoadsPublishedVersion($draft) + public function testCreateContentDraftLoadVersionInfoStillLoadsPublishedVersion($draft): void { $content = $this->createContentVersion1(); @@ -1497,7 +1499,7 @@ public function testCreateContentDraftLoadVersionInfoStillLoadsPublishedVersion( * @depends testLoadContent * @depends testCreateContentDraft */ - public function testCreateContentDraftLoadContentStillLoadsPublishedVersion() + public function testCreateContentDraftLoadContentStillLoadsPublishedVersion(): void { $content = $this->createContentVersion1(); @@ -1518,7 +1520,7 @@ public function testCreateContentDraftLoadContentStillLoadsPublishedVersion() * @depends testLoadContentByRemoteId * @depends testCreateContentDraft */ - public function testCreateContentDraftLoadContentByRemoteIdStillLoadsPublishedVersion() + public function testCreateContentDraftLoadContentByRemoteIdStillLoadsPublishedVersion(): void { $content = $this->createContentVersion1(); @@ -1539,7 +1541,7 @@ public function testCreateContentDraftLoadContentByRemoteIdStillLoadsPublishedVe * @depends testLoadContentByContentInfo * @depends testCreateContentDraft */ - public function testCreateContentDraftLoadContentByContentInfoStillLoadsPublishedVersion() + public function testCreateContentDraftLoadContentByContentInfoStillLoadsPublishedVersion(): void { $content = $this->createContentVersion1(); @@ -1559,7 +1561,7 @@ public function testCreateContentDraftLoadContentByContentInfoStillLoadsPublishe * * @group user */ - public function testNewContentUpdateStruct() + public function testNewContentUpdateStruct(): void { $updateStruct = $this->contentService->newContentUpdateStruct(); @@ -1648,7 +1650,7 @@ public function testUpdateContentWithDifferentUser() * * @depends testUpdateContent */ - public function testUpdateContentSetsExpectedFields($content) + public function testUpdateContentSetsExpectedFields($content): void { $actual = $this->normalizeFields($content->getFields()); @@ -1683,7 +1685,7 @@ public function testUpdateContentSetsExpectedFields($content) * * @depends testUpdateContent */ - public function testUpdateContentThrowsBadStateException() + public function testUpdateContentThrowsBadStateException(): void { $content = $this->createContentVersion1(); @@ -1710,7 +1712,7 @@ public function testUpdateContentThrowsBadStateException() * * @depends testUpdateContent */ - public function testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoesNotAccept() + public function testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoesNotAccept(): void { $draft = $this->createContentDraftVersion1(); @@ -1734,7 +1736,7 @@ public function testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoes * * @depends testUpdateContent */ - public function testUpdateContentWhenMandatoryFieldIsEmpty() + public function testUpdateContentWhenMandatoryFieldIsEmpty(): void { $draft = $this->createContentDraftVersion1(); @@ -1761,7 +1763,7 @@ public function testUpdateContentWhenMandatoryFieldIsEmpty() * * @depends testUpdateContent */ - public function testUpdateContentThrowsContentFieldValidationException() + public function testUpdateContentThrowsContentFieldValidationException(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); $contentType = $contentTypeService->loadContentTypeByIdentifier('folder'); @@ -1788,7 +1790,7 @@ public function testUpdateContentThrowsContentFieldValidationException() * * @depends testUpdateContent */ - public function testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLanguages() + public function testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLanguages(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); $contentType = $contentTypeService->loadContentTypeByIdentifier('folder'); @@ -1830,7 +1832,7 @@ public function testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLangu * * @depends testUpdateContent */ - public function testUpdateContentWithNotUpdatingMandatoryField() + public function testUpdateContentWithNotUpdatingMandatoryField(): void { $draft = $this->createContentDraftVersion1(); @@ -1865,7 +1867,7 @@ public function testUpdateContentWithNotUpdatingMandatoryField() * * @depends testUpdateContent */ - public function testCreateContentDraftWithSecondParameter() + public function testCreateContentDraftWithSecondParameter(): void { $contentVersion2 = $this->createContentVersion2(); @@ -1883,7 +1885,7 @@ public function testCreateContentDraftWithSecondParameter() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContentDraft */ - public function testCreateContentDraftWithThirdParameter() + public function testCreateContentDraftWithThirdParameter(): void { $content = $this->contentService->loadContent(4); $user = $this->createUserVersion1(); @@ -1908,7 +1910,7 @@ public function testCreateContentDraftWithThirdParameter() * @depends testPublishVersion * @depends testUpdateContent */ - public function testPublishVersionFromContentDraft() + public function testPublishVersionFromContentDraft(): void { $contentVersion2 = $this->createContentVersion2(); @@ -1936,7 +1938,7 @@ public function testPublishVersionFromContentDraft() * * @depends testPublishVersionFromContentDraft */ - public function testPublishVersionFromContentDraftArchivesOldVersion() + public function testPublishVersionFromContentDraftArchivesOldVersion(): void { $contentVersion2 = $this->createContentVersion2(); @@ -1964,7 +1966,7 @@ public function testPublishVersionFromContentDraftArchivesOldVersion() * * @depends testPublishVersionFromContentDraft */ - public function testPublishVersionFromContentDraftUpdatesContentInfoCurrentVersion() + public function testPublishVersionFromContentDraftUpdatesContentInfoCurrentVersion(): void { $contentVersion2 = $this->createContentVersion2(); @@ -1978,7 +1980,7 @@ public function testPublishVersionFromContentDraftUpdatesContentInfoCurrentVersi * * @depends testPublishVersionFromContentDraft */ - public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo() + public function testPublishVersionFromOldContentDraftArchivesNewerVersionNo(): void { $content = $this->createContentVersion1(); @@ -2073,7 +2075,7 @@ public function testPublishVersionNotCreatingUnlimitedArchives(): void * * @group user */ - public function testNewContentMetadataUpdateStruct() + public function testNewContentMetadataUpdateStruct(): void { // Creates a new metadata update struct $metadataUpdate = $this->contentService->newContentMetadataUpdateStruct(); @@ -2140,7 +2142,7 @@ public function testUpdateContentMetadata() * * @depends testUpdateContentMetadata */ - public function testUpdateContentMetadataSetsExpectedProperties($content) + public function testUpdateContentMetadataSetsExpectedProperties($content): void { $contentInfo = $content->contentInfo; $currentUserReference = $this->getRepository()->getPermissionResolver()->getCurrentUserReference(); @@ -2180,7 +2182,7 @@ public function testUpdateContentMetadataSetsExpectedProperties($content) * * @depends testUpdateContentMetadata */ - public function testUpdateContentMetadataNotUpdatesContentVersion($content) + public function testUpdateContentMetadataNotUpdatesContentVersion($content): void { self::assertEquals(1, $content->getVersionInfo()->versionNo); } @@ -2192,7 +2194,7 @@ public function testUpdateContentMetadataNotUpdatesContentVersion($content) * * @depends testUpdateContentMetadata */ - public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnDuplicateRemoteId() + public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnDuplicateRemoteId(): void { $content = $this->createContentVersion1(); @@ -2213,7 +2215,7 @@ public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnDuplica * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContentMetadata */ - public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnNoMetadataPropertiesSet() + public function testUpdateContentMetadataThrowsInvalidArgumentExceptionOnNoMetadataPropertiesSet(): void { $contentInfo = $this->contentService->loadContentInfo(4); $contentMetadataUpdateStruct = $this->contentService->newContentMetadataUpdateStruct(); @@ -2319,7 +2321,7 @@ public function testUpdateContentMainTranslation(): void * * @depends testPublishVersionFromContentDraft */ - public function testDeleteContent() + public function testDeleteContent(): void { $contentVersion2 = $this->createContentVersion2(); @@ -2346,7 +2348,7 @@ public function testDeleteContent() * * @depends testPublishVersionFromContentDraft */ - public function testDeleteContentWithEmptyBinaryField() + public function testDeleteContentWithEmptyBinaryField(): void { $contentVersion = $this->createContentVersion1EmptyBinaryField(); @@ -2411,7 +2413,7 @@ public function testCountContentDraftsForUsers(): void /** * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentDraftList() */ - public function testLoadContentDraftsReturnsEmptyArrayByDefault() + public function testLoadContentDraftsReturnsEmptyArrayByDefault(): void { $contentDrafts = $this->contentService->loadContentDraftList(); @@ -2467,7 +2469,7 @@ public function testLoadContentDraftList(): void /** * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentDraftList($user) */ - public function testLoadContentDraftsWithFirstParameter() + public function testLoadContentDraftsWithFirstParameter(): void { $user = $this->createUserVersion1(); @@ -2595,7 +2597,7 @@ public function testLoadAllContentDraftList(): void * * @depends testPublishVersionFromContentDraft */ - public function testLoadVersionInfoWithSecondParameter() + public function testLoadVersionInfoWithSecondParameter(): void { $publishedContent = $this->createContentVersion1(); @@ -2620,7 +2622,7 @@ public function testLoadVersionInfoWithSecondParameter() * * @depends testLoadVersionInfoWithSecondParameter */ - public function testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter() + public function testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter(): void { $draft = $this->createContentDraftVersion1(); @@ -2637,7 +2639,7 @@ public function testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter() * * @depends testLoadVersionInfoWithSecondParameter */ - public function testLoadVersionInfoByIdWithSecondParameter() + public function testLoadVersionInfoByIdWithSecondParameter(): array { $publishedContent = $this->createContentVersion1(); @@ -2669,7 +2671,7 @@ public function testLoadVersionInfoByIdWithSecondParameter() * * @param array $data */ - public function testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInfo(array $data) + public function testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInfo(array $data): void { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo $versionInfo */ $versionInfo = $data['versionInfo']; @@ -2716,7 +2718,7 @@ public function testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInf * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) */ - public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter() + public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter(): void { $content = $this->createContentVersion1(); @@ -2734,7 +2736,7 @@ public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParamete * @depends testCreateContent * @depends testLoadContentByVersionInfo */ - public function testLoadContentByVersionInfoWithSecondParameter() + public function testLoadContentByVersionInfoWithSecondParameter(): void { $sectionId = $this->generateId('section', 1); $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -2810,7 +2812,7 @@ static function ($field1, $field2): int { * * @depends testLoadContentByContentInfo */ - public function testLoadContentByContentInfoWithLanguageParameters() + public function testLoadContentByContentInfoWithLanguageParameters(): void { $sectionId = $this->generateId('section', 1); $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -2920,7 +2922,7 @@ public function testLoadContentByContentInfoWithLanguageParameters() * * @depends testLoadContentByContentInfo */ - public function testLoadContentByContentInfoWithVersionNumberParameter() + public function testLoadContentByContentInfoWithVersionNumberParameter(): void { $publishedContent = $this->createContentVersion1(); @@ -2952,7 +2954,7 @@ public function testLoadContentByContentInfoWithVersionNumberParameter() * * @depends testLoadContentByContentInfoWithVersionNumberParameter */ - public function testLoadContentByContentInfoThrowsNotFoundExceptionWithVersionNumberParameter() + public function testLoadContentByContentInfoThrowsNotFoundExceptionWithVersionNumberParameter(): void { $content = $this->createContentVersion1(); @@ -2988,7 +2990,7 @@ public function testLoadContentWithPrioritizedLanguages() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $contentDraft */ - public function testLoadContentWithPrioritizedLanguagesThrowsNotFoundException(Content $contentDraft) + public function testLoadContentWithPrioritizedLanguagesThrowsNotFoundException(Content $contentDraft): void { $this->expectException(NotFoundException::class); @@ -3021,7 +3023,7 @@ public function testLoadContentPassTroughPrioritizedLanguagesToContentType(Conte * * @depends testPublishVersionFromContentDraft */ - public function testLoadContentWithThirdParameter() + public function testLoadContentWithThirdParameter(): void { $publishedContent = $this->createContentVersion1(); @@ -3046,7 +3048,7 @@ public function testLoadContentWithThirdParameter() * * @depends testLoadContentWithThirdParameter */ - public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() + public function testLoadContentThrowsNotFoundExceptionWithThirdParameter(): void { $content = $this->createContentVersion1(); @@ -3063,7 +3065,7 @@ public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() * * @depends testPublishVersionFromContentDraft */ - public function testLoadContentByRemoteIdWithSecondParameter() + public function testLoadContentByRemoteIdWithSecondParameter(): void { $draft = $this->createMultipleLanguageDraftVersion1(); @@ -3087,7 +3089,7 @@ public function testLoadContentByRemoteIdWithSecondParameter() * * @depends testPublishVersionFromContentDraft */ - public function testLoadContentByRemoteIdWithThirdParameter() + public function testLoadContentByRemoteIdWithThirdParameter(): void { $publishedContent = $this->createContentVersion1(); @@ -3116,7 +3118,7 @@ public function testLoadContentByRemoteIdWithThirdParameter() * * @depends testLoadContentByRemoteIdWithThirdParameter */ - public function testLoadContentByRemoteIdThrowsNotFoundExceptionWithThirdParameter() + public function testLoadContentByRemoteIdThrowsNotFoundExceptionWithThirdParameter(): void { $content = $this->createContentVersion1(); @@ -3137,7 +3139,7 @@ public function testLoadContentByRemoteIdThrowsNotFoundExceptionWithThirdParamet * * @param string[]|null $languageCodes */ - public function testLoadContentWithPrioritizedLanguagesList($languageCodes) + public function testLoadContentWithPrioritizedLanguagesList($languageCodes): void { $content = $this->createContentVersion2(); @@ -3157,7 +3159,7 @@ public function testLoadContentWithPrioritizedLanguagesList($languageCodes) /** * @return array */ - public function getPrioritizedLanguageList() + public function getPrioritizedLanguageList(): array { return [ [[self::ENG_US]], @@ -3177,7 +3179,7 @@ public function getPrioritizedLanguageList() * @depends testPublishVersion * @depends testCreateContentDraft */ - public function testDeleteVersion() + public function testDeleteVersion(): void { $content = $this->createContentVersion1(); @@ -3209,7 +3211,7 @@ public function testDeleteVersion() * @depends testCreateContent * @depends testPublishVersion */ - public function testDeleteVersionThrowsBadStateExceptionOnPublishedVersion() + public function testDeleteVersionThrowsBadStateExceptionOnPublishedVersion(): void { $content = $this->createContentVersion1(); @@ -3228,7 +3230,7 @@ public function testDeleteVersionThrowsBadStateExceptionOnPublishedVersion() * @depends testCreateContent * @depends testPublishVersion */ - public function testDeleteVersionWorksIfOnlyVersionIsDraft() + public function testDeleteVersionWorksIfOnlyVersionIsDraft(): void { $draft = $this->createContentDraftVersion1(); @@ -3250,7 +3252,7 @@ public function testDeleteVersionWorksIfOnlyVersionIsDraft() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo[] */ - public function testLoadVersions() + public function testLoadVersions(): array { $contentVersion2 = $this->createContentVersion2(); @@ -3276,7 +3278,7 @@ public function testLoadVersions() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo[] $versions */ - public function testLoadVersionsSetsExpectedVersionInfo(array $versions) + public function testLoadVersionsSetsExpectedVersionInfo(array $versions): void { self::assertCount(2, $versions); @@ -3329,7 +3331,7 @@ public function testLoadVersionsSetsExpectedVersionInfo(array $versions) * * @group field-type */ - public function testCopyContent() + public function testCopyContent(): void { $parentLocationId = $this->generateId('location', 56); @@ -3392,7 +3394,7 @@ public function testCopyContent() * * @group field-type */ - public function testCopyContentWithNewOwner() + public function testCopyContentWithNewOwner(): void { $parentLocationId = $this->generateId('location', 56); @@ -3452,7 +3454,7 @@ public function testCopyContentWithNewOwner() * * @depends testCopyContent */ - public function testCopyContentWithGivenVersion() + public function testCopyContentWithGivenVersion(): void { $parentLocationId = $this->generateId('location', 56); @@ -3542,7 +3544,7 @@ public function testAddRelation(): array * * @depends testAddRelation */ - public function testAddRelationAddsRelationToContent($relations) + public function testAddRelationAddsRelationToContent($relations): void { self::assertCount( 1, @@ -3553,7 +3555,7 @@ public function testAddRelationAddsRelationToContent($relations) /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Relation[] $relations */ - protected function assertExpectedRelations($relations) + protected function assertExpectedRelations(array $relations) { self::assertEquals( [ @@ -3580,7 +3582,7 @@ protected function assertExpectedRelations($relations) * * @depends testAddRelation */ - public function testAddRelationSetsExpectedRelations($relations) + public function testAddRelationSetsExpectedRelations($relations): void { $this->assertExpectedRelations($relations); } @@ -3594,7 +3596,7 @@ public function testAddRelationSetsExpectedRelations($relations) * * @depends testAddRelationSetsExpectedRelations */ - public function testCreateContentDraftWithRelations() + public function testCreateContentDraftWithRelations(): array { $draft = $this->createContentDraftVersion1(); $media = $this->contentService->loadContentInfoByRemoteId(self::MEDIA_REMOTE_ID); @@ -3640,7 +3642,7 @@ public function testCreateContentDraftWithRelationsCreatesRelations(array $relat * * @depends testCreateContentDraftWithRelationsCreatesRelations */ - public function testCreateContentDraftWithRelationsCreatesExpectedRelations($relations) + public function testCreateContentDraftWithRelationsCreatesExpectedRelations($relations): void { $this->assertExpectedRelations($relations); } @@ -3652,7 +3654,7 @@ public function testCreateContentDraftWithRelationsCreatesExpectedRelations($rel * * @depends testAddRelation */ - public function testAddRelationThrowsBadStateException() + public function testAddRelationThrowsBadStateException(): void { $content = $this->createContentVersion1(); @@ -3675,7 +3677,7 @@ public function testAddRelationThrowsBadStateException() * @depends testAddRelation * @depends loadRelationList */ - public function testLoadRelationsSkipsArchivedContent() + public function testLoadRelationsSkipsArchivedContent(): void { $trashService = $this->getRepository()->getTrashService(); @@ -3731,7 +3733,7 @@ public function testLoadRelationsSkipsArchivedContent() * @depends testAddRelation * @depends loadRelationList */ - public function testLoadRelationsSkipsDraftContent() + public function testLoadRelationsSkipsDraftContent(): void { $draft = $this->createContentDraftVersion1(); @@ -3959,7 +3961,7 @@ public function testCountReverseRelationsForUnauthorizedUser(): void * * @depends testAddRelation */ - public function testLoadReverseRelations() + public function testLoadReverseRelations(): void { $versionInfo = $this->createContentVersion1()->getVersionInfo(); $contentInfo = $versionInfo->getContentInfo(); @@ -4042,7 +4044,7 @@ static function ($rel1, $rel2): int { * @depends testAddRelation * @depends testLoadReverseRelations */ - public function testLoadReverseRelationsSkipsArchivedContent() + public function testLoadReverseRelationsSkipsArchivedContent(): void { $trashService = $this->getRepository()->getTrashService(); @@ -4116,7 +4118,7 @@ public function testLoadReverseRelationsSkipsArchivedContent() * @depends testAddRelation * @depends testLoadReverseRelations */ - public function testLoadReverseRelationsSkipsDraftContent() + public function testLoadReverseRelationsSkipsDraftContent(): void { // Load "Media" page Content $media = $this->contentService->loadContentByRemoteId(self::MEDIA_REMOTE_ID); @@ -4298,7 +4300,7 @@ public function testLoadReverseRelationListSkipsArchivedContent(): void /** * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadReverseRelationList */ - public function testLoadReverseRelationListSkipsDraftContent() + public function testLoadReverseRelationListSkipsDraftContent(): void { $draft1 = $this->contentService->createContentDraft( $this->createFolder([self::ENG_GB => 'Foo'], 2)->contentInfo @@ -4350,7 +4352,7 @@ public function testLoadReverseRelationListWithType(): void * * @depends testLoadRelationList */ - public function testDeleteRelation() + public function testDeleteRelation(): void { $draft = $this->createContentDraftVersion1(); @@ -4377,7 +4379,7 @@ public function testDeleteRelation() * * @depends testDeleteRelation */ - public function testDeleteRelationThrowsBadStateException() + public function testDeleteRelationThrowsBadStateException(): void { $content = $this->createContentVersion1(); @@ -4411,7 +4413,7 @@ public function testDeleteRelationThrowsBadStateException() * * @depends testDeleteRelation */ - public function testDeleteRelationThrowsInvalidArgumentException() + public function testDeleteRelationThrowsInvalidArgumentException(): void { $draft = $this->createContentDraftVersion1(); @@ -4434,7 +4436,7 @@ public function testDeleteRelationThrowsInvalidArgumentException() * @depends testCreateContent * @depends testLoadContent */ - public function testCreateContentInTransactionWithRollback() + public function testCreateContentInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4483,7 +4485,7 @@ public function testCreateContentInTransactionWithRollback() * @depends testCreateContent * @depends testLoadContent */ - public function testCreateContentInTransactionWithCommit() + public function testCreateContentInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4527,7 +4529,7 @@ public function testCreateContentInTransactionWithCommit() * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately * @depends testLoadContentThrowsNotFoundException */ - public function testCreateContentWithLocationCreateParameterInTransactionWithRollback() + public function testCreateContentWithLocationCreateParameterInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4565,7 +4567,7 @@ public function testCreateContentWithLocationCreateParameterInTransactionWithRol * @depends testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately * @depends testLoadContentThrowsNotFoundException */ - public function testCreateContentWithLocationCreateParameterInTransactionWithCommit() + public function testCreateContentWithLocationCreateParameterInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4599,7 +4601,7 @@ public function testCreateContentWithLocationCreateParameterInTransactionWithCom * @depends testCreateContentDraft * @depends testLoadContent */ - public function testCreateContentDraftInTransactionWithRollback() + public function testCreateContentDraftInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4644,7 +4646,7 @@ public function testCreateContentDraftInTransactionWithRollback() * @depends testCreateContentDraft * @depends testLoadContent */ - public function testCreateContentDraftInTransactionWithCommit() + public function testCreateContentDraftInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4687,7 +4689,7 @@ public function testCreateContentDraftInTransactionWithCommit() * @depends testPublishVersion * @depends testLoadContent */ - public function testPublishVersionInTransactionWithRollback() + public function testPublishVersionInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4734,7 +4736,7 @@ public function testPublishVersionInTransactionWithRollback() * @depends testPublishVersion * @depends testLoadVersionInfo */ - public function testPublishVersionInTransactionWithCommit() + public function testPublishVersionInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4776,7 +4778,7 @@ public function testPublishVersionInTransactionWithCommit() * @depends testLoadContent * @depends testLoadContentInfo */ - public function testUpdateContentInTransactionWithRollback() + public function testUpdateContentInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4827,7 +4829,7 @@ public function testUpdateContentInTransactionWithRollback() * @depends testLoadContent * @depends testLoadContentInfo */ - public function testUpdateContentInTransactionWithCommit() + public function testUpdateContentInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4877,7 +4879,7 @@ public function testUpdateContentInTransactionWithCommit() * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ - public function testUpdateContentMetadataInTransactionWithRollback() + public function testUpdateContentMetadataInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4925,7 +4927,7 @@ public function testUpdateContentMetadataInTransactionWithRollback() * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ - public function testUpdateContentMetadataInTransactionWithCommit() + public function testUpdateContentMetadataInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4973,7 +4975,7 @@ public function testUpdateContentMetadataInTransactionWithCommit() * @depends testUpdateContentMetadata * @depends testLoadContentInfo */ - public function testUpdateContentMetadataCheckWithinTransaction() + public function testUpdateContentMetadataCheckWithinTransaction(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -5021,7 +5023,7 @@ public function testUpdateContentMetadataCheckWithinTransaction() * @depends testLoadContentInfo * @depends testLoadContentDraftList */ - public function testDeleteVersionInTransactionWithRollback() + public function testDeleteVersionInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -5061,7 +5063,7 @@ public function testDeleteVersionInTransactionWithRollback() * @depends testLoadContentInfo * @depends testLoadContentDrafts */ - public function testDeleteVersionInTransactionWithCommit() + public function testDeleteVersionInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -5100,7 +5102,7 @@ public function testDeleteVersionInTransactionWithCommit() * @depends testDeleteContent * @depends testLoadContentInfo */ - public function testDeleteContentInTransactionWithRollback() + public function testDeleteContentInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -5138,7 +5140,7 @@ public function testDeleteContentInTransactionWithRollback() * @depends testDeleteContent * @depends testLoadContentInfo */ - public function testDeleteContentInTransactionWithCommit() + public function testDeleteContentInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -5179,7 +5181,7 @@ public function testDeleteContentInTransactionWithCommit() * * @depends testCopyContent */ - public function testCopyContentInTransactionWithRollback() + public function testCopyContentInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -5227,7 +5229,7 @@ public function testCopyContentInTransactionWithRollback() * * @depends testCopyContent */ - public function testCopyContentInTransactionWithCommit() + public function testCopyContentInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -5268,7 +5270,7 @@ public function testCopyContentInTransactionWithCommit() self::assertCount(2, $locations); } - public function testURLAliasesCreatedForNewContent() + public function testURLAliasesCreatedForNewContent(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5299,7 +5301,7 @@ public function testURLAliasesCreatedForNewContent() ); } - public function testURLAliasesCreatedForUpdatedContent() + public function testURLAliasesCreatedForUpdatedContent(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5366,7 +5368,7 @@ public function testURLAliasesCreatedForUpdatedContent() ); } - public function testCustomURLAliasesNotHistorizedOnUpdatedContent() + public function testCustomURLAliasesNotHistorizedOnUpdatedContent(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5423,7 +5425,7 @@ public function testCustomURLAliasesNotHistorizedOnUpdatedContent() * Test to ensure that old versions are not affected by updates to newer * drafts. */ - public function testUpdatingDraftDoesNotUpdateOldVersions() + public function testUpdatingDraftDoesNotUpdateOldVersions(): void { $contentVersion2 = $this->createContentVersion2(); @@ -5440,7 +5442,7 @@ public function testUpdatingDraftDoesNotUpdateOldVersions() * Test scenario with writer and publisher users. * Writer can only create content. Publisher can publish this content. */ - public function testPublishWorkflow() + public function testPublishWorkflow(): void { $this->createRoleWithPolicies('Publisher', [ ['module' => 'content', 'function' => 'read'], @@ -5479,7 +5481,7 @@ public function testPublishWorkflow() /** * Test publish / content policy is required to be able to publish content. */ - public function testPublishContentWithoutPublishPolicyThrowsException() + public function testPublishContentWithoutPublishPolicyThrowsException(): void { $this->createRoleWithPolicies('Writer', [ ['module' => 'content', 'function' => 'read'], @@ -5505,7 +5507,7 @@ public function testPublishContentWithoutPublishPolicyThrowsException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslation() + public function testDeleteTranslation(): void { $content = $this->createContentVersion2(); @@ -5529,7 +5531,7 @@ public function testDeleteTranslation() * Test deleting a Translation which is initial for some Version, updates initialLanguageCode * with mainLanguageCode (assuming they are different). */ - public function testDeleteTranslationUpdatesInitialLanguageCodeVersion() + public function testDeleteTranslationUpdatesInitialLanguageCodeVersion(): void { $content = $this->createContentVersion2(); // create another, copied, version @@ -5563,7 +5565,7 @@ public function testDeleteTranslationUpdatesInitialLanguageCodeVersion() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslationUpdatesUrlAlias() + public function testDeleteTranslationUpdatesUrlAlias(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5603,7 +5605,7 @@ public function testDeleteTranslationUpdatesUrlAlias() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslationMainLanguageThrowsBadStateException() + public function testDeleteTranslationMainLanguageThrowsBadStateException(): void { $content = $this->createContentVersion2(); @@ -5622,7 +5624,7 @@ public function testDeleteTranslationMainLanguageThrowsBadStateException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslationDeletesSingleTranslationVersions() + public function testDeleteTranslationDeletesSingleTranslationVersions(): void { // content created by the createContentVersion1 method has eng-US translation only. $content = $this->createContentVersion1(); @@ -5651,7 +5653,7 @@ public function testDeleteTranslationDeletesSingleTranslationVersions() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslationThrowsUnauthorizedException() + public function testDeleteTranslationThrowsUnauthorizedException(): void { $content = $this->createContentVersion2(); @@ -5681,7 +5683,7 @@ public function testDeleteTranslationThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslationThrowsInvalidArgumentException() + public function testDeleteTranslationThrowsInvalidArgumentException(): void { // content created by the createContentVersion1 method has eng-US translation only. $content = $this->createContentVersion1(); @@ -5697,7 +5699,7 @@ public function testDeleteTranslationThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraft() + public function testDeleteTranslationFromDraft(): void { $languageCode = self::ENG_GB; $content = $this->createMultipleLanguageContentVersion2(); @@ -5715,7 +5717,7 @@ public function testDeleteTranslationFromDraft() * * @return array */ - public function providerForDeleteTranslationFromDraftRemovesUrlAliasOnPublishing() + public function providerForDeleteTranslationFromDraftRemovesUrlAliasOnPublishing(): array { return [ [ @@ -5741,7 +5743,7 @@ public function providerForDeleteTranslationFromDraftRemovesUrlAliasOnPublishing * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testDeleteTranslationFromDraftRemovesUrlAliasOnPublishing(array $fieldValues) + public function testDeleteTranslationFromDraftRemovesUrlAliasOnPublishing(array $fieldValues): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5802,7 +5804,7 @@ public function testDeleteTranslationFromDraftRemovesUrlAliasOnPublishing(array /** * Test that URL aliases for deleted Translations are properly archived. */ - public function testDeleteTranslationFromDraftArchivesUrlAliasOnPublishing() + public function testDeleteTranslationFromDraftArchivesUrlAliasOnPublishing(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); @@ -5861,7 +5863,7 @@ public function testDeleteTranslationFromDraftArchivesUrlAliasOnPublishing() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnSingleTranslation() + public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnSingleTranslation(): void { // create Content with single Translation $publishedContent = $this->contentService->publishVersion( @@ -5898,7 +5900,7 @@ public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnSingleTra * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnMainTranslation() + public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnMainTranslation(): void { $mainLanguageCode = self::ENG_US; $draft = $this->createMultilingualContentDraft( @@ -5924,7 +5926,7 @@ public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnMainTrans * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnPublishedVersion() + public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnPublishedVersion(): void { $languageCode = self::ENG_US; $content = $this->createMultipleLanguageContentVersion2(); @@ -5942,7 +5944,7 @@ public function testDeleteTranslationFromDraftThrowsBadStateExceptionOnPublished * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraftThrowsUnauthorizedException() + public function testDeleteTranslationFromDraftThrowsUnauthorizedException(): void { $languageCode = self::ENG_GB; $content = $this->createMultipleLanguageContentVersion2(); @@ -5974,7 +5976,7 @@ public function testDeleteTranslationFromDraftThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslationFromDraft */ - public function testDeleteTranslationFromDraftThrowsInvalidArgumentException() + public function testDeleteTranslationFromDraftThrowsInvalidArgumentException(): void { $languageCode = self::GER_DE; $content = $this->createMultipleLanguageContentVersion2(); @@ -5987,7 +5989,7 @@ public function testDeleteTranslationFromDraftThrowsInvalidArgumentException() /** * Test loading list of Content items. */ - public function testLoadContentListByContentInfo() + public function testLoadContentListByContentInfo(): void { $allLocationsCount = $this->locationService->getAllLocationsCount(); $contentInfoList = array_map( @@ -6018,7 +6020,7 @@ static function (Location $location) { * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion */ - public function testLoadVersionsAfterDeletingTwoDrafts() + public function testLoadVersionsAfterDeletingTwoDrafts(): void { $content = $this->createFolder([self::ENG_GB => 'Foo'], 2); @@ -6049,7 +6051,7 @@ public function testLoadVersionsAfterDeletingTwoDrafts() /** * Tests loading list of content versions of status draft. */ - public function testLoadVersionsOfStatusDraft() + public function testLoadVersionsOfStatusDraft(): void { $content = $this->createContentVersion1(); @@ -6065,7 +6067,7 @@ public function testLoadVersionsOfStatusDraft() /** * Tests loading list of content versions of status archived. */ - public function testLoadVersionsOfStatusArchived() + public function testLoadVersionsOfStatusArchived(): void { $content = $this->createContentVersion1(); @@ -6087,7 +6089,7 @@ public function testLoadVersionsOfStatusArchived() * @param array $expectedAliasProperties * @param array $actualAliases */ - private function assertAliasesCorrect(array $expectedAliasProperties, array $actualAliases) + private function assertAliasesCorrect(array $expectedAliasProperties, array $actualAliases): void { foreach ($actualAliases as $actualAlias) { if (!isset($expectedAliasProperties[$actualAlias->path])) { @@ -6131,7 +6133,7 @@ private function assertAliasesCorrect(array $expectedAliasProperties, array $act * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $fields */ - private function assertAllFieldsEquals(array $fields) + private function assertAllFieldsEquals(array $fields): void { $actual = $this->normalizeFields($fields); $expected = $this->normalizeFields($this->createFieldsFixture()); @@ -6146,7 +6148,7 @@ private function assertAllFieldsEquals(array $fields) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $fields * @param string $languageCode */ - private function assertLocaleFieldsEquals(array $fields, $languageCode) + private function assertLocaleFieldsEquals(array $fields, string $languageCode): void { $actual = $this->normalizeFields($fields); @@ -6173,7 +6175,7 @@ private function assertLocaleFieldsEquals(array $fields, $languageCode) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Field[] */ - private function normalizeFields(array $fields) + private function normalizeFields(array $fields): array { $normalized = []; foreach ($fields as $field) { @@ -6206,7 +6208,7 @@ static function ($field1, $field2): int { * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ - private function assertDefaultContentStates(ContentInfo $contentInfo) + private function assertDefaultContentStates(ContentInfo $contentInfo): void { $objectStateService = $this->getRepository()->getObjectStateService(); @@ -6231,7 +6233,7 @@ private function assertDefaultContentStates(ContentInfo $contentInfo) * @param string $languageCode * @param int $contentId */ - private function assertTranslationDoesNotExist($languageCode, $contentId) + private function assertTranslationDoesNotExist(string $languageCode, int $contentId): void { $content = $this->contentService->loadContent($contentId); @@ -6256,7 +6258,7 @@ private function assertTranslationDoesNotExist($languageCode, $contentId) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Field[] */ - private function createFieldsFixture() + private function createFieldsFixture(): array { return [ new Field( @@ -6285,7 +6287,7 @@ private function createFieldsFixture() * * @return array */ - private function getExpectedMediaContentInfoProperties() + private function getExpectedMediaContentInfoProperties(): array { return [ 'id' => self::MEDIA_CONTENT_ID, @@ -6358,7 +6360,7 @@ function (Location $parentLocation) { * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRevealContent() + public function testRevealContent(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -6409,7 +6411,7 @@ function (Location $parentLocation) { /** * @depends testRevealContent */ - public function testRevealContentWithHiddenParent() + public function testRevealContentWithHiddenParent(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -6467,7 +6469,7 @@ public function testRevealContentWithHiddenParent() /** * @depends testRevealContent */ - public function testRevealContentWithHiddenChildren() + public function testRevealContentWithHiddenChildren(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -6532,7 +6534,7 @@ public function testRevealContentWithHiddenChildren() } } - public function testHideContentWithParentLocation() + public function testHideContentWithParentLocation(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -6579,7 +6581,7 @@ public function testHideContentWithParentLocation() self::assertTrue($childLocations[0]->invisible); } - public function testChangeContentName() + public function testChangeContentName(): void { $contentDraft = $this->createContentDraft( 'folder', @@ -6601,7 +6603,7 @@ public function testChangeContentName() self::assertEquals('Polo', $updatedContent->contentInfo->name); } - public function testCopyTranslationsFromPublishedToDraft() + public function testCopyTranslationsFromPublishedToDraft(): void { $contentDraft = $this->createContentDraft( 'folder', @@ -6664,7 +6666,7 @@ public function testCopyTranslationsFromPublishedToDraft() ); } - public function testCopyTranslationsFromInvalidPublishedContentToDraft() + public function testCopyTranslationsFromInvalidPublishedContentToDraft(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -6791,7 +6793,7 @@ static function (Location $location) { ); } - public function testPublishVersionWithSelectedLanguages() + public function testPublishVersionWithSelectedLanguages(): void { $publishedContent = $this->createFolder( [ @@ -6821,7 +6823,7 @@ public function testPublishVersionWithSelectedLanguages() ); } - public function testCreateContentWithRomanianSpecialCharsInTitle() + public function testCreateContentWithRomanianSpecialCharsInTitle(): void { $baseName = 'ȘșțȚdfdf'; $expectedPath = '/SstTdfdf'; @@ -6885,7 +6887,7 @@ private function createUserWithVersionReadLimitations(array $limitationValues = * * @return object */ - private function createContentWithReverseRelations(array $drafts) + private function createContentWithReverseRelations(array $drafts): \AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225 { $contentWithReverseRelations = new class() { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ diff --git a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php index feb041b512..e91b2cd928 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php @@ -28,7 +28,7 @@ class ContentTypeServiceAuthorizationTest extends BaseContentTypeServiceTest * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentTypeGroup */ - public function testCreateContentTypeGroupThrowsUnauthorizedException() + public function testCreateContentTypeGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -70,7 +70,7 @@ public function testCreateContentTypeGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateContentTypeGroup */ - public function testUpdateContentTypeGroupThrowsUnauthorizedException() + public function testUpdateContentTypeGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -121,7 +121,7 @@ public function testUpdateContentTypeGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testDeleteContentTypeGroup */ - public function testDeleteContentTypeGroupThrowsUnauthorizedException() + public function testDeleteContentTypeGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -159,7 +159,7 @@ public function testDeleteContentTypeGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentType */ - public function testCreateContentTypeThrowsUnauthorizedException() + public function testCreateContentTypeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -217,7 +217,7 @@ public function testCreateContentTypeThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateContentTypeDraft */ - public function testUpdateContentTypeDraftThrowsUnauthorizedException() + public function testUpdateContentTypeDraftThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -270,7 +270,7 @@ public function testUpdateContentTypeDraftThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testAddFieldDefinition */ - public function testAddFieldDefinitionThrowsUnauthorizedException() + public function testAddFieldDefinitionThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -327,7 +327,7 @@ public function testAddFieldDefinitionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testRemoveFieldDefinition */ - public function testRemoveFieldDefinitionThrowsUnauthorizedException() + public function testRemoveFieldDefinitionThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -361,7 +361,7 @@ public function testRemoveFieldDefinitionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUpdateFieldDefinition */ - public function testUpdateFieldDefinitionThrowsUnauthorizedException() + public function testUpdateFieldDefinitionThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -420,7 +420,7 @@ public function testUpdateFieldDefinitionThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testPublishContentTypeDraft */ - public function testPublishContentTypeDraftThrowsUnauthorizedException() + public function testPublishContentTypeDraftThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -452,7 +452,7 @@ public function testPublishContentTypeDraftThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCreateContentTypeDraft */ - public function testCreateContentTypeDraftThrowsUnauthorizedException() + public function testCreateContentTypeDraftThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -485,7 +485,7 @@ public function testCreateContentTypeDraftThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testDeleteContentType */ - public function testDeleteContentTypeThrowsUnauthorizedException() + public function testDeleteContentTypeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -518,7 +518,7 @@ public function testDeleteContentTypeThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testCopyContentType */ - public function testCopyContentTypeThrowsUnauthorizedException() + public function testCopyContentTypeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -551,7 +551,7 @@ public function testCopyContentTypeThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testAssignContentTypeGroup */ - public function testAssignContentTypeGroupThrowsUnauthorizedException() + public function testAssignContentTypeGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -585,7 +585,7 @@ public function testAssignContentTypeGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ContentTypeServiceTest::testUnassignContentTypeGroup */ - public function testUnassignContentTypeGroupThrowsUnauthorizedException() + public function testUnassignContentTypeGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/ContentTypeServiceTest.php b/tests/integration/Core/Repository/ContentTypeServiceTest.php index 6d066c2752..4229b8b2fd 100644 --- a/tests/integration/Core/Repository/ContentTypeServiceTest.php +++ b/tests/integration/Core/Repository/ContentTypeServiceTest.php @@ -29,6 +29,7 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\Translation\Message; +use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; /** @@ -75,7 +76,7 @@ public function testNewContentTypeGroupCreateStruct() * * @depends testNewContentTypeGroupCreateStruct */ - public function testNewContentTypeGroupCreateStructValues($createStruct) + public function testNewContentTypeGroupCreateStructValues(ValueObject $createStruct): void { $this->assertPropertiesCorrect( [ @@ -99,7 +100,7 @@ public function testNewContentTypeGroupCreateStructValues($createStruct) * * @group user */ - public function testCreateContentTypeGroup() + public function testCreateContentTypeGroup(): array { $repository = $this->getRepository(); @@ -142,7 +143,7 @@ public function testCreateContentTypeGroup() * * @depends testCreateContentTypeGroup */ - public function testCreateContentTypeGroupStructValues(array $data) + public function testCreateContentTypeGroupStructValues(array $data): array { $createStruct = $data['createStruct']; $group = $data['group']; @@ -175,7 +176,7 @@ public function testCreateContentTypeGroupStructValues(array $data) * * @depends testCreateContentTypeGroupStructValues */ - public function testCreateContentTypeGroupStructLanguageDependentValues(array $data) + public function testCreateContentTypeGroupStructLanguageDependentValues(array $data): void { $createStruct = $data['createStruct']; $group = $data['group']; @@ -196,7 +197,7 @@ public function testCreateContentTypeGroupStructLanguageDependentValues(array $d * * @depends testCreateContentTypeGroup */ - public function testCreateContentTypeGroupThrowsInvalidArgumentException() + public function testCreateContentTypeGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeGroupCreateStruct\' is invalid: A group with the identifier \'Content\' already exists'); @@ -268,7 +269,7 @@ public function testLoadSystemContentTypeGroup(): void * * @depends testLoadContentTypeGroup */ - public function testLoadContentTypeGroupStructValues(ContentTypeGroup $group) + public function testLoadContentTypeGroupStructValues(ContentTypeGroup $group): void { $this->assertPropertiesCorrect( [ @@ -288,7 +289,7 @@ public function testLoadContentTypeGroupStructValues(ContentTypeGroup $group) * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::loadContentTypeGroup() */ - public function testLoadContentTypeGroupThrowsNotFoundException() + public function testLoadContentTypeGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -333,7 +334,7 @@ public function testLoadContentTypeGroupByIdentifier() * * @depends testLoadContentTypeGroupByIdentifier */ - public function testLoadContentTypeGroupByIdentifierStructValues(ContentTypeGroup $group) + public function testLoadContentTypeGroupByIdentifierStructValues(ContentTypeGroup $group): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -351,7 +352,7 @@ public function testLoadContentTypeGroupByIdentifierStructValues(ContentTypeGrou * * @depends testLoadContentTypeGroupByIdentifier */ - public function testLoadContentTypeGroupByIdentifierThrowsNotFoundException() + public function testLoadContentTypeGroupByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -413,7 +414,7 @@ public function testLoadContentTypeGroups() * * @depends testLoadContentTypeGroups */ - public function testLoadContentTypeGroupsIdentifiers($groups) + public function testLoadContentTypeGroupsIdentifiers($groups): void { self::assertCount(4, $groups); @@ -444,7 +445,7 @@ public function testLoadContentTypeGroupsIdentifiers($groups) * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::newContentTypeGroupUpdateStruct() */ - public function testNewContentTypeGroupUpdateStruct() + public function testNewContentTypeGroupUpdateStruct(): void { $repository = $this->getRepository(); @@ -467,7 +468,7 @@ public function testNewContentTypeGroupUpdateStruct() * * @depends testCreateContentTypeGroup */ - public function testUpdateContentTypeGroup() + public function testUpdateContentTypeGroup(): array { $repository = $this->getRepository(); @@ -520,7 +521,7 @@ public function testUpdateContentTypeGroup() * * @depends testUpdateContentTypeGroup */ - public function testUpdateContentTypeGroupStructValues(array $data) + public function testUpdateContentTypeGroupStructValues(array $data): array { $expectedValues = [ 'identifier' => $data['updateStruct']->identifier, @@ -543,7 +544,7 @@ public function testUpdateContentTypeGroupStructValues(array $data) * * @depends testUpdateContentTypeGroupStructValues */ - public function testUpdateContentTypeGroupStructLanguageDependentValues(array $data) + public function testUpdateContentTypeGroupStructLanguageDependentValues(array $data): void { $expectedValues = [ 'identifier' => $data['updateStruct']->identifier, @@ -568,7 +569,7 @@ public function testUpdateContentTypeGroupStructLanguageDependentValues(array $d * * @depends testUpdateContentTypeGroup */ - public function testUpdateContentTypeGroupThrowsInvalidArgumentException() + public function testUpdateContentTypeGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeGroupUpdateStruct->identifier\' is invalid: given identifier already exists'); @@ -597,7 +598,7 @@ public function testUpdateContentTypeGroupThrowsInvalidArgumentException() * * @depends testLoadContentTypeGroup */ - public function testDeleteContentTypeGroup() + public function testDeleteContentTypeGroup(): void { $this->expectException(NotFoundException::class); @@ -687,7 +688,7 @@ public function testNewContentTypeCreateStruct() * * @depends testNewContentTypeCreateStruct */ - public function testNewContentTypeCreateStructValues($createStruct) + public function testNewContentTypeCreateStructValues(ValueObject $createStruct): void { $this->assertPropertiesCorrect( [ @@ -742,7 +743,7 @@ public function testNewFieldDefinitionCreateStruct() * * @depends testNewFieldDefinitionCreateStruct */ - public function testNewFieldDefinitionCreateStructValues($createStruct) + public function testNewFieldDefinitionCreateStructValues(ValueObject $createStruct): void { $this->assertPropertiesCorrect( [ @@ -771,7 +772,7 @@ public function testNewFieldDefinitionCreateStructValues($createStruct) * * @depends testDeleteContentTypeGroup */ - public function testDeleteContentTypeGroupThrowsInvalidArgumentException() + public function testDeleteContentTypeGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -799,7 +800,7 @@ public function testDeleteContentTypeGroupThrowsInvalidArgumentException() * @group user * @group field-type */ - public function testCreateContentType() + public function testCreateContentType(): array { $repository = $this->getRepository(); @@ -907,7 +908,7 @@ public function testCreateContentType() * * @param array $data */ - public function testCreateContentTypeStructValues(array $data) + public function testCreateContentTypeStructValues(array $data): void { $typeCreate = $data['typeCreate']; $contentType = $data['contentType']; @@ -1009,7 +1010,7 @@ protected function assertFieldDefinitionsEqual( * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup[] $expectedGroups * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup[] $actualGroups */ - protected function assertContentTypeGroupsCorrect($expectedGroups, $actualGroups) + protected function assertContentTypeGroupsCorrect($expectedGroups, array $actualGroups) { $sorter = static function ($a, $b): int { return strcmp($a->id, $b->id); @@ -1041,7 +1042,7 @@ protected function assertContentTypeGroupsCorrect($expectedGroups, $actualGroups * * @depends testCreateContentType */ - public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIdentifier() + public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIdentifier(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeCreateStruct\' is invalid: Another content type with identifier \'folder\' exists'); @@ -1076,7 +1077,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIden * * @depends testCreateContentType */ - public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateRemoteId() + public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateRemoteId(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Another content type with remoteId \'a3d405b81be900468eb153d774f4f0d2\' exists'); @@ -1111,7 +1112,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateRemo * * @depends testCreateContentType */ - public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateFieldIdentifier() + public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateFieldIdentifier(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeCreateStruct\' is invalid: The argument contains duplicate Field definition identifier \'title\''); @@ -1149,7 +1150,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateFiel * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentType */ - public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateContentTypeIdentifier() + public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateContentTypeIdentifier(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Another content type with identifier \'blog-post\' exists'); @@ -1188,7 +1189,7 @@ public function testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateCont * * @depends testCreateContentType */ - public function testCreateContentTypeThrowsContentTypeFieldDefinitionValidationException() + public function testCreateContentTypeThrowsContentTypeFieldDefinitionValidationException(): void { $repository = $this->getRepository(); @@ -1247,7 +1248,7 @@ public function testCreateContentTypeThrowsContentTypeFieldDefinitionValidationE * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentTypeGroup */ - public function testCreateContentTypeThrowsInvalidArgumentExceptionGroupsEmpty() + public function testCreateContentTypeThrowsInvalidArgumentExceptionGroupsEmpty(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeGroups\' is invalid: The argument must contain at least one content type group'); @@ -1296,7 +1297,7 @@ public function testNewContentTypeUpdateStruct() * * @depends testNewContentTypeUpdateStruct */ - public function testNewContentTypeUpdateStructValues($typeUpdate) + public function testNewContentTypeUpdateStructValues($typeUpdate): void { foreach ($typeUpdate as $propertyName => $propertyValue) { self::assertNull( @@ -1313,7 +1314,7 @@ public function testNewContentTypeUpdateStructValues($typeUpdate) * * @depends testCreateContentType */ - public function testLoadContentTypeDraft() + public function testLoadContentTypeDraft(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1339,7 +1340,7 @@ public function testLoadContentTypeDraft() * * @depends testLoadContentTypeDraft */ - public function testLoadContentTypeDraftThrowsNotFoundException() + public function testLoadContentTypeDraftThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -1359,7 +1360,7 @@ public function testLoadContentTypeDraftThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::loadContentTypeDraft() */ - public function testLoadContentTypeDraftThrowsNotFoundExceptionIfDiffrentOwner() + public function testLoadContentTypeDraftThrowsNotFoundExceptionIfDiffrentOwner(): void { $this->expectException(NotFoundException::class); @@ -1380,7 +1381,7 @@ public function testLoadContentTypeDraftThrowsNotFoundExceptionIfDiffrentOwner() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::loadContentTypeDraft() */ - public function testCanLoadContentTypeDraftEvenIfDiffrentOwner() + public function testCanLoadContentTypeDraftEvenIfDiffrentOwner(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -1402,7 +1403,7 @@ public function testCanLoadContentTypeDraftEvenIfDiffrentOwner() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateContentTypeDraft() */ - public function testUpdateContentTypeDraft() + public function testUpdateContentTypeDraft(): array { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1456,7 +1457,7 @@ public function testUpdateContentTypeDraft() * * @depends testUpdateContentTypeDraft */ - public function testUpdateContentTypeDraftStructValues($data) + public function testUpdateContentTypeDraftStructValues(array $data): void { $originalType = $data['originalType']; $updateStruct = $data['updateStruct']; @@ -1501,7 +1502,7 @@ public function testUpdateContentTypeDraftStructValues($data) * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testUpdateContentTypeDraftWithNewTranslation() + public function testUpdateContentTypeDraftWithNewTranslation(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1541,7 +1542,7 @@ public function testUpdateContentTypeDraftWithNewTranslation() * * @depends testUpdateContentTypeDraft */ - public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier() + public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier(): void { $this->expectException(InvalidArgumentException::class); @@ -1566,7 +1567,7 @@ public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicat * * @depends testUpdateContentTypeDraft */ - public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateRemoteId() + public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateRemoteId(): void { $this->expectException(InvalidArgumentException::class); @@ -1591,7 +1592,7 @@ public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicat * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateContentTypeDraft */ - public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftForAuthenticatedUser() + public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftForAuthenticatedUser(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: There is no content type draft assigned to the authenticated user'); @@ -1630,7 +1631,7 @@ public function testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftF * * @depends testCreateContentType */ - public function testAddFieldDefinition() + public function testAddFieldDefinition(): array { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1685,7 +1686,7 @@ public function testAddFieldDefinition() * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionStructValues(array $data) + public function testAddFieldDefinitionStructValues(array $data): void { $loadedType = $data['loadedType']; $fieldDefCreate = $data['fieldDefCreate']; @@ -1713,7 +1714,7 @@ public function testAddFieldDefinitionStructValues(array $data) * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionThrowsInvalidArgumentExceptionDuplicateFieldIdentifier() + public function testAddFieldDefinitionThrowsInvalidArgumentExceptionDuplicateFieldIdentifier(): void { $this->expectException(InvalidArgumentException::class); @@ -1740,7 +1741,7 @@ public function testAddFieldDefinitionThrowsInvalidArgumentExceptionDuplicateFie * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionThrowsContentTypeFieldDefinitionValidationException() + public function testAddFieldDefinitionThrowsContentTypeFieldDefinitionValidationException(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1800,7 +1801,7 @@ public function testAddFieldDefinitionThrowsContentTypeFieldDefinitionValidation * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField() + public function testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField(): void { $this->expectException(BadStateException::class); $this->expectExceptionMessage('The content type already contains a Field definition of the singular Field Type \'ezuser\''); @@ -1841,7 +1842,7 @@ public function testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField( * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::createContentType() */ - public function testCreateContentThrowsContentTypeValidationException() + public function testCreateContentThrowsContentTypeValidationException(): void { $this->expectException(ContentTypeValidationException::class); $this->expectExceptionMessage('Field Type \'ezuser\' is singular and cannot be used more than once in a content type'); @@ -1896,7 +1897,7 @@ public function testCreateContentThrowsContentTypeValidationException() * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionThrowsBadStateExceptionContentInstances() + public function testAddFieldDefinitionThrowsBadStateExceptionContentInstances(): void { $this->expectException(BadStateException::class); $this->expectExceptionMessage('A Field definition of the \'ezuser\' Field Type cannot be added because the content type already has Content items'); @@ -1938,7 +1939,7 @@ public function testAddFieldDefinitionThrowsBadStateExceptionContentInstances() * * @depends testCreateContentType */ - public function testRemoveFieldDefinition() + public function testRemoveFieldDefinition(): array { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -1973,7 +1974,7 @@ public function testRemoveFieldDefinition() * * @depends testRemoveFieldDefinition */ - public function testRemoveFieldDefinitionRemoved(array $data) + public function testRemoveFieldDefinitionRemoved(array $data): void { $removedFieldDefinition = $data['removedFieldDefinition']; $loadedType = $data['loadedType']; @@ -1997,7 +1998,7 @@ public function testRemoveFieldDefinitionRemoved(array $data) * * @depends testRemoveFieldDefinition */ - public function testRemoveFieldDefinitionThrowsInvalidArgumentException() + public function testRemoveFieldDefinitionThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2024,7 +2025,7 @@ public function testRemoveFieldDefinitionThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::removeFieldDefinition */ - public function testRemoveFieldDefinitionThrowsInvalidArgumentExceptionOnWrongDraft() + public function testRemoveFieldDefinitionThrowsInvalidArgumentExceptionOnWrongDraft(): void { $this->expectException(InvalidArgumentException::class); @@ -2047,7 +2048,7 @@ public function testRemoveFieldDefinitionThrowsInvalidArgumentExceptionOnWrongDr * * @depends testRemoveFieldDefinition */ - public function testRemoveFieldDefinitionRemovesFieldFromContent() + public function testRemoveFieldDefinitionRemovesFieldFromContent(): array { $repository = $this->getRepository(); @@ -2118,7 +2119,7 @@ public function testRemoveFieldDefinitionRemovesFieldFromContent() * * @depends testRemoveFieldDefinitionRemovesFieldFromContent */ - public function testRemoveFieldDefinitionRemovesFieldFromContentRemoved($data) + public function testRemoveFieldDefinitionRemovesFieldFromContentRemoved($data): void { list( $contentVersion1Archived, @@ -2147,7 +2148,7 @@ public function testRemoveFieldDefinitionRemovesFieldFromContentRemoved($data) * * @depends testAddFieldDefinition */ - public function testAddFieldDefinitionAddsFieldToContent() + public function testAddFieldDefinitionAddsFieldToContent(): array { $repository = $this->getRepository(); @@ -2239,7 +2240,7 @@ public function testAddFieldDefinitionAddsFieldToContent() * * @depends testAddFieldDefinitionAddsFieldToContent */ - public function testAddFieldDefinitionAddsFieldToContentAdded(array $data) + public function testAddFieldDefinitionAddsFieldToContentAdded(array $data): void { list( $contentVersion1Archived, @@ -2302,7 +2303,7 @@ public function testNewFieldDefinitionUpdateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct $fieldDefinitionUpdateStruct */ - public function testNewFieldDefinitionUpdateStructValues($fieldDefinitionUpdateStruct) + public function testNewFieldDefinitionUpdateStructValues($fieldDefinitionUpdateStruct): void { foreach ($fieldDefinitionUpdateStruct as $propertyName => $propertyValue) { self::assertNull( @@ -2321,7 +2322,7 @@ public function testNewFieldDefinitionUpdateStructValues($fieldDefinitionUpdateS * * @depends testLoadContentTypeDraft */ - public function testUpdateFieldDefinition() + public function testUpdateFieldDefinition(): array { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2375,7 +2376,7 @@ public function testUpdateFieldDefinition() /** * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateFieldDefinition */ - public function testUpdateFieldDefinitionWithNewTranslation() + public function testUpdateFieldDefinitionWithNewTranslation(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2445,7 +2446,7 @@ public function testUpdateFieldDefinitionWithNewTranslation() * * @depends testUpdateFieldDefinition */ - public function testUpdateFieldDefinitionStructValues(array $data) + public function testUpdateFieldDefinitionStructValues(array $data): void { $originalField = $data['originalField']; $updatedField = $data['updatedField']; @@ -2477,7 +2478,7 @@ public function testUpdateFieldDefinitionStructValues(array $data) * @covers \Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionUpdateStruct * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateFieldDefinition */ - public function testUpdateFieldDefinitionWithEmptyStruct() + public function testUpdateFieldDefinitionWithEmptyStruct(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2505,7 +2506,7 @@ public function testUpdateFieldDefinitionWithEmptyStruct() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::updateFieldDefinition */ - public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIdentifierExists() + public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIdentifierExists(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$fieldDefinitionUpdateStruct\' is invalid: Another Field definition with identifier \'title\' exists in the content type'); @@ -2538,7 +2539,7 @@ public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIden * * @depends testLoadContentTypeDraft */ - public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionForUndefinedField() + public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionForUndefinedField(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$fieldDefinition\' is invalid: The given Field definition does not belong to the content type'); @@ -2572,7 +2573,7 @@ public function testUpdateFieldDefinitionThrowsInvalidArgumentExceptionForUndefi * * @depends testLoadContentTypeDraft */ - public function testPublishContentTypeDraft() + public function testPublishContentTypeDraft(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2602,7 +2603,7 @@ public function testPublishContentTypeDraft() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::publishContentTypeDraft */ - public function testPublishContentTypeDraftSetsNameSchema() + public function testPublishContentTypeDraftSetsNameSchema(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2638,7 +2639,7 @@ public function testPublishContentTypeDraftSetsNameSchema() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::publishContentTypeDraft */ - public function testPublishContentTypeDraftRefreshesContentTypesList() + public function testPublishContentTypeDraftRefreshesContentTypesList(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2694,7 +2695,7 @@ static function (ContentType $contentType) { * * @depends testPublishContentTypeDraft */ - public function testPublishContentTypeDraftThrowsBadStateException() + public function testPublishContentTypeDraftThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -2718,7 +2719,7 @@ public function testPublishContentTypeDraftThrowsBadStateException() * * @depends testPublishContentTypeDraft */ - public function testPublishContentTypeDraftThrowsInvalidArgumentExceptionWithoutFields() + public function testPublishContentTypeDraftThrowsInvalidArgumentExceptionWithoutFields(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentTypeDraft\' is invalid: The content type draft should have at least one Field definition'); @@ -2783,7 +2784,7 @@ public function testLoadContentType() * * @param string[] $languageCodes */ - public function testLoadContentTypeWithPrioritizedLanguagesList(array $languageCodes) + public function testLoadContentTypeWithPrioritizedLanguagesList(array $languageCodes): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2818,7 +2819,7 @@ public function testLoadContentTypeWithPrioritizedLanguagesList(array $languageC /** * @return array */ - public function getPrioritizedLanguageList() + public function getPrioritizedLanguageList(): array { return [ [[]], @@ -2836,7 +2837,7 @@ public function getPrioritizedLanguageList() * * @depends testLoadContentType */ - public function testLoadContentTypeStructValues($userGroupType) + public function testLoadContentTypeStructValues(ValueObject $userGroupType) { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -2878,7 +2879,7 @@ public function testLoadContentTypeStructValues($userGroupType) * * @depends testLoadContentTypeStructValues */ - public function testLoadContentTypeFieldDefinitions(APIFieldDefinitionCollection $fieldDefinitions) + public function testLoadContentTypeFieldDefinitions(APIFieldDefinitionCollection $fieldDefinitions): void { $expectedFieldDefinitions = [ 'name' => [ @@ -2974,7 +2975,7 @@ static function ($fieldDefinition) { * * @depends testLoadContentType */ - public function testLoadContentTypeThrowsNotFoundException() + public function testLoadContentTypeThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -3027,7 +3028,7 @@ public function testLoadContentTypeByIdentifier() * * @depends testLoadContentTypeByIdentifier */ - public function testLoadContentTypeByIdentifierReturnsCorrectInstance($contentType) + public function testLoadContentTypeByIdentifierReturnsCorrectInstance($contentType): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -3045,7 +3046,7 @@ public function testLoadContentTypeByIdentifierReturnsCorrectInstance($contentTy * * @depends testLoadContentTypeByIdentifier */ - public function testLoadContentTypeByIdentifierThrowsNotFoundException() + public function testLoadContentTypeByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -3094,7 +3095,7 @@ public function testLoadContentTypeByRemoteId() * * @depends testLoadContentTypeByRemoteId */ - public function testLoadContentTypeByRemoteIdReturnsCorrectInstance($contentType) + public function testLoadContentTypeByRemoteIdReturnsCorrectInstance($contentType): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -3112,7 +3113,7 @@ public function testLoadContentTypeByRemoteIdReturnsCorrectInstance($contentType * * @depends testLoadContentType */ - public function testLoadContentTypeByRemoteIdThrowsNotFoundException() + public function testLoadContentTypeByRemoteIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -3133,7 +3134,7 @@ public function testLoadContentTypeByRemoteIdThrowsNotFoundException() * * @depends testLoadContentType */ - public function testLoadContentTypeList() + public function testLoadContentTypeList(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -3185,7 +3186,7 @@ public function testLoadContentTypes() * * @depends testLoadContentTypes */ - public function testLoadContentTypesContent(array $types) + public function testLoadContentTypesContent(array $types): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -3216,7 +3217,7 @@ static function ($a, $b): int { * * @depends testLoadContentType */ - public function testCreateContentTypeDraft() + public function testCreateContentTypeDraft(): array { $repository = $this->getRepository(); @@ -3246,7 +3247,7 @@ public function testCreateContentTypeDraft() * * @depends testCreateContentTypeDraft */ - public function testCreateContentTypeDraftStructValues(array $data) + public function testCreateContentTypeDraftStructValues(array $data): array { $originalType = $data['originalType']; $typeDraft = $data['typeDraft']; @@ -3299,7 +3300,7 @@ public function testCreateContentTypeDraftStructValues(array $data) * * @depends testCreateContentTypeDraftStructValues */ - public function testCreateContentTypeDraftStructLanguageDependentValues(array $data) + public function testCreateContentTypeDraftStructLanguageDependentValues(array $data): void { $originalType = $data['originalType']; $typeDraft = $data['typeDraft']; @@ -3323,7 +3324,7 @@ public function testCreateContentTypeDraftStructLanguageDependentValues(array $d * * @depends testCreateContentTypeDraft */ - public function testCreateContentTypeDraftThrowsBadStateException() + public function testCreateContentTypeDraftThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -3348,7 +3349,7 @@ public function testCreateContentTypeDraftThrowsBadStateException() * * @depends testLoadContentTypeByIdentifier */ - public function testDeleteContentType() + public function testDeleteContentType(): void { $this->expectException(NotFoundException::class); @@ -3373,7 +3374,7 @@ public function testDeleteContentType() * * @depends testDeleteContentType */ - public function testDeleteContentTypeThrowsBadStateException() + public function testDeleteContentTypeThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -3399,7 +3400,7 @@ public function testDeleteContentTypeThrowsBadStateException() * * @depends testLoadContentTypeByIdentifier */ - public function testCopyContentType() + public function testCopyContentType(): array { $repository = $this->getRepository(); @@ -3446,7 +3447,7 @@ public function testCopyContentType() * * @depends testCopyContentType */ - public function testCopyContentTypeStructValues(array $data) + public function testCopyContentTypeStructValues(array $data): void { $originalType = $data['originalType']; $copiedType = $data['copiedType']; @@ -3459,7 +3460,7 @@ public function testCopyContentTypeStructValues(array $data) * @param \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType $copiedType * @param array $excludedProperties */ - private function assertCopyContentTypeValues($originalType, $copiedType, $excludedProperties = []) + private function assertCopyContentTypeValues(ValueObject $originalType, ValueObject $copiedType, array $excludedProperties = []): void { $allProperties = [ 'names', @@ -3537,7 +3538,7 @@ private function assertCopyContentTypeValues($originalType, $copiedType, $exclud * * @depends testCopyContentType */ - public function testCopyContentTypeWithSecondParameter() + public function testCopyContentTypeWithSecondParameter(): void { $repository = $this->getRepository(); @@ -3571,7 +3572,7 @@ public function testCopyContentTypeWithSecondParameter() * @depends testLoadContentTypeByIdentifier * @depends testLoadContentType */ - public function testAssignContentTypeGroup() + public function testAssignContentTypeGroup(): void { $repository = $this->getRepository(); @@ -3606,7 +3607,7 @@ public function testAssignContentTypeGroup() * * @depends testAssignContentTypeGroup */ - public function testAssignContentTypeGroupThrowsInvalidArgumentException() + public function testAssignContentTypeGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -3632,7 +3633,7 @@ public function testAssignContentTypeGroupThrowsInvalidArgumentException() * * @depends testAssignContentTypeGroup */ - public function testUnassignContentTypeGroup() + public function testUnassignContentTypeGroup(): void { $repository = $this->getRepository(); @@ -3671,7 +3672,7 @@ public function testUnassignContentTypeGroup() * * @depends testUnassignContentTypeGroup */ - public function testUnassignContentTypeGroupThrowsInvalidArgumentException() + public function testUnassignContentTypeGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -3695,7 +3696,7 @@ public function testUnassignContentTypeGroupThrowsInvalidArgumentException() * * @depends testUnassignContentTypeGroup */ - public function testUnassignContentTypeGroupThrowsBadStateException() + public function testUnassignContentTypeGroupThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -3722,7 +3723,7 @@ public function testUnassignContentTypeGroupThrowsBadStateException() * @depends testLoadContentTypeGroup * @depends testCreateContentTypeGroup */ - public function testCreateContentTypeGroupInTransactionWithRollback() + public function testCreateContentTypeGroupInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -3769,7 +3770,7 @@ public function testCreateContentTypeGroupInTransactionWithRollback() * @depends testLoadContentTypeGroup * @depends testCreateContentTypeGroup */ - public function testCreateContentTypeGroupInTransactionWithCommit() + public function testCreateContentTypeGroupInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -3812,7 +3813,7 @@ public function testCreateContentTypeGroupInTransactionWithCommit() * @depends testUpdateContentTypeGroup * @depends testLoadContentTypeGroupByIdentifier */ - public function testUpdateContentTypeGroupInTransactionWithRollback() + public function testUpdateContentTypeGroupInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -3856,7 +3857,7 @@ public function testUpdateContentTypeGroupInTransactionWithRollback() * @depends testUpdateContentTypeGroup * @depends testLoadContentTypeGroupByIdentifier */ - public function testUpdateContentTypeGroupInTransactionWithCommit() + public function testUpdateContentTypeGroupInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -3902,7 +3903,7 @@ public function testUpdateContentTypeGroupInTransactionWithCommit() * @depends testDeleteContentTypeGroup * @depends testLoadContentTypeGroupByIdentifierThrowsNotFoundException */ - public function testDeleteContentTypeGroupWithRollback() + public function testDeleteContentTypeGroupWithRollback(): void { $repository = $this->getRepository(); @@ -3951,7 +3952,7 @@ public function testDeleteContentTypeGroupWithRollback() * @depends testDeleteContentTypeGroup * @depends testLoadContentTypeGroupByIdentifierThrowsNotFoundException */ - public function testDeleteContentTypeGroupWithCommit() + public function testDeleteContentTypeGroupWithCommit(): void { $repository = $this->getRepository(); @@ -4000,7 +4001,7 @@ public function testDeleteContentTypeGroupWithCommit() * @depends testCreateContentType * @depends testLoadContentTypeByIdentifierThrowsNotFoundException */ - public function testCreateContentTypeInTransactionWithRollback() + public function testCreateContentTypeInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4061,7 +4062,7 @@ public function testCreateContentTypeInTransactionWithRollback() * @depends testCreateContentType * @depends testLoadContentTypeByIdentifierThrowsNotFoundException */ - public function testCreateContentTypeInTransactionWithCommit() + public function testCreateContentTypeInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4119,7 +4120,7 @@ public function testCreateContentTypeInTransactionWithCommit() * @depends testLoadContentTypeByIdentifier * @depends testLoadContentTypeThrowsNotFoundException */ - public function testCopyContentTypeInTransactionWithRollback() + public function testCopyContentTypeInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4164,7 +4165,7 @@ public function testCopyContentTypeInTransactionWithRollback() * @depends testLoadContentTypeByIdentifier * @depends testLoadContentTypeThrowsNotFoundException */ - public function testCopyContentTypeInTransactionWithCommit() + public function testCopyContentTypeInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4204,7 +4205,7 @@ public function testCopyContentTypeInTransactionWithCommit() * @depends testCopyContentType * @depends testLoadContentTypeByIdentifierThrowsNotFoundException */ - public function testDeleteContentTypeInTransactionWithRollback() + public function testDeleteContentTypeInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4244,7 +4245,7 @@ public function testDeleteContentTypeInTransactionWithRollback() * @depends testCopyContentType * @depends testLoadContentTypeByIdentifierThrowsNotFoundException */ - public function testDeleteContentTypeInTransactionWithCommit() + public function testDeleteContentTypeInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4287,7 +4288,7 @@ public function testDeleteContentTypeInTransactionWithCommit() * * @depends testAssignContentTypeGroup */ - public function testAssignContentTypeGroupInTransactionWithRollback() + public function testAssignContentTypeGroupInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -4334,7 +4335,7 @@ public function testAssignContentTypeGroupInTransactionWithRollback() * * @depends testAssignContentTypeGroup */ - public function testAssignContentTypeGroupInTransactionWithCommit() + public function testAssignContentTypeGroupInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -4379,7 +4380,7 @@ public function testAssignContentTypeGroupInTransactionWithCommit() * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::isContentTypeUsed() */ - public function testIsContentTypeUsed() + public function testIsContentTypeUsed(): void { $repository = $this->getRepository(); @@ -4405,7 +4406,7 @@ public function testIsContentTypeUsed() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRemoveContentTypeTranslation() + public function testRemoveContentTypeTranslation(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -4447,7 +4448,7 @@ public function testRemoveContentTypeTranslation() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRemoveContentTypeTranslationWithMultilingualData() + public function testRemoveContentTypeTranslationWithMultilingualData(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -4509,7 +4510,7 @@ public function testRemoveContentTypeTranslationWithMultilingualData() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testUpdateContentTypeDraftWithNewTranslationWithMultilingualData() + public function testUpdateContentTypeDraftWithNewTranslationWithMultilingualData(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -4638,7 +4639,7 @@ public function testUpdateContentTypeDraftWithNewTranslationWithMultilingualData * * @covers \Ibexa\Contracts\Core\Repository\ContentTypeService::deleteUserDrafts() */ - public function testDeleteUserDrafts() + public function testDeleteUserDrafts(): void { $this->expectException(NotFoundException::class); diff --git a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php index a1a200a2f8..14dd68e1c2 100644 --- a/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\FieldType\Author\Author; use Ibexa\Core\FieldType\Author\AuthorCollection; use Ibexa\Core\FieldType\Author\Type; +use Ibexa\Core\FieldType\Author\Value; use Ibexa\Core\FieldType\Author\Value as AuthorValue; /** @@ -37,7 +38,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'defaultAuthor' => [ @@ -52,7 +53,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'defaultAuthor' => Type::DEFAULT_VALUE_EMPTY, @@ -64,7 +65,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -76,7 +77,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -86,7 +87,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -96,7 +97,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -108,7 +109,7 @@ public function getInvalidValidatorConfiguration() * * @return \Ibexa\Core\FieldType\Author\Value */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new AuthorValue( [ @@ -141,7 +142,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( AuthorValue::class, @@ -188,7 +189,7 @@ public function assertFieldDataLoadedCorrect(Field $field) * * @return array[] */ - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ ['Sindelfingen', InvalidArgumentException::class], @@ -200,7 +201,7 @@ public function provideInvalidCreationFieldData() * * @return \Ibexa\Core\FieldType\Author\Value */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new AuthorValue( [ @@ -222,7 +223,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( AuthorValue::class, @@ -261,7 +262,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( AuthorValue::class, @@ -307,7 +308,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -340,7 +341,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -366,7 +367,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new AuthorValue()], @@ -374,7 +375,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -396,7 +397,7 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): array { return [ new Author( @@ -409,7 +410,7 @@ protected function getValidSearchValueOne() ]; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): array { return [ new Author( @@ -432,7 +433,7 @@ protected function getSearchTargetValueTwo(): string return 'Greta'; } - protected function getAdditionallyIndexedFieldData() + protected function getAdditionallyIndexedFieldData(): array { return [ [ @@ -453,7 +454,7 @@ protected function getAdditionallyIndexedFieldData() ]; } - protected function getValidMultivaluedSearchValuesOne() + protected function getValidMultivaluedSearchValuesOne(): array { return [ new Author( @@ -473,7 +474,7 @@ protected function getValidMultivaluedSearchValuesOne() ]; } - protected function getValidMultivaluedSearchValuesTwo() + protected function getValidMultivaluedSearchValuesTwo(): array { return [ new Author( @@ -500,17 +501,17 @@ protected function getValidMultivaluedSearchValuesTwo() ]; } - protected function getMultivaluedSearchTargetValuesOne() + protected function getMultivaluedSearchTargetValuesOne(): array { return ['Antoinette', 'Ferdinand']; } - protected function getMultivaluedSearchTargetValuesTwo() + protected function getMultivaluedSearchTargetValuesTwo(): array { return ['Greta', 'Leopold', 'Maximilian']; } - protected function getAdditionallyIndexedMultivaluedFieldData() + protected function getAdditionallyIndexedMultivaluedFieldData(): array { return [ [ @@ -526,7 +527,7 @@ protected function getAdditionallyIndexedMultivaluedFieldData() ]; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['Ferdinand', 'Greta'], diff --git a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php index db760b6274..fff0883967 100644 --- a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php @@ -259,7 +259,7 @@ abstract public function provideFromHashData(); * @param \Ibexa\Contracts\Core\Repository $repository * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function postCreationHook(Repository\Repository $repository, Repository\Values\Content\Content $content) + public function postCreationHook(Repository\Repository $repository, Content $content): void { // Do nothing by default } @@ -387,7 +387,7 @@ protected function getOverride($key, array $overrideValues, $default) * * @dataProvider providerForTestIsEmptyValue */ - public function testIsEmptyValue($value) + public function testIsEmptyValue($value): void { self::assertTrue($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); } @@ -399,7 +399,7 @@ abstract public function providerForTestIsEmptyValue(); * * @dataProvider providerForTestIsNotEmptyValue */ - public function testIsNotEmptyValue($value) + public function testIsNotEmptyValue($value): void { self::assertFalse($this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName())->isEmptyValue($value)); } @@ -409,7 +409,7 @@ abstract public function providerForTestIsNotEmptyValue(); /** * @depends testCreateContentType */ - public function testContentTypeField($contentType) + public function testContentTypeField($contentType): void { self::assertSame( $this->getTypeName(), @@ -443,7 +443,7 @@ public function testLoadContentTypeFieldType($contentType) return $contentType->fieldDefinitions[1]; } - public function testSettingsSchema() + public function testSettingsSchema(): void { $repository = $this->getRepository(); $fieldTypeService = $repository->getFieldTypeService(); @@ -458,7 +458,7 @@ public function testSettingsSchema() /** * @depends testLoadContentTypeFieldType */ - public function testLoadContentTypeFieldData(FieldDefinition $fieldDefinition) + public function testLoadContentTypeFieldData(FieldDefinition $fieldDefinition): void { self::assertEquals( $this->getTypeName(), @@ -480,7 +480,7 @@ public function testLoadContentTypeFieldData(FieldDefinition $fieldDefinition) /** * @depends testCreateContentType */ - public function testCreateContentTypeFailsWithInvalidFieldSettings() + public function testCreateContentTypeFailsWithInvalidFieldSettings(): void { $this->expectException(ContentTypeFieldDefinitionValidationException::class); @@ -490,7 +490,7 @@ public function testCreateContentTypeFailsWithInvalidFieldSettings() ); } - public function testValidatorSchema() + public function testValidatorSchema(): void { $repository = $this->getRepository(); $fieldTypeService = $repository->getFieldTypeService(); @@ -505,7 +505,7 @@ public function testValidatorSchema() /** * @depends testCreateContentType */ - public function testCreateContentTypeFailsWithInvalidValidatorConfiguration() + public function testCreateContentTypeFailsWithInvalidValidatorConfiguration(): void { $this->expectException(ContentTypeFieldDefinitionValidationException::class); @@ -645,7 +645,7 @@ public function testPublishedFieldType($content) /** * @depends testPublishContent */ - public function testPublishedName(Content $content) + public function testPublishedName(Content $content): void { self::assertEquals( $content->getFieldValue('name') . ' ' . $this->getFieldName(), @@ -685,7 +685,7 @@ public function testLoadFieldType() /** * @depends testLoadFieldType */ - public function testLoadExternalData() + public function testLoadExternalData(): void { $this->assertFieldDataLoadedCorrect($this->testLoadFieldType()); } @@ -705,7 +705,7 @@ public function testCreateContentWithEmptyFieldValue() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $contentDraft */ - public function testPublishContentWithEmptyFieldValue(Content $contentDraft) + public function testPublishContentWithEmptyFieldValue(Content $contentDraft): void { $this->getRepository(false)->getContentService()->publishVersion( $contentDraft->versionInfo @@ -758,7 +758,7 @@ public function testLoadEmptyFieldValueType($content) /** * @depends testLoadEmptyFieldValueType */ - public function testLoadEmptyFieldValueData($field) + public function testLoadEmptyFieldValueData($field): void { /** @var \Ibexa\Core\FieldType\FieldType $fieldType */ $fieldType = $this->getRepository()->getFieldTypeService()->getFieldType($this->getTypeName()); @@ -828,7 +828,7 @@ public function testUpdateTypeFieldStillAvailable($content) /** * @depends testUpdateTypeFieldStillAvailable */ - public function testUpdatedDataCorrect(Field $field) + public function testUpdatedDataCorrect(Field $field): void { $this->assertUpdatedFieldDataLoadedCorrect($field); } @@ -858,7 +858,7 @@ public function testUpdateNoNewContentTypeFieldStillAvailable($content) /** * @depends testUpdateNoNewContentTypeFieldStillAvailable */ - public function testUpdatedNoNewContentDataCorrect(Field $field) + public function testUpdatedNoNewContentDataCorrect(Field $field): void { $this->assertFieldDataLoadedCorrect($field); } @@ -904,7 +904,7 @@ public function testCopiedFieldType($content) /** * @depends testCopiedFieldType */ - public function testCopiedExternalData(Field $field) + public function testCopiedExternalData(Field $field): void { $this->assertCopiedFieldDataLoadedCorrectly($field); } @@ -912,7 +912,7 @@ public function testCopiedExternalData(Field $field) /** * @depends testCopyField */ - public function testDeleteContent($content) + public function testDeleteContent($content): void { $this->expectException(NotFoundException::class); @@ -947,7 +947,7 @@ public function testCreateContentFails($failingValue, ?string $expectedException * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, $expectedException) + public function testUpdateContentFails($failingValue, string $expectedException): void { $this->expectException($expectedException); $this->updateContent($failingValue); @@ -973,7 +973,7 @@ protected function removeFieldDefinition() /** * Tests removal of field definition from the ContentType of the Content. */ - public function testRemoveFieldDefinition() + public function testRemoveFieldDefinition(): void { $content = $this->removeFieldDefinition(); @@ -1010,7 +1010,7 @@ protected function addFieldDefinition() /** * Tests addition of field definition from the ContentType of the Content. */ - public function testAddFieldDefinition() + public function testAddFieldDefinition(): void { $content = $this->addFieldDefinition(); @@ -1028,7 +1028,7 @@ public function testAddFieldDefinition() /** * @dataProvider provideToHashData */ - public function testToHash($value, $expectedHash) + public function testToHash($value, $expectedHash): void { $repository = $this->getRepository(); $fieldTypeService = $repository->getFieldTypeService(); @@ -1048,7 +1048,7 @@ public function testToHash($value, $expectedHash) * @todo: Requires correct registered FieldTypeService, needs to be * maintained! */ - public function testFromHash($hash, $expectedValue) + public function testFromHash($hash, $expectedValue): void { $repository = $this->getRepository(); $fieldTypeService = $repository->getFieldTypeService(); @@ -1063,7 +1063,7 @@ public function testFromHash($hash, $expectedValue) /** * Test that exceeding default version archive limit has no effect on a published content. */ - public function testExceededVersionArchiveLimitHasNoEffectOnContent() + public function testExceededVersionArchiveLimitHasNoEffectOnContent(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1088,7 +1088,7 @@ public function testExceededVersionArchiveLimitHasNoEffectOnContent() /** * Test that deleting new draft does not affect data of published version. */ - public function testDeleteDraftOfPublishedContentDoesNotDeleteData() + public function testDeleteDraftOfPublishedContentDoesNotDeleteData(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1110,7 +1110,7 @@ public function testDeleteDraftOfPublishedContentDoesNotDeleteData() /** * Test creating new translation from existing content with empty field. */ - public function testUpdateContentWithNewTranslationOnEmptyField() + public function testUpdateContentWithNewTranslationOnEmptyField(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1152,7 +1152,7 @@ public function getValidMultilingualFieldData(array $languageCodes) * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteTranslation */ - public function testDeleteTranslation() + public function testDeleteTranslation(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); diff --git a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php index 537552f3b5..beaa83a124 100644 --- a/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php @@ -15,6 +15,7 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Checkbox\Value; use Ibexa\Core\FieldType\Checkbox\Value as CheckboxValue; /** @@ -42,7 +43,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -52,7 +53,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -62,7 +63,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -74,7 +75,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -84,7 +85,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -94,7 +95,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -106,7 +107,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new CheckboxValue(true); } @@ -129,7 +130,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( CheckboxValue::class, @@ -145,7 +146,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -160,7 +161,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new CheckboxValue(false); } @@ -172,7 +173,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( CheckboxValue::class, @@ -201,7 +202,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( CheckboxValue::class, @@ -237,7 +238,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -254,7 +255,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -264,12 +265,12 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return []; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [$this->getValidCreationFieldData()], diff --git a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php index b74fb63e7b..88c649171a 100644 --- a/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Country\Value; use Ibexa\Core\FieldType\Country\Value as CountryValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'isMultiple' => [ @@ -50,7 +51,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'isMultiple' => false, @@ -62,7 +63,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -74,7 +75,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -84,7 +85,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -94,7 +95,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -106,7 +107,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new CountryValue( [ @@ -138,7 +139,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( CountryValue::class, @@ -162,7 +163,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -198,7 +199,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new CountryValue( [ @@ -219,7 +220,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( CountryValue::class, @@ -255,7 +256,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( CountryValue::class, @@ -298,7 +299,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -330,7 +331,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -355,7 +356,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new CountryValue()], @@ -363,7 +364,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -372,12 +373,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): array { return ['Andorra']; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): array { return ['Trinidad and Tobago']; } @@ -392,7 +393,7 @@ protected function getSearchTargetValueTwo(): string return 'Trinidad and Tobago'; } - protected function getAdditionallyIndexedFieldData() + protected function getAdditionallyIndexedFieldData(): array { return [ [ @@ -423,17 +424,17 @@ protected function getAdditionallyIndexedFieldData() ]; } - protected function getValidMultivaluedSearchValuesOne() + protected function getValidMultivaluedSearchValuesOne(): array { return ['Andorra', 'Bolivia']; } - protected function getValidMultivaluedSearchValuesTwo() + protected function getValidMultivaluedSearchValuesTwo(): array { return ['Syrian Arab Republic', 'Trinidad and Tobago']; } - protected function getAdditionallyIndexedMultivaluedFieldData() + protected function getAdditionallyIndexedMultivaluedFieldData(): array { return [ [ @@ -459,7 +460,7 @@ protected function getAdditionallyIndexedMultivaluedFieldData() ]; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['Andorra', 'Tobago'], diff --git a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php index 9c2616cdad..2699ebbe09 100644 --- a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; +use Ibexa\Core\FieldType\DateAndTime\Value; use Ibexa\Core\FieldType\DateAndTime\Value as DateAndTimeValue; /** @@ -46,7 +47,7 @@ protected function supportsLikeWildcard($value): bool * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'useSeconds' => [ @@ -69,7 +70,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'useSeconds' => false, @@ -83,7 +84,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -95,7 +96,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -105,7 +106,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -115,7 +116,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -127,7 +128,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { // We may only create times from timestamps here, since storing will // loose information about the timezone. @@ -152,7 +153,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( DateAndTimeValue::class, @@ -160,7 +161,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); $expectedData = [ - 'value' => new \DateTime('@123456'), + 'value' => new DateTime('@123456'), ]; $this->assertPropertiesCorrect( $expectedData, @@ -168,7 +169,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -182,7 +183,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return DateAndTimeValue::fromTimestamp(12345678); } @@ -194,7 +195,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( DateAndTimeValue::class, @@ -202,7 +203,7 @@ public function assertUpdatedFieldDataLoadedCorrect(Field $field) ); $expectedData = [ - 'value' => new \DateTime('@12345678'), + 'value' => new DateTime('@12345678'), ]; $this->assertPropertiesCorrect( $expectedData, @@ -223,7 +224,7 @@ public function provideInvalidUpdateFieldData() * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, $expectedException) + public function testUpdateContentFails($failingValue, $expectedException): array { return [ [ @@ -240,7 +241,7 @@ public function testUpdateContentFails($failingValue, $expectedException) * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( DateAndTimeValue::class, @@ -248,7 +249,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) ); $expectedData = [ - 'value' => new \DateTime('@123456'), + 'value' => new DateTime('@123456'), ]; $this->assertPropertiesCorrect( $expectedData, @@ -276,7 +277,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -296,7 +297,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -309,14 +310,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new DateAndTimeValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ diff --git a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php index 1c6b88aca5..4ee0421fef 100644 --- a/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateIntegrationTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Core\FieldType\Date\Type; +use Ibexa\Core\FieldType\Date\Value; use Ibexa\Core\FieldType\Date\Value as DateValue; /** @@ -47,7 +48,7 @@ protected function supportsLikeWildcard($value): bool * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'defaultType' => [ @@ -62,7 +63,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'defaultType' => Type::DEFAULT_EMPTY, @@ -74,7 +75,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -86,7 +87,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -96,7 +97,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -106,7 +107,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -118,7 +119,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return DateValue::fromTimestamp(86400); } @@ -141,7 +142,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( DateValue::class, @@ -158,7 +159,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -173,7 +174,7 @@ public function provideInvalidCreationFieldData() * * @return mixed */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return DateValue::fromTimestamp(86400); } @@ -186,7 +187,7 @@ public function getValidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( DateValue::class, @@ -215,7 +216,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { $this->assertFieldDataLoadedCorrect($field); } @@ -240,7 +241,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { $timestamp = 186401; $dateTime = new DateTime("@{$timestamp}"); @@ -276,7 +277,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { $timestamp = 123456; @@ -301,14 +302,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new DateValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -327,7 +328,7 @@ protected function getValidSearchValueTwo(): int return 172800; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): int|string { // Handling Legacy Search Engine, which stores Date value as timestamp if ($this->getSetupFactory() instanceof Legacy) { @@ -337,7 +338,7 @@ protected function getSearchTargetValueOne() return '1970-01-02T00:00:00Z'; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): int|string { // Handling Legacy Search Engine, which stores Date value as timestamp if ($this->getSetupFactory() instanceof Legacy) { diff --git a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php index 58ad782a6a..71feb68785 100644 --- a/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\ContentFieldValidationException; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\EmailAddress\Value; use Ibexa\Core\FieldType\EmailAddress\Value as EmailAddressValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -45,7 +46,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -55,7 +56,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -67,7 +68,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return [ 'EmailAddressValidator' => [], @@ -79,7 +80,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'EmailAddressValidator' => [], @@ -91,7 +92,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'StringLengthValidator' => [ @@ -105,7 +106,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new EmailAddressValue('spam@ibexa.co'); } @@ -128,7 +129,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( EmailAddressValue::class, @@ -144,7 +145,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -179,7 +180,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new EmailAddressValue('spam_name@ibexa-some-thing.co'); } @@ -191,7 +192,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( EmailAddressValue::class, @@ -220,7 +221,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( EmailAddressValue::class, @@ -256,7 +257,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -273,7 +274,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -283,7 +284,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new EmailAddressValue()], @@ -292,7 +293,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -323,7 +324,7 @@ protected function getSearchTargetValueTwo(): string return strtoupper($this->getValidSearchValueTwo()); } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['holmes4@ibexa.co', 'wyoming.knott@o2.ru'], diff --git a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php index d2c0dcc2d5..82a57d7bb0 100644 --- a/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php @@ -193,7 +193,7 @@ protected function uriExistsOnIO($uri) /** * Tests that a VersionUpdate can remove the stored file. */ - public function testUpdateWithRemove() + public function testUpdateWithRemove(): void { $type = $this->createContentType( $this->getValidFieldSettings(), diff --git a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php index 97845f7893..539e2a180f 100644 --- a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Float\Value; use Ibexa\Core\FieldType\Float\Value as FloatValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -45,7 +46,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -55,7 +56,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -67,7 +68,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return [ 'FloatValueValidator' => [ @@ -88,7 +89,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'FloatValueValidator' => [ @@ -103,7 +104,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'FloatValueValidator' => [ @@ -117,7 +118,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new FloatValue(23.5); } @@ -140,7 +141,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( FloatValue::class, @@ -156,7 +157,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -177,7 +178,7 @@ public function provideInvalidCreationFieldData() /** * Get update field externals data. */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new FloatValue(42.5); } @@ -189,7 +190,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( FloatValue::class, @@ -218,7 +219,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( FloatValue::class, @@ -254,7 +255,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -271,7 +272,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -281,14 +282,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new FloatValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ diff --git a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php index 5e7d747927..15eba3d282 100644 --- a/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\ISBN\Value; use Ibexa\Core\FieldType\ISBN\Value as ISBNValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'isISBN13' => [ @@ -50,7 +51,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'isISBN13' => true, @@ -62,7 +63,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -74,7 +75,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -84,7 +85,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -94,7 +95,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -106,7 +107,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new ISBNValue('9789722514095'); } @@ -129,7 +130,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( ISBNValue::class, @@ -144,7 +145,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -171,7 +172,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new ISBNValue('978-972-25-1409-5'); } @@ -183,7 +184,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( ISBNValue::class, @@ -210,7 +211,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( ISBNValue::class, @@ -245,7 +246,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -270,7 +271,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -292,7 +293,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new ISBNValue()], @@ -301,7 +302,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -320,7 +321,7 @@ protected function getValidSearchValueTwo(): string return '9780380448340'; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['9780099067504', '9780380448340'], diff --git a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php index 6e62427e2d..67d8ce9aad 100644 --- a/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Integer\Value; use Ibexa\Core\FieldType\Integer\Value as IntegerValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -45,7 +46,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -55,7 +56,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -67,7 +68,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return [ 'IntegerValueValidator' => [ @@ -88,7 +89,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'IntegerValueValidator' => [ @@ -103,7 +104,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'IntegerValueValidator' => [ @@ -117,7 +118,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new IntegerValue(23); } @@ -140,7 +141,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( IntegerValue::class, @@ -156,7 +157,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -179,7 +180,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new IntegerValue(42); } @@ -191,7 +192,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( IntegerValue::class, @@ -220,7 +221,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( IntegerValue::class, @@ -256,7 +257,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -273,7 +274,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -283,14 +284,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new IntegerValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -311,7 +312,7 @@ protected function getValidSearchValueTwo(): int return 26; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['25', '26'], diff --git a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php index 6673e530a9..93f46e68bc 100644 --- a/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php @@ -7,11 +7,13 @@ namespace Ibexa\Tests\Integration\Core\Repository\FieldType; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Keyword\Value; use Ibexa\Core\FieldType\Keyword\Value as KeywordValue; /** @@ -37,7 +39,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -47,7 +49,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -57,7 +59,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -69,7 +71,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -79,7 +81,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -89,7 +91,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -101,15 +103,17 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new KeywordValue(['foo', 'bar', 'sindelfingen']); } /** * {@inheritdoc} + * + * @return \Ibexa\Core\FieldType\Keyword\Value[] */ - public function getValidMultilingualFieldData(array $languageCodes) + public function getValidMultilingualFieldData(array $languageCodes): array { $data = []; foreach ($languageCodes as $languageCode) { @@ -143,7 +147,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( KeywordValue::class, @@ -156,7 +160,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -175,7 +179,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new KeywordValue(['bielefeld']); } @@ -187,7 +191,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( KeywordValue::class, @@ -213,7 +217,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( KeywordValue::class, @@ -246,7 +250,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -263,7 +267,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -273,7 +277,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new KeywordValue()], @@ -282,7 +286,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -297,7 +301,7 @@ public function providerForTestIsNotEmptyValue() /** * Test updating multiple contents with ezkeyword field preserves proper fields values. */ - public function testUpdateContentKeywords() + public function testUpdateContentKeywords(): void { $contentType = $this->testCreateContentType(); $contentService = $this->getRepository()->getContentService(); @@ -333,7 +337,7 @@ public function testUpdateContentKeywords() /** * {@inheritdoc} */ - protected function createContent($fieldData, $contentType = null) + protected function createContent($fieldData, $contentType = null): Content { if ($contentType === null) { $contentType = $this->testCreateContentType(); @@ -361,7 +365,7 @@ protected function createContent($fieldData, $contentType = null) * @param int $contentId * @param \Ibexa\Core\FieldType\Keyword\Value $value */ - private function assertContentFieldHasCorrectData($contentId, KeywordValue $value) + private function assertContentFieldHasCorrectData(int $contentId, KeywordValue $value): void { $contentService = $this->getRepository()->getContentService(); $loadedContent = $contentService->loadContent($contentId, ['eng-US']); @@ -397,7 +401,7 @@ public function testGoBackToDifferentVersionWithDifferentKeywords(): void self::assertEqualsCanonicalizing($contentDraft03->getFieldValue('data'), $value01); } - public function testKeywordsAreCaseSensitive() + public function testKeywordsAreCaseSensitive(): void { $contentType = $this->testCreateContentType(); $publishedContent01 = $this->createAndPublishContent('Foo', $contentType, md5(uniqid(__METHOD__, true))); @@ -421,7 +425,7 @@ public function testKeywordsAreCaseSensitive() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createAndPublishContent($fieldData, ContentType $contentType, $remoteId) + protected function createAndPublishContent($fieldData, ContentType $contentType, $remoteId): Content { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -451,29 +455,29 @@ protected function getValidSearchValueTwo(): string return 'branch'; } - protected function getValidMultivaluedSearchValuesOne() + protected function getValidMultivaluedSearchValuesOne(): array { return ['add', 'branch']; } - protected function getValidMultivaluedSearchValuesTwo() + protected function getValidMultivaluedSearchValuesTwo(): array { return ['commit', 'delete']; } - public function checkFullTextSupport() + public function checkFullTextSupport(): void { // Does nothing } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['add', 'branch'], ]; } - public function providerForTestTruncateField() + public function providerForTestTruncateField(): array { return [ [new KeywordValue()], @@ -493,7 +497,7 @@ public function providerForTestTruncateField() * * @todo Move this method to BaseIntegrationTest when fixed for all field types. */ - public function testTruncateField($emptyValue) + public function testTruncateField($emptyValue): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -522,7 +526,7 @@ public function testTruncateField($emptyValue) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content[] */ - protected function createKeywordContent() + protected function createKeywordContent(): array { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -578,7 +582,7 @@ protected function createKeywordContent() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFindContentFieldCriterion() + public function testFindContentFieldCriterion(): void { $this->createKeywordContent(); $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php index 240e1a9c6e..9aa5e0e8e5 100644 --- a/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\MapLocation\Value; use Ibexa\Core\FieldType\MapLocation\Value as MapLocationValue; /** @@ -34,7 +35,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -44,7 +45,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -54,7 +55,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -66,7 +67,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -76,7 +77,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -86,7 +87,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -98,7 +99,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new MapLocationValue( [ @@ -127,7 +128,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertEquals( $this->getValidCreationFieldData(), @@ -135,7 +136,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -181,7 +182,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { // https://maps.google.de/maps?qll=,&spn=0.139491,0.209942&sll=51.983611,8.574829&sspn=0.36242,0.839767&oq=Punta+Cana&t=h&hnear=Punta+Cana,+La+Altagracia,+Dominikanische+Republik&z=13 return new MapLocationValue( @@ -200,7 +201,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertEquals( $this->getValidUpdateFieldData(), @@ -221,7 +222,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertEquals( $this->getValidCreationFieldData(), @@ -249,7 +250,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -276,7 +277,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -296,7 +297,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new MapLocationValue()], @@ -311,7 +312,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ diff --git a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php index ca1403263e..5cbceeed4a 100644 --- a/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Relation\Value; use Ibexa\Core\FieldType\Relation\Value as RelationValue; use Ibexa\Core\Repository\Values\Content\Relation; @@ -49,7 +50,7 @@ protected function supportsLikeWildcard($value): bool * * @return array|\Ibexa\Contracts\Core\Repository\Values\Content\Relation[] */ - public function getCreateExpectedRelations(Content $content) + public function getCreateExpectedRelations(Content $content): array { $contentService = $this->getRepository()->getContentService(); @@ -70,7 +71,7 @@ public function getCreateExpectedRelations(Content $content) * * @return array|\Ibexa\Contracts\Core\Repository\Values\Content\Relation[] */ - public function getUpdateExpectedRelations(Content $content) + public function getUpdateExpectedRelations(Content $content): array { $contentService = $this->getRepository()->getContentService(); @@ -86,7 +87,7 @@ public function getUpdateExpectedRelations(Content $content) ]; } - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'selectionMethod' => [ @@ -111,7 +112,7 @@ public function getSettingsSchema() /** * @covers \Ibexa\Tests\Integration\Core\Repository\FieldType\BaseIntegrationTest::getValidatorSchema() */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -123,7 +124,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'selectionMethod' => 0, @@ -140,7 +141,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -152,7 +153,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'selectionMethod' => 'a', @@ -169,7 +170,7 @@ public function getInvalidFieldSettings() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return ['noValidator' => true]; } @@ -179,7 +180,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new RelationValue(4); } @@ -202,7 +203,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( RelationValue::class, @@ -218,7 +219,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -304,7 +305,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field): void * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -323,7 +324,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -333,14 +334,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new RelationValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ diff --git a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php index 5da099b74c..b473621f73 100644 --- a/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\FieldType\RelationList\Type as RelationListType; +use Ibexa\Core\FieldType\RelationList\Value; use Ibexa\Core\FieldType\RelationList\Value as RelationListValue; use Ibexa\Core\Repository\Values\Content\Relation; @@ -49,7 +50,7 @@ protected function supportsLikeWildcard($value): bool * * @return array|\Ibexa\Contracts\Core\Repository\Values\Content\Relation[] */ - public function getCreateExpectedRelations(Content $content) + public function getCreateExpectedRelations(Content $content): array { $contentService = $this->getRepository()->getContentService(); @@ -78,7 +79,7 @@ public function getCreateExpectedRelations(Content $content) * * @return array|\Ibexa\Contracts\Core\Repository\Values\Content\Relation[] */ - public function getUpdateExpectedRelations(Content $content) + public function getUpdateExpectedRelations(Content $content): array { $contentService = $this->getRepository()->getContentService(); @@ -112,7 +113,7 @@ public function getUpdateExpectedRelations(Content $content) ]; } - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'selectionMethod' => [ @@ -134,7 +135,7 @@ public function getSettingsSchema() ]; } - public function getValidatorSchema() + public function getValidatorSchema(): array { return [ 'RelationListValueValidator' => [ @@ -153,7 +154,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'selectionMethod' => 1, @@ -170,7 +171,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'RelationListValueValidator' => [ @@ -186,7 +187,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return ['selectionMethod' => 'a', 'selectionDefaultLocation' => true, 'unknownSetting' => false]; } @@ -198,7 +199,7 @@ public function getInvalidFieldSettings() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return ['noValidator' => true]; } @@ -208,7 +209,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new RelationListValue([4, 49]); } @@ -231,7 +232,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( RelationListValue::class, @@ -247,7 +248,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -332,7 +333,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field): void * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -351,7 +352,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -361,7 +362,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new RelationListValue()], @@ -369,7 +370,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -378,12 +379,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): array { return [11]; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): array { return [12]; } @@ -398,12 +399,12 @@ protected function getSearchTargetValueTwo(): int return 12; } - protected function getValidMultivaluedSearchValuesOne() + protected function getValidMultivaluedSearchValuesOne(): array { return [11, 12]; } - protected function getValidMultivaluedSearchValuesTwo() + protected function getValidMultivaluedSearchValuesTwo(): array { return [13, 14]; } diff --git a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php index 7e6662dcab..0e71c719d4 100644 --- a/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php +++ b/tests/integration/Core/Repository/FieldType/RelationSearchBaseIntegrationTestTrait.php @@ -42,7 +42,7 @@ abstract public function getUpdateExpectedRelations(Content $content); /** * Tests relation processing on field create. */ - public function testCreateContentRelationsProcessedCorrect() + public function testCreateContentRelationsProcessedCorrect(): void { $content = $this->createContent($this->getValidCreationFieldData()); @@ -61,7 +61,7 @@ public function testCreateContentRelationsProcessedCorrect() /** * Tests relation processing on field update. */ - public function testUpdateContentRelationsProcessedCorrect() + public function testUpdateContentRelationsProcessedCorrect(): void { $content = $this->updateContent($this->getValidUpdateFieldData()); @@ -84,7 +84,7 @@ public function testUpdateContentRelationsProcessedCorrect() * * @return \Ibexa\Core\Repository\Values\Content\Relation[] */ - protected function normalizeRelations(array $relations) + protected function normalizeRelations(array $relations): array { usort( $relations, @@ -97,7 +97,7 @@ static function (RelationContract $a, RelationContract $b): int { } ); $normalized = array_map( - static function (RelationContract $relation) { + static function (RelationContract $relation): Relation { $newRelation = new Relation( [ 'id' => null, @@ -116,7 +116,7 @@ static function (RelationContract $relation) { return $normalized; } - public function testCopyContentCopiesFieldRelations() + public function testCopyContentCopiesFieldRelations(): void { $content = $this->updateContent($this->getValidUpdateFieldData()); $contentService = $this->getRepository()->getContentService(); @@ -151,7 +151,7 @@ public function testCopyContentCopiesFieldRelations() ); } - public function testSubtreeCopyContentCopiesFieldRelations() + public function testSubtreeCopyContentCopiesFieldRelations(): void { $contentService = $this->getRepository()->getContentService(); $locationService = $this->getRepository()->getLocationService(); diff --git a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php index 8cb1caeafe..c8e46ad40d 100644 --- a/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php @@ -21,6 +21,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\Field as FieldSortClause; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Core\Search\Common\FieldNameResolver; @@ -216,7 +217,7 @@ protected function getFullTextIndexedFieldData() ); } - public function checkFullTextSupport() + public function checkFullTextSupport(): void { // Does nothing by default, override in a concrete test case as needed } @@ -262,7 +263,7 @@ protected function checkCustomFieldsSupport() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createTestSearchContent($fieldData, Repository $repository, $contentType) + protected function createTestSearchContent($fieldData, Repository $repository, ContentType $contentType) { $contentService = $repository->getContentService(); $locationService = $repository->getLocationService(); @@ -374,7 +375,7 @@ public function findProvider() * * @depends testCreateTestContent */ - public function testFindEqualsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindEqualsOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::EQ, $valueOne); @@ -394,7 +395,7 @@ public function testFindEqualsOne($valueOne, $valueTwo, $filter, $content, $modi * * @depends testCreateTestContent */ - public function testFindNotEqualsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotEqualsOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::EQ, $valueOne)); @@ -414,7 +415,7 @@ public function testFindNotEqualsOne($valueOne, $valueTwo, $filter, $content, $m * * @depends testCreateTestContent */ - public function testFindEqualsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindEqualsTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::EQ, $valueTwo); @@ -434,7 +435,7 @@ public function testFindEqualsTwo($valueOne, $valueTwo, $filter, $content, $modi * * @depends testCreateTestContent */ - public function testFindNotEqualsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotEqualsTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::EQ, $valueTwo)); @@ -454,7 +455,7 @@ public function testFindNotEqualsTwo($valueOne, $valueTwo, $filter, $content, $m * * @depends testCreateTestContent */ - public function testFindInOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindInOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::IN, [$valueOne]); @@ -474,7 +475,7 @@ public function testFindInOne($valueOne, $valueTwo, $filter, $content, $modifyFi * * @depends testCreateTestContent */ - public function testFindNotInOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotInOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field('data', Operator::IN, [$valueOne]) @@ -496,7 +497,7 @@ public function testFindNotInOne($valueOne, $valueTwo, $filter, $content, $modif * * @depends testCreateTestContent */ - public function testFindInTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindInTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::IN, [$valueTwo]); @@ -516,7 +517,7 @@ public function testFindInTwo($valueOne, $valueTwo, $filter, $content, $modifyFi * * @depends testCreateTestContent */ - public function testFindNotInTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotInTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field('data', Operator::IN, [$valueTwo]) @@ -538,7 +539,7 @@ public function testFindNotInTwo($valueOne, $valueTwo, $filter, $content, $modif * * @depends testCreateTestContent */ - public function testFindInOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindInOneTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field( 'data', @@ -565,7 +566,7 @@ public function testFindInOneTwo($valueOne, $valueTwo, $filter, $content, $modif * * @depends testCreateTestContent */ - public function testFindNotInOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotInOneTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field( @@ -594,7 +595,7 @@ public function testFindNotInOneTwo($valueOne, $valueTwo, $filter, $content, $mo * * @depends testCreateTestContent */ - public function testFindGreaterThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindGreaterThanOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::GT, $valueOne); @@ -614,7 +615,7 @@ public function testFindGreaterThanOne($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindNotGreaterThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotGreaterThanOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::GT, $valueOne)); @@ -634,7 +635,7 @@ public function testFindNotGreaterThanOne($valueOne, $valueTwo, $filter, $conten * * @depends testCreateTestContent */ - public function testFindGreaterThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindGreaterThanTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::GT, $valueTwo); @@ -654,7 +655,7 @@ public function testFindGreaterThanTwo($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindNotGreaterThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotGreaterThanTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::GT, $valueTwo)); @@ -674,7 +675,7 @@ public function testFindNotGreaterThanTwo($valueOne, $valueTwo, $filter, $conten * * @depends testCreateTestContent */ - public function testFindGreaterThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindGreaterThanOrEqualOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::GTE, $valueOne); @@ -694,7 +695,7 @@ public function testFindGreaterThanOrEqualOne($valueOne, $valueTwo, $filter, $co * * @depends testCreateTestContent */ - public function testFindNotGreaterThanOrEqual($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotGreaterThanOrEqual($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::GTE, $valueOne)); @@ -714,7 +715,7 @@ public function testFindNotGreaterThanOrEqual($valueOne, $valueTwo, $filter, $co * * @depends testCreateTestContent */ - public function testFindGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindGreaterThanOrEqualTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::GTE, $valueTwo); @@ -734,7 +735,7 @@ public function testFindGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $co * * @depends testCreateTestContent */ - public function testFindNotGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotGreaterThanOrEqualTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::GTE, $valueTwo)); @@ -754,7 +755,7 @@ public function testFindNotGreaterThanOrEqualTwo($valueOne, $valueTwo, $filter, * * @depends testCreateTestContent */ - public function testFindLowerThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLowerThanOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::LT, $valueOne); @@ -774,7 +775,7 @@ public function testFindLowerThanOne($valueOne, $valueTwo, $filter, $content, $m * * @depends testCreateTestContent */ - public function testFindNotLowerThanOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLowerThanOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::LT, $valueOne)); @@ -794,7 +795,7 @@ public function testFindNotLowerThanOne($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindLowerThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLowerThanTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::LT, $valueTwo); @@ -814,7 +815,7 @@ public function testFindLowerThanTwo($valueOne, $valueTwo, $filter, $content, $m * * @depends testCreateTestContent */ - public function testFindNotLowerThanTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLowerThanTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::LT, $valueTwo)); @@ -834,7 +835,7 @@ public function testFindNotLowerThanTwo($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLowerThanOrEqualOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::LTE, $valueOne); @@ -854,7 +855,7 @@ public function testFindLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $cont * * @depends testCreateTestContent */ - public function testFindNotLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLowerThanOrEqualOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::LTE, $valueOne)); @@ -874,7 +875,7 @@ public function testFindNotLowerThanOrEqualOne($valueOne, $valueTwo, $filter, $c * * @depends testCreateTestContent */ - public function testFindLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLowerThanOrEqualTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::LTE, $valueTwo); @@ -894,7 +895,7 @@ public function testFindLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $cont * * @depends testCreateTestContent */ - public function testFindNotLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLowerThanOrEqualTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::LTE, $valueTwo)); @@ -914,7 +915,7 @@ public function testFindNotLowerThanOrEqualTwo($valueOne, $valueTwo, $filter, $c * * @depends testCreateTestContent */ - public function testFindBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindBetweenOneTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field( 'data', @@ -941,7 +942,7 @@ public function testFindBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $ * * @depends testCreateTestContent */ - public function testFindNotBetweenOneTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotBetweenOneTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field( @@ -970,7 +971,7 @@ public function testFindNotBetweenOneTwo($valueOne, $valueTwo, $filter, $content * * @depends testCreateTestContent */ - public function testFindBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindBetweenTwoOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field( 'data', @@ -997,7 +998,7 @@ public function testFindBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $ * * @depends testCreateTestContent */ - public function testFindNotBetweenTwoOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotBetweenTwoOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field( @@ -1026,7 +1027,7 @@ public function testFindNotBetweenTwoOne($valueOne, $valueTwo, $filter, $content * * @depends testCreateTestContent */ - public function testFindContainsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindContainsOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::CONTAINS, $valueOne); @@ -1046,7 +1047,7 @@ public function testFindContainsOne($valueOne, $valueTwo, $filter, $content, $mo * * @depends testCreateTestContent */ - public function testFindNotContainsOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotContainsOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot(new Field('data', Operator::CONTAINS, $valueOne)); @@ -1066,7 +1067,7 @@ public function testFindNotContainsOne($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindContainsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindContainsTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new Field('data', Operator::CONTAINS, $valueTwo); @@ -1086,7 +1087,7 @@ public function testFindContainsTwo($valueOne, $valueTwo, $filter, $content, $mo * * @depends testCreateTestContent */ - public function testFindNotContainsTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotContainsTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $criteria = new LogicalNot( new Field('data', Operator::CONTAINS, $valueTwo) @@ -1102,7 +1103,7 @@ public function testFindNotContainsTwo($valueOne, $valueTwo, $filter, $content, * * @depends testCreateTestContent */ - public function testFindLikeOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLikeOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { // (in case test is skipped for current search engine) $this->supportsLikeWildcard($valueOne); @@ -1119,7 +1120,7 @@ public function testFindLikeOne($valueOne, $valueTwo, $filter, $content, $modify * * @depends testCreateTestContent */ - public function testFindNotLikeOne($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLikeOne($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { if ($this->supportsLikeWildcard($valueOne)) { $valueOne = substr_replace($valueOne, '*', -1, 1); @@ -1139,7 +1140,7 @@ public function testFindNotLikeOne($valueOne, $valueTwo, $filter, $content, $mod * * @depends testCreateTestContent */ - public function testFindLikeTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindLikeTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { if ($this->supportsLikeWildcard($valueTwo)) { $valueTwo = substr_replace($valueTwo, '*', 1, 1); @@ -1157,7 +1158,7 @@ public function testFindLikeTwo($valueOne, $valueTwo, $filter, $content, $modify * * @depends testCreateTestContent */ - public function testFindNotLikeTwo($valueOne, $valueTwo, $filter, $content, $modifyField, array $context) + public function testFindNotLikeTwo($valueOne, $valueTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { if ($this->supportsLikeWildcard($valueTwo)) { $valueTwo = substr_replace($valueTwo, '*', 2, 1); @@ -1278,7 +1279,7 @@ public function sortProvider() * * @depends testCreateTestContent */ - public function testSort($ascending, $content, $modifyField, array $context) + public function testSort($ascending, $content, $modifyField, array $context): void { [$repository, $contentOneId, $contentTwoId] = $context; $sortClause = new FieldSortClause( @@ -1329,7 +1330,7 @@ public function fullTextFindProvider() * * @depends testCreateTestContent */ - public function testFullTextFindOne($valueOne, $valueTwo, $filter, $content, array $context) + public function testFullTextFindOne($valueOne, $valueTwo, bool $filter, bool $content, array $context): void { $this->checkFullTextSupport(); @@ -1343,7 +1344,7 @@ public function testFullTextFindOne($valueOne, $valueTwo, $filter, $content, arr * * @depends testCreateTestContent */ - public function testFullTextFindTwo($valueOne, $valueTwo, $filter, $content, array $context) + public function testFullTextFindTwo($valueOne, $valueTwo, bool $filter, bool $content, array $context): void { $this->checkFullTextSupport(); diff --git a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php index 705afec4c0..5faf855e58 100644 --- a/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php @@ -224,7 +224,7 @@ public function findMultivaluedProvider() * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedEqualsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedEqualsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::EQ); @@ -248,7 +248,7 @@ public function testFindMultivaluedEqualsOne($valuesOne, $valuesTwo, $filter, $c * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotEqualsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotEqualsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::EQ); @@ -272,7 +272,7 @@ public function testFindMultivaluedNotEqualsOne($valuesOne, $valuesTwo, $filter, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedInOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedInOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::IN); @@ -294,7 +294,7 @@ public function testFindMultivaluedInOne($valuesOne, $valuesTwo, $filter, $conte * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotInOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotInOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::IN); @@ -318,7 +318,7 @@ public function testFindMultivaluedNotInOne($valuesOne, $valuesTwo, $filter, $co * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedInOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedInOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::IN); @@ -340,7 +340,7 @@ public function testFindMultivaluedInOneTwo($valuesOne, $valuesTwo, $filter, $co * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotInOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotInOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::IN); @@ -364,7 +364,7 @@ public function testFindMultivaluedNotInOneTwo($valuesOne, $valuesTwo, $filter, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedContainsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedContainsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::CONTAINS); @@ -388,7 +388,7 @@ public function testFindMultivaluedContainsOne($valuesOne, $valuesTwo, $filter, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotContainsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotContainsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::CONTAINS); @@ -412,7 +412,7 @@ public function testFindMultivaluedNotContainsOne($valuesOne, $valuesTwo, $filte * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GT); @@ -434,7 +434,7 @@ public function testFindMultivaluedGreaterThanOneFindsOneTwo($valuesOne, $values * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedGreaterThanOneFindsTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedGreaterThanOneFindsTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GT); @@ -456,7 +456,7 @@ public function testFindMultivaluedGreaterThanOneFindsTwo($valuesOne, $valuesTwo * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotGreaterThanOneFindsOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GT); @@ -478,7 +478,7 @@ public function testFindMultivaluedNotGreaterThanOneFindsOneTwo($valuesOne, $val * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotGreaterThanOneFindsTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotGreaterThanOneFindsTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GT); @@ -500,7 +500,7 @@ public function testFindMultivaluedNotGreaterThanOneFindsTwo($valuesOne, $values * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedGreaterThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedGreaterThanOrEqualOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GTE); @@ -524,7 +524,7 @@ public function testFindMultivaluedGreaterThanOrEqualOne($valuesOne, $valuesTwo, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotGreaterThanOrEqual($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotGreaterThanOrEqual($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::GTE); @@ -548,7 +548,7 @@ public function testFindMultivaluedNotGreaterThanOrEqual($valuesOne, $valuesTwo, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedLowerThanOneEmpty($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedLowerThanOneEmpty($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LT); @@ -570,7 +570,7 @@ public function testFindMultivaluedLowerThanOneEmpty($valuesOne, $valuesTwo, $fi * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedLowerThanOneFindsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedLowerThanOneFindsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LT); @@ -592,7 +592,7 @@ public function testFindMultivaluedLowerThanOneFindsOne($valuesOne, $valuesTwo, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotLowerThanOneEmpty($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotLowerThanOneEmpty($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LT); @@ -614,7 +614,7 @@ public function testFindMultivaluedNotLowerThanOneEmpty($valuesOne, $valuesTwo, * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotLowerThanOneFindsOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotLowerThanOneFindsOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LT); @@ -636,7 +636,7 @@ public function testFindMultivaluedNotLowerThanOneFindsOne($valuesOne, $valuesTw * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedLowerThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedLowerThanOrEqualOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LTE); @@ -660,7 +660,7 @@ public function testFindMultivaluedLowerThanOrEqualOne($valuesOne, $valuesTwo, $ * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotLowerThanOrEqualOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotLowerThanOrEqualOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::LTE); @@ -684,7 +684,7 @@ public function testFindMultivaluedNotLowerThanOrEqualOne($valuesOne, $valuesTwo * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedBetweenOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedBetweenOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::BETWEEN); @@ -717,7 +717,7 @@ public function testFindMultivaluedBetweenOneTwo($valuesOne, $valuesTwo, $filter * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotBetweenOneTwo($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotBetweenOneTwo($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::BETWEEN); @@ -752,7 +752,7 @@ public function testFindMultivaluedNotBetweenOneTwo($valuesOne, $valuesTwo, $fil * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedBetweenTwoOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedBetweenTwoOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::BETWEEN); @@ -785,7 +785,7 @@ public function testFindMultivaluedBetweenTwoOne($valuesOne, $valuesTwo, $filter * * @depends testCreateMultivaluedTestContent */ - public function testFindMultivaluedNotBetweenTwoOne($valuesOne, $valuesTwo, $filter, $content, $modifyField, array $context) + public function testFindMultivaluedNotBetweenTwoOne($valuesOne, $valuesTwo, bool $filter, bool $content, ?string $modifyField, array $context): void { $this->checkOperatorSupport(Operator::BETWEEN); diff --git a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php index 3a3e014c35..a66b5c81d0 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Selection\Value; use Ibexa\Core\FieldType\Selection\Value as SelectionValue; /** @@ -25,7 +26,7 @@ class SelectionIntegrationTest extends SearchMultivaluedBaseIntegrationTest * * @return string */ - public function getTypeName() + public function getTypeName(): string { return 'ezselection'; } @@ -35,7 +36,7 @@ public function getTypeName() * * If Selection is improved to be able to index + search for string also with LegacySearch, then adapt this too. */ - protected function supportsLikeWildcard($value) + protected function supportsLikeWildcard($value): bool { parent::supportsLikeWildcard($value); @@ -47,7 +48,7 @@ protected function supportsLikeWildcard($value) * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'isMultiple' => [ @@ -70,7 +71,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'isMultiple' => true, @@ -98,7 +99,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -112,7 +113,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -122,7 +123,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -132,7 +133,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -144,7 +145,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new SelectionValue([0, 2]); } @@ -154,7 +155,7 @@ public function getValidCreationFieldData() * * @return string */ - public function getFieldName() + public function getFieldName(): string { return 'A first' . ' ' . 'Sindelfingen'; } @@ -167,7 +168,7 @@ public function getFieldName() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( SelectionValue::class, @@ -183,7 +184,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -202,7 +203,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new SelectionValue([1]); } @@ -214,7 +215,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( SelectionValue::class, @@ -243,7 +244,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( SelectionValue::class, @@ -279,7 +280,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -296,7 +297,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -306,7 +307,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new SelectionValue()], @@ -314,7 +315,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -326,27 +327,27 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): array { return [1]; } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): array { return [2]; } - protected function getSearchTargetValueOne() + protected function getSearchTargetValueOne(): int { return 1; } - protected function getSearchTargetValueTwo() + protected function getSearchTargetValueTwo(): int { return 2; } - protected function getAdditionallyIndexedFieldData() + protected function getAdditionallyIndexedFieldData(): array { return [ [ @@ -362,17 +363,17 @@ protected function getAdditionallyIndexedFieldData() ]; } - protected function getValidMultivaluedSearchValuesOne() + protected function getValidMultivaluedSearchValuesOne(): array { return [0, 1]; } - protected function getValidMultivaluedSearchValuesTwo() + protected function getValidMultivaluedSearchValuesTwo(): array { return [2, 3, 4]; } - protected function getAdditionallyIndexedMultivaluedFieldData() + protected function getAdditionallyIndexedMultivaluedFieldData(): array { return [ [ @@ -383,7 +384,7 @@ protected function getAdditionallyIndexedMultivaluedFieldData() ]; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['Bielefeld', 'Sindelfingen'], diff --git a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php index 0cdb894853..19c0dadd40 100644 --- a/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php @@ -20,7 +20,7 @@ class SelectionMultilingualIntegrationTest extends SelectionIntegrationTest * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return array_merge( parent::getSettingsSchema(), @@ -38,7 +38,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ @@ -90,7 +90,7 @@ public function getFieldName(): string return 'Arkansas' . ' ' . 'Mississippi'; } - protected function getAdditionallyIndexedFieldData() + protected function getAdditionallyIndexedFieldData(): array { return [ [ @@ -106,7 +106,7 @@ protected function getAdditionallyIndexedFieldData() ]; } - protected function getAdditionallyIndexedMultivaluedFieldData() + protected function getAdditionallyIndexedMultivaluedFieldData(): array { return [ [ @@ -117,7 +117,7 @@ protected function getAdditionallyIndexedMultivaluedFieldData() ]; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['Hudson', 'Mississippi'], diff --git a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php index 8d664ba334..b742032bb7 100644 --- a/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\TextBlock\Value; use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; /** @@ -34,7 +35,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'textRows' => [ @@ -49,7 +50,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'textRows' => 0, @@ -61,7 +62,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -73,7 +74,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -83,7 +84,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -93,7 +94,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -105,7 +106,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new TextBlockValue('Example'); } @@ -128,7 +129,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TextBlockValue::class, @@ -144,7 +145,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -159,7 +160,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new TextBlockValue('Example 2'); } @@ -171,7 +172,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TextBlockValue::class, @@ -200,7 +201,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( TextBlockValue::class, @@ -236,7 +237,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -253,7 +254,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -263,7 +264,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new TextBlockValue()], @@ -275,7 +276,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -307,7 +308,7 @@ protected function getSearchTargetValueTwo(): string return strtoupper("truth suffers from ' too much analysis"); } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['path', 'analysis'], diff --git a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php index 73fb280f23..a2d39a6d2c 100644 --- a/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\TextLine\Value; use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; /** @@ -35,7 +36,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -45,7 +46,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -55,7 +56,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -67,7 +68,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return [ 'StringLengthValidator' => [ @@ -88,7 +89,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'StringLengthValidator' => [ @@ -103,7 +104,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'StringLengthValidator' => [ @@ -117,7 +118,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new TextLineValue('Example'); } @@ -140,7 +141,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TextLineValue::class, @@ -156,7 +157,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -179,7 +180,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new TextLineValue('Example 2'); } @@ -191,7 +192,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TextLineValue::class, @@ -220,7 +221,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( TextLineValue::class, @@ -256,7 +257,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -273,7 +274,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -283,7 +284,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new TextLineValue()], @@ -293,7 +294,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -325,7 +326,7 @@ protected function getSearchTargetValueTwo(): string return strtoupper($this->getValidSearchValueTwo()); } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['aaa', 'bbb'], diff --git a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php index 7bf5f66e29..f8c2ddbf7f 100644 --- a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php @@ -10,6 +10,7 @@ use DateTime; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Time\Value; use Ibexa\Core\FieldType\Time\Value as TimeValue; /** @@ -45,7 +46,7 @@ protected function supportsLikeWildcard($value): bool * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'useSeconds' => [ @@ -64,7 +65,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'useSeconds' => false, @@ -77,7 +78,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -89,7 +90,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -99,7 +100,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -109,7 +110,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 42], @@ -121,7 +122,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { // We may only create times from timestamps here, since storing will // loose information about the timezone. @@ -146,7 +147,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TimeValue::class, @@ -162,7 +163,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -188,7 +189,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( TimeValue::class, @@ -218,7 +219,7 @@ public function provideInvalidUpdateFieldData() * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, $expectedException) + public function testUpdateContentFails($failingValue, $expectedException): array { return [ [ @@ -235,7 +236,7 @@ public function testUpdateContentFails($failingValue, $expectedException) * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( TimeValue::class, @@ -271,7 +272,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { $timestamp = 123456; $dateTime = new DateTime("@{$timestamp}"); @@ -291,7 +292,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -301,14 +302,14 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new TimeValue()], ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -317,12 +318,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): Value { return new TimeValue($this->getSearchTargetValueOne()); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): Value { return new TimeValue($this->getSearchTargetValueTwo()); } diff --git a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php index 9a5f34e9ad..db54870f1d 100644 --- a/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Ibexa\Core\FieldType\Url\Value; use Ibexa\Core\FieldType\Url\Value as UrlValue; /** @@ -34,7 +35,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return []; } @@ -44,7 +45,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return []; } @@ -54,7 +55,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -66,7 +67,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return []; } @@ -76,7 +77,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return []; } @@ -86,7 +87,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -98,7 +99,7 @@ public function getInvalidValidatorConfiguration() * * @return mixed */ - public function getValidCreationFieldData() + public function getValidCreationFieldData(): Value { return new UrlValue('http://example.com', 'Example'); } @@ -121,7 +122,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( UrlValue::class, @@ -138,7 +139,7 @@ public function assertFieldDataLoadedCorrect(Field $field) ); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return [ [ @@ -157,7 +158,7 @@ public function provideInvalidCreationFieldData() * * @return array */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new UrlValue('http://example.com/2', 'Example 2'); } @@ -169,7 +170,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( UrlValue::class, @@ -199,7 +200,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( UrlValue::class, @@ -236,7 +237,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -263,7 +264,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -277,7 +278,7 @@ public function provideFromHashData() ]; } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new UrlValue()], @@ -287,7 +288,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -299,12 +300,12 @@ public function providerForTestIsNotEmptyValue() ]; } - protected function getValidSearchValueOne() + protected function getValidSearchValueOne(): Value { return new UrlValue('http://ample.com', 'Ample'); } - protected function getValidSearchValueTwo() + protected function getValidSearchValueTwo(): Value { return new UrlValue('http://example.com', 'Example'); } @@ -319,7 +320,7 @@ protected function getSearchTargetValueTwo(): string return 'http://example.com'; } - protected function getAdditionallyIndexedFieldData() + protected function getAdditionallyIndexedFieldData(): array { return [ [ @@ -331,7 +332,7 @@ protected function getAdditionallyIndexedFieldData() ]; } - protected function getFullTextIndexedFieldData() + protected function getFullTextIndexedFieldData(): array { return [ ['ample', 'example'], diff --git a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php index 432e0a2b8c..5896ba2d7f 100644 --- a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php @@ -10,10 +10,12 @@ use Doctrine\DBAL\Exception\NotNullConstraintViolationException; use Ibexa\Contracts\Core\Repository\Exceptions\BadStateException; use Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\FieldType\User\Type; +use Ibexa\Core\FieldType\User\Value; use Ibexa\Core\FieldType\User\Value as UserValue; use Ibexa\Core\Repository\Values\User\User; use Ibexa\Tests\Core\FieldType\DataProvider\UserValidatorConfigurationSchemaProvider; @@ -43,7 +45,7 @@ public function getTypeName(): string * * @return array */ - public function getSettingsSchema() + public function getSettingsSchema(): array { return [ 'PasswordTTL' => [ @@ -70,7 +72,7 @@ public function getSettingsSchema() * * @return mixed */ - public function getValidFieldSettings() + public function getValidFieldSettings(): array { return [ 'PasswordTTL' => null, @@ -85,7 +87,7 @@ public function getValidFieldSettings() * * @return mixed */ - public function getInvalidFieldSettings() + public function getInvalidFieldSettings(): array { return [ 'somethingUnknown' => 0, @@ -97,7 +99,7 @@ public function getInvalidFieldSettings() * * @return array */ - public function getValidatorSchema() + public function getValidatorSchema(): array { return (new UserValidatorConfigurationSchemaProvider()) ->getExpectedValidatorConfigurationSchema(); @@ -108,7 +110,7 @@ public function getValidatorSchema() * * @return mixed */ - public function getValidValidatorConfiguration() + public function getValidValidatorConfiguration(): array { return [ 'PasswordValueValidator' => [ @@ -128,7 +130,7 @@ public function getValidValidatorConfiguration() * * @return mixed */ - public function getInvalidValidatorConfiguration() + public function getInvalidValidatorConfiguration(): array { return [ 'unknown' => ['value' => 23], @@ -168,7 +170,7 @@ public function getFieldName(): string * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertFieldDataLoadedCorrect(Field $field) + public function assertFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( UserValue::class, @@ -191,7 +193,7 @@ public function assertFieldDataLoadedCorrect(Field $field) self::assertNotNull($field->value->contentId); } - public function provideInvalidCreationFieldData() + public function provideInvalidCreationFieldData(): array { return []; } @@ -208,7 +210,7 @@ public function testCreateContentFails( * * @return \Ibexa\Core\FieldType\User\Value */ - public function getValidUpdateFieldData() + public function getValidUpdateFieldData(): Value { return new UserValue( [ @@ -229,7 +231,7 @@ public function getValidUpdateFieldData() * * @return array */ - public function assertUpdatedFieldDataLoadedCorrect(Field $field) + public function assertUpdatedFieldDataLoadedCorrect(Field $field): void { self::assertInstanceOf( UserValue::class, @@ -252,7 +254,7 @@ public function assertUpdatedFieldDataLoadedCorrect(Field $field) self::assertNotNull($field->value->contentId); } - public function provideInvalidUpdateFieldData() + public function provideInvalidUpdateFieldData(): array { return [ [ @@ -271,7 +273,7 @@ public function provideInvalidUpdateFieldData() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */ - public function assertCopiedFieldDataLoadedCorrectly(Field $field) + public function assertCopiedFieldDataLoadedCorrectly(Field $field): void { self::assertInstanceOf( UserValue::class, @@ -315,7 +317,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field) * * @return array */ - public function provideToHashData() + public function provideToHashData(): array { return [ [ @@ -356,7 +358,7 @@ public function provideToHashData() * * @return array */ - public function provideFromHashData() + public function provideFromHashData(): array { return [ [ @@ -371,7 +373,7 @@ public function provideFromHashData() * * @param mixed $fieldData */ - protected function createContent($fieldData, $contentType = null) + protected function createContent($fieldData, $contentType = null): Content { if ($contentType === null) { $contentType = $this->testCreateContentType(); @@ -405,12 +407,12 @@ protected function createContent($fieldData, $contentType = null) return $contentService->createContentDraft($user->content->contentInfo, $user->content->versionInfo); } - public function testCreateContentWithEmptyFieldValue() + public function testCreateContentWithEmptyFieldValue(): void { self::markTestSkipped('User field will never be created empty'); } - public function providerForTestIsEmptyValue() + public function providerForTestIsEmptyValue(): array { return [ [new UserValue()], @@ -418,7 +420,7 @@ public function providerForTestIsEmptyValue() ]; } - public function providerForTestIsNotEmptyValue() + public function providerForTestIsNotEmptyValue(): array { return [ [ @@ -427,7 +429,7 @@ public function providerForTestIsNotEmptyValue() ]; } - public function testRemoveFieldDefinition() + public function testRemoveFieldDefinition(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -472,7 +474,7 @@ public function testCopyField($content) /** * @depends testCopyField */ - public function testCopiedFieldType($content) + public function testCopiedFieldType($content): void { self::markTestSkipped('Users cannot be copied, content is not passed to test.'); } @@ -480,7 +482,7 @@ public function testCopiedFieldType($content) /** * @depends testCopiedFieldType */ - public function testCopiedExternalData(Field $field) + public function testCopiedExternalData(Field $field): void { self::markTestSkipped('Users cannot be copied, field is not passed to test.'); } @@ -488,7 +490,7 @@ public function testCopiedExternalData(Field $field) /** * @see https://issues.ibexa.co/browse/EZP-30966 */ - public function testUpdateFieldDefinitionWithIncompleteSettingsSchema() + public function testUpdateFieldDefinitionWithIncompleteSettingsSchema(): void { $contentTypeService = $this->getRepository()->getContentTypeService(); $contentType = $this->testCreateContentType(); diff --git a/tests/integration/Core/Repository/FieldTypeServiceTest.php b/tests/integration/Core/Repository/FieldTypeServiceTest.php index b296579223..044779caf1 100644 --- a/tests/integration/Core/Repository/FieldTypeServiceTest.php +++ b/tests/integration/Core/Repository/FieldTypeServiceTest.php @@ -23,7 +23,7 @@ class FieldTypeServiceTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService::getFieldTypes() */ - public function testGetFieldTypes() + public function testGetFieldTypes(): void { $repository = $this->getRepository(); @@ -52,7 +52,7 @@ public function testGetFieldTypes() * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService::getFieldType() */ - public function testGetFieldType() + public function testGetFieldType(): void { $repository = $this->getRepository(); @@ -78,7 +78,7 @@ public function testGetFieldType() * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService::getFieldType() */ - public function testGetFieldTypeThrowsNotFoundException() + public function testGetFieldTypeThrowsNotFoundException(): void { $this->expectException(\RuntimeException::class); @@ -97,7 +97,7 @@ public function testGetFieldTypeThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService::hasFieldType() */ - public function testHasFieldTypeReturnsTrue() + public function testHasFieldTypeReturnsTrue(): void { $repository = $this->getRepository(); @@ -116,7 +116,7 @@ public function testHasFieldTypeReturnsTrue() * * @covers \Ibexa\Contracts\Core\Repository\FieldTypeService::hasFieldType() */ - public function testHasFieldTypeReturnsFalse() + public function testHasFieldTypeReturnsFalse(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php index dd4eb9fc89..5f05710b1c 100644 --- a/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php @@ -28,7 +28,7 @@ class LanguageServiceAuthorizationTest extends BaseTest * * @depends testCreateLanguage */ - public function testCreateLanguageThrowsUnauthorizedException() + public function testCreateLanguageThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -62,7 +62,7 @@ public function testCreateLanguageThrowsUnauthorizedException() * * @depends testUpdateLanguageName */ - public function testUpdateLanguageNameThrowsUnauthorizedException() + public function testUpdateLanguageNameThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -100,7 +100,7 @@ public function testUpdateLanguageNameThrowsUnauthorizedException() * * @depends testEnableLanguage */ - public function testEnableLanguageThrowsUnauthorizedException() + public function testEnableLanguageThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -136,7 +136,7 @@ public function testEnableLanguageThrowsUnauthorizedException() * * @depends testDisableLanguage */ - public function testDisableLanguageThrowsUnauthorizedException() + public function testDisableLanguageThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -172,7 +172,7 @@ public function testDisableLanguageThrowsUnauthorizedException() * * @depends testDeleteLanguage */ - public function testDeleteLanguageThrowsUnauthorizedException() + public function testDeleteLanguageThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php index 31e8a0b759..b2a9203313 100644 --- a/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php +++ b/tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php @@ -7,6 +7,7 @@ namespace Ibexa\Tests\Integration\Core\Repository; +use Ibexa\Contracts\Core\Repository\LanguageService; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy as LegacySetupFactory; /** @@ -20,10 +21,9 @@ class LanguageServiceMaximumSupportedLanguagesTest extends BaseTest { /** @var \Ibexa\Contracts\Core\Repository\LanguageService */ - private $languageService; + private LanguageService $languageService; - /** @var array */ - private $createdLanguages = []; + private array $createdLanguages = []; /** * Creates as much languages as possible. @@ -78,7 +78,7 @@ protected function tearDown(): void * * @depends Ibexa\Tests\Integration\Core\Repository\LanguageServiceTest::testNewLanguageCreateStruct */ - public function testCreateMaximumLanguageLimit() + public function testCreateMaximumLanguageLimit(): void { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('Maximum number of languages reached.'); diff --git a/tests/integration/Core/Repository/LanguageServiceTest.php b/tests/integration/Core/Repository/LanguageServiceTest.php index ed3074ca1d..bac793c9f8 100644 --- a/tests/integration/Core/Repository/LanguageServiceTest.php +++ b/tests/integration/Core/Repository/LanguageServiceTest.php @@ -28,7 +28,7 @@ class LanguageServiceTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::newLanguageCreateStruct */ - public function testNewLanguageCreateStruct() + public function testNewLanguageCreateStruct(): void { $repository = $this->getRepository(); @@ -94,7 +94,7 @@ public function testCreateLanguage() * * @depends testCreateLanguage */ - public function testCreateLanguageSetsIdPropertyOnReturnedLanguage($language) + public function testCreateLanguageSetsIdPropertyOnReturnedLanguage($language): void { self::assertNotNull($language->id); } @@ -108,7 +108,7 @@ public function testCreateLanguageSetsIdPropertyOnReturnedLanguage($language) * * @depends testCreateLanguage */ - public function testCreateLanguageSetsExpectedProperties($language) + public function testCreateLanguageSetsExpectedProperties($language): void { self::assertEquals( [ @@ -131,7 +131,7 @@ public function testCreateLanguageSetsExpectedProperties($language) * * @depends testCreateLanguage */ - public function testCreateLanguageThrowsInvalidArgumentException() + public function testCreateLanguageThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'languageCreateStruct\' is invalid: language with the "nor-NO" language code already exists'); @@ -162,7 +162,7 @@ public function testCreateLanguageThrowsInvalidArgumentException() * * @depends testCreateLanguage */ - public function testLoadLanguageById() + public function testLoadLanguageById(): void { $repository = $this->getRepository(); @@ -197,7 +197,7 @@ public function testLoadLanguageById() * * @depends testLoadLanguageById */ - public function testLoadLanguageByIdThrowsNotFoundException() + public function testLoadLanguageByIdThrowsNotFoundException(): void { $repository = $this->getRepository(); @@ -223,7 +223,7 @@ public function testLoadLanguageByIdThrowsNotFoundException() * * @depends testLoadLanguageById */ - public function testUpdateLanguageName() + public function testUpdateLanguageName(): void { $repository = $this->getRepository(); @@ -269,7 +269,7 @@ public function testUpdateLanguageName() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::updateLanguageName */ - public function testUpdateLanguageNameThrowsInvalidArgumentException() + public function testUpdateLanguageNameThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'newName\' is invalid: \'\' is incorrect value'); @@ -288,7 +288,7 @@ public function testUpdateLanguageNameThrowsInvalidArgumentException() * * @depends testLoadLanguageById */ - public function testEnableLanguage() + public function testEnableLanguage(): void { $repository = $this->getRepository(); @@ -318,7 +318,7 @@ public function testEnableLanguage() * * @depends testLoadLanguageById */ - public function testDisableLanguage() + public function testDisableLanguage(): void { $repository = $this->getRepository(); @@ -349,7 +349,7 @@ public function testDisableLanguage() * * @depends testCreateLanguage */ - public function testLoadLanguage() + public function testLoadLanguage(): void { $repository = $this->getRepository(); @@ -401,7 +401,7 @@ public function testLoadLanguage() * * @depends testLoadLanguage */ - public function testLoadLanguageThrowsNotFoundException() + public function testLoadLanguageThrowsNotFoundException(): void { $repository = $this->getRepository(); @@ -422,7 +422,7 @@ public function testLoadLanguageThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::loadLanguage */ - public function testLoadLanguageThrowsInvalidArgumentException() + public function testLoadLanguageThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'languageCode\' is invalid: language code has an invalid value'); @@ -440,7 +440,7 @@ public function testLoadLanguageThrowsInvalidArgumentException() * @depends testCreateLanguage * @depends testLoadLanguage */ - public function testLoadLanguages() + public function testLoadLanguages(): void { $repository = $this->getRepository(); @@ -485,7 +485,7 @@ public function testLoadLanguages() * * @depends testCreateLanguage */ - public function loadLanguagesReturnsAnEmptyArrayByDefault() + public function loadLanguagesReturnsAnEmptyArrayByDefault(): void { $repository = $this->getRepository(); @@ -501,7 +501,7 @@ public function loadLanguagesReturnsAnEmptyArrayByDefault() * * @depends testLoadLanguages */ - public function testDeleteLanguage() + public function testDeleteLanguage(): void { $repository = $this->getRepository(); $languageService = $repository->getContentLanguageService(); @@ -544,7 +544,7 @@ public function testDeleteLanguage() * * @depends testDeleteLanguage */ - public function testDeleteLanguageThrowsInvalidArgumentException() + public function testDeleteLanguageThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'language\' is invalid: Cannot delete language: some content still references the language'); @@ -588,7 +588,7 @@ public function testDeleteLanguageThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\LanguageService::getDefaultLanguageCode */ - public function testGetDefaultLanguageCode() + public function testGetDefaultLanguageCode(): void { $repository = $this->getRepository(); $languageService = $repository->getContentLanguageService(); @@ -606,7 +606,7 @@ public function testGetDefaultLanguageCode() * * @depends testCreateLanguage */ - public function testCreateLanguageInTransactionWithRollback() + public function testCreateLanguageInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -652,7 +652,7 @@ public function testCreateLanguageInTransactionWithRollback() * * @depends testCreateLanguage */ - public function testCreateLanguageInTransactionWithCommit() + public function testCreateLanguageInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -694,7 +694,7 @@ public function testCreateLanguageInTransactionWithCommit() * * @depends testUpdateLanguageName */ - public function testUpdateLanguageNameInTransactionWithRollback() + public function testUpdateLanguageNameInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -733,7 +733,7 @@ public function testUpdateLanguageNameInTransactionWithRollback() * * @depends testUpdateLanguageName */ - public function testUpdateLanguageNameInTransactionWithCommit() + public function testUpdateLanguageNameInTransactionWithCommit(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php b/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php index 474cb3a77b..818d355f3f 100644 --- a/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php +++ b/tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php @@ -81,7 +81,7 @@ public function testCanUserReadTrashedContent(array $limitations, bool $expected $this->loginAsEditorUserWithLimitations('content', 'read', $limitations); $trashItem = $repository->sudo( - static function (Repository $repository) use ($location) { + static function (Repository $repository) use ($location): ?\Ibexa\Contracts\Core\Repository\Values\Content\TrashItem { return $repository->getTrashService()->trash($location); } ); diff --git a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php index 0209c446a0..f9d0d17aba 100644 --- a/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/LocationServiceAuthorizationTest.php @@ -32,7 +32,7 @@ class LocationServiceAuthorizationTest extends BaseTest * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCreateLocation */ - public function testCreateLocationThrowsUnauthorizedException() + public function testCreateLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -75,7 +75,7 @@ public function testCreateLocationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCreateLocation */ - public function testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentManageLocationsPolicy() + public function testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentManageLocationsPolicy(): void { $this->expectException(UnauthorizedException::class); @@ -136,7 +136,7 @@ public function testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentM * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocation */ - public function testLoadLocationThrowsUnauthorizedException() + public function testLoadLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -186,7 +186,7 @@ public function testLoadLocationListFiltersUnauthorizedLocations(): void * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocationByRemoteId */ - public function testLoadLocationByRemoteIdThrowsUnauthorizedException() + public function testLoadLocationByRemoteIdThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -216,7 +216,7 @@ public function testLoadLocationByRemoteIdThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocations */ - public function testLoadLocationsNoAccess() + public function testLoadLocationsNoAccess(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -246,7 +246,7 @@ public function testLoadLocationsNoAccess() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testUpdateLocation */ - public function testUpdateLocationThrowsUnauthorizedException() + public function testUpdateLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -286,7 +286,7 @@ public function testUpdateLocationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testSwapLocation */ - public function testSwapLocationThrowsUnauthorizedException() + public function testSwapLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -328,7 +328,7 @@ public function testSwapLocationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testHideLocation */ - public function testHideLocationThrowsUnauthorizedException() + public function testHideLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -359,7 +359,7 @@ public function testHideLocationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testUnhideLocation */ - public function testUnhideLocationThrowsUnauthorizedException() + public function testUnhideLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -393,7 +393,7 @@ public function testUnhideLocationThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testDeleteLocation */ - public function testDeleteLocationThrowsUnauthorizedException() + public function testDeleteLocationThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -457,7 +457,7 @@ public function testDeleteLocationThrowsUnauthorizedExceptionWithLanguageLimitat * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testDeleteLocation */ - public function testDeleteLocationWithSubtreeThrowsUnauthorizedException() + public function testDeleteLocationWithSubtreeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); $this->expectExceptionMessage('The User does not have the \'remove\' \'content\' permission'); @@ -556,7 +556,7 @@ public function testDeleteLocationWithSubtreeThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testCopySubtree */ - public function testCopySubtreeThrowsUnauthorizedException() + public function testCopySubtreeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -601,7 +601,7 @@ public function testCopySubtreeThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testMoveSubtree */ - public function testMoveSubtreeThrowsUnauthorizedException() + public function testMoveSubtreeThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 63875e9cb3..12ca15a9cc 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\BadStateException; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\URLAliasService; use Ibexa\Contracts\Core\Repository\URLAliasService as URLAliasServiceInterface; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; @@ -73,7 +74,7 @@ public function testNewLocationCreateStruct() * * @depends testNewLocationCreateStruct */ - public function testNewLocationCreateStructValues(LocationCreateStruct $locationCreate) + public function testNewLocationCreateStructValues(LocationCreateStruct $locationCreate): void { $this->assertPropertiesCorrect( [ @@ -96,7 +97,7 @@ public function testNewLocationCreateStructValues(LocationCreateStruct $location * * @depends testNewLocationCreateStruct */ - public function testCreateLocation() + public function testCreateLocation(): array { $repository = $this->getRepository(); @@ -223,7 +224,7 @@ public function testCreateLocationWithContentTypeSortingOptions(): void * * @depends testCreateLocation */ - public function testCreateLocationStructValues(array $data) + public function testCreateLocationStructValues(array $data): void { $locationCreate = $data['locationCreate']; $createdLocation = $data['createdLocation']; @@ -255,7 +256,7 @@ public function testCreateLocationStructValues(array $data) * * @depends testNewLocationCreateStruct */ - public function testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBelowParent() + public function testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBelowParent(): void { $this->expectException(InvalidArgumentException::class); @@ -290,7 +291,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBe * * @depends testNewLocationCreateStruct */ - public function testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocationOfContent() + public function testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocationOfContent(): void { $this->expectException(InvalidArgumentException::class); @@ -325,7 +326,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocat * * @depends testNewLocationCreateStruct */ - public function testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists() + public function testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists(): void { $this->expectException(InvalidArgumentException::class); @@ -362,7 +363,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists() * * @dataProvider dataProviderForOutOfRangeLocationPriority */ - public function testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority) + public function testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority): void { $this->expectException(InvalidArgumentException::class); @@ -394,7 +395,7 @@ public function testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfR /* END: Use Case */ } - public function dataProviderForOutOfRangeLocationPriority() + public function dataProviderForOutOfRangeLocationPriority(): array { return [[-2147483649], [2147483648]]; } @@ -406,7 +407,7 @@ public function dataProviderForOutOfRangeLocationPriority() * * @depends testCreateLocation */ - public function testCreateLocationInTransactionWithRollback() + public function testCreateLocationInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -487,7 +488,7 @@ public function testLoadLocation() * * @depends testLoadLocation */ - public function testLoadLocationRootStructValues() + public function testLoadLocationRootStructValues(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -566,7 +567,7 @@ private function assertRootLocationStructValues(Location $location): void * * @depends testLoadLocation */ - public function testLoadLocationStructValues(Location $location) + public function testLoadLocationStructValues(Location $location): void { $this->assertPropertiesCorrect( [ @@ -598,7 +599,7 @@ public function testLoadLocationStructValues(Location $location) self::assertEquals(4, $content->contentInfo->id); } - public function testLoadLocationPrioritizedLanguagesFallback() + public function testLoadLocationPrioritizedLanguagesFallback(): void { $repository = $this->getRepository(); @@ -659,7 +660,7 @@ public function testLoadLocationThrowsNotFoundExceptionForNotAvailableContent(): * * @depends testCreateLocation */ - public function testLoadLocationThrowsNotFoundException() + public function testLoadLocationThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -745,7 +746,7 @@ public function testLoadLocationListPrioritizedLanguagesFallbackAndAlwaysAvailab * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationList */ - public function testLoadLocationListWithRootLocationId() + public function testLoadLocationListWithRootLocationId(): void { $repository = $this->getRepository(); @@ -767,7 +768,7 @@ public function testLoadLocationListWithRootLocationId() * * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationList */ - public function testLoadLocationListInCorrectOrder() + public function testLoadLocationListInCorrectOrder(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -791,7 +792,7 @@ public function testLoadLocationListInCorrectOrder() * * @depends testLoadLocation */ - public function testLoadLocationByRemoteId() + public function testLoadLocationByRemoteId(): void { $repository = $this->getRepository(); @@ -816,7 +817,7 @@ public function testLoadLocationByRemoteId() * * @depends testLoadLocation */ - public function testLoadLocationByRemoteIdThrowsNotFoundException() + public function testLoadLocationByRemoteIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -872,7 +873,7 @@ public function testLoadLocations() * * @depends testLoadLocations */ - public function testLoadLocationsContent(array $locations) + public function testLoadLocationsContent(array $locations): void { self::assertCount(1, $locations); foreach ($locations as $loadedLocation) { @@ -954,7 +955,7 @@ public function testLoadLocationsLimitedSubtree() * * @depends testLoadLocationsLimitedSubtree */ - public function testLoadLocationsLimitedSubtreeContent(array $locations) + public function testLoadLocationsLimitedSubtreeContent(array $locations): void { self::assertCount(1, $locations); @@ -971,7 +972,7 @@ public function testLoadLocationsLimitedSubtreeContent(array $locations) * * @depends testLoadLocations */ - public function testLoadLocationsThrowsBadStateException() + public function testLoadLocationsThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -1002,7 +1003,7 @@ public function testLoadLocationsThrowsBadStateException() * * @depends testLoadLocations */ - public function testLoadLocationsThrowsBadStateExceptionLimitedSubtree() + public function testLoadLocationsThrowsBadStateExceptionLimitedSubtree(): void { $this->expectException(BadStateException::class); @@ -1108,7 +1109,7 @@ public function testLoadParentLocationsForDraftContent() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $contentDraft */ - public function testLoadParentLocationsForDraftContentThrowsBadStateException(Content $contentDraft) + public function testLoadParentLocationsForDraftContentThrowsBadStateException(Content $contentDraft): void { $this->expectException(BadStateException::class); $this->expectExceptionMessageMatches('/is already published/'); @@ -1129,7 +1130,7 @@ public function testLoadParentLocationsForDraftContentThrowsBadStateException(Co * * @depends testLoadLocation */ - public function testGetLocationChildCount() + public function testGetLocationChildCount(): void { // $locationId is the ID of an existing location $locationService = $this->getRepository()->getLocationService(); @@ -1149,7 +1150,7 @@ public function testGetLocationChildCount() * * @depends testLoadLocationChildren */ - public function testLoadLocationChildrenData(LocationList $locations) + public function testLoadLocationChildrenData(LocationList $locations): void { self::assertCount(5, $locations->locations); self::assertEquals(5, $locations->getTotalCount()); @@ -1412,7 +1413,7 @@ static function (Location $location) { * * @covers \Ibexa\Contracts\Core\Repository\LocationService::newLocationUpdateStruct */ - public function testNewLocationUpdateStruct() + public function testNewLocationUpdateStruct(): void { $repository = $this->getRepository(); @@ -1445,7 +1446,7 @@ public function testNewLocationUpdateStruct() * * @depends testLoadLocation */ - public function testUpdateLocation() + public function testUpdateLocation(): array { $repository = $this->getRepository(); @@ -1484,7 +1485,7 @@ public function testUpdateLocation() * * @depends testUpdateLocation */ - public function testUpdateLocationStructValues(array $data) + public function testUpdateLocationStructValues(array $data): void { $originalLocation = $data['originalLocation']; $updateStruct = $data['updateStruct']; @@ -1515,7 +1516,7 @@ public function testUpdateLocationStructValues(array $data) * * @depends testLoadLocation */ - public function testUpdateLocationWithSameRemoteId() + public function testUpdateLocationWithSameRemoteId(): void { $repository = $this->getRepository(); @@ -1551,7 +1552,7 @@ public function testUpdateLocationWithSameRemoteId() * * @depends testLoadLocation */ - public function testUpdateLocationThrowsInvalidArgumentException() + public function testUpdateLocationThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -1583,7 +1584,7 @@ public function testUpdateLocationThrowsInvalidArgumentException() * * @dataProvider dataProviderForOutOfRangeLocationPriority */ - public function testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority) + public function testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange($priority): void { $this->expectException(InvalidArgumentException::class); @@ -1614,7 +1615,7 @@ public function testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfR * * @depends testLoadLocation */ - public function testUpdateLocationTwice() + public function testUpdateLocationTwice(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -1646,7 +1647,7 @@ public function testUpdateLocationTwice() * * @depends testLoadLocation */ - public function testSwapLocation() + public function testSwapLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -1858,7 +1859,7 @@ static function (Location $location) { * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function testSwapLocationDoesNotCorruptSearchResults(array $contentItems) + public function testSwapLocationDoesNotCorruptSearchResults(array $contentItems): void { $repository = $this->getRepository(false); $searchService = $repository->getSearchService(); @@ -1961,7 +1962,7 @@ public function testSwapLocationForSecondaryLocations(): void * * @covers \Ibexa\Contracts\Core\Repository\LocationService::swapLocation */ - public function testSwapLocationUpdatesMainLocation() + public function testSwapLocationUpdatesMainLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -1999,7 +2000,7 @@ public function testSwapLocationUpdatesMainLocation() * * @covers \Ibexa\Contracts\Core\Repository\LocationService::swapLocation */ - public function testBookmarksAreSwappedAfterSwapLocation() + public function testBookmarksAreSwappedAfterSwapLocation(): void { $repository = $this->getRepository(); @@ -2036,7 +2037,7 @@ public function testBookmarksAreSwappedAfterSwapLocation() * * @depends testLoadLocation */ - public function testHideLocation() + public function testHideLocation(): void { $repository = $this->getRepository(); @@ -2107,7 +2108,7 @@ protected function assertSubtreeProperties(array $expectedValues, Location $loca * * @depends testHideLocation */ - public function testUnhideLocation() + public function testUnhideLocation(): void { $repository = $this->getRepository(); @@ -2152,7 +2153,7 @@ public function testUnhideLocation() * * @depends testUnhideLocation */ - public function testUnhideLocationNotUnhidesHiddenSubtree() + public function testUnhideLocationNotUnhidesHiddenSubtree(): void { $repository = $this->getRepository(); @@ -2218,7 +2219,7 @@ public function testUnhideLocationNotUnhidesHiddenSubtree() * * @depends testLoadLocation */ - public function testDeleteLocation() + public function testDeleteLocation(): void { $repository = $this->getRepository(); @@ -2268,7 +2269,7 @@ public function testDeleteLocation() * * @depends testDeleteLocation */ - public function testDeleteLocationDecrementsChildCountOnParent() + public function testDeleteLocationDecrementsChildCountOnParent(): void { $repository = $this->getRepository(); @@ -2314,7 +2315,7 @@ public function testDeleteLocationDecrementsChildCountOnParent() * * @covers \Ibexa\Contracts\Core\Repository\LocationService::deleteLocation() */ - public function testDeleteContentObjectLastLocation() + public function testDeleteContentObjectLastLocation(): void { $this->expectException(NotFoundException::class); @@ -2360,7 +2361,7 @@ public function testDeleteContentObjectLastLocation() * * @depends testDeleteLocation */ - public function testDeleteLocationDeletesRelatedBookmarks() + public function testDeleteLocationDeletesRelatedBookmarks(): void { $repository = $this->getRepository(); @@ -2462,7 +2463,7 @@ public function testDeleteUnusedLocationWhichPreviousHadContentWithRelativeAlias * * @depends testLoadLocation */ - public function testCopySubtree() + public function testCopySubtree(): void { $repository = $this->getRepository(); @@ -2515,7 +2516,7 @@ public function testCopySubtree() * * @depends testLoadLocation */ - public function testCopySubtreeWithAliases() + public function testCopySubtreeWithAliases(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -2610,7 +2611,7 @@ public function testCopySubtreeWithTranslatedContent(): void * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ - private function assertDefaultContentStates(ContentInfo $contentInfo) + private function assertDefaultContentStates(ContentInfo $contentInfo): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -2637,7 +2638,7 @@ private function assertDefaultContentStates(ContentInfo $contentInfo) * * @depends testCopySubtree */ - public function testCopySubtreeUpdatesSubtreeProperties() + public function testCopySubtreeUpdatesSubtreeProperties(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -2704,7 +2705,7 @@ public function testCopySubtreeUpdatesSubtreeProperties() * * @depends testCopySubtree */ - public function testCopySubtreeIncrementsChildCountOfNewParent() + public function testCopySubtreeIncrementsChildCountOfNewParent(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -2793,7 +2794,7 @@ public function testCopySubtreeWithInvisibleChild(): void * * @depends testCopySubtree */ - public function testCopySubtreeThrowsInvalidArgumentException() + public function testCopySubtreeThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -3035,7 +3036,7 @@ public function testMoveSubtreeHidden(): void * * @depends testMoveSubtree */ - public function testMoveSubtreeUpdatesSubtreeProperties() + public function testMoveSubtreeUpdatesSubtreeProperties(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -3097,7 +3098,7 @@ public function testMoveSubtreeUpdatesSubtreeProperties() * * @depends testMoveSubtreeUpdatesSubtreeProperties */ - public function testMoveSubtreeUpdatesSubtreePropertiesHidden() + public function testMoveSubtreeUpdatesSubtreePropertiesHidden(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -3163,7 +3164,7 @@ public function testMoveSubtreeUpdatesSubtreePropertiesHidden() * * @depends testMoveSubtree */ - public function testMoveSubtreeIncrementsChildCountOfNewParent() + public function testMoveSubtreeIncrementsChildCountOfNewParent(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -3222,7 +3223,7 @@ public function testMoveSubtreeIncrementsChildCountOfNewParent() * * @depends testMoveSubtree */ - public function testMoveSubtreeDecrementsChildCountOfOldParent() + public function testMoveSubtreeDecrementsChildCountOfOldParent(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -3283,7 +3284,7 @@ public function testMoveSubtreeDecrementsChildCountOfOldParent() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testMoveInvisibleSubtree() + public function testMoveInvisibleSubtree(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -3642,7 +3643,7 @@ private function loadSubtreeProperties(Location $location, array $properties = [ * * @return array */ - private function loadLocationProperties(Location $location, array $overwrite = []) + private function loadLocationProperties(Location $location, array $overwrite = []): array { return array_merge( [ @@ -3679,13 +3680,13 @@ protected function assertGeneratedAliases($urlAliasService, array $expectedAlias * @param \Ibexa\Contracts\Core\Repository\URLAliasService $urlAliasService * @param array $expectedSubItemAliases */ - private function assertAliasesBeforeCopy($urlAliasService, array $expectedSubItemAliases) + private function assertAliasesBeforeCopy(URLAliasService $urlAliasService, array $expectedSubItemAliases): void { foreach ($expectedSubItemAliases as $aliasUrl) { try { $urlAliasService->lookup($aliasUrl); self::fail('We didn\'t expect to find alias, but it was found'); - } catch (\Exception $e) { + } catch (Exception $e) { self::assertTrue(true); // OK - alias was not found } } @@ -3699,7 +3700,7 @@ private function assertAliasesBeforeCopy($urlAliasService, array $expectedSubIte * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content published Content */ - private function publishContentWithParentLocation($contentName, $parentLocationId) + private function publishContentWithParentLocation(string $contentName, int $parentLocationId): Content { $repository = $this->getRepository(false); $locationService = $repository->getLocationService(); diff --git a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php index 2ad7c523e1..efb453bc1b 100644 --- a/tests/integration/Core/Repository/NonRedundantFieldSetTest.php +++ b/tests/integration/Core/Repository/NonRedundantFieldSetTest.php @@ -58,7 +58,7 @@ public function testCreateContentDefaultValues() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentDefaultValuesFields(Content $content) + public function testCreateContentDefaultValuesFields(Content $content): void { self::assertCount(1, $content->versionInfo->languageCodes); self::assertContains('eng-US', $content->versionInfo->languageCodes); @@ -107,7 +107,7 @@ public function testCreateContentEmptyValues() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentEmptyValuesFields(Content $content) + public function testCreateContentEmptyValuesFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -160,7 +160,7 @@ public function testCreateContentEmptyValuesTranslationNotStored() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentEmptyValuesTranslationNotStoredFields(Content $content) + public function testCreateContentEmptyValuesTranslationNotStoredFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -215,7 +215,7 @@ public function testCreateContentTwoLanguagesMainTranslationStored() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentTwoLanguagesMainTranslationStoredFields(Content $content) + public function testCreateContentTwoLanguagesMainTranslationStoredFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -274,7 +274,7 @@ public function testCreateContentTwoLanguagesSecondTranslationNotStored() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentTwoLanguagesSecondTranslationNotStoredFields(Content $content) + public function testCreateContentTwoLanguagesSecondTranslationNotStoredFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -325,7 +325,7 @@ public function testCreateContentDefaultValuesNoStructFields() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentDefaultValuesNoStructFieldsFields(Content $content) + public function testCreateContentDefaultValuesNoStructFieldsFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -375,7 +375,7 @@ public function testCreateContentTwoLanguagesNoValuesForMainLanguage() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testCreateContentTwoLanguagesNoValuesForMainLanguageFields(Content $content) + public function testCreateContentTwoLanguagesNoValuesForMainLanguageFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -406,7 +406,7 @@ public function testCreateContentTwoLanguagesNoValuesForMainLanguageFields(Conte * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content[] */ - public function testCreateContentDraft() + public function testCreateContentDraft(): array { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -427,7 +427,7 @@ public function testCreateContentDraft() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content[] $data */ - public function testCreateContentDraftFields(array $data) + public function testCreateContentDraftFields(array $data): void { $content = $data[1]; @@ -459,7 +459,7 @@ public function testCreateContentDraftFields(array $data) * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content[] $data */ - public function testCreateContentDraftFieldsRetainsIds(array $data) + public function testCreateContentDraftFieldsRetainsIds(array $data): void { $this->assertFieldIds($data[0], $data[1]); } @@ -501,7 +501,7 @@ public function testUpdateContentWithNewLanguage() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testUpdateContentWithNewLanguageFields(Content $content) + public function testUpdateContentWithNewLanguageFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -570,7 +570,7 @@ public function testUpdateContentWithNewLanguageVariant() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testUpdateContentWithNewLanguageVariantFields(Content $content) + public function testUpdateContentWithNewLanguageVariantFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -631,7 +631,7 @@ public function testUpdateContentWithNewLanguageNoValues() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testUpdateContentWithNewLanguageNoValuesFields(Content $content) + public function testUpdateContentWithNewLanguageNoValuesFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -696,7 +696,7 @@ public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopy() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopyFields(Content $content) + public function testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopyFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -754,7 +754,7 @@ public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCr * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */ - public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCreatedFields(Content $content) + public function testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCreatedFields(Content $content): void { $emptyValue = $this->getRepository()->getFieldTypeService()->getFieldType('ezstring')->getEmptyValue(); @@ -803,7 +803,7 @@ protected function assertFieldIds(Content $content1, Content $content2) * * @return array */ - protected function mapFields(array $fields) + protected function mapFields(array $fields): array { $mappedFields = []; diff --git a/tests/integration/Core/Repository/NotificationServiceTest.php b/tests/integration/Core/Repository/NotificationServiceTest.php index 30de93afde..bbd24ecce7 100644 --- a/tests/integration/Core/Repository/NotificationServiceTest.php +++ b/tests/integration/Core/Repository/NotificationServiceTest.php @@ -24,7 +24,7 @@ class NotificationServiceTest extends BaseTest /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::loadNotifications() */ - public function testLoadNotifications() + public function testLoadNotifications(): void { $repository = $this->getRepository(); @@ -42,7 +42,7 @@ public function testLoadNotifications() /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::getNotification() */ - public function testGetNotification() + public function testGetNotification(): void { $repository = $this->getRepository(); @@ -61,7 +61,7 @@ public function testGetNotification() /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::markNotificationAsRead() */ - public function testMarkNotificationAsRead() + public function testMarkNotificationAsRead(): void { $repository = $this->getRepository(); @@ -102,7 +102,7 @@ public function testMarkNotificationAsUnread(): void /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::getPendingNotificationCount() */ - public function testGetPendingNotificationCount() + public function testGetPendingNotificationCount(): void { $repository = $this->getRepository(); @@ -117,7 +117,7 @@ public function testGetPendingNotificationCount() /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::getNotificationCount() */ - public function testGetNotificationCount() + public function testGetNotificationCount(): void { $repository = $this->getRepository(); @@ -132,7 +132,7 @@ public function testGetNotificationCount() /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::deleteNotification() */ - public function testDeleteNotification() + public function testDeleteNotification(): void { $repository = $this->getRepository(); @@ -153,7 +153,7 @@ public function testDeleteNotification() /** * @covers \Ibexa\Contracts\Core\Repository\NotificationService::createNotification() */ - public function testCreateNotification() + public function testCreateNotification(): void { $repository = $this->getRepository(); @@ -183,7 +183,7 @@ public function testCreateNotification() * * @depends testCreateNotification */ - public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwner() + public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwner(): void { $this->expectException(InvalidArgumentException::class); @@ -206,7 +206,7 @@ public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwn * * @depends testCreateNotification */ - public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingType() + public function testCreateNotificationThrowsInvalidArgumentExceptionOnMissingType(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php index db3ad3e695..25716e2106 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php @@ -26,7 +26,7 @@ class ObjectStateServiceAuthorizationTest extends BaseTest * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testCreateObjectStateGroup */ - public function testCreateObjectStateGroupThrowsUnauthorizedException() + public function testCreateObjectStateGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -71,7 +71,7 @@ public function testCreateObjectStateGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testUpdateObjectStateGroup */ - public function testUpdateObjectStateGroupThrowsUnauthorizedException() + public function testUpdateObjectStateGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -121,7 +121,7 @@ public function testUpdateObjectStateGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testDeleteObjectStateGroup */ - public function testDeleteObjectStateGroupThrowsUnauthorizedException() + public function testDeleteObjectStateGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -158,7 +158,7 @@ public function testDeleteObjectStateGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testCreateObjectState */ - public function testCreateObjectStateThrowsUnauthorizedException() + public function testCreateObjectStateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -210,7 +210,7 @@ public function testCreateObjectStateThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testUpdateObjectState */ - public function testUpdateObjectStateThrowsUnauthorizedException() + public function testUpdateObjectStateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -261,7 +261,7 @@ public function testUpdateObjectStateThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testSetPriorityOfObjectState */ - public function testSetPriorityOfObjectStateThrowsUnauthorizedException() + public function testSetPriorityOfObjectStateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -300,7 +300,7 @@ public function testSetPriorityOfObjectStateThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testDeleteObjectState */ - public function testDeleteObjectStateThrowsUnauthorizedException() + public function testDeleteObjectStateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -335,7 +335,7 @@ public function testDeleteObjectStateThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\ObjectStateServiceTest::testSetContentState */ - public function testSetContentStateThrowsUnauthorizedException() + public function testSetContentStateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/ObjectStateServiceTest.php b/tests/integration/Core/Repository/ObjectStateServiceTest.php index 9a792115aa..3fc89e48b2 100644 --- a/tests/integration/Core/Repository/ObjectStateServiceTest.php +++ b/tests/integration/Core/Repository/ObjectStateServiceTest.php @@ -65,7 +65,7 @@ public function testNewObjectStateGroupCreateStruct() * * @depends testNewObjectStateGroupCreateStruct */ - public function testNewObjectStateGroupCreateStructValues(ObjectStateGroupCreateStruct $objectStateGroupCreate) + public function testNewObjectStateGroupCreateStructValues(ObjectStateGroupCreateStruct $objectStateGroupCreate): void { $this->assertPropertiesCorrect( [ @@ -109,7 +109,7 @@ public function testNewObjectStateGroupUpdateStruct() * * @depends testNewObjectStateGroupUpdateStruct */ - public function testNewObjectStateGroupUpdateStructValues(ObjectStateGroupUpdateStruct $objectStateGroupUpdate) + public function testNewObjectStateGroupUpdateStructValues(ObjectStateGroupUpdateStruct $objectStateGroupUpdate): void { $this->assertPropertiesCorrect( [ @@ -155,7 +155,7 @@ public function testNewObjectStateCreateStruct() * * @depends testNewObjectStateCreateStruct */ - public function testNewObjectStateCreateStructValues(ObjectStateCreateStruct $objectStateCreate) + public function testNewObjectStateCreateStructValues(ObjectStateCreateStruct $objectStateCreate): void { $this->assertPropertiesCorrect( [ @@ -200,7 +200,7 @@ public function testNewObjectStateUpdateStruct() * * @depends testNewObjectStateUpdateStruct */ - public function testNewObjectStateUpdateStructValues(ObjectStateUpdateStruct $objectStateUpdate) + public function testNewObjectStateUpdateStructValues(ObjectStateUpdateStruct $objectStateUpdate): void { $this->assertPropertiesCorrect( [ @@ -261,7 +261,7 @@ public function testCreateObjectStateGroup() * * @depends testCreateObjectStateGroup */ - public function testCreateObjectStateGroupStructValues(ObjectStateGroup $createdObjectStateGroup) + public function testCreateObjectStateGroupStructValues(ObjectStateGroup $createdObjectStateGroup): void { $this->assertPropertiesCorrect( [ @@ -290,7 +290,7 @@ public function testCreateObjectStateGroupStructValues(ObjectStateGroup $created * * @depends testCreateObjectStateGroup */ - public function testCreateObjectStateGroupThrowsInvalidArgumentException() + public function testCreateObjectStateGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -323,7 +323,7 @@ public function testCreateObjectStateGroupThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::loadObjectStateGroup */ - public function testLoadObjectStateGroup() + public function testLoadObjectStateGroup(): void { $repository = $this->getRepository(); @@ -364,7 +364,7 @@ public function testLoadObjectStateGroup() * * @depends testLoadObjectStateGroup */ - public function testLoadObjectStateGroupThrowsNotFoundException() + public function testLoadObjectStateGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -442,7 +442,7 @@ public function testLoadObjectStateGroupByIdentifierThrowsNotFoundException(): v * * @depends testLoadObjectStateGroup */ - public function testLoadObjectStateGroups() + public function testLoadObjectStateGroups(): void { $repository = $this->getRepository(); @@ -470,7 +470,7 @@ public function testLoadObjectStateGroups() * * @return bool[] */ - protected function createObjectStateGroups() + protected function createObjectStateGroups(): array { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -544,7 +544,7 @@ protected function assertObjectsLoadedByIdentifiers(array $expectedIdentifiers, * * @depends testLoadObjectStateGroups */ - public function testLoadObjectStateGroupsWithOffset() + public function testLoadObjectStateGroupsWithOffset(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -597,7 +597,7 @@ static function ($group) { * * @depends testLoadObjectStateGroupsWithOffset */ - public function testLoadObjectStateGroupsWithOffsetAndLimit() + public function testLoadObjectStateGroupsWithOffsetAndLimit(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -629,7 +629,7 @@ public function testLoadObjectStateGroupsWithOffsetAndLimit() * * @depends testLoadObjectStateGroup */ - public function testLoadObjectStates() + public function testLoadObjectStates(): void { $repository = $this->getRepository(); @@ -664,7 +664,7 @@ public function testLoadObjectStates() * * @depends testLoadObjectStateGroup */ - public function testUpdateObjectStateGroup() + public function testUpdateObjectStateGroup(): array { $repository = $this->getRepository(); @@ -721,7 +721,7 @@ public function testUpdateObjectStateGroup() * * @depends testLoadObjectStateGroup */ - public function testUpdateObjectStateGroupChosenFieldsOnly() + public function testUpdateObjectStateGroupChosenFieldsOnly(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -763,7 +763,7 @@ public function testUpdateObjectStateGroupChosenFieldsOnly() * * @depends testUpdateObjectStateGroup */ - public function testUpdateObjectStateGroupThrowsInvalidArgumentException() + public function testUpdateObjectStateGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -814,7 +814,7 @@ public function testUpdateObjectStateGroupThrowsInvalidArgumentException() * * @depends testUpdateObjectStateGroup */ - public function testUpdateObjectStateGroupStructValues(array $testData) + public function testUpdateObjectStateGroupStructValues(array $testData): void { list( $loadedObjectStateGroup, @@ -841,7 +841,7 @@ public function testUpdateObjectStateGroupStructValues(array $testData) * @depends testLoadObjectStateGroup * @depends testNewObjectStateCreateStruct */ - public function testCreateObjectState() + public function testCreateObjectState(): array { $repository = $this->getRepository(); @@ -894,7 +894,7 @@ public function testCreateObjectState() * * @covers \Ibexa\Contracts\Core\Repository\ObjectStateService::createObjectState */ - public function testCreateObjectStateInEmptyGroup() + public function testCreateObjectStateInEmptyGroup(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -954,7 +954,7 @@ public function testCreateObjectStateInEmptyGroup() * @depends testLoadObjectStateGroup * @depends testCreateObjectState */ - public function testCreateObjectStateThrowsInvalidArgumentException() + public function testCreateObjectStateThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -997,7 +997,7 @@ public function testCreateObjectStateThrowsInvalidArgumentException() * * @depends testCreateObjectState */ - public function testCreateObjectStateStructValues(array $testData) + public function testCreateObjectStateStructValues(array $testData): void { list( $loadedObjectStateGroup, @@ -1117,7 +1117,7 @@ public function testLoadObjectStateByIdentifierThrowsNotFoundException(): void * * @depends testLoadObjectState */ - public function testLoadObjectStateStructValues(ObjectState $loadedObjectState) + public function testLoadObjectStateStructValues(ObjectState $loadedObjectState): void { $this->assertPropertiesCorrect( [ @@ -1151,7 +1151,7 @@ public function testLoadObjectStateStructValues(ObjectState $loadedObjectState) * * @depends testLoadObjectState */ - public function testLoadObjectStateThrowsNotFoundException() + public function testLoadObjectStateThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -1174,7 +1174,7 @@ public function testLoadObjectStateThrowsNotFoundException() * * @return array */ - public function getPrioritizedLanguagesList() + public function getPrioritizedLanguagesList(): array { return [ [[], null], @@ -1198,7 +1198,7 @@ public function getPrioritizedLanguagesList() public function testLoadObjectStateGroupsWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { // cleanup before the actual test $this->deleteExistingObjectStateGroups(); @@ -1239,7 +1239,7 @@ public function testLoadObjectStateGroupsWithPrioritizedLanguagesList( public function testLoadObjectStateGroupWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1275,7 +1275,7 @@ public function testLoadObjectStateGroupWithPrioritizedLanguagesList( public function testLoadObjectStateWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1308,7 +1308,7 @@ public function testLoadObjectStateWithPrioritizedLanguagesList( * @param string[] $languageCodes * @param string|null $expectedLanguageCode */ - public function testLoadObjectStatesWithPrioritizedLanguagesList($languageCodes, $expectedLanguageCode) + public function testLoadObjectStatesWithPrioritizedLanguagesList(array $languageCodes, $expectedLanguageCode): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1362,7 +1362,7 @@ public function testLoadObjectStatesWithPrioritizedLanguagesList($languageCodes, * * @depends testLoadObjectState */ - public function testUpdateObjectState() + public function testUpdateObjectState(): array { $repository = $this->getRepository(); @@ -1418,7 +1418,7 @@ public function testUpdateObjectState() * * @depends testLoadObjectState */ - public function testUpdateObjectStateChosenFieldsOnly() + public function testUpdateObjectStateChosenFieldsOnly(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1466,7 +1466,7 @@ public function testUpdateObjectStateChosenFieldsOnly() * * @depends testUpdateObjectState */ - public function testUpdateObjectStateThrowsInvalidArgumentException() + public function testUpdateObjectStateThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -1508,7 +1508,7 @@ public function testUpdateObjectStateThrowsInvalidArgumentException() * * @depends testUpdateObjectState */ - public function testUpdateObjectStateStructValues(array $testData) + public function testUpdateObjectStateStructValues(array $testData): void { list( $loadedObjectState, @@ -1547,7 +1547,7 @@ public function testUpdateObjectStateStructValues(array $testData) * * @depends testLoadObjectState */ - public function testSetPriorityOfObjectState() + public function testSetPriorityOfObjectState(): void { $repository = $this->getRepository(); @@ -1588,7 +1588,7 @@ public function testSetPriorityOfObjectState() * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo * @depends testLoadObjectState */ - public function testGetContentState() + public function testGetContentState(): void { $repository = $this->getRepository(); @@ -1626,7 +1626,7 @@ public function testGetContentState() * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo * @depends testLoadObjectState */ - public function testGetInitialObjectState() + public function testGetInitialObjectState(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1694,7 +1694,7 @@ public function testGetInitialObjectState() * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testLoadContentInfo * @depends testLoadObjectState */ - public function testSetContentState() + public function testSetContentState(): void { $repository = $this->getRepository(); @@ -1739,7 +1739,7 @@ public function testSetContentState() * * @depends testSetContentState */ - public function testSetContentStateThrowsInvalidArgumentException() + public function testSetContentStateThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -1784,7 +1784,7 @@ public function testSetContentStateThrowsInvalidArgumentException() * * @depends testLoadObjectState */ - public function testGetContentCount() + public function testGetContentCount(): void { $repository = $this->getRepository(); @@ -1809,7 +1809,7 @@ public function testGetContentCount() * * @depends testLoadObjectState */ - public function testDeleteObjectState() + public function testDeleteObjectState(): void { $repository = $this->getRepository(); @@ -1843,7 +1843,7 @@ public function testDeleteObjectState() * * @depends testLoadObjectStateGroup */ - public function testDeleteObjectStateGroup() + public function testDeleteObjectStateGroup(): void { $repository = $this->getRepository(); @@ -1875,7 +1875,7 @@ public function testDeleteObjectStateGroup() /** * Delete existing (e.g. initial) object state groups. */ - private function deleteExistingObjectStateGroups() + private function deleteExistingObjectStateGroups(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -1899,10 +1899,10 @@ private function deleteExistingObjectStateGroups() */ private function createObjectState( ObjectStateGroup $objectStateGroup, - $identifier, + string $identifier, array $names, array $descriptions - ) { + ): ObjectState { $objectStateService = $this->getRepository(false)->getObjectStateService(); $objectStateCreateStruct = $objectStateService->newObjectStateCreateStruct( $identifier diff --git a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php index b7c794a9f0..480d9bdc57 100644 --- a/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php +++ b/tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php @@ -30,7 +30,7 @@ protected function addParallelProcess(ParallelProcessList $list, callable $callb { $connection = $this->getRawDatabaseConnection(); - $process = new Process(static function () use ($callback, $connection) { + $process = new Process(static function () use ($callback, $connection): void { $connection->connect(); $callback(); $connection->close(); diff --git a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php index 0adfb8a436..fa8fba6c58 100644 --- a/tests/integration/Core/Repository/Parallel/ContentServiceTest.php +++ b/tests/integration/Core/Repository/Parallel/ContentServiceTest.php @@ -29,14 +29,14 @@ public function testPublishMultipleVersions(): void $version2 = $contentService->createContentDraft($content->contentInfo, $content->versionInfo); $processList = new ParallelProcessList(); - $this->addParallelProcess($processList, static function () use ($version1, $contentService) { + $this->addParallelProcess($processList, static function () use ($version1, $contentService): void { try { $contentService->publishVersion($version1->versionInfo); } catch (BadStateException $e) { } }); - $this->addParallelProcess($processList, static function () use ($version2, $contentService) { + $this->addParallelProcess($processList, static function () use ($version2, $contentService): void { try { $contentService->publishVersion($version2->versionInfo); } catch (BadStateException $e) { diff --git a/tests/integration/Core/Repository/PermissionResolverTest.php b/tests/integration/Core/Repository/PermissionResolverTest.php index d07f89a792..be16d5b8ad 100644 --- a/tests/integration/Core/Repository/PermissionResolverTest.php +++ b/tests/integration/Core/Repository/PermissionResolverTest.php @@ -36,7 +36,7 @@ class PermissionResolverTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::getCurrentUserReference() */ - public function testGetCurrentUserReferenceReturnsAnonymousUserReference() + public function testGetCurrentUserReferenceReturnsAnonymousUserReference(): void { $repository = $this->getRepository(); $anonymousUserId = $this->generateId('user', 10); @@ -66,7 +66,7 @@ public function testGetCurrentUserReferenceReturnsAnonymousUserReference() * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ - public function testSetCurrentUserReference() + public function testSetCurrentUserReference(): void { $repository = $this->getRepository(); $repository->getPermissionResolver()->setCurrentUserReference( @@ -109,7 +109,7 @@ public function testSetCurrentUserReference() * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ - public function testHasAccessWithAnonymousUserNo() + public function testHasAccessWithAnonymousUserNo(): void { $repository = $this->getRepository(); @@ -141,7 +141,7 @@ public function testHasAccessWithAnonymousUserNo() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends testHasAccessWithAnonymousUserNo */ - public function testHasAccessForCurrentUserNo() + public function testHasAccessForCurrentUserNo(): void { $repository = $this->getRepository(); @@ -175,7 +175,7 @@ public function testHasAccessForCurrentUserNo() * * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService */ - public function testHasAccessWithAdministratorUser() + public function testHasAccessWithAdministratorUser(): void { $repository = $this->getRepository(); @@ -206,7 +206,7 @@ public function testHasAccessWithAdministratorUser() * @depends testSetCurrentUserReference * @depends testHasAccessWithAdministratorUser */ - public function testHasAccessForCurrentUserYes() + public function testHasAccessForCurrentUserYes(): void { $repository = $this->getRepository(); @@ -239,7 +239,7 @@ public function testHasAccessForCurrentUserYes() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetUserService * @depends testSetCurrentUserReference */ - public function testHasAccessLimited() + public function testHasAccessLimited(): void { $repository = $this->getRepository(); @@ -271,7 +271,7 @@ public function testHasAccessLimited() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessForCurrentUserNo */ - public function testCanUserForAnonymousUserNo() + public function testCanUserForAnonymousUserNo(): void { $this->expectException(UnauthorizedException::class); @@ -318,7 +318,7 @@ public function testCanUserForAnonymousUserNo() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessForCurrentUserYes */ - public function testCanUserForAdministratorUser() + public function testCanUserForAdministratorUser(): void { $this->expectException(NotFoundException::class); @@ -364,7 +364,7 @@ public function testCanUserForAdministratorUser() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessLimited */ - public function testCanUserWithLimitationYes() + public function testCanUserWithLimitationYes(): void { $repository = $this->getRepository(); @@ -401,7 +401,7 @@ public function testCanUserWithLimitationYes() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentService * @depends testHasAccessLimited */ - public function testCanUserWithLimitationNo() + public function testCanUserWithLimitationNo(): void { $this->expectException(UnauthorizedException::class); @@ -447,7 +447,7 @@ public function testCanUserWithLimitationNo() * @depends testSetCurrentUserReference * @depends testHasAccessLimited */ - public function testCanUserThrowsInvalidArgumentException() + public function testCanUserThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -487,7 +487,7 @@ public function testCanUserThrowsInvalidArgumentException() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService * @depends testHasAccessLimited */ - public function testCanUserWithTargetYes() + public function testCanUserWithTargetYes(): void { $repository = $this->getRepository(); @@ -549,7 +549,7 @@ public function testCanUserWithTargetYes() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService * @depends testHasAccessLimited */ - public function testCanUserWithTargetNo() + public function testCanUserWithTargetNo(): void { $this->expectException(UnauthorizedException::class); @@ -610,7 +610,7 @@ public function testCanUserWithTargetNo() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService * @depends testHasAccessLimited */ - public function testCanUserWithMultipleTargetsYes() + public function testCanUserWithMultipleTargetsYes(): void { $repository = $this->getRepository(); @@ -673,7 +673,7 @@ public function testCanUserWithMultipleTargetsYes() * @depends Ibexa\Tests\Integration\Core\Repository\RepositoryTest::testGetContentTypeService * @depends testHasAccessLimited */ - public function testCanUserWithMultipleTargetsNo() + public function testCanUserWithMultipleTargetsNo(): void { $this->expectException(UnauthorizedException::class); @@ -737,7 +737,7 @@ public function testCanUserWithMultipleTargetsNo() * @depends testSetCurrentUserReference * @depends testHasAccessLimited */ - public function testCanUserWithTargetThrowsInvalidArgumentException() + public function testCanUserWithTargetThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -780,7 +780,7 @@ public function testCanUserWithTargetThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\PermissionResolver::canUser() */ - public function testCanUserThrowsBadStateException() + public function testCanUserThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -808,12 +808,12 @@ public function testCanUserThrowsBadStateException() */ public function testCanUserWithLimitations( Limitation $limitation, - $module, - $function, + string $module, + string $function, ValueObject $object, array $targets, - $expectedResult - ) { + bool $expectedResult + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $roleService = $repository->getRoleService(); @@ -847,7 +847,7 @@ public function testCanUserWithLimitations( * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function getDataForTestCanUserWithLimitations() + public function getDataForTestCanUserWithLimitations(): array { $repository = $this->getRepository(); $contentService = $repository->getContentService(); diff --git a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php index 21c9d61d26..050325a6de 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php @@ -61,7 +61,7 @@ protected function setUp(): void /** * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode */ - public function testSearchOnNotExistingLanguageGivesException() + public function testSearchOnNotExistingLanguageGivesException(): void { $this->expectException(NotFoundException::class); @@ -78,7 +78,7 @@ public function testSearchOnNotExistingLanguageGivesException() /** * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode */ - public function testSearchOnUsedLanguageGivesOneResult() + public function testSearchOnUsedLanguageGivesOneResult(): void { $query = new Query(); $query->filter = new LanguageCode(['por-PT'], false); @@ -91,7 +91,7 @@ public function testSearchOnUsedLanguageGivesOneResult() /** * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode */ - public function testSearchOnStandardLanguageGivesManyResult() + public function testSearchOnStandardLanguageGivesManyResult(): void { $query = new Query(); $query->filter = new LanguageCode(['eng-US'], false); @@ -105,7 +105,7 @@ public function testSearchOnStandardLanguageGivesManyResult() /** * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode */ - public function testSearchOnNotUsedInstalledLanguageGivesNoResult() + public function testSearchOnNotUsedInstalledLanguageGivesNoResult(): void { $query = new Query(); $query->filter = new LanguageCode(['eng-GB'], false); diff --git a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php index 91c5484303..cdb071191c 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php @@ -20,7 +20,7 @@ */ class EZP20018ObjectStateTest extends BaseTest { - public function testSearchForNonUsedObjectState() + public function testSearchForNonUsedObjectState(): void { $repository = $this->getRepository(); @@ -48,7 +48,7 @@ public function testSearchForNonUsedObjectState() self::assertCount($results2->totalCount, $results2->searchHits); } - public function testSearchForUsedObjectState() + public function testSearchForUsedObjectState(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php index 3ecc0e0c5a..c3c6d23633 100644 --- a/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php +++ b/tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php @@ -20,7 +20,7 @@ */ class EZP20018VisibilityTest extends BaseTest { - public function testSearchForHiddenContent() + public function testSearchForHiddenContent(): void { $repository = $this->getRepository(); @@ -44,7 +44,7 @@ public function testSearchForHiddenContent() self::assertCount(1, $results2->searchHits); } - public function testSearchForVisibleContent() + public function testSearchForVisibleContent(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/Regression/EZP21069Test.php b/tests/integration/Core/Repository/Regression/EZP21069Test.php index cafd165695..ea952df9e0 100644 --- a/tests/integration/Core/Repository/Regression/EZP21069Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21069Test.php @@ -84,7 +84,7 @@ protected function setUp(): void $this->refreshSearch($repository); } - public function testSearchOnPreviousAttributeContentGivesNoResult() + public function testSearchOnPreviousAttributeContentGivesNoResult(): void { $query = new Query(); $query->filter = new Field('name', Operator::EQ, 'TheOriginalNews'); @@ -94,7 +94,7 @@ public function testSearchOnPreviousAttributeContentGivesNoResult() self::assertEmpty($results->searchHits); } - public function testSearchOnCurrentAttributeContentGivesOnesResult() + public function testSearchOnCurrentAttributeContentGivesOnesResult(): void { $query = new Query(); $query->filter = new Field('name', Operator::EQ, 'TheUpdatedNews'); @@ -104,7 +104,7 @@ public function testSearchOnCurrentAttributeContentGivesOnesResult() self::assertCount(1, $results->searchHits); } - public function testSearchOnDraftAttributeContentGivesNoResult() + public function testSearchOnDraftAttributeContentGivesNoResult(): void { $query = new Query(); $query->filter = new Field('name', Operator::EQ, 'TheDraftNews'); diff --git a/tests/integration/Core/Repository/Regression/EZP21089Test.php b/tests/integration/Core/Repository/Regression/EZP21089Test.php index 79249e3176..33b36544b2 100644 --- a/tests/integration/Core/Repository/Regression/EZP21089Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21089Test.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Integration\Core\Repository\Regression; use DateTime; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Tests\Integration\Core\Repository\BaseTest; /** @@ -23,7 +24,7 @@ class EZP21089Test extends BaseTest { /** @var \Ibexa\Core\Repository\Values\ContentType\ContentType */ - private $contentType; + private ContentType $contentType; protected function setUp(): void { @@ -107,7 +108,7 @@ protected function setUp(): void $this->contentType = $contentTypeService->loadContentType($type->id); } - public function testCreateContent() + public function testCreateContent(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php index eb1ca7deea..ce32c99ee2 100644 --- a/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php @@ -48,7 +48,7 @@ protected function tearDown(): void * * @dataProvider validIntegerValues */ - public function testEzIntegerWithDefaultValues($integerValue) + public function testEzIntegerWithDefaultValues(int $integerValue): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -75,7 +75,7 @@ public function testEzIntegerWithDefaultValues($integerValue) $contentService->deleteContent($content->versionInfo->contentInfo); } - public function validIntegerValues() + public function validIntegerValues(): array { return [ [0], @@ -91,7 +91,7 @@ public function validIntegerValues() * * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - protected function createTestContentType() + protected function createTestContentType(): ContentType { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); diff --git a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php index 610a4902f7..1816569c20 100644 --- a/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php @@ -22,7 +22,7 @@ class EZP21771EzStringTest extends BaseTest * It shouldn't throw a fatal error when inserting 11 consecutive digits * into an eZString field */ - public function test11NumbersOnEzString() + public function test11NumbersOnEzString(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); diff --git a/tests/integration/Core/Repository/Regression/EZP21798Test.php b/tests/integration/Core/Repository/Regression/EZP21798Test.php index 590a4f3a6a..1071438576 100644 --- a/tests/integration/Core/Repository/Regression/EZP21798Test.php +++ b/tests/integration/Core/Repository/Regression/EZP21798Test.php @@ -23,7 +23,7 @@ class EZP21798Test extends BaseTest * This test will verify that anonymous users can access to a new section * that it's allowed to */ - public function testRoleChanges() + public function testRoleChanges(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); diff --git a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php index 0a78fad519..f59e5bc64b 100644 --- a/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php +++ b/tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php @@ -64,14 +64,14 @@ protected function setUp(): void /** * @dataProvider searchContentQueryProvider */ - public function testSearchContentMultipleLocations(Query $query, $expectedResultCount) + public function testSearchContentMultipleLocations(Query $query, int $expectedResultCount): void { $result = $this->getRepository()->getSearchService()->findContent($query); self::assertSame($expectedResultCount, $result->totalCount); self::assertSame($expectedResultCount, count($result->searchHits)); } - public function searchContentQueryProvider() + public function searchContentQueryProvider(): array { return [ [ diff --git a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php index c4db367886..0beb50a5cb 100644 --- a/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php @@ -7,13 +7,15 @@ namespace Ibexa\Tests\Integration\Core\Repository\Regression; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeDraft; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCreateStruct; use Ibexa\Tests\Integration\Core\Repository\BaseTest; class EZP22408DeleteRelatedObjectTest extends BaseTest { - /** @var \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType */ - private $testContentType; + private ?ContentTypeDraft $testContentType = null; protected function setUp(): void { @@ -22,7 +24,7 @@ protected function setUp(): void $this->createTestContentType(); } - public function testRelationListIsUpdatedWhenRelatedObjectIsDeleted() + public function testRelationListIsUpdatedWhenRelatedObjectIsDeleted(): void { $targetObject1 = $this->createTargetObject('Relation list target object 1'); $targetObject2 = $this->createTargetObject('Relation list target object 2'); @@ -43,7 +45,7 @@ public function testRelationListIsUpdatedWhenRelatedObjectIsDeleted() self::assertSame([$targetObject2->id], $relationListValue->destinationContentIds); } - public function testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted() + public function testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted(): void { $targetObject = $this->createTargetObject('Single relation target object'); $referenceObject = $this->createReferenceObject( @@ -61,7 +63,7 @@ public function testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted() self::assertEmpty($relationValue->destinationContentId); } - private function createTestContentType() + private function createTestContentType(): void { $languageCode = $this->getMainLanguageCode(); $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -120,7 +122,7 @@ private function getMainLanguageCode(): string * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private function createTargetObject($name) + private function createTargetObject(string $name): Content { $contentService = $this->getRepository()->getContentService(); $createStruct = $contentService->newContentCreateStruct( @@ -146,7 +148,7 @@ private function createTargetObject($name) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private function createReferenceObject($name, array $relationListTarget = [], $singleRelationTarget = null) + private function createReferenceObject(string $name, array $relationListTarget = [], $singleRelationTarget = null): Content { $contentService = $this->getRepository()->getContentService(); $createStruct = $contentService->newContentCreateStruct( @@ -176,7 +178,7 @@ private function createReferenceObject($name, array $relationListTarget = [], $s /** * @return \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct */ - private function getLocationCreateStruct() + private function getLocationCreateStruct(): LocationCreateStruct { return $this->getRepository()->getLocationService()->newLocationCreateStruct(2); } diff --git a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php index fba7847e34..55412168f9 100644 --- a/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php @@ -100,12 +100,12 @@ protected function setUp(): void $contentTypeService->publishContentTypeDraft($type); } - public function testCreateObjectWithRelationToContentType() + public function testCreateObjectWithRelationToContentType(): void { $this->createContentWithRelationList(); } - public function testCreateObjectWithRelationToContentTypeWithExistingDraft() + public function testCreateObjectWithRelationToContentTypeWithExistingDraft(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); @@ -120,7 +120,7 @@ public function testCreateObjectWithRelationToContentTypeWithExistingDraft() /** * Creates content #2 of type 'test-type' with a relation list to new content #1 of type 'folder'. */ - private function createContentWithRelationList() + private function createContentWithRelationList(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); diff --git a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php index 80a7e74879..a9054f7721 100644 --- a/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php +++ b/tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php @@ -35,7 +35,7 @@ protected function setUp(): void $contentService->publishVersion($draft->versionInfo); } - private function getFolderCreateStruct($name) + private function getFolderCreateStruct(string $name) { $createStruct = $this->getRepository()->getContentService()->newContentCreateStruct( $this->getRepository()->getContentTypeService()->loadContentTypeByIdentifier('folder'), @@ -50,7 +50,7 @@ private function getFolderCreateStruct($name) /** * Test that alias is found (ie. NotFoundException is not thrown). */ - public function testURLAliasLoadedInRightLanguage() + public function testURLAliasLoadedInRightLanguage(): void { $aliasService = $this->getRepository()->getURLAliasService(); $alias = $aliasService->lookup('common/alias'); diff --git a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php index 4629a1e11f..4045618e0d 100644 --- a/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php +++ b/tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php @@ -20,7 +20,7 @@ class EZP22840RoleLimitations extends BaseTest /** * Test Subtree Role Assignment Limitation against state/assign. */ - public function testSubtreeRoleAssignLimitation() + public function testSubtreeRoleAssignLimitation(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -66,7 +66,7 @@ public function testSubtreeRoleAssignLimitation() /** * Test Section Role Assignment Limitation against user/login. */ - public function testSectionRoleAssignLimitation() + public function testSectionRoleAssignLimitation(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); diff --git a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php index ff8da3162f..0d1aa05fa6 100644 --- a/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php +++ b/tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php @@ -26,7 +26,7 @@ protected function setUp(): void * * @dataProvider searchContentQueryWithInvalidDataProvider */ - public function testSearchContentSubtreeShouldThrowException($pathString) + public function testSearchContentSubtreeShouldThrowException(string|array $pathString): void { $this->expectException(\InvalidArgumentException::class); @@ -44,7 +44,7 @@ public function testSearchContentSubtreeShouldThrowException($pathString) * * @dataProvider searchContentQueryProvider */ - public function testSearchContentSubtree($pathString) + public function testSearchContentSubtree(string|array $pathString): void { $query = new Query( [ @@ -55,7 +55,7 @@ public function testSearchContentSubtree($pathString) $result = $this->getRepository()->getSearchService()->findContent($query); } - public function searchContentQueryProvider() + public function searchContentQueryProvider(): array { return [ [ @@ -70,7 +70,7 @@ public function searchContentQueryProvider() ]; } - public function searchContentQueryWithInvalidDataProvider() + public function searchContentQueryWithInvalidDataProvider(): array { return [ [ diff --git a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php index 0e65134c73..d7340b8a24 100644 --- a/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php @@ -16,7 +16,7 @@ */ class EZP26327UrlAliasHistorizationTest extends BaseTest { - public function testHistorization() + public function testHistorization(): void { $contentService = $this->getRepository()->getContentService(); $contentTypeService = $this->getRepository()->getContentTypeService(); diff --git a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php index 79a7b9cf0c..881351e616 100644 --- a/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php @@ -20,7 +20,7 @@ */ class EZP26367UrlAliasHistoryRedirectLoopTest extends BaseTest { - public function testReverseLookupReturnsHistoryAlias() + public function testReverseLookupReturnsHistoryAlias(): void { $contentService = $this->getRepository()->getContentService(); $contentTypeService = $this->getRepository()->getContentTypeService(); @@ -88,7 +88,7 @@ public function testReverseLookupReturnsHistoryAlias() self::assertFalse($urlAlias->isHistory); } - public function testLookupHistoryUrlReturnsActiveAlias() + public function testLookupHistoryUrlReturnsActiveAlias(): void { $contentService = $this->getRepository()->getContentService(); $contentTypeService = $this->getRepository()->getContentTypeService(); diff --git a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php index 275380d794..5543ee7e13 100644 --- a/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php +++ b/tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php @@ -18,7 +18,7 @@ */ class EZP26551DeleteContentTypeDraftTest extends BaseTest { - public function testDeleteContentTypeGroup() + public function testDeleteContentTypeGroup(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); diff --git a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php index 7f46a1c5c2..0c64f53f7d 100644 --- a/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php +++ b/tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php @@ -18,7 +18,7 @@ class EZP28799SubtreeSearchTest extends BaseTest /** * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content[] */ - public function createTestContent() + public function createTestContent(): array { $rootLocationId = 2; $contentService = $this->getRepository()->getContentService(); @@ -61,7 +61,7 @@ public function createTestContent() return [$leftFolder, $rightFolder, $targetFolder]; } - public function testConflictingConditions() + public function testConflictingConditions(): void { list($leftFolder, $rightFolder, $targetFolder) = $this->createTestContent(); $locationService = $this->getRepository()->getLocationService(); @@ -83,7 +83,7 @@ public function testConflictingConditions() self::assertSame(0, $result->totalCount); } - public function testNegativeSubtree() + public function testNegativeSubtree(): void { list($leftFolder, $rightFolder, $targetFolder) = $this->createTestContent(); $locationService = $this->getRepository()->getLocationService(); diff --git a/tests/integration/Core/Repository/Regression/EnvTest.php b/tests/integration/Core/Repository/Regression/EnvTest.php index 9296c9eed8..c47c86993a 100644 --- a/tests/integration/Core/Repository/Regression/EnvTest.php +++ b/tests/integration/Core/Repository/Regression/EnvTest.php @@ -21,7 +21,7 @@ class EnvTest extends BaseTest /** * Verify Redis cache is setup if asked for, if not file system. */ - public function testVerifyCacheDriver() + public function testVerifyCacheDriver(): void { $pool = $this->getSetupFactory()->getServiceContainer()->get('ibexa.cache_pool'); diff --git a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php index b5002bb318..637416c3d6 100644 --- a/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php +++ b/tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php @@ -10,6 +10,8 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalOr; use Ibexa\Tests\Integration\Core\Repository\BaseTest; /** @@ -20,7 +22,7 @@ */ class PureNegativeQueryTest extends BaseTest { - public function providerForTestMatchAll() + public function providerForTestMatchAll(): array { $query = new Query(['filter' => new Criterion\MatchAll()]); $result = $this->getRepository()->getSearchService()->findContent($query); @@ -31,7 +33,7 @@ public function providerForTestMatchAll() return [ [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\ContentId($contentId), new Criterion\MatchNone(), @@ -40,7 +42,7 @@ public function providerForTestMatchAll() 1, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\ContentId($contentId), new Criterion\MatchNone(), @@ -49,7 +51,7 @@ public function providerForTestMatchAll() 0, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -60,7 +62,7 @@ public function providerForTestMatchAll() 1, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -71,7 +73,7 @@ public function providerForTestMatchAll() 0, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\ContentId($contentId), new Criterion\MatchAll(), @@ -80,7 +82,7 @@ public function providerForTestMatchAll() $totalCount, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\ContentId($contentId), new Criterion\MatchAll(), @@ -89,7 +91,7 @@ public function providerForTestMatchAll() 1, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\MatchAll(), new Criterion\MatchNone(), @@ -98,7 +100,7 @@ public function providerForTestMatchAll() $totalCount, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\MatchAll(), new Criterion\MatchNone(), @@ -107,7 +109,7 @@ public function providerForTestMatchAll() 0, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -118,7 +120,7 @@ public function providerForTestMatchAll() $totalCount, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -131,7 +133,7 @@ public function providerForTestMatchAll() 1, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\LogicalNot( new Criterion\ContentId($contentId) @@ -146,7 +148,7 @@ public function providerForTestMatchAll() $totalCount, ], [ - new Criterion\LogicalOr( + new LogicalOr( [ new Criterion\LogicalNot( new Criterion\ContentId($contentId) @@ -159,7 +161,7 @@ public function providerForTestMatchAll() $totalCount - 1, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -170,7 +172,7 @@ public function providerForTestMatchAll() 0, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\ContentId($contentId), new Criterion\LogicalNot( @@ -183,7 +185,7 @@ public function providerForTestMatchAll() 1, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\LogicalNot( new Criterion\ContentId($contentId) @@ -198,7 +200,7 @@ public function providerForTestMatchAll() 0, ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ new Criterion\LogicalNot( new Criterion\ContentId($contentId) @@ -219,7 +221,7 @@ public function providerForTestMatchAll() * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterion * @param int $totalCount */ - public function testMatchAllContentInfoQuery($criterion, $totalCount) + public function testMatchAllContentInfoQuery(LogicalOr|LogicalAnd $criterion, ?int $totalCount): void { $query = new Query( [ @@ -238,7 +240,7 @@ public function testMatchAllContentInfoQuery($criterion, $totalCount) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterion * @param int $totalCount */ - public function testMatchAllContentInfoFilter($criterion, $totalCount) + public function testMatchAllContentInfoFilter(LogicalOr|LogicalAnd $criterion, ?int $totalCount): void { $query = new Query( [ @@ -257,7 +259,7 @@ public function testMatchAllContentInfoFilter($criterion, $totalCount) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterion * @param int $totalCount */ - public function testMatchAllLocationQuery($criterion, $totalCount) + public function testMatchAllLocationQuery(LogicalOr|LogicalAnd $criterion, ?int $totalCount): void { $query = new LocationQuery( [ @@ -276,7 +278,7 @@ public function testMatchAllLocationQuery($criterion, $totalCount) * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterion * @param int $totalCount */ - public function testMatchAllLocationFilter($criterion, $totalCount) + public function testMatchAllLocationFilter(LogicalOr|LogicalAnd $criterion, ?int $totalCount): void { $query = new LocationQuery( [ diff --git a/tests/integration/Core/Repository/RepositoryTest.php b/tests/integration/Core/Repository/RepositoryTest.php index 8784b2fdea..87a770bd72 100644 --- a/tests/integration/Core/Repository/RepositoryTest.php +++ b/tests/integration/Core/Repository/RepositoryTest.php @@ -37,7 +37,7 @@ class RepositoryTest extends BaseTest /** * Test for the getRepository() method. */ - public function testGetRepository() + public function testGetRepository(): void { self::assertInstanceOf(Repository::class, $this->getSetupFactory()->getRepository(true)); } @@ -48,7 +48,7 @@ public function testGetRepository() * @group content * @group user */ - public function testGetContentService() + public function testGetContentService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -64,7 +64,7 @@ public function testGetContentService() * * @covers \Ibexa\Contracts\Core\Repository\Repository::getContentLanguageService() */ - public function testGetContentLanguageService() + public function testGetContentLanguageService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -80,7 +80,7 @@ public function testGetContentLanguageService() * @group field-type * @group user */ - public function testGetContentTypeService() + public function testGetContentTypeService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -94,7 +94,7 @@ public function testGetContentTypeService() * * @group location */ - public function testGetLocationService() + public function testGetLocationService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -108,7 +108,7 @@ public function testGetLocationService() * * @group section */ - public function testGetSectionService() + public function testGetSectionService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -122,7 +122,7 @@ public function testGetSectionService() * * @group user */ - public function testGetUserService() + public function testGetUserService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -136,7 +136,7 @@ public function testGetUserService() * * @group user */ - public function testGetNotificationService() + public function testGetNotificationService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -150,7 +150,7 @@ public function testGetNotificationService() * * @group trash */ - public function testGetTrashService() + public function testGetTrashService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -164,7 +164,7 @@ public function testGetTrashService() * * @group role */ - public function testGetRoleService() + public function testGetRoleService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -178,7 +178,7 @@ public function testGetRoleService() * * @group url-alias */ - public function testGetURLAliasService() + public function testGetURLAliasService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -192,7 +192,7 @@ public function testGetURLAliasService() * * @group url-wildcard */ - public function testGetURLWildcardService() + public function testGetURLWildcardService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -206,7 +206,7 @@ public function testGetURLWildcardService() * * @group object-state */ - public function testGetObjectStateService() + public function testGetObjectStateService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -220,7 +220,7 @@ public function testGetObjectStateService() * * @group object-state */ - public function testGetFieldTypeService() + public function testGetFieldTypeService(): void { $repository = $this->getRepository(); self::assertInstanceOf( @@ -234,7 +234,7 @@ public function testGetFieldTypeService() * * @group search */ - public function testGetSearchService() + public function testGetSearchService(): void { $repository = $this->getRepository(); @@ -249,7 +249,7 @@ public function testGetSearchService() * * @group permission */ - public function testGetPermissionResolver() + public function testGetPermissionResolver(): void { $repository = $this->getRepository(); @@ -262,7 +262,7 @@ public function testGetPermissionResolver() /** * Test for the commit() method. */ - public function testCommit() + public function testCommit(): void { $repository = $this->getRepository(); @@ -279,7 +279,7 @@ public function testCommit() /** * Test for the commit() method. */ - public function testCommitThrowsRuntimeException() + public function testCommitThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -290,7 +290,7 @@ public function testCommitThrowsRuntimeException() /** * Test for the rollback() method. */ - public function testRollback() + public function testRollback(): void { $repository = $this->getRepository(); $repository->beginTransaction(); @@ -300,7 +300,7 @@ public function testRollback() /** * Test for the rollback() method. */ - public function testRollbackThrowsRuntimeException() + public function testRollbackThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); diff --git a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php index 11a30eeaae..68cb2b6c62 100644 --- a/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/RoleServiceAuthorizationTest.php @@ -30,7 +30,7 @@ class RoleServiceAuthorizationTest extends BaseTest * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testCreateRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testCreateRoleThrowsUnauthorizedException() + public function testCreateRoleThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -62,7 +62,7 @@ public function testCreateRoleThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testLoadRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testLoadRoleThrowsUnauthorizedException() + public function testLoadRoleThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -91,7 +91,7 @@ public function testLoadRoleThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testLoadRoleByIdentifier * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testLoadRoleByIdentifierThrowsUnauthorizedException() + public function testLoadRoleByIdentifierThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -117,7 +117,7 @@ public function testLoadRoleByIdentifierThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoles() */ - public function testLoadRolesLoadsEmptyListForAnonymousUser() + public function testLoadRolesLoadsEmptyListForAnonymousUser(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -140,7 +140,7 @@ public function testLoadRolesLoadsEmptyListForAnonymousUser() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::loadRoles() */ - public function testLoadRolesForUserWithSubtreeLimitation() + public function testLoadRolesForUserWithSubtreeLimitation(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -173,7 +173,7 @@ public function testLoadRolesForUserWithSubtreeLimitation() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testDeleteRole * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testDeleteRoleThrowsUnauthorizedException() + public function testDeleteRoleThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -202,7 +202,7 @@ public function testDeleteRoleThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testUpdatePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testUpdatePolicyByRoleDraftThrowsUnauthorizedException() + public function testUpdatePolicyByRoleDraftThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -250,7 +250,7 @@ public function testUpdatePolicyByRoleDraftThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemovePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testRemovePolicyThrowsUnauthorizedException() + public function testRemovePolicyThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -295,7 +295,7 @@ public function testRemovePolicyThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemovePolicyByRoleDraft * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testDeletePolicyThrowsUnauthorizedException() + public function testDeletePolicyThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -329,7 +329,7 @@ public function testDeletePolicyThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testAssignRoleToUserGroupThrowsUnauthorizedException() + public function testAssignRoleToUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -364,7 +364,7 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testAssignRoleToUserGroupThrowsUnauthorizedExceptionWithRoleLimitationParameter() + public function testAssignRoleToUserGroupThrowsUnauthorizedExceptionWithRoleLimitationParameter(): void { $this->expectException(UnauthorizedException::class); @@ -406,7 +406,7 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedExceptionWithRoleLimi * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemoveRoleAssignmentFromUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testRemoveRoleAssignmentFromUserGroupThrowsUnauthorizedException() + public function testRemoveRoleAssignmentFromUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -450,7 +450,7 @@ public function testRemoveRoleAssignmentFromUserGroupThrowsUnauthorizedException * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUser * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testAssignRoleToUserThrowsUnauthorizedException() + public function testAssignRoleToUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -479,7 +479,7 @@ public function testAssignRoleToUserThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testAssignRoleToUser * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testAssignRoleToUserThrowsUnauthorizedExceptionWithRoleLimitationParameter() + public function testAssignRoleToUserThrowsUnauthorizedExceptionWithRoleLimitationParameter(): void { $this->expectException(UnauthorizedException::class); @@ -515,7 +515,7 @@ public function testAssignRoleToUserThrowsUnauthorizedExceptionWithRoleLimitatio * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testRemoveRoleAssignment * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testRemoveRoleAssignmentThrowsUnauthorizedException() + public function testRemoveRoleAssignmentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -552,7 +552,7 @@ public function testRemoveRoleAssignmentThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testGetRoleAssignments * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testGetRoleAssignmentsThrowsUnauthorizedException() + public function testGetRoleAssignmentsThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -578,7 +578,7 @@ public function testGetRoleAssignmentsThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() */ - public function testGetRoleAssignmentsForUserLoadsEmptyListForAnonymousUser() + public function testGetRoleAssignmentsForUserLoadsEmptyListForAnonymousUser(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -600,7 +600,7 @@ public function testGetRoleAssignmentsForUserLoadsEmptyListForAnonymousUser() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::getRoleAssignmentsForUser() */ - public function testGetRoleAssignmentsForUserWithSubtreeLimitation() + public function testGetRoleAssignmentsForUserWithSubtreeLimitation(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -633,7 +633,7 @@ public function testGetRoleAssignmentsForUserWithSubtreeLimitation() * @depends Ibexa\Tests\Integration\Core\Repository\RoleServiceTest::testGetRoleAssignmentsForUserGroup * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testGetRoleAssignmentsForUserGroupThrowsUnauthorizedException() + public function testGetRoleAssignmentsForUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/RoleServiceTest.php b/tests/integration/Core/Repository/RoleServiceTest.php index d37e910cb8..a878a5f321 100644 --- a/tests/integration/Core/Repository/RoleServiceTest.php +++ b/tests/integration/Core/Repository/RoleServiceTest.php @@ -59,7 +59,7 @@ class RoleServiceTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newRoleCreateStruct() */ - public function testNewRoleCreateStruct() + public function testNewRoleCreateStruct(): void { $repository = $this->getRepository(); @@ -90,7 +90,7 @@ public function testNewRoleCopyStruct(): void * * @depends testNewRoleCreateStruct */ - public function testNewRoleCreateStructSetsNamePropertyOnStruct() + public function testNewRoleCreateStructSetsNamePropertyOnStruct(): void { $repository = $this->getRepository(); @@ -111,7 +111,7 @@ public function testNewRoleCreateStructSetsNamePropertyOnStruct() * * @depends testNewRoleCreateStruct */ - public function testCreateRole() + public function testCreateRole(): array { $repository = $this->getRepository(); @@ -145,7 +145,7 @@ public function testCreateRole() * * @depends testCreateRole */ - public function testRoleCreateStructValues(array $data) + public function testRoleCreateStructValues(array $data): array { $createStruct = $data['createStruct']; $role = $data['role']; @@ -172,7 +172,7 @@ public function testRoleCreateStructValues(array $data) * * @depends testNewRoleCreateStruct */ - public function testCreateRoleWithPolicy() + public function testCreateRoleWithPolicy(): array { $repository = $this->getRepository(); @@ -220,7 +220,7 @@ public function testCreateRoleWithPolicy() * * @depends testCreateRoleWithPolicy */ - public function testRoleCreateStructValuesWithPolicy(array $data) + public function testRoleCreateStructValuesWithPolicy(array $data): array { $createStruct = $data['createStruct']; $role = $data['role']; @@ -249,15 +249,15 @@ public function testRoleCreateStructValuesWithPolicy(array $data) * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole */ - public function testCreateRoleWithMultiplePolicies() + public function testCreateRoleWithMultiplePolicies(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); - $limitation1 = new Limitation\ContentTypeLimitation(); + $limitation1 = new ContentTypeLimitation(); $limitation1->limitationValues = ['1', '3', '13']; - $limitation2 = new Limitation\SectionLimitation(); + $limitation2 = new SectionLimitation(); $limitation2->limitationValues = ['2', '3']; $limitation3 = new Limitation\OwnerLimitation(); @@ -342,7 +342,7 @@ public function testCreateRoleWithMultiplePolicies() * * @depends testNewRoleCreateStruct */ - public function testCreateRoleDraft() + public function testCreateRoleDraft(): void { $repository = $this->getRepository(); @@ -374,7 +374,7 @@ public function testCreateRoleDraft() * * @depends testCreateRole */ - public function testCreateRoleThrowsInvalidArgumentException() + public function testCreateRoleThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -401,7 +401,7 @@ public function testCreateRoleThrowsInvalidArgumentException() * * @depends testCreateRoleDraft */ - public function testCreateRoleDraftThrowsInvalidArgumentException() + public function testCreateRoleDraftThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -431,7 +431,7 @@ public function testCreateRoleDraftThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::createRole() */ - public function testCreateRoleThrowsLimitationValidationException() + public function testCreateRoleThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -473,7 +473,7 @@ public function testCreateRoleThrowsLimitationValidationException() * * @depends testNewRoleCreateStruct */ - public function testCreateRoleInTransactionWithRollback() + public function testCreateRoleInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -510,7 +510,7 @@ public function testCreateRoleInTransactionWithRollback() * * @depends testNewRoleCreateStruct */ - public function testCreateRoleDraftInTransactionWithRollback() + public function testCreateRoleDraftInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -723,7 +723,7 @@ public function testCopyRoleWithPoliciesAndLimitations( * * @depends testCreateRole */ - public function testLoadRole() + public function testLoadRole(): void { $repository = $this->getRepository(); @@ -751,7 +751,7 @@ public function testLoadRole() * * @depends testCreateRoleDraft */ - public function testLoadRoleDraft() + public function testLoadRoleDraft(): void { $repository = $this->getRepository(); @@ -773,7 +773,7 @@ public function testLoadRoleDraft() self::assertEquals('roleName', $role->identifier); } - public function testLoadRoleDraftByRoleId() + public function testLoadRoleDraftByRoleId(): void { $repository = $this->getRepository(); @@ -806,7 +806,7 @@ public function testLoadRoleDraftByRoleId() * * @depends testLoadRole */ - public function testLoadRoleThrowsNotFoundException() + public function testLoadRoleThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -830,7 +830,7 @@ public function testLoadRoleThrowsNotFoundException() * * @depends testLoadRoleDraft */ - public function testLoadRoleDraftThrowsNotFoundException() + public function testLoadRoleDraftThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -847,7 +847,7 @@ public function testLoadRoleDraftThrowsNotFoundException() /* END: Use Case */ } - public function testLoadRoleDraftByRoleIdThrowsNotFoundException() + public function testLoadRoleDraftByRoleIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -871,7 +871,7 @@ public function testLoadRoleDraftByRoleIdThrowsNotFoundException() * * @depends testCreateRole */ - public function testLoadRoleByIdentifier() + public function testLoadRoleByIdentifier(): void { $repository = $this->getRepository(); @@ -901,7 +901,7 @@ public function testLoadRoleByIdentifier() * * @depends testLoadRoleByIdentifier */ - public function testLoadRoleByIdentifierThrowsNotFoundException() + public function testLoadRoleByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -924,7 +924,7 @@ public function testLoadRoleByIdentifierThrowsNotFoundException() * * @depends testCreateRole */ - public function testLoadRoles() + public function testLoadRoles(): void { $repository = $this->getRepository(); @@ -961,7 +961,7 @@ public function testLoadRoles() * * @depends testLoadRoles */ - public function testLoadRolesReturnsExpectedSetOfDefaultRoles() + public function testLoadRolesReturnsExpectedSetOfDefaultRoles(): void { $repository = $this->getRepository(); @@ -993,7 +993,7 @@ public function testLoadRolesReturnsExpectedSetOfDefaultRoles() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newRoleUpdateStruct() */ - public function testNewRoleUpdateStruct() + public function testNewRoleUpdateStruct(): void { $repository = $this->getRepository(); @@ -1013,7 +1013,7 @@ public function testNewRoleUpdateStruct() * @depends testNewRoleUpdateStruct * @depends testLoadRoleDraft */ - public function testUpdateRoleDraft() + public function testUpdateRoleDraft(): void { $repository = $this->getRepository(); @@ -1045,7 +1045,7 @@ public function testUpdateRoleDraft() * * @depends testUpdateRoleDraft */ - public function testUpdateRoleDraftThrowsInvalidArgumentException() + public function testUpdateRoleDraftThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -1076,7 +1076,7 @@ public function testUpdateRoleDraftThrowsInvalidArgumentException() * @depends testCreateRole * @depends testLoadRoles */ - public function testDeleteRole() + public function testDeleteRole(): void { $repository = $this->getRepository(); @@ -1104,7 +1104,7 @@ public function testDeleteRole() * * @depends testLoadRoleDraft */ - public function testDeleteRoleDraft() + public function testDeleteRoleDraft(): void { $this->expectException(NotFoundException::class); @@ -1131,7 +1131,7 @@ public function testDeleteRoleDraft() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newPolicyCreateStruct() */ - public function testNewPolicyCreateStruct() + public function testNewPolicyCreateStruct(): void { $repository = $this->getRepository(); @@ -1150,7 +1150,7 @@ public function testNewPolicyCreateStruct() * * @depends testNewPolicyCreateStruct */ - public function testNewPolicyCreateStructSetsStructProperties() + public function testNewPolicyCreateStructSetsStructProperties(): void { $repository = $this->getRepository(); @@ -1173,7 +1173,7 @@ public function testNewPolicyCreateStructSetsStructProperties() * @depends testCreateRoleDraft * @depends testNewPolicyCreateStruct */ - public function testAddPolicyByRoleDraft() + public function testAddPolicyByRoleDraft(): void { $repository = $this->getRepository(); @@ -1206,7 +1206,7 @@ public function testAddPolicyByRoleDraft() } usort( $actual, - static function ($p1, $p2): int { + static function (array $p1, array $p2): int { return strcasecmp($p1['function'], $p2['function']); } ); @@ -1235,7 +1235,7 @@ static function ($p1, $p2): int { * * @depends testAddPolicyByRoleDraft */ - public function testAddPolicyByRoleDraftUpdatesRole() + public function testAddPolicyByRoleDraftUpdatesRole(): array { $repository = $this->getRepository(); @@ -1277,7 +1277,7 @@ public function testAddPolicyByRoleDraftUpdatesRole() * * @depends testAddPolicyByRoleDraftUpdatesRole */ - public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) + public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy): void { list($role, $policy) = $roleAndPolicy; @@ -1295,7 +1295,7 @@ public function testAddPolicyByRoleDraftSetsPolicyProperties($roleAndPolicy) * @depends testNewPolicyCreateStruct * @depends testCreateRoleDraft */ - public function testAddPolicyByRoleDraftThrowsLimitationValidationException() + public function testAddPolicyByRoleDraftThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -1335,7 +1335,7 @@ public function testAddPolicyByRoleDraftThrowsLimitationValidationException() * * @depends testAddPolicyByRoleDraftUpdatesRole */ - public function testCreateRoleWithAddPolicy() + public function testCreateRoleWithAddPolicy(): void { $repository = $this->getRepository(); @@ -1396,7 +1396,7 @@ public function testCreateRoleWithAddPolicy() * * @depends testAddPolicyByRoleDraftUpdatesRole */ - public function testCreateRoleDraftWithAddPolicy() + public function testCreateRoleDraftWithAddPolicy(): void { $repository = $this->getRepository(); @@ -1452,7 +1452,7 @@ public function testCreateRoleDraftWithAddPolicy() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::newPolicyUpdateStruct() */ - public function testNewPolicyUpdateStruct() + public function testNewPolicyUpdateStruct(): void { $repository = $this->getRepository(); @@ -1467,7 +1467,7 @@ public function testNewPolicyUpdateStruct() ); } - public function testUpdatePolicyByRoleDraftNoLimitation() + public function testUpdatePolicyByRoleDraftNoLimitation(): void { $repository = $this->getRepository(); @@ -1529,7 +1529,7 @@ public function testUpdatePolicyByRoleDraftNoLimitation() * @depends testAddPolicyByRoleDraft * @depends testNewPolicyUpdateStruct */ - public function testUpdatePolicyByRoleDraft() + public function testUpdatePolicyByRoleDraft(): array { $repository = $this->getRepository(); @@ -1633,7 +1633,7 @@ public function testUpdatePolicyUpdatesLimitations($roleAndPolicy) * * @depends testUpdatePolicyUpdatesLimitations */ - public function testUpdatePolicyUpdatesRole($role) + public function testUpdatePolicyUpdatesRole($role): void { $limitations = []; foreach ($role->getPolicies() as $policy) { @@ -1668,7 +1668,7 @@ public function testUpdatePolicyUpdatesRole($role) * @depends testNewRoleCreateStruct * @depends testCreateRole */ - public function testUpdatePolicyByRoleDraftThrowsLimitationValidationException() + public function testUpdatePolicyByRoleDraftThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -1738,7 +1738,7 @@ public function testUpdatePolicyByRoleDraftThrowsLimitationValidationException() * * @depends testAddPolicyByRoleDraft */ - public function testRemovePolicyByRoleDraft() + public function testRemovePolicyByRoleDraft(): void { $repository = $this->getRepository(); @@ -1776,7 +1776,7 @@ public function testRemovePolicyByRoleDraft() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::addPolicyByRoleDraft() */ - public function testAddPolicyWithRoleAssignment() + public function testAddPolicyWithRoleAssignment(): void { $repository = $this->getRepository(); @@ -1875,7 +1875,7 @@ public function testLoadRoleAssignment() * * @depends testLoadRoleByIdentifier */ - public function testGetRoleAssignments() + public function testGetRoleAssignments(): array { $repository = $this->getRepository(); @@ -1912,7 +1912,7 @@ public function testGetRoleAssignments() * * @depends testGetRoleAssignments */ - public function testGetRoleAssignmentsContainExpectedLimitation(array $roleAssignments) + public function testGetRoleAssignmentsContainExpectedLimitation(array $roleAssignments): void { self::assertEquals( 'Subtree', @@ -2021,7 +2021,7 @@ public function testCountRoleAssignmentsAfterDeletingUser(): void * * @depends testGetRoleAssignments */ - public function testAssignRoleToUser() + public function testAssignRoleToUser(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2050,7 +2050,7 @@ public function testAssignRoleToUser() * * @depends testAssignRoleToUser */ - public function testAssignRoleToUserWithRoleLimitation() + public function testAssignRoleToUserWithRoleLimitation(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2157,7 +2157,7 @@ public function testAssignRoleToUserWithRoleLimitation() * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ - public function testAssignRoleToUserWithRoleLimitationThrowsLimitationValidationException() + public function testAssignRoleToUserWithRoleLimitationThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -2199,7 +2199,7 @@ public function testAssignRoleToUserWithRoleLimitationThrowsLimitationValidation * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ - public function testAssignRoleToUserThrowsInvalidArgumentException() + public function testAssignRoleToUserThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2245,7 +2245,7 @@ public function testAssignRoleToUserThrowsInvalidArgumentException() * @depends testAssignRoleToUser * @depends testLoadRoleByIdentifier */ - public function testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentException() + public function testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2298,7 +2298,7 @@ public function testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentExcep * * @depends testAssignRoleToUser */ - public function testRemoveRoleAssignment() + public function testRemoveRoleAssignment(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2335,7 +2335,7 @@ public function testRemoveRoleAssignment() * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ - public function testGetRoleAssignmentsForUserDirect() + public function testGetRoleAssignmentsForUserDirect(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2391,7 +2391,7 @@ public function testGetRoleAssignmentsForUserDirect() * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ - public function testGetRoleAssignmentsForUserEmpty() + public function testGetRoleAssignmentsForUserEmpty(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2416,7 +2416,7 @@ public function testGetRoleAssignmentsForUserEmpty() * @depends testAssignRoleToUser * @depends testCreateRoleWithAddPolicy */ - public function testGetRoleAssignmentsForUserInherited() + public function testGetRoleAssignmentsForUserInherited(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2444,7 +2444,7 @@ public function testGetRoleAssignmentsForUserInherited() * * @depends testGetRoleAssignments */ - public function testAssignRoleToUserGroup() + public function testAssignRoleToUserGroup(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2473,7 +2473,7 @@ public function testAssignRoleToUserGroup() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::assignRoleToUserGroup() */ - public function testAssignRoleToUserGroupAffectsRoleAssignmentsForUser() + public function testAssignRoleToUserGroupAffectsRoleAssignmentsForUser(): void { $roleService = $this->getRepository()->getRoleService(); @@ -2503,7 +2503,7 @@ public function testAssignRoleToUserGroupAffectsRoleAssignmentsForUser() * * @depends testAssignRoleToUserGroup */ - public function testAssignRoleToUserGroupWithRoleLimitation() + public function testAssignRoleToUserGroupWithRoleLimitation(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2606,7 +2606,7 @@ public function testAssignRoleToUserGroupWithRoleLimitation() * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ - public function testAssignRoleToUserGroupWithRoleLimitationThrowsLimitationValidationException() + public function testAssignRoleToUserGroupWithRoleLimitationThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -2649,7 +2649,7 @@ public function testAssignRoleToUserGroupWithRoleLimitationThrowsLimitationValid * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ - public function testAssignRoleToUserGroupThrowsInvalidArgumentException() + public function testAssignRoleToUserGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2696,7 +2696,7 @@ public function testAssignRoleToUserGroupThrowsInvalidArgumentException() * @depends testLoadRoleByIdentifier * @depends testAssignRoleToUserGroup */ - public function testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgumentException() + public function testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2750,7 +2750,7 @@ public function testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgument * * @depends testAssignRoleToUserGroup */ - public function testRemoveRoleAssignmentFromUserGroup() + public function testRemoveRoleAssignmentFromUserGroup(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2786,7 +2786,7 @@ public function testRemoveRoleAssignmentFromUserGroup() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment */ - public function testUnassignRoleByAssignment() + public function testUnassignRoleByAssignment(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2813,7 +2813,7 @@ public function testUnassignRoleByAssignment() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment */ - public function testUnassignRoleByAssignmentThrowsUnauthorizedException() + public function testUnassignRoleByAssignmentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -2838,7 +2838,7 @@ public function testUnassignRoleByAssignmentThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\RoleService::removeRoleAssignment */ - public function testUnassignRoleByAssignmentThrowsNotFoundException() + public function testUnassignRoleByAssignmentThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -2866,7 +2866,7 @@ public function testUnassignRoleByAssignmentThrowsNotFoundException() * @depends testAssignRoleToUserGroup * @depends testCreateRoleWithAddPolicy */ - public function testGetRoleAssignmentsForUserGroup() + public function testGetRoleAssignmentsForUserGroup(): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); @@ -2917,7 +2917,7 @@ public function testGetRoleAssignmentsForUserGroup() * @depends testAssignRoleToUser * @depends testAssignRoleToUserGroup */ - public function testLoadPoliciesByUserId() + public function testLoadPoliciesByUserId(): void { $repository = $this->getRepository(); @@ -2994,7 +2994,7 @@ public function testLoadPoliciesByUserId() * * @depends testCreateRoleDraft */ - public function testPublishRoleDraft() + public function testPublishRoleDraft(): void { $repository = $this->getRepository(); @@ -3033,7 +3033,7 @@ public function testPublishRoleDraft() * @depends testCreateRoleDraft * @depends testAddPolicyByRoleDraft */ - public function testPublishRoleDraftAddPolicies() + public function testPublishRoleDraftAddPolicies(): void { $repository = $this->getRepository(); @@ -3068,7 +3068,7 @@ public function testPublishRoleDraftAddPolicies() } usort( $actual, - static function ($p1, $p2): int { + static function (array $p1, array $p2): int { return strcasecmp($p1['function'], $p2['function']); } ); diff --git a/tests/integration/Core/Repository/SearchEngineIndexingTest.php b/tests/integration/Core/Repository/SearchEngineIndexingTest.php index 7cdaf1e370..c73299c34b 100644 --- a/tests/integration/Core/Repository/SearchEngineIndexingTest.php +++ b/tests/integration/Core/Repository/SearchEngineIndexingTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -59,7 +60,7 @@ public function testFindContentInfoFullTextIsSearchable() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo */ - public function testFindLocationsFullTextIsSearchable(ContentInfo $contentInfo) + public function testFindLocationsFullTextIsSearchable(ContentInfo $contentInfo): void { $searchTerm = 'pamplemousse'; @@ -86,7 +87,7 @@ public function testFindLocationsFullTextIsSearchable(ContentInfo $contentInfo) * * @depends testFindContentInfoFullTextIsSearchable */ - public function testFindContentInfoFullTextIsNotSearchable() + public function testFindContentInfoFullTextIsNotSearchable(): void { $searchTerm = 'pamplemousse'; $this->createFullTextIsSearchableContent($searchTerm, false); @@ -110,7 +111,7 @@ public function testFindContentInfoFullTextIsNotSearchable() * * @depends testFindLocationsFullTextIsSearchable */ - public function testFindLocationsFullTextIsNotSearchable() + public function testFindLocationsFullTextIsNotSearchable(): void { $searchTerm = 'pamplemousse'; @@ -185,7 +186,7 @@ protected function createFullTextIsSearchableContent($searchText, $isSearchable) /** * EZP-26186: Make sure index is NOT deleted on removal of version draft (affected Solr). */ - public function testDeleteVersion() + public function testDeleteVersion(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -213,7 +214,7 @@ public function testDeleteVersion() /** * EZP-26186: Make sure affected child locations are deleted on content deletion (affected Solr). */ - public function testDeleteContent() + public function testDeleteContent(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -236,7 +237,7 @@ public function testDeleteContent() /** * EZP-26186: Make sure index is deleted on removal of Users (affected Solr). */ - public function testDeleteUser() + public function testDeleteUser(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -259,7 +260,7 @@ public function testDeleteUser() /** * EZP-26186: Make sure index is deleted on removal of UserGroups (affected Solr). */ - public function testDeleteUserGroup() + public function testDeleteUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -282,7 +283,7 @@ public function testDeleteUserGroup() /** * Test that a newly created user is available for search. */ - public function testCreateUser() + public function testCreateUser(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -318,7 +319,7 @@ public function testCreateUser() /** * Test that a newly updated user is available for search. */ - public function testUpdateUser() + public function testUpdateUser(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -350,7 +351,7 @@ public function testUpdateUser() /** * Test that a newly created user group is available for search. */ - public function testCreateUserGroup() + public function testCreateUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -380,7 +381,7 @@ public function testCreateUserGroup() /** * Test that a newly created Location is available for search. */ - public function testCreateLocation() + public function testCreateLocation(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -402,7 +403,7 @@ public function testCreateLocation() /** * Test that hiding a Location makes it unavailable for search. */ - public function testHideSubtree() + public function testHideSubtree(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -428,7 +429,7 @@ public function testHideSubtree() /** * Test that hiding and revealing a Location makes it available for search. */ - public function testRevealSubtree() + public function testRevealSubtree(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -456,7 +457,7 @@ public function testRevealSubtree() /** * Test that a copied subtree is available for search. */ - public function testCopySubtree() + public function testCopySubtree(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -506,7 +507,7 @@ public function testCopySubtree() /** * Test that moved subtree is available for search and found only under a specific parent Location. */ - public function testMoveSubtree() + public function testMoveSubtree(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -571,7 +572,7 @@ public function testMoveSubtree() * Testing that content is indexed even when containing only fields with values * considered to be empty by the search engine. */ - public function testIndexContentWithNullField() + public function testIndexContentWithNullField(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -627,7 +628,7 @@ public function testIndexContentWithNullField() /** * Test that updated Location is available for search. */ - public function testUpdateLocation() + public function testUpdateLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -665,7 +666,7 @@ public function testUpdateLocation() * Testing that content will be deleted with all of its subitems but subitems with additional location will stay as * they are. */ - public function testDeleteLocation() + public function testDeleteLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -700,7 +701,7 @@ public function testDeleteLocation() /** * Test content is available for search after being published. */ - public function testPublishVersion() + public function testPublishVersion(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -731,7 +732,7 @@ public function testPublishVersion() /** * Test recovered content is available for search. */ - public function testRecoverLocation() + public function testRecoverLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -761,7 +762,7 @@ public function testRecoverLocation() /** * Test copied content is available for search. */ - public function testCopyContent() + public function testCopyContent(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -787,7 +788,7 @@ public function testCopyContent() /** * Test that setting object content state to locked and then unlocked does not affect search index. */ - public function testSetContentState() + public function testSetContentState(): void { $repository = $this->getRepository(); $objectStateService = $repository->getObjectStateService(); @@ -819,7 +820,7 @@ public function testSetContentState() * * @dataProvider getSpecialFullTextCases */ - public function testIndexingSpecialFullTextCases($text, $searchForText) + public function testIndexingSpecialFullTextCases(string $text, $searchForText): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -891,7 +892,7 @@ public function getEmailAddressesCases(): array * * @return array */ - public function getSpecialFullTextCases() + public function getSpecialFullTextCases(): array { return [ ['UPPERCASE TEXT', 'uppercase text'], @@ -918,7 +919,7 @@ public function getSpecialFullTextCases() * * @see https://issues.ibexa.co/browse/EZP-27250 */ - public function testUserFullTextSearch() + public function testUserFullTextSearch(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -940,7 +941,7 @@ public function testUserFullTextSearch() /** * Test updating Content field value with empty value removes it from search index. */ - public function testRemovedContentFieldValueIsNotFound() + public function testRemovedContentFieldValueIsNotFound(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -975,7 +976,7 @@ public function testRemovedContentFieldValueIsNotFound() * @param int $parentLocationId parent location Id * @param bool $expected expected value of {invisible} property in subtree */ - private function assertSubtreeInvisibleProperty(SearchService $searchService, $parentLocationId, $expected) + private function assertSubtreeInvisibleProperty(SearchService $searchService, $parentLocationId, $expected): void { $criterion = new Criterion\ParentLocationId($parentLocationId); $query = new LocationQuery(['filter' => $criterion]); @@ -990,7 +991,7 @@ private function assertSubtreeInvisibleProperty(SearchService $searchService, $p /** * Test that swapping locations affects properly Search Engine Index. */ - public function testSwapLocation() + public function testSwapLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -1023,7 +1024,7 @@ public function testSwapLocation() /** * Test that updating Content metadata affects properly Search Engine Index. */ - public function testUpdateContentMetadata() + public function testUpdateContentMetadata(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1037,7 +1038,7 @@ public function testUpdateContentMetadata() $newContentMetadataUpdateStruct = $contentService->newContentMetadataUpdateStruct(); $newContentMetadataUpdateStruct->remoteId = md5('Test'); - $newContentMetadataUpdateStruct->publishedDate = new \DateTime(); + $newContentMetadataUpdateStruct->publishedDate = new DateTime(); $newContentMetadataUpdateStruct->publishedDate->add(new \DateInterval('P1D')); $newContentMetadataUpdateStruct->mainLocationId = $newLocation->id; @@ -1074,7 +1075,7 @@ public function testUpdateContentMetadata() /** * Test that updating Content Draft metadata does not affect Search Engine Index. */ - public function testUpdateContentDraftMetadataIsNotIndexed() + public function testUpdateContentDraftMetadataIsNotIndexed(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1099,7 +1100,7 @@ public function testUpdateContentDraftMetadataIsNotIndexed() /** * Test that assigning section to content object properly affects Search Engine Index. */ - public function testAssignSection() + public function testAssignSection(): void { $repository = $this->getRepository(); $sectionService = $repository->getSectionService(); @@ -1123,7 +1124,7 @@ public function testAssignSection() /** * Test search engine is updated after removal of the translation from all the Versions. */ - public function testDeleteTranslation() + public function testDeleteTranslation(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -1270,7 +1271,7 @@ protected function createContent( * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createContentWithNameAndDescription($contentName, $contentDescription, array $parentLocationIdList = []) + protected function createContentWithNameAndDescription(string $contentName, $contentDescription, array $parentLocationIdList = []): Content { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1303,7 +1304,7 @@ protected function createContentWithNameAndDescription($contentName, $contentDes * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createMultiLanguageContent(array $names, $parentLocationId, $alwaysAvailable) + protected function createMultiLanguageContent(array $names, int $parentLocationId, $alwaysAvailable) { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -1363,7 +1364,7 @@ protected function assertContentIdSearch($contentId, $expectedCount) * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location */ - protected function createNewTestLocation() + protected function createNewTestLocation(): Location { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php b/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php index b2a87eecfe..1f7c9333ee 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php @@ -17,11 +17,9 @@ */ final class TermAggregationDataSetBuilder { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Aggregation */ - private $aggregation; + private Aggregation $aggregation; - /** @var array */ - private $entries; + private array $entries; /** @var callable|null */ private $mapper; diff --git a/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php b/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php index 326aeef304..ff10450a59 100644 --- a/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php +++ b/tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php @@ -17,20 +17,15 @@ */ final class FieldAggregationFixtureGenerator { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var string|null */ - private $contentTypeIdentifier; + private ?string $contentTypeIdentifier = null; - /** @var string|null */ - private $fieldTypeIdentifier; + private ?string $fieldTypeIdentifier = null; - /** @var string|null */ - private $fieldDefinitionIdentifier; + private ?string $fieldDefinitionIdentifier = null; - /** @var iterable|null */ - private $values; + private ?iterable $values = null; /** @var callable|null */ private $fieldDefinitionCreateStructConfigurator; diff --git a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php index a8d8099af3..9ffc226bb2 100644 --- a/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php +++ b/tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php @@ -16,7 +16,7 @@ final class RemoteIdIndexingTest extends BaseTest { /** @var int[] */ - private static $contentIdByRemoteIdIndex = []; + private static array $contentIdByRemoteIdIndex = []; /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException diff --git a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php index 052e8358a4..6a48fb4a9f 100644 --- a/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SearchServiceAuthorizationTest.php @@ -31,7 +31,7 @@ class SearchServiceAuthorizationTest extends BaseTest * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindContentFiltered */ - public function testFindContent() + public function testFindContent(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -62,7 +62,7 @@ public function testFindContent() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindContentFiltered */ - public function testFindContentEmptyResult() + public function testFindContentEmptyResult(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -96,7 +96,7 @@ public function testFindContentEmptyResult() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFindSingle */ - public function testFindSingleThrowsNotFoundException() + public function testFindSingleThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -129,7 +129,7 @@ public function testFindSingleThrowsNotFoundException() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ - public function testFindContentWithUserPermissionFilter() + public function testFindContentWithUserPermissionFilter(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -168,7 +168,7 @@ public function testFindContentWithUserPermissionFilter() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ - public function testFindSingleWithUserPermissionFilter() + public function testFindSingleWithUserPermissionFilter(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -200,7 +200,7 @@ public function testFindSingleWithUserPermissionFilter() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceAuthorizationTest::testFindContent */ - public function testFindSingleThrowsNotFoundExceptionWithUserPermissionFilter() + public function testFindSingleThrowsNotFoundExceptionWithUserPermissionFilter(): void { $this->expectException(NotFoundException::class); diff --git a/tests/integration/Core/Repository/SearchServiceFulltextTest.php b/tests/integration/Core/Repository/SearchServiceFulltextTest.php index ff3219f92b..d1e8254f4c 100644 --- a/tests/integration/Core/Repository/SearchServiceFulltextTest.php +++ b/tests/integration/Core/Repository/SearchServiceFulltextTest.php @@ -43,8 +43,10 @@ protected function setUp(): void /** * Create test Content and return Content ID map for subsequent testing. + * + * @return mixed[] */ - public function testPrepareContent() + public function testPrepareContent(): array { $repository = $this->getRepository(); $dataMap = [ @@ -216,7 +218,7 @@ private function doTestFulltextContentSearch(string $searchString, array $expect * * @dataProvider providerForTestFulltextSearchSolr7 */ - public function testFulltextLocationSearchSolr7($searchString, array $expectedKeys, array $idMap): void + public function testFulltextLocationSearchSolr7(string $searchString, array $expectedKeys, array $idMap): void { if (false === $this->isSolrMajorVersionInRange('7.0.0', '8.0.0')) { self::markTestSkipped('This test is only relevant for Solr >= 7'); @@ -243,12 +245,12 @@ private function doTestFulltextLocationSearch($searchString, array $expectedKeys * @param array $expectedKeys * @param array $idMap */ - public function assertFulltextSearch(SearchResult $searchResult, array $expectedKeys, array $idMap) + public function assertFulltextSearch(SearchResult $searchResult, array $expectedKeys, array $idMap): void { self::assertEquals( array_reduce( $expectedKeys, - static function ($carry, $item) { + static function ($carry, $item): float|int { $carry += count((array)$item); return $carry; @@ -272,7 +274,7 @@ static function ($carry, $item) { * * @return array */ - private function mapKeysToIds(array $expectedKeys, array $idMap) + private function mapKeysToIds(array $expectedKeys, array $idMap): array { $expectedIds = []; diff --git a/tests/integration/Core/Repository/SearchServiceImageTest.php b/tests/integration/Core/Repository/SearchServiceImageTest.php index e9b589aa3e..9e82758f1e 100644 --- a/tests/integration/Core/Repository/SearchServiceImageTest.php +++ b/tests/integration/Core/Repository/SearchServiceImageTest.php @@ -255,7 +255,7 @@ public function provideInvalidDataForTestCriterion(): iterable /** * @param string|array $value */ - private function createMimeTypeCriterion($value): Query\Criterion\Image\MimeType + private function createMimeTypeCriterion(string|array $value): Query\Criterion\Image\MimeType { return new Query\Criterion\Image\MimeType( self::IMAGE_FIELD_DEF_IDENTIFIER, @@ -268,7 +268,7 @@ private function createMimeTypeCriterion($value): Query\Criterion\Image\MimeType * @param numeric|null $max */ private function createFileSizeCriterion( - $min = 0, + int|string|float|null $min = 0, $max = null ): Query\Criterion\Image\FileSize { return new Query\Criterion\Image\FileSize( @@ -324,7 +324,7 @@ private function createDimensionsCriterion( /** * @param string|array $value */ - private function createOrientationCriterion($value): Query\Criterion\Image\Orientation + private function createOrientationCriterion(string|array $value): Query\Criterion\Image\Orientation { return new Query\Criterion\Image\Orientation( self::IMAGE_FIELD_DEF_IDENTIFIER, diff --git a/tests/integration/Core/Repository/SearchServiceLocationTest.php b/tests/integration/Core/Repository/SearchServiceLocationTest.php index 7a38aee7c3..2896c92900 100644 --- a/tests/integration/Core/Repository/SearchServiceLocationTest.php +++ b/tests/integration/Core/Repository/SearchServiceLocationTest.php @@ -193,7 +193,7 @@ protected function createFolderWithNonPrintableUtf8Characters(): Content * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFieldIsEmptyInLocation() + public function testFieldIsEmptyInLocation(): void { $testContents = $this->createMovieContent(); @@ -226,7 +226,7 @@ public function testFieldIsEmptyInLocation() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFieldIsNotEmptyInLocation() + public function testFieldIsNotEmptyInLocation(): void { $testContents = $this->createMovieContent(); @@ -256,7 +256,7 @@ public function testFieldIsNotEmptyInLocation() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFieldCollectionContains() + public function testFieldCollectionContains(): void { $testContent = $this->createMultipleCountriesContent(); @@ -288,7 +288,7 @@ public function testFieldCollectionContains() * * @depends Ibexa\Tests\Integration\Core\Repository\SearchServiceTest::testFieldCollectionContains */ - public function testFieldCollectionContainsNoMatch() + public function testFieldCollectionContainsNoMatch(): void { $this->createMultipleCountriesContent(); $query = new LocationQuery( @@ -375,7 +375,7 @@ public function testEscapedNonPrintableUtf8Characters(): void self::assertEquals(1, $result->totalCount); } - public function testInvalidFieldIdentifierRange() + public function testInvalidFieldIdentifierRange(): void { $this->expectException(InvalidArgumentException::class); @@ -396,7 +396,7 @@ public function testInvalidFieldIdentifierRange() ); } - public function testInvalidFieldIdentifierIn() + public function testInvalidFieldIdentifierIn(): void { $this->expectException(InvalidArgumentException::class); @@ -417,7 +417,7 @@ public function testInvalidFieldIdentifierIn() ); } - public function testFindLocationsWithNonSearchableField() + public function testFindLocationsWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); @@ -456,7 +456,7 @@ static function (SearchHit $searchHit) { * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testQueryCustomField() + public function testQueryCustomField(): void { $query = new LocationQuery( [ @@ -487,7 +487,7 @@ public function testQueryCustomField() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testQueryModifiedField() + public function testQueryModifiedField(): void { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { @@ -558,7 +558,7 @@ protected function createTestPlaceContentType() * * @group maplocation */ - public function testMapLocationDistanceLessThanOrEqual() + public function testMapLocationDistanceLessThanOrEqual(): void { $contentType = $this->createTestPlaceContentType(); @@ -640,7 +640,7 @@ public function testMapLocationDistanceLessThanOrEqual() * * @group maplocation */ - public function testMapLocationDistanceGreaterThanOrEqual() + public function testMapLocationDistanceGreaterThanOrEqual(): void { $contentType = $this->createTestPlaceContentType(); @@ -722,7 +722,7 @@ public function testMapLocationDistanceGreaterThanOrEqual() * * @group maplocation */ - public function testMapLocationDistanceBetween() + public function testMapLocationDistanceBetween(): void { $contentType = $this->createTestPlaceContentType(); @@ -820,7 +820,7 @@ public function testMapLocationDistanceBetween() * * @group maplocation */ - public function testMapLocationDistanceSortAscending() + public function testMapLocationDistanceSortAscending(): void { $contentType = $this->createTestPlaceContentType(); @@ -939,7 +939,7 @@ public function testMapLocationDistanceSortAscending() * * @group maplocation */ - public function testMapLocationDistanceSortDescending() + public function testMapLocationDistanceSortDescending(): void { $contentType = $this->createTestPlaceContentType(); @@ -1058,7 +1058,7 @@ public function testMapLocationDistanceSortDescending() * * @group maplocation */ - public function testMapLocationDistanceWithCustomField() + public function testMapLocationDistanceWithCustomField(): void { $contentType = $this->createTestPlaceContentType(); @@ -1143,7 +1143,7 @@ public function testMapLocationDistanceWithCustomField() * * @group maplocation */ - public function testMapLocationDistanceWithCustomFieldSort() + public function testMapLocationDistanceWithCustomFieldSort(): void { $contentType = $this->createTestPlaceContentType(); @@ -1263,7 +1263,7 @@ public function testMapLocationDistanceWithCustomFieldSort() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testVisibilityCriterionWithHiddenContent() + public function testVisibilityCriterionWithHiddenContent(): void { $repository = $this->getRepository(); $contentTypeService = $repository->getContentTypeService(); diff --git a/tests/integration/Core/Repository/SearchServiceTest.php b/tests/integration/Core/Repository/SearchServiceTest.php index d6dc0baa09..97e7172d95 100644 --- a/tests/integration/Core/Repository/SearchServiceTest.php +++ b/tests/integration/Core/Repository/SearchServiceTest.php @@ -21,6 +21,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Tests\Solr\SetupFactory\LegacySetupFactory as LegacySolrSetupFactory; @@ -44,7 +45,7 @@ class SearchServiceTest extends BaseTest self::FIND_LOCATION_METHOD, ]; - public function getFilterContentSearches() + public function getFilterContentSearches(): array { $fixtureDir = $this->getFixtureDir(); @@ -188,7 +189,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::GT, + Operator::GT, 1343140540 ), 'sortClauses' => [new SortClause\ContentId()], @@ -199,7 +200,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::GTE, + Operator::GTE, 1311154215 ), 'sortClauses' => [new SortClause\ContentId()], @@ -210,7 +211,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::LTE, + Operator::LTE, 1311154215 ), 'limit' => 10, @@ -222,7 +223,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::IN, + Operator::IN, [1033920794, 1060695457, 1343140540] ), 'sortClauses' => [new SortClause\ContentId()], @@ -233,7 +234,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [1033920776, 1072180276] ), 'sortClauses' => [new SortClause\ContentId()], @@ -244,7 +245,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::CREATED, - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [1033920776, 1072180278] ), 'sortClauses' => [new SortClause\ContentId()], @@ -255,7 +256,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::EQ, + Operator::EQ, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -266,7 +267,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -277,7 +278,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::LT, + Operator::LT, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -288,7 +289,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::LTE, + Operator::LTE, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -299,7 +300,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::GT, + Operator::GT, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -310,7 +311,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::GTE, + Operator::GTE, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -321,7 +322,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\CustomField( 'user_group_name_value_s', - Criterion\Operator::BETWEEN, + Operator::BETWEEN, ['Administrator users', 'Members'] ), 'sortClauses' => [new SortClause\ContentId()], @@ -350,7 +351,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\Field( 'name', - Criterion\Operator::EQ, + Operator::EQ, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -361,7 +362,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\Field( 'name', - Criterion\Operator::IN, + Operator::IN, ['Members', 'Anonymous users'] ), 'sortClauses' => [new SortClause\ContentId()], @@ -372,7 +373,7 @@ public function getFilterContentSearches() [ 'filter' => new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [1033920275, 1033920794] ), 'sortClauses' => [new SortClause\ContentId()], @@ -385,12 +386,12 @@ public function getFilterContentSearches() [ new Criterion\Field( 'name', - Criterion\Operator::EQ, + Operator::EQ, 'Members' ), new Criterion\DateMetadata( Criterion\DateMetadata::MODIFIED, - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [1033920275, 1033920794] ), ] @@ -446,7 +447,7 @@ public function getFilterContentSearches() ], $fixtureDir . 'Status.php', // Result having the same sort level should be sorted between them to be system independent - static function (&$data) { + static function (&$data): void { usort( $data->searchHits, static function ($a, $b): int { @@ -469,7 +470,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::MODIFIER, - Criterion\Operator::EQ, + Operator::EQ, 14 ), 'sortClauses' => [ @@ -483,7 +484,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::MODIFIER, - Criterion\Operator::IN, + Operator::IN, [14] ), 'sortClauses' => [ @@ -497,7 +498,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::OWNER, - Criterion\Operator::EQ, + Operator::EQ, 14 ), 'sortClauses' => [ @@ -511,7 +512,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::OWNER, - Criterion\Operator::IN, + Operator::IN, [14] ), 'sortClauses' => [ @@ -525,7 +526,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::EQ, + Operator::EQ, 12 ), 'sortClauses' => [ @@ -539,7 +540,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::IN, + Operator::IN, [12] ), 'sortClauses' => [ @@ -553,7 +554,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::EQ, + Operator::EQ, 4 ), 'sortClauses' => [ @@ -567,7 +568,7 @@ static function ($a, $b): int { [ 'filter' => new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::IN, + Operator::IN, [4] ), 'sortClauses' => [ @@ -609,7 +610,7 @@ static function ($a, $b): int { ]; } - public function getContentQuerySearches() + public function getContentQuerySearches(): array { $fixtureDir = $this->getFixtureDir(); @@ -844,35 +845,35 @@ public function getContentQuerySearches() ]; } - public function getLocationQuerySearches() + public function getLocationQuerySearches(): array { $fixtureDir = $this->getFixtureDir(); return [ [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::EQ, 1), + 'query' => new Criterion\Location\Depth(Operator::EQ, 1), 'sortClauses' => [new SortClause\ContentId()], ], $fixtureDir . 'Depth.php', ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::IN, [1, 3]), + 'query' => new Criterion\Location\Depth(Operator::IN, [1, 3]), 'sortClauses' => [new SortClause\ContentId()], ], $fixtureDir . 'DepthIn.php', ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::GT, 2), + 'query' => new Criterion\Location\Depth(Operator::GT, 2), 'sortClauses' => [new SortClause\ContentId()], ], $fixtureDir . 'DepthGt.php', ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::GTE, 2), + 'query' => new Criterion\Location\Depth(Operator::GTE, 2), 'sortClauses' => [new SortClause\ContentId()], 'limit' => 50, ], @@ -880,14 +881,14 @@ public function getLocationQuerySearches() ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::LT, 2), + 'query' => new Criterion\Location\Depth(Operator::LT, 2), 'sortClauses' => [new SortClause\ContentId()], ], $fixtureDir . 'Depth.php', ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::LTE, 2), + 'query' => new Criterion\Location\Depth(Operator::LTE, 2), 'sortClauses' => [new SortClause\ContentId()], 'limit' => 50, ], @@ -895,7 +896,7 @@ public function getLocationQuerySearches() ], [ [ - 'query' => new Criterion\Location\Depth(Criterion\Operator::BETWEEN, [1, 2]), + 'query' => new Criterion\Location\Depth(Operator::BETWEEN, [1, 2]), 'sortClauses' => [new SortClause\ContentId()], 'limit' => 50, ], @@ -921,7 +922,7 @@ public function getLocationQuerySearches() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFindContentFiltered($queryData, $fixture, $closure = null) + public function testFindContentFiltered(array $queryData, string $fixture, \Closure $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -934,7 +935,7 @@ public function testFindContentFiltered($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContentInfo() */ - public function testFindContentInfoFiltered($queryData, $fixture, $closure = null) + public function testFindContentInfoFiltered(array $queryData, string $fixture, \Closure $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $this->getContentInfoFixtureClosure($closure), true); @@ -947,7 +948,7 @@ public function testFindContentInfoFiltered($queryData, $fixture, $closure = nul * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindLocationsContentFiltered($queryData, $fixture, $closure = null) + public function testFindLocationsContentFiltered(array $queryData, string $fixture, \Closure $closure = null): void { $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -960,7 +961,7 @@ public function testFindLocationsContentFiltered($queryData, $fixture, $closure * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testQueryContent($queryData, $fixture, $closure = null) + public function testQueryContent(array $queryData, string $fixture, ?callable $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -973,7 +974,7 @@ public function testQueryContent($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testQueryContentInfo($queryData, $fixture, $closure = null) + public function testQueryContentInfo(array $queryData, string $fixture, $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $this->getContentInfoFixtureClosure($closure), true); @@ -986,7 +987,7 @@ public function testQueryContentInfo($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testQueryContentLocations($queryData, $fixture, $closure = null) + public function testQueryContentLocations(array $queryData, string $fixture, ?callable $closure = null): void { $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -999,20 +1000,20 @@ public function testQueryContentLocations($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testQueryLocations($queryData, $fixture, $closure = null) + public function testQueryLocations(array $queryData, string $fixture, ?callable $closure = null): void { $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, $closure); } - public function getCaseInsensitiveSearches() + public function getCaseInsensitiveSearches(): array { return [ [ [ 'filter' => new Criterion\Field( 'name', - Criterion\Operator::EQ, + Operator::EQ, 'Members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -1022,7 +1023,7 @@ public function getCaseInsensitiveSearches() [ 'filter' => new Criterion\Field( 'name', - Criterion\Operator::EQ, + Operator::EQ, 'members' ), 'sortClauses' => [new SortClause\ContentId()], @@ -1032,7 +1033,7 @@ public function getCaseInsensitiveSearches() [ 'filter' => new Criterion\Field( 'name', - Criterion\Operator::EQ, + Operator::EQ, 'MEMBERS' ), 'sortClauses' => [new SortClause\ContentId()], @@ -1048,7 +1049,7 @@ public function getCaseInsensitiveSearches() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFindContentFieldFiltersCaseSensitivity($queryData) + public function testFindContentFieldFiltersCaseSensitivity(array $queryData): void { $query = new Query($queryData); $this->assertQueryFixture( @@ -1064,7 +1065,7 @@ public function testFindContentFieldFiltersCaseSensitivity($queryData) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindLocationsFieldFiltersCaseSensitivity($queryData) + public function testFindLocationsFieldFiltersCaseSensitivity(array $queryData): void { $query = new LocationQuery($queryData); $this->assertQueryFixture( @@ -1073,7 +1074,7 @@ public function testFindLocationsFieldFiltersCaseSensitivity($queryData) ); } - public function getRelationFieldFilterSearches() + public function getRelationFieldFilterSearches(): array { $fixtureDir = $this->getFixtureDir(); @@ -1082,7 +1083,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::IN, + Operator::IN, [1, 4, 10] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1093,7 +1094,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::IN, + Operator::IN, [4, 49] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1104,7 +1105,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::IN, + Operator::IN, [4] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1115,7 +1116,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, [1, 4, 10] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1126,7 +1127,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, [4, 49] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1137,7 +1138,7 @@ public function getRelationFieldFilterSearches() [ 'filter' => new Criterion\FieldRelation( 'image', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, [4] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1151,7 +1152,7 @@ public function getRelationFieldFilterSearches() * Purely for creating relation data needed for testFindRelationFieldContentInfoFiltered() * and testFindRelationFieldLocationsFiltered(). */ - public function testRelationContentCreation() + public function testRelationContentCreation(): void { $repository = $this->getRepository(); $galleryType = $repository->getContentTypeService()->loadContentTypeByIdentifier('gallery'); @@ -1184,7 +1185,7 @@ public function testRelationContentCreation() * * @depends testRelationContentCreation */ - public function testFindRelationFieldContentInfoFiltered($queryData, $fixture) + public function testFindRelationFieldContentInfoFiltered(array $queryData, string $fixture): void { $this->getRepository(false); // To make sure repo is setup w/o removing data from getRelationFieldFilterContentSearches $query = new Query($queryData); @@ -1200,14 +1201,14 @@ public function testFindRelationFieldContentInfoFiltered($queryData, $fixture) * * @depends testRelationContentCreation */ - public function testFindRelationFieldLocationsFiltered($queryData, $fixture) + public function testFindRelationFieldLocationsFiltered(array $queryData, string $fixture): void { $this->getRepository(false); // To make sure repo is setup w/o removing data from getRelationFieldFilterContentSearches $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, null, true, false, false); } - public function testFindSingle() + public function testFindSingle(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -1224,7 +1225,7 @@ public function testFindSingle() ); } - public function testFindNoPerformCount() + public function testFindNoPerformCount(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -1249,7 +1250,7 @@ public function testFindNoPerformCount() } } - public function testFindNoPerformCountException() + public function testFindNoPerformCountException(): void { $this->expectException(\RuntimeException::class); @@ -1270,7 +1271,7 @@ public function testFindNoPerformCountException() $searchService->findContent($query); } - public function testFindLocationsNoPerformCount() + public function testFindLocationsNoPerformCount(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -1295,7 +1296,7 @@ public function testFindLocationsNoPerformCount() } } - public function testFindLocationsNoPerformCountException() + public function testFindLocationsNoPerformCountException(): void { $this->expectException(\RuntimeException::class); @@ -1321,7 +1322,7 @@ public function testFindLocationsNoPerformCountException() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content[] */ - protected function createMovieContent() + protected function createMovieContent(): array { $movies = []; @@ -1479,7 +1480,7 @@ public function testFieldIsEmpty() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFieldIsNotEmpty() + public function testFieldIsNotEmpty(): void { $testContents = $this->createMovieContent(); @@ -1508,7 +1509,7 @@ public function testFieldIsNotEmpty() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFieldCollectionContains() + public function testFieldCollectionContains(): void { $testContent = $this->createMultipleCountriesContent(); @@ -1516,7 +1517,7 @@ public function testFieldCollectionContains() [ 'query' => new Criterion\Field( 'countries', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, 'Belgium' ), ] @@ -1540,14 +1541,14 @@ public function testFieldCollectionContains() * * @depends testFieldCollectionContains */ - public function testFieldCollectionContainsNoMatch() + public function testFieldCollectionContainsNoMatch(): void { $this->createMultipleCountriesContent(); $query = new Query( [ 'query' => new Criterion\Field( 'countries', - Criterion\Operator::CONTAINS, + Operator::CONTAINS, 'Netherlands Antilles' ), ] @@ -1560,7 +1561,7 @@ public function testFieldCollectionContainsNoMatch() self::assertEquals(0, $result->totalCount); } - public function testInvalidFieldIdentifierRange() + public function testInvalidFieldIdentifierRange(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$criterion->target\' is invalid: No searchable Fields found for the provided Criterion target \'some_hopefully_unknown_field\''); @@ -1573,7 +1574,7 @@ public function testInvalidFieldIdentifierRange() [ 'filter' => new Criterion\Field( 'some_hopefully_unknown_field', - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [10, 1000] ), 'sortClauses' => [new SortClause\ContentId()], @@ -1582,7 +1583,7 @@ public function testInvalidFieldIdentifierRange() ); } - public function testInvalidFieldIdentifierIn() + public function testInvalidFieldIdentifierIn(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$criterion->target\' is invalid: No searchable Fields found for the provided Criterion target \'some_hopefully_unknown_field\''); @@ -1595,7 +1596,7 @@ public function testInvalidFieldIdentifierIn() [ 'filter' => new Criterion\Field( 'some_hopefully_unknown_field', - Criterion\Operator::EQ, + Operator::EQ, 1000 ), 'sortClauses' => [new SortClause\ContentId()], @@ -1604,7 +1605,7 @@ public function testInvalidFieldIdentifierIn() ); } - public function testFindContentWithNonSearchableField() + public function testFindContentWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$criterion->target\' is invalid: No searchable Fields found for the provided Criterion target \'tag_cloud_url\''); @@ -1617,7 +1618,7 @@ public function testFindContentWithNonSearchableField() [ 'filter' => new Criterion\Field( 'tag_cloud_url', - Criterion\Operator::EQ, + Operator::EQ, 'http://nimbus.com' ), 'sortClauses' => [new SortClause\ContentId()], @@ -1626,7 +1627,7 @@ public function testFindContentWithNonSearchableField() ); } - public function testSortFieldWithNonSearchableField() + public function testSortFieldWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$sortClause->targetData\' is invalid: No searchable Fields found for the provided Sort Clause target \'title\' on \'template_look\''); @@ -1643,7 +1644,7 @@ public function testSortFieldWithNonSearchableField() ); } - public function testSortMapLocationDistanceWithNonSearchableField() + public function testSortMapLocationDistanceWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$sortClause->targetData\' is invalid: No searchable Fields found for the provided Sort Clause target \'title\' on \'template_look\''); @@ -1667,7 +1668,7 @@ public function testSortMapLocationDistanceWithNonSearchableField() ); } - public function testFindSingleFailMultiple() + public function testFindSingleFailMultiple(): void { $this->expectException(InvalidArgumentException::class); @@ -1681,7 +1682,7 @@ public function testFindSingleFailMultiple() ); } - public function testFindSingleWithNonSearchableField() + public function testFindSingleWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); @@ -1691,7 +1692,7 @@ public function testFindSingleWithNonSearchableField() $searchService->findSingle( new Criterion\Field( 'tag_cloud_url', - Criterion\Operator::EQ, + Operator::EQ, 'http://nimbus.com' ) ); @@ -1868,7 +1869,7 @@ static function (SearchHit $a, SearchHit $b): int { } } - public function getSortedLocationSearches() + public function getSortedLocationSearches(): array { $fixtureDir = $this->getFixtureDir(); @@ -1891,7 +1892,7 @@ public function getSortedLocationSearches() ], $fixtureDir . 'SortLocationDepth.php', // Result having the same sort level should be sorted between them to be system independent - static function (&$data) { + static function (&$data): void { // Result with ids: // 4 has depth = 1 // 11, 12, 13, 42, 59 have depth = 2 @@ -1992,11 +1993,11 @@ protected function createTestContentType() * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ protected function createMultilingualContent( - $contentType, + ContentType $contentType, $fieldValue11 = null, $fieldValue12 = null, $fieldValue2 = null, - $mainLanguageCode = 'eng-GB', + ?string $mainLanguageCode = 'eng-GB', $alwaysAvailable = false ) { $repository = $this->getRepository(); @@ -2022,7 +2023,7 @@ protected function createMultilingualContent( return $content; } - public function providerForTestMultilingualFieldSort() + public function providerForTestMultilingualFieldSort(): array { return [ 0 => [ @@ -2342,10 +2343,10 @@ public function providerForTestMultilingualFieldSort() */ public function testMultilingualFieldSortContent( array $contentDataList, - $languageSettings, + array $languageSettings, array $sortClauses, - $expected - ) { + array $expected + ): void { $this->assertMultilingualFieldSort( $contentDataList, $languageSettings, @@ -2368,10 +2369,10 @@ public function testMultilingualFieldSortContent( */ public function testMultilingualFieldSortLocation( array $contentDataList, - $languageSettings, + array $languageSettings, array $sortClauses, - $expected - ) { + array $expected + ): void { $this->assertMultilingualFieldSort( $contentDataList, $languageSettings, @@ -2390,7 +2391,7 @@ public function testMultilingualFieldSortLocation( */ protected function assertMultilingualFieldSort( array $contentDataList, - $languageSettings, + array $languageSettings, array $sortClauses, $expected, $contentSearch = true @@ -2459,7 +2460,7 @@ protected function assertMultilingualFieldSort( self::assertEquals($expectedIdList, $this->mapResultContentIds($result)); } - public function providerForTestMultilingualFieldFilter() + public function providerForTestMultilingualFieldFilter(): array { return [ 0 => [ @@ -2475,7 +2476,7 @@ public function providerForTestMultilingualFieldFilter() 'ger-DE', ], ], - new Criterion\Field('integer', Criterion\Operator::LT, 5), + new Criterion\Field('integer', Operator::LT, 5), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2493,7 +2494,7 @@ public function providerForTestMultilingualFieldFilter() ], 'useAlwaysAvailable' => false, ], - new Criterion\Field('integer', Criterion\Operator::LT, 2), + new Criterion\Field('integer', Operator::LT, 2), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2508,7 +2509,7 @@ public function providerForTestMultilingualFieldFilter() 'eng-GB', ], ], - new Criterion\Field('integer', Criterion\Operator::LTE, 4), + new Criterion\Field('integer', Operator::LTE, 4), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2527,7 +2528,7 @@ public function providerForTestMultilingualFieldFilter() ], 'useAlwaysAvailable' => false, ], - new Criterion\Field('integer', Criterion\Operator::LTE, 4), + new Criterion\Field('integer', Operator::LTE, 4), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2539,7 +2540,7 @@ public function providerForTestMultilingualFieldFilter() 4 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::LTE, 4), + new Criterion\Field('integer', Operator::LTE, 4), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2552,7 +2553,7 @@ public function providerForTestMultilingualFieldFilter() 5 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::GT, 1), + new Criterion\Field('integer', Operator::GT, 1), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2565,7 +2566,7 @@ public function providerForTestMultilingualFieldFilter() 6 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::GTE, 2), + new Criterion\Field('integer', Operator::GTE, 2), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2578,7 +2579,7 @@ public function providerForTestMultilingualFieldFilter() 7 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::BETWEEN, [2, 4]), + new Criterion\Field('integer', Operator::BETWEEN, [2, 4]), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2590,13 +2591,13 @@ public function providerForTestMultilingualFieldFilter() 8 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::BETWEEN, [4, 2]), + new Criterion\Field('integer', Operator::BETWEEN, [4, 2]), [], ], 9 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::EQ, 4), + new Criterion\Field('integer', Operator::EQ, 4), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2607,7 +2608,7 @@ public function providerForTestMultilingualFieldFilter() 10 => [ $fixture, $languageSettings, - new Criterion\Field('integer', Criterion\Operator::EQ, 2), + new Criterion\Field('integer', Operator::EQ, 2), /** * Expected order, Value eng-GB, Value ger-DE. * @@ -2632,10 +2633,10 @@ public function providerForTestMultilingualFieldFilter() */ public function testMultilingualFieldFilterContent( array $contentDataList, - $languageSettings, + array $languageSettings, Criterion $criterion, - $expected - ) { + array $expected + ): void { $this->assertMultilingualFieldFilter( $contentDataList, $languageSettings, @@ -2658,10 +2659,10 @@ public function testMultilingualFieldFilterContent( */ public function testMultilingualFieldFilterLocation( array $contentDataList, - $languageSettings, + array $languageSettings, Criterion $criterion, - $expected - ) { + array $expected + ): void { $this->assertMultilingualFieldFilter( $contentDataList, $languageSettings, @@ -2680,7 +2681,7 @@ public function testMultilingualFieldFilterLocation( */ protected function assertMultilingualFieldFilter( array $contentDataList, - $languageSettings, + array $languageSettings, Criterion $criterion, $expected, $contentSearch = true @@ -2780,7 +2781,7 @@ static function (SearchHit $searchHit) { * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFindAndSortContent($queryData, $fixture, $closure = null) + public function testFindAndSortContent(array $queryData, string $fixture, \Closure $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -2793,7 +2794,7 @@ public function testFindAndSortContent($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContentInfo() */ - public function testFindAndSortContentInfo($queryData, $fixture, $closure = null) + public function testFindAndSortContentInfo(array $queryData, string $fixture, \Closure $closure = null): void { $query = new Query($queryData); $this->assertQueryFixture($query, $fixture, $this->getContentInfoFixtureClosure($closure), true); @@ -2806,7 +2807,7 @@ public function testFindAndSortContentInfo($queryData, $fixture, $closure = null * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindAndSortContentLocations($queryData, $fixture, $closure = null) + public function testFindAndSortContentLocations(array $queryData, string $fixture, \Closure $closure = null): void { $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -2819,7 +2820,7 @@ public function testFindAndSortContentLocations($queryData, $fixture, $closure = * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindAndSortLocations($queryData, $fixture, $closure = null) + public function testFindAndSortLocations(array $queryData, string $fixture, \Closure $closure = null): void { $query = new LocationQuery($queryData); $this->assertQueryFixture($query, $fixture, $closure); @@ -2830,13 +2831,13 @@ public function testFindAndSortLocations($queryData, $fixture, $closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testQueryCustomField() + public function testQueryCustomField(): void { $query = new Query( [ 'query' => new Criterion\CustomField( 'custom_field', - Criterion\Operator::EQ, + Operator::EQ, 'AdMiNiStRaToR' ), 'offset' => 0, @@ -2859,7 +2860,7 @@ public function testQueryCustomField() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testQueryModifiedField() + public function testQueryModifiedField(): void { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { @@ -2873,7 +2874,7 @@ public function testQueryModifiedField() [ 'query' => new Criterion\Field( 'first_name', - Criterion\Operator::EQ, + Operator::EQ, 'User' ), 'offset' => 0, @@ -2900,7 +2901,7 @@ public function testQueryModifiedField() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testSortModifiedField() + public function testSortModifiedField(): void { // Check using get_class since the others extend SetupFactory\Legacy if ($this->getSetupFactory() instanceof Legacy) { @@ -2969,7 +2970,7 @@ protected function createTestPlaceContentType() * * @group maplocation */ - public function testMapLocationDistanceLessThanOrEqual() + public function testMapLocationDistanceLessThanOrEqual(): void { $contentType = $this->createTestPlaceContentType(); @@ -3020,7 +3021,7 @@ public function testMapLocationDistanceLessThanOrEqual() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::LTE, + Operator::LTE, 240, 43.756825, 15.775074 @@ -3050,7 +3051,7 @@ public function testMapLocationDistanceLessThanOrEqual() * * @group maplocation */ - public function testMapLocationDistanceGreaterThanOrEqual() + public function testMapLocationDistanceGreaterThanOrEqual(): void { $contentType = $this->createTestPlaceContentType(); @@ -3101,7 +3102,7 @@ public function testMapLocationDistanceGreaterThanOrEqual() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::GTE, + Operator::GTE, 240, 43.756825, 15.775074 @@ -3131,7 +3132,7 @@ public function testMapLocationDistanceGreaterThanOrEqual() * * @group maplocation */ - public function testMapLocationDistanceBetween() + public function testMapLocationDistanceBetween(): void { $contentType = $this->createTestPlaceContentType(); @@ -3198,7 +3199,7 @@ public function testMapLocationDistanceBetween() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [239, 241], 43.756825, 15.775074 @@ -3236,7 +3237,7 @@ public function testMapLocationDistanceBetween() * * @group maplocation */ - public function testMapLocationDistanceBetweenPolar() + public function testMapLocationDistanceBetweenPolar(): void { $contentType = $this->createTestPlaceContentType(); @@ -3271,7 +3272,7 @@ public function testMapLocationDistanceBetweenPolar() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::BETWEEN, + Operator::BETWEEN, [221, 350], 89, 16 @@ -3301,7 +3302,7 @@ public function testMapLocationDistanceBetweenPolar() * * @group maplocation */ - public function testMapLocationDistanceSortAscending() + public function testMapLocationDistanceSortAscending(): void { $contentType = $this->createTestPlaceContentType(); @@ -3373,7 +3374,7 @@ public function testMapLocationDistanceSortAscending() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::GTE, + Operator::GTE, 235, $wellInVodice['latitude'], $wellInVodice['longitude'] @@ -3419,7 +3420,7 @@ public function testMapLocationDistanceSortAscending() * * @group maplocation */ - public function testMapLocationDistanceSortDescending() + public function testMapLocationDistanceSortDescending(): void { $contentType = $this->createTestPlaceContentType(); @@ -3491,7 +3492,7 @@ public function testMapLocationDistanceSortDescending() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::GTE, + Operator::GTE, 235, $well['latitude'], $well['longitude'] @@ -3537,7 +3538,7 @@ public function testMapLocationDistanceSortDescending() * * @group maplocation */ - public function testMapLocationDistanceWithCustomField() + public function testMapLocationDistanceWithCustomField(): void { $contentType = $this->createTestPlaceContentType(); @@ -3583,7 +3584,7 @@ public function testMapLocationDistanceWithCustomField() $distanceCriterion = new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::LTE, + Operator::LTE, 240, 43.756825, 15.775074 @@ -3621,7 +3622,7 @@ public function testMapLocationDistanceWithCustomField() * * @group maplocation */ - public function testMapLocationDistanceWithCustomFieldSort() + public function testMapLocationDistanceWithCustomFieldSort(): void { $contentType = $this->createTestPlaceContentType(); @@ -3702,7 +3703,7 @@ public function testMapLocationDistanceWithCustomFieldSort() new Criterion\ContentTypeId($contentType->id), new Criterion\MapLocationDistance( 'maplocation', - Criterion\Operator::GTE, + Operator::GTE, 235, $well['latitude'], $well['longitude'] @@ -3740,7 +3741,7 @@ public function testMapLocationDistanceWithCustomFieldSort() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindMainLocation() + public function testFindMainLocation(): void { $plainSiteLocationId = 56; $designLocationId = 58; @@ -3785,7 +3786,7 @@ public function testFindMainLocation() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testFindNonMainLocation() + public function testFindNonMainLocation(): void { $designLocationId = 58; $partnersContentId = 59; @@ -3829,7 +3830,7 @@ public function testFindNonMainLocation() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testSortMainLocationAscending() + public function testSortMainLocationAscending(): void { $plainSiteLocationId = 56; $designLocationId = 58; @@ -3872,7 +3873,7 @@ public function testSortMainLocationAscending() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testSortMainLocationDescending() + public function testSortMainLocationDescending(): void { $plainSiteLocationId = 56; $designLocationId = 58; @@ -3915,7 +3916,7 @@ public function testSortMainLocationDescending() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testContentWithMultipleLocations() + public function testContentWithMultipleLocations(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4018,7 +4019,7 @@ protected function createContentForTestUserMetadataGroupHorizontal() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testUserMetadataGroupHorizontalFilterContent(string $queryType = null) + public function testUserMetadataGroupHorizontalFilterContent(string $queryType = null): void { if ($queryType === null) { $queryType = 'filter'; @@ -4041,7 +4042,7 @@ public function testUserMetadataGroupHorizontalFilterContent(string $queryType = $criteria[] = new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::EQ, + Operator::EQ, $editorsUserGroupId ); @@ -4097,7 +4098,7 @@ public function testUserMetadataGroupHorizontalFilterContent(string $queryType = * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testUserMetadataGroupHorizontalQueryContent() + public function testUserMetadataGroupHorizontalQueryContent(): void { $this->testUserMetadataGroupHorizontalFilterContent('query'); } @@ -4107,7 +4108,7 @@ public function testUserMetadataGroupHorizontalQueryContent() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) + public function testUserMetadataGroupHorizontalFilterLocation($queryType = null): void { if ($queryType === null) { $queryType = 'filter'; @@ -4131,7 +4132,7 @@ public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) $criteria[] = new Criterion\UserMetadata( Criterion\UserMetadata::GROUP, - Criterion\Operator::EQ, + Operator::EQ, $editorsUserGroupId ); @@ -4198,7 +4199,7 @@ public function testUserMetadataGroupHorizontalFilterLocation($queryType = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations() */ - public function testUserMetadataGroupHorizontalQueryLocation() + public function testUserMetadataGroupHorizontalQueryLocation(): void { $this->testUserMetadataGroupHorizontalFilterLocation('query'); } @@ -4208,7 +4209,7 @@ public function testUserMetadataGroupHorizontalQueryLocation() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFullTextOnNewContent() + public function testFullTextOnNewContent(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4249,7 +4250,7 @@ public function testFullTextOnNewContent() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testLanguageAnalysisSeparateContent() + public function testLanguageAnalysisSeparateContent(): void { self::markTestSkipped('Language analysis is currently not supported'); @@ -4313,7 +4314,7 @@ public function testLanguageAnalysisSeparateContent() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testLanguageAnalysisSameContent() + public function testLanguageAnalysisSameContent(): void { self::markTestSkipped('Language analysis is currently not supported'); @@ -4363,7 +4364,7 @@ public function testLanguageAnalysisSameContent() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testLanguageAnalysisSameContentNotFound() + public function testLanguageAnalysisSameContentNotFound(): void { self::markTestSkipped('Language analysis is currently not supported'); @@ -4414,7 +4415,7 @@ public function testLanguageAnalysisSameContentNotFound() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentWithLanguageFilter() + public function testFindContentWithLanguageFilter(): void { $repository = $this->getRepository(); $searchService = $repository->getSearchService(); @@ -4456,7 +4457,7 @@ public function testFindContentWithLanguageFilter() * * @return array */ - public function testFulltextComplex() + public function testFulltextComplex(): array { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -4528,7 +4529,7 @@ public function testFulltextComplex() * * @param array $data */ - public function testFulltextContentSearchComplex(array $data) + public function testFulltextContentSearchComplex(array $data): void { // Do not initialize from scratch $repository = $this->getRepository(false); @@ -4574,7 +4575,7 @@ public function testFulltextContentSearchComplex(array $data) * * @param array $data */ - public function testFulltextContentTranslationSearch(array $data) + public function testFulltextContentTranslationSearch(array $data): void { $criterion = $data[0]; $query = new Query(['query' => $criterion]); @@ -4591,7 +4592,7 @@ public function testFulltextContentTranslationSearch(array $data) * * @param array $data */ - public function testFulltextLocationSearchComplex(array $data) + public function testFulltextLocationSearchComplex(array $data): void { $setupFactory = $this->getSetupFactory(); if ($setupFactory instanceof LegacySolrSetupFactory && getenv('SOLR_VERSION') === '4.10.4') { @@ -4859,7 +4860,7 @@ protected function getFixtureDir(): string private function getContentInfoFixtureClosure($closure = null) { /** @var $data \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult */ - return static function (&$data) use ($closure) { + return static function (&$data) use ($closure): void { foreach ($data->searchHits as $searchHit) { if ($searchHit->valueObject instanceof Content) { $searchHit->valueObject = $searchHit->valueObject->getVersionInfo()->getContentInfo(); @@ -4879,7 +4880,7 @@ private function getContentInfoFixtureClosure($closure = null) * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent() */ - public function testFieldCriterionForContentsWithIdenticalFieldIdentifiers() + public function testFieldCriterionForContentsWithIdenticalFieldIdentifiers(): void { $this->createContentWithFieldType( 'url', @@ -4895,7 +4896,7 @@ public function testFieldCriterionForContentsWithIdenticalFieldIdentifiers() [ 'query' => new Criterion\Field( 'title', - Criterion\Operator::EQ, + Operator::EQ, 'foo' ), ] @@ -4962,7 +4963,7 @@ private function createContentWithFieldType( * * @dataProvider getSeedsForRandomSortClause */ - public function testRandomSortContent(?int $firstSeed, ?int $secondSeed) + public function testRandomSortContent(?int $firstSeed, ?int $secondSeed): void { if ($firstSeed || $secondSeed) { $this->skipIfSeedNotImplemented(); @@ -5008,7 +5009,7 @@ public function testRandomSortContent(?int $firstSeed, ?int $secondSeed) * * @dataProvider getSeedsForRandomSortClause */ - public function testRandomSortLocation(?int $firstSeed, ?int $secondSeed) + public function testRandomSortLocation(?int $firstSeed, ?int $secondSeed): void { if ($firstSeed || $secondSeed) { $this->skipIfSeedNotImplemented(); @@ -5047,7 +5048,7 @@ public function testRandomSortLocation(?int $firstSeed, ?int $secondSeed) } } - public function getSeedsForRandomSortClause() + public function getSeedsForRandomSortClause(): array { $randomSeed = mt_rand(); @@ -5067,7 +5068,7 @@ public function getSeedsForRandomSortClause() ]; } - private function skipIfSeedNotImplemented() + private function skipIfSeedNotImplemented(): void { /** @var \Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy $setupFactory */ $setupFactory = $this->getSetupFactory(); diff --git a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php index 09c200b469..213d402ff3 100644 --- a/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php +++ b/tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php @@ -13,6 +13,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Tests\Solr\SetupFactory\LegacySetupFactory as LegacySolrSetupFactory; use RuntimeException; @@ -87,13 +88,13 @@ protected function createTestContentType() * @return mixed */ protected function createContent( - $contentType, + ContentType $contentType, array $searchValuesMap, - $mainLanguageCode, + ?string $mainLanguageCode, $alwaysAvailable, $sortValue, array $parentLocationIds - ) { + ): array { $repository = $this->getRepository(); $contentService = $repository->getContentService(); $locationService = $repository->getLocationService(); @@ -128,7 +129,7 @@ protected function createContent( * * @return array */ - public function createTestContent(array $parentLocationIds) + public function createTestContent(array $parentLocationIds): array { $repository = $this->getRepository(); $languageService = $repository->getContentLanguageService(); @@ -194,7 +195,10 @@ public function testCreateTestContent() return $this->createTestContent([2, 12]); } - public function providerForTestFind() + /** + * @return mixed[] + */ + public function providerForTestFind(): array { $data = [ 0 => [ @@ -1679,7 +1683,7 @@ public function providerForTestFind() return $data; } - protected function getSetupType() + protected function getSetupType(): string { if (getenv('SOLR_CLOUD')) { return self::SETUP_CLOUD; @@ -1729,7 +1733,7 @@ public function testFindContent( array $languageSettings, array $contentDataList, array $context - ) { + ): void { /** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ list($repository, $data) = $context; @@ -1779,7 +1783,7 @@ public function testFindLocationsSingle( array $languageSettings, array $contentDataList, array $context - ) { + ): void { /** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ list($repository, $data) = $context; @@ -1834,7 +1838,7 @@ public function testFindLocationsMultiple( array $languageSettings, array $contentDataList, array $context - ) { + ): void { /** @var \Ibexa\Contracts\Core\Repository\Repository $repository */ list($repository, $data) = $context; diff --git a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php index 7acdc8cea0..1a0a590c85 100644 --- a/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/SectionServiceAuthorizationTest.php @@ -25,7 +25,7 @@ class SectionServiceAuthorizationTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\SectionService::createSection() */ - public function testCreateSectionThrowsUnauthorizedException() + public function testCreateSectionThrowsUnauthorizedException(): void { $repository = $this->getRepository(); @@ -55,7 +55,7 @@ public function testCreateSectionThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSection() */ - public function testLoadSectionThrowsUnauthorizedException() + public function testLoadSectionThrowsUnauthorizedException(): void { $repository = $this->getRepository(); @@ -87,7 +87,7 @@ public function testLoadSectionThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::updateSection() */ - public function testUpdateSectionThrowsUnauthorizedException() + public function testUpdateSectionThrowsUnauthorizedException(): void { $repository = $this->getRepository(); @@ -123,7 +123,7 @@ public function testUpdateSectionThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSections() */ - public function testLoadSectionsLoadsEmptyListForAnonymousUser() + public function testLoadSectionsLoadsEmptyListForAnonymousUser(): void { $repository = $this->getRepository(); @@ -160,7 +160,7 @@ public function testLoadSectionsLoadsEmptyListForAnonymousUser() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSections() */ - public function testLoadSectionFiltersSections() + public function testLoadSectionFiltersSections(): void { $repository = $this->getRepository(); @@ -205,7 +205,7 @@ public function testLoadSectionFiltersSections() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSectionByIdentifier() */ - public function testLoadSectionByIdentifierThrowsUnauthorizedException() + public function testLoadSectionByIdentifierThrowsUnauthorizedException(): void { $repository = $this->getRepository(); @@ -237,7 +237,7 @@ public function testLoadSectionByIdentifierThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::assignSection() */ - public function testAssignSectionThrowsUnauthorizedException() + public function testAssignSectionThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -279,7 +279,7 @@ public function testAssignSectionThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::deleteSection() */ - public function testDeleteSectionThrowsUnauthorizedException() + public function testDeleteSectionThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/SectionServiceTest.php b/tests/integration/Core/Repository/SectionServiceTest.php index 61d11265cf..83d302bb4d 100644 --- a/tests/integration/Core/Repository/SectionServiceTest.php +++ b/tests/integration/Core/Repository/SectionServiceTest.php @@ -77,7 +77,7 @@ protected function setUp(): void * * @covers \Ibexa\Contracts\Core\Repository\SectionService::newSectionCreateStruct() */ - public function testNewSectionCreateStruct() + public function testNewSectionCreateStruct(): void { $repository = $this->getRepository(); @@ -97,7 +97,7 @@ public function testNewSectionCreateStruct() * * @depends testNewSectionCreateStruct */ - public function testCreateSection() + public function testCreateSection(): void { $repository = $this->getRepository(); @@ -121,7 +121,7 @@ public function testCreateSection() * * @depends testNewSectionCreateStruct */ - public function testCreateSectionForUserWithSectionLimitation() + public function testCreateSectionForUserWithSectionLimitation(): void { $repository = $this->getRepository(); @@ -160,7 +160,7 @@ public function testCreateSectionForUserWithSectionLimitation() * * @depends testCreateSection */ - public function testCreateSectionThrowsInvalidArgumentException() + public function testCreateSectionThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -191,7 +191,7 @@ public function testCreateSectionThrowsInvalidArgumentException() * * @depends testCreateSection */ - public function testLoadSection() + public function testLoadSection(): void { $repository = $this->getRepository(); @@ -212,7 +212,7 @@ public function testLoadSection() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSection() */ - public function testLoadSectionThrowsNotFoundException() + public function testLoadSectionThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -233,7 +233,7 @@ public function testLoadSectionThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::newSectionUpdateStruct() */ - public function testNewSectionUpdateStruct() + public function testNewSectionUpdateStruct(): void { $repository = $this->getRepository(); @@ -255,7 +255,7 @@ public function testNewSectionUpdateStruct() * @depends testLoadSection * @depends testNewSectionUpdateStruct */ - public function testUpdateSection() + public function testUpdateSection(): void { $repository = $this->getRepository(); @@ -293,7 +293,7 @@ public function testUpdateSection() * @depends testLoadSection * @depends testNewSectionUpdateStruct */ - public function testUpdateSectionForUserWithSectionLimitation() + public function testUpdateSectionForUserWithSectionLimitation(): void { $repository = $this->getRepository(); $administratorUserId = $this->generateId('user', 14); @@ -349,7 +349,7 @@ public function testUpdateSectionForUserWithSectionLimitation() * * @depends testUpdateSection */ - public function testUpdateSectionKeepsSectionIdentifierOnNameUpdate() + public function testUpdateSectionKeepsSectionIdentifierOnNameUpdate(): void { $repository = $this->getRepository(); @@ -377,7 +377,7 @@ public function testUpdateSectionKeepsSectionIdentifierOnNameUpdate() * * @depends testUpdateSection */ - public function testUpdateSectionWithSectionIdentifierOnNameUpdate() + public function testUpdateSectionWithSectionIdentifierOnNameUpdate(): void { $repository = $this->getRepository(); @@ -408,7 +408,7 @@ public function testUpdateSectionWithSectionIdentifierOnNameUpdate() * * @depends testUpdateSection */ - public function testUpdateSectionKeepsSectionNameOnIdentifierUpdate() + public function testUpdateSectionKeepsSectionNameOnIdentifierUpdate(): void { $repository = $this->getRepository(); @@ -437,7 +437,7 @@ public function testUpdateSectionKeepsSectionNameOnIdentifierUpdate() * * @depends testUpdateSection */ - public function testUpdateSectionThrowsInvalidArgumentException() + public function testUpdateSectionThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -475,7 +475,7 @@ public function testUpdateSectionThrowsInvalidArgumentException() * * @depends testCreateSection */ - public function testLoadSections() + public function testLoadSections(): void { $repository = $this->getRepository(); @@ -498,7 +498,7 @@ public function testLoadSections() * * @depends testCreateSection */ - public function testLoadSectionsReturnsDefaultSectionsByDefault() + public function testLoadSectionsReturnsDefaultSectionsByDefault(): void { $repository = $this->getRepository(); @@ -560,7 +560,7 @@ public function testLoadSectionsReturnsDefaultSectionsByDefault() * * @depends testCreateSection */ - public function testLoadSectionByIdentifier() + public function testLoadSectionByIdentifier(): void { $repository = $this->getRepository(); @@ -584,7 +584,7 @@ public function testLoadSectionByIdentifier() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::loadSectionByIdentifier() */ - public function testLoadSectionByIdentifierThrowsNotFoundException() + public function testLoadSectionByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -603,7 +603,7 @@ public function testLoadSectionByIdentifierThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::countAssignedContents() */ - public function testCountAssignedContents() + public function testCountAssignedContents(): void { $repository = $this->getRepository(); @@ -632,7 +632,7 @@ public function testCountAssignedContents() * * @covers \Ibexa\Contracts\Core\Repository\SectionService::isSectionUsed() */ - public function testIsSectionUsed() + public function testIsSectionUsed(): void { $repository = $this->getRepository(); @@ -663,7 +663,7 @@ public function testIsSectionUsed() * * @depends testCountAssignedContents */ - public function testAssignSection() + public function testAssignSection(): void { $repository = $this->getRepository(); $sectionService = $repository->getSectionService(); @@ -721,7 +721,7 @@ public function testAssignSection() * * @depends testCreateSection */ - public function testAssignSectionToSubtree() + public function testAssignSectionToSubtree(): void { $repository = $this->getRepository(); $sectionService = $repository->getSectionService(); @@ -774,7 +774,7 @@ public function testAssignSectionToSubtree() * * @depends testCreateSection */ - public function testCountAssignedContentsReturnsZeroByDefault() + public function testCountAssignedContentsReturnsZeroByDefault(): void { $repository = $this->getRepository(); @@ -801,7 +801,7 @@ public function testCountAssignedContentsReturnsZeroByDefault() * * @depends testCreateSection */ - public function testIsSectionUsedReturnsZeroByDefault() + public function testIsSectionUsedReturnsZeroByDefault(): void { $repository = $this->getRepository(); @@ -828,7 +828,7 @@ public function testIsSectionUsedReturnsZeroByDefault() * * @depends testLoadSections */ - public function testDeleteSection() + public function testDeleteSection(): void { $repository = $this->getRepository(); @@ -855,7 +855,7 @@ public function testDeleteSection() * * @depends testDeleteSection */ - public function testDeleteSectionThrowsNotFoundException() + public function testDeleteSectionThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -885,7 +885,7 @@ public function testDeleteSectionThrowsNotFoundException() * * @depends testAssignSection */ - public function testDeleteSectionThrowsBadStateException() + public function testDeleteSectionThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -924,7 +924,7 @@ public function testDeleteSectionThrowsBadStateException() * @depends testCreateSection * @depends testLoadSectionByIdentifier */ - public function testCreateSectionInTransactionWithRollback() + public function testCreateSectionInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -970,7 +970,7 @@ public function testCreateSectionInTransactionWithRollback() * @depends testCreateSection * @depends testLoadSectionByIdentifier */ - public function testCreateSectionInTransactionWithCommit() + public function testCreateSectionInTransactionWithCommit(): void { $repository = $this->getRepository(); @@ -1012,7 +1012,7 @@ public function testCreateSectionInTransactionWithCommit() * @depends testUpdateSection * @depends testLoadSectionByIdentifier */ - public function testUpdateSectionInTransactionWithRollback() + public function testUpdateSectionInTransactionWithRollback(): void { $repository = $this->getRepository(); @@ -1056,7 +1056,7 @@ public function testUpdateSectionInTransactionWithRollback() * @depends testUpdateSection * @depends testLoadSectionByIdentifier */ - public function testUpdateSectionInTransactionWithCommit() + public function testUpdateSectionInTransactionWithCommit(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/SettingServiceTest.php b/tests/integration/Core/Repository/SettingServiceTest.php index 30bd6c6ed8..f51b2899a8 100644 --- a/tests/integration/Core/Repository/SettingServiceTest.php +++ b/tests/integration/Core/Repository/SettingServiceTest.php @@ -51,7 +51,7 @@ protected function setUp(): void * * @dataProvider dataProviderForCreateSetting */ - public function testCreateSetting(string $identifier, $value): void + public function testCreateSetting(string $identifier, bool|string|int|float|array|null $value): void { $settingService = $this->getSettingService(); diff --git a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php index 7767645d89..e0c83de069 100644 --- a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php @@ -31,7 +31,7 @@ class TrashServiceAuthorizationTest extends BaseTrashServiceTest * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testLoadTrashItem * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ - public function testLoadTrashItemThrowsUnauthorizedException() + public function testLoadTrashItemThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -60,7 +60,7 @@ public function testLoadTrashItemThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\TrashService::trash */ - public function testTrashThrowsUnauthorizedException() + public function testTrashThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); $this->expectExceptionMessage('The User does not have the \'remove\' \'content\' permission'); @@ -123,7 +123,7 @@ public function testTrashThrowsUnauthorizedExceptionWithLanguageLimitation(): vo * * @covers \Ibexa\Contracts\Core\Repository\TrashService::trash */ - public function testTrashRequiresContentRemovePolicy() + public function testTrashRequiresContentRemovePolicy(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -153,7 +153,7 @@ public function testTrashRequiresContentRemovePolicy() * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ - public function testRecoverThrowsUnauthorizedException() + public function testRecoverThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -185,7 +185,7 @@ public function testRecoverThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ - public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParameter() + public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParameter(): void { $this->expectException(UnauthorizedException::class); @@ -225,7 +225,7 @@ public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParam * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testEmptyTrash * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ - public function testEmptyTrashThrowsUnauthorizedException() + public function testEmptyTrashThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -257,7 +257,7 @@ public function testEmptyTrashThrowsUnauthorizedException() * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testDeleteTrashItem * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ - public function testDeleteTrashItemThrowsUnauthorizedException() + public function testDeleteTrashItemThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -281,7 +281,7 @@ public function testDeleteTrashItemThrowsUnauthorizedException() /* END: Use Case */ } - public function testTrashRequiresPremissionsToRemoveAllSubitems() + public function testTrashRequiresPremissionsToRemoveAllSubitems(): void { $this->createRoleWithPolicies('Publisher', [ ['module' => 'content', 'function' => 'read'], diff --git a/tests/integration/Core/Repository/TrashServiceTest.php b/tests/integration/Core/Repository/TrashServiceTest.php index 138c43b553..9a6c79df59 100644 --- a/tests/integration/Core/Repository/TrashServiceTest.php +++ b/tests/integration/Core/Repository/TrashServiceTest.php @@ -40,7 +40,7 @@ class TrashServiceTest extends BaseTrashServiceTest * * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocationByRemoteId */ - public function testTrash() + public function testTrash(): void { /* BEGIN: Use Case */ $trashItem = $this->createTrashItem(); @@ -57,7 +57,7 @@ public function testTrash() * * @depends testTrash */ - public function testTrashSetsExpectedTrashItemProperties() + public function testTrashSetsExpectedTrashItemProperties(): void { $repository = $this->getRepository(); @@ -90,7 +90,7 @@ public function testTrashSetsExpectedTrashItemProperties() * * @depends testTrash */ - public function testTrashRemovesLocationFromMainStorage() + public function testTrashRemovesLocationFromMainStorage(): void { $this->expectException(NotFoundException::class); @@ -115,7 +115,7 @@ public function testTrashRemovesLocationFromMainStorage() * * @depends testTrash */ - public function testTrashRemovesChildLocationsFromMainStorage() + public function testTrashRemovesChildLocationsFromMainStorage(): void { $repository = $this->getRepository(); @@ -150,7 +150,7 @@ public function testTrashRemovesChildLocationsFromMainStorage() * * @depends testTrash */ - public function testTrashDecrementsChildCountOnParentLocation() + public function testTrashDecrementsChildCountOnParentLocation(): void { $repository = $this->getRepository(); $locationService = $repository->getLocationService(); @@ -174,7 +174,7 @@ public function testTrashDecrementsChildCountOnParentLocation() /** * Test sending a location to trash updates Content mainLocation. */ - public function testTrashUpdatesMainLocation() + public function testTrashUpdatesMainLocation(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -202,7 +202,7 @@ public function testTrashUpdatesMainLocation() /** * Test sending a location to trash. */ - public function testTrashReturnsNull() + public function testTrashReturnsNull(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -225,7 +225,7 @@ public function testTrashReturnsNull() * * @depends testTrash */ - public function testLoadTrashItem() + public function testLoadTrashItem(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -274,7 +274,7 @@ public function testLoadTrashItem() * * @depends testLoadTrashItem */ - public function testLoadTrashItemThrowsNotFoundException() + public function testLoadTrashItemThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -295,7 +295,7 @@ public function testLoadTrashItemThrowsNotFoundException() * * @depends testTrash */ - public function testRecover() + public function testRecover(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -336,7 +336,7 @@ public function testRecover() /** * Test recovering a non existing trash item results in a NotFoundException. */ - public function testRecoverThrowsNotFoundExceptionForNonExistingTrashItem() + public function testRecoverThrowsNotFoundExceptionForNonExistingTrashItem(): void { $this->expectException(NotFoundException::class); @@ -357,7 +357,7 @@ public function testRecoverThrowsNotFoundExceptionForNonExistingTrashItem() * * @depends testTrash */ - public function testNotFoundAliasAfterRemoveIt() + public function testNotFoundAliasAfterRemoveIt(): void { $this->expectException(NotFoundException::class); @@ -383,7 +383,7 @@ public function testNotFoundAliasAfterRemoveIt() * * @depends testTrash */ - public function testAliasesForRemovedItems() + public function testAliasesForRemovedItems(): void { $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; @@ -425,7 +425,7 @@ public function testAliasesForRemovedItems() * * @depends testRecover */ - public function testRecoverDoesNotRestoreChildLocations() + public function testRecoverDoesNotRestoreChildLocations(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -476,7 +476,7 @@ public function testRecoverDoesNotRestoreChildLocations() * * @todo Fix naming */ - public function testRecoverWithLocationCreateStructParameter() + public function testRecoverWithLocationCreateStructParameter(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -525,7 +525,7 @@ public function testRecoverWithLocationCreateStructParameter() * * @depends testRecover */ - public function testRecoverIncrementsChildCountOnOriginalParent() + public function testRecoverIncrementsChildCountOnOriginalParent(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -564,7 +564,7 @@ public function testRecoverIncrementsChildCountOnOriginalParent() * * @depends testRecoverWithLocationCreateStructParameter */ - public function testRecoverWithLocationCreateStructParameterIncrementsChildCountOnNewParent() + public function testRecoverWithLocationCreateStructParameterIncrementsChildCountOnNewParent(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -607,7 +607,7 @@ public function testRecoverWithLocationCreateStructParameterIncrementsChildCount /** * Test recovering a location from trash to non existing location. */ - public function testRecoverToNonExistingLocation() + public function testRecoverToNonExistingLocation(): void { $this->expectException(NotFoundException::class); @@ -743,7 +743,7 @@ public function testFindTrashItemsSort(array $sortClausesClasses): void * * @depends testTrash */ - public function testFindTrashItemsLimits() + public function testFindTrashItemsLimits(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -772,7 +772,7 @@ public function testFindTrashItemsLimits() * * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testFindTrashItems */ - public function testFindTrashItemsLimitedAccess() + public function testFindTrashItemsLimitedAccess(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -816,7 +816,7 @@ public function testFindTrashItemsLimitedAccess() /** * Test Section Role Assignment Limitation against user/login. */ - public function testFindTrashItemsSubtreeLimitation() + public function testFindTrashItemsSubtreeLimitation(): void { $repository = $this->getRepository(); $contentService = $repository->getContentService(); @@ -873,7 +873,7 @@ public function testFindTrashItemsSubtreeLimitation() * * @depends testFindTrashItems */ - public function testEmptyTrash() + public function testEmptyTrash(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -904,7 +904,7 @@ public function testEmptyTrash() * * @depends testFindTrashItems */ - public function testEmptyTrashForUserWithSubtreeLimitation() + public function testEmptyTrashForUserWithSubtreeLimitation(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -948,7 +948,7 @@ public function testEmptyTrashForUserWithSubtreeLimitation() * * @depends testFindTrashItems */ - public function testDeleteTrashItem() + public function testDeleteTrashItem(): void { $repository = $this->getRepository(); $trashService = $repository->getTrashService(); @@ -997,7 +997,7 @@ static function ($trashItem) { /** * Test deleting a non existing trash item. */ - public function testDeleteThrowsNotFoundExceptionForNonExistingTrashItem() + public function testDeleteThrowsNotFoundExceptionForNonExistingTrashItem(): void { $this->expectException(NotFoundException::class); @@ -1224,7 +1224,7 @@ public function trashSortClausesProvider(): array * * @return string[] */ - private function createRemoteIdList() + private function createRemoteIdList(): array { $repository = $this->getRepository(); @@ -1254,7 +1254,7 @@ private function createRemoteIdList() * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function createNewContentInPlaceTrashedOne(Repository $repository, $parentLocationId) + protected function createNewContentInPlaceTrashedOne(Repository $repository, int $parentLocationId): Content { $contentService = $repository->getContentService(); $locationService = $repository->getLocationService(); @@ -1274,7 +1274,7 @@ protected function createNewContentInPlaceTrashedOne(Repository $repository, $pa /** * @param string $urlPath Url alias path */ - private function assertAliasNotExists(URLAliasService $urlAliasService, $urlPath) + private function assertAliasNotExists(URLAliasService $urlAliasService, string $urlPath): void { try { $this->getRepository()->getURLAliasService()->lookup($urlPath); diff --git a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php index 6c565dacd1..656f7716bf 100644 --- a/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php @@ -18,7 +18,7 @@ class URLAliasServiceAuthorizationTest extends BaseTest * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testCreateUrlAlias */ - public function testCreateUrlAliasThrowsUnauthorizedException() + public function testCreateUrlAliasThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -52,7 +52,7 @@ public function testCreateUrlAliasThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testCreateGlobalUrlAlias */ - public function testCreateGlobalUrlAliasThrowsUnauthorizedException() + public function testCreateGlobalUrlAliasThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -80,7 +80,7 @@ public function testCreateGlobalUrlAliasThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\URLAliasServiceTest::testRemoveAliases */ - public function testRemoveAliasesThrowsUnauthorizedException() + public function testRemoveAliasesThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 63dc1e90a7..0dfa57b488 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -11,6 +11,7 @@ use Exception; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; @@ -70,7 +71,7 @@ protected function setUp(): void * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias() */ - public function testCreateUrlAlias() + public function testCreateUrlAlias(): array { $repository = $this->getRepository(); @@ -104,7 +105,7 @@ public function testCreateUrlAlias() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testCreateSameAliasForDifferentLanguage() + public function testCreateSameAliasForDifferentLanguage(): void { $repository = $this->getRepository(); $locationId = $this->generateId('location', 5); @@ -152,7 +153,7 @@ public function testLoad(): void * * @depends testCreateUrlAlias */ - public function testCreateUrlAliasPropertyValues(array $testData) + public function testCreateUrlAliasPropertyValues(array $testData): void { [$createdUrlAlias, $locationId] = $testData; @@ -180,7 +181,7 @@ public function testCreateUrlAliasPropertyValues(array $testData) * * @depends testCreateUrlAliasPropertyValues */ - public function testCreateUrlAliasWithForwarding() + public function testCreateUrlAliasWithForwarding(): array { $repository = $this->getRepository(); @@ -210,7 +211,7 @@ public function testCreateUrlAliasWithForwarding() * * @depends testCreateUrlAliasWithForwarding */ - public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData) + public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData): void { [$createdUrlAlias, $locationId] = $testData; @@ -236,7 +237,7 @@ public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData) * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias($location, $path, $languageCode, $forwarding, $alwaysAvailable) */ - public function testCreateUrlAliasWithAlwaysAvailable() + public function testCreateUrlAliasWithAlwaysAvailable(): array { $repository = $this->getRepository(); @@ -266,7 +267,7 @@ public function testCreateUrlAliasWithAlwaysAvailable() * * @depends testCreateUrlAliasWithAlwaysAvailable */ - public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testData) + public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testData): void { [$createdUrlAlias, $locationId] = $testData; @@ -292,7 +293,7 @@ public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testD * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias() */ - public function testCreateUrlAliasThrowsInvalidArgumentException() + public function testCreateUrlAliasThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -346,7 +347,7 @@ public function testCreateGlobalUrlAlias() * * @depends testCreateGlobalUrlAlias */ - public function testCreateGlobalUrlAliasPropertyValues(URLAlias $createdUrlAlias) + public function testCreateGlobalUrlAliasPropertyValues(URLAlias $createdUrlAlias): void { self::assertNotNull($createdUrlAlias->id); @@ -398,7 +399,7 @@ public function testCreateGlobalUrlAliasWithForward() * * @depends testCreateGlobalUrlAliasWithForward */ - public function testCreateGlobalUrlAliasWithForwardPropertyValues(URLAlias $createdUrlAlias) + public function testCreateGlobalUrlAliasWithForwardPropertyValues(URLAlias $createdUrlAlias): void { self::assertNotNull($createdUrlAlias->id); @@ -451,7 +452,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailable() * * @depends testCreateGlobalUrlAliasWithAlwaysAvailable */ - public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAlias $createdUrlAlias) + public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAlias $createdUrlAlias): void { self::assertNotNull($createdUrlAlias->id); @@ -475,7 +476,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAli * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) */ - public function testCreateGlobalUrlAliasForLocation() + public function testCreateGlobalUrlAliasForLocation(): array { $repository = $this->getRepository(); @@ -510,7 +511,7 @@ public function testCreateGlobalUrlAliasForLocation() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) */ - public function testCreateGlobalUrlAliasForLocationVariation() + public function testCreateGlobalUrlAliasForLocationVariation(): array { $repository = $this->getRepository(); @@ -545,7 +546,7 @@ public function testCreateGlobalUrlAliasForLocationVariation() * * @depends testCreateGlobalUrlAliasForLocation */ - public function testCreateGlobalUrlAliasForLocationPropertyValues($testData) + public function testCreateGlobalUrlAliasForLocationPropertyValues($testData): void { [$createdUrlAlias, $locationId] = $testData; @@ -571,7 +572,7 @@ public function testCreateGlobalUrlAliasForLocationPropertyValues($testData) * * @depends testCreateGlobalUrlAliasForLocationVariation */ - public function testCreateGlobalUrlAliasForLocationVariationPropertyValues($testData) + public function testCreateGlobalUrlAliasForLocationVariationPropertyValues($testData): void { $this->testCreateGlobalUrlAliasForLocationPropertyValues($testData); } @@ -581,7 +582,7 @@ public function testCreateGlobalUrlAliasForLocationVariationPropertyValues($test * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias() */ - public function testCreateGlobalUrlAliasThrowsInvalidArgumentException() + public function testCreateGlobalUrlAliasThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -605,7 +606,7 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases() */ - public function testListLocationAliases() + public function testListLocationAliases(): array { $repository = $this->getRepository(); @@ -638,7 +639,7 @@ public function testListLocationAliases() * * @depends testListLocationAliases */ - public function testListLocationAliasesLoadsCorrectly(array $testData) + public function testListLocationAliasesLoadsCorrectly(array $testData): void { [$loadedAliases, $location] = $testData; @@ -659,7 +660,7 @@ public function testListLocationAliasesLoadsCorrectly(array $testData) * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases($location, $custom, $languageCode) */ - public function testListLocationAliasesWithCustomFilter() + public function testListLocationAliasesWithCustomFilter(): void { $repository = $this->getRepository(); @@ -688,7 +689,7 @@ public function testListLocationAliasesWithCustomFilter() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases($location, $custom) */ - public function testListLocationAliasesWithLanguageCodeFilter() + public function testListLocationAliasesWithLanguageCodeFilter(): void { $repository = $this->getRepository(); @@ -716,7 +717,7 @@ public function testListLocationAliasesWithLanguageCodeFilter() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listGlobalAliases() */ - public function testListGlobalAliases() + public function testListGlobalAliases(): void { $repository = $this->getRepository(); @@ -737,7 +738,7 @@ public function testListGlobalAliases() /** * Creates 3 global aliases. */ - private function createGlobalAliases() + private function createGlobalAliases(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -766,7 +767,7 @@ private function createGlobalAliases() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listGlobalAliases($languageCode) */ - public function testListGlobalAliasesWithLanguageFilter() + public function testListGlobalAliasesWithLanguageFilter(): void { $repository = $this->getRepository(); @@ -789,7 +790,7 @@ public function testListGlobalAliasesWithLanguageFilter() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listGlobalAliases($languageCode, $offset) */ - public function testListGlobalAliasesWithOffset() + public function testListGlobalAliasesWithOffset(): void { $repository = $this->getRepository(); @@ -812,7 +813,7 @@ public function testListGlobalAliasesWithOffset() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listGlobalAliases($languageCode, $offset, $limit) */ - public function testListGlobalAliasesWithLimit() + public function testListGlobalAliasesWithLimit(): void { $repository = $this->getRepository(); @@ -835,7 +836,7 @@ public function testListGlobalAliasesWithLimit() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::removeAliases() */ - public function testRemoveAliases() + public function testRemoveAliases(): void { $repository = $this->getRepository(); @@ -876,7 +877,7 @@ public function testRemoveAliases() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::removeAliases() */ - public function testRemoveAliasesThrowsInvalidArgumentExceptionIfAutogeneratedAliasesAreToBeRemoved() + public function testRemoveAliasesThrowsInvalidArgumentExceptionIfAutogeneratedAliasesAreToBeRemoved(): void { $this->expectException(InvalidArgumentException::class); @@ -928,7 +929,7 @@ public function testLookUp() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp($url, $languageCode) */ - public function testLookUpWithLanguageFilter() + public function testLookUpWithLanguageFilter(): void { $repository = $this->getRepository(); @@ -956,7 +957,7 @@ public function testLookUpWithLanguageFilter() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp() */ - public function testLookUpThrowsNotFoundException() + public function testLookUpThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -975,7 +976,7 @@ public function testLookUpThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp($url, $languageCode) */ - public function testLookUpThrowsNotFoundExceptionWithLanguageFilter() + public function testLookUpThrowsNotFoundExceptionWithLanguageFilter(): void { $this->expectException(NotFoundException::class); @@ -994,7 +995,7 @@ public function testLookUpThrowsNotFoundExceptionWithLanguageFilter() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp($url, $languageCode) */ - public function testLookUpThrowsInvalidArgumentException() + public function testLookUpThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -1016,7 +1017,7 @@ public function testLookUpThrowsInvalidArgumentException() * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases */ - public function testLookupOnRenamedParent() + public function testLookupOnRenamedParent(): void { $urlAliasService = $this->getRepository()->getURLAliasService(); $locationService = $this->getRepository()->getLocationService(); @@ -1076,7 +1077,7 @@ public function testLookupOnRenamedParent() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testLookupOnMultilingualNestedLocations() + public function testLookupOnMultilingualNestedLocations(): array { $urlAliasService = $this->getRepository()->getURLAliasService(); $locationService = $this->getRepository()->getLocationService(); @@ -1137,7 +1138,7 @@ public function testLookupOnMultilingualNestedLocations() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException * @throws \ErrorException */ - public function testRefreshSystemUrlAliasesForLocationWithChangedSlugConverterConfiguration() + public function testRefreshSystemUrlAliasesForLocationWithChangedSlugConverterConfiguration(): void { [$topFolderLocation, $nestedFolderLocation] = $this->testLookupOnMultilingualNestedLocations(); @@ -1199,7 +1200,7 @@ public function testRefreshSystemUrlAliasesForLocationWithChangedSlugConverterCo * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRefreshSystemUrlAliasesForContentsWithUpdatedContentTypes() + public function testRefreshSystemUrlAliasesForContentsWithUpdatedContentTypes(): void { [$topFolderLocation, $nestedFolderLocation] = $this->testLookupOnMultilingualNestedLocations(); /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $topFolderLocation */ @@ -1252,7 +1253,7 @@ public function testRefreshSystemUrlAliasesForContentsWithUpdatedContentTypes() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testCreateNonLatinNonEmptyUniqueAliases() + public function testCreateNonLatinNonEmptyUniqueAliases(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -1303,7 +1304,7 @@ public function testCreateNonLatinNonEmptyUniqueAliases() * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException * @throws \Exception */ - public function testRefreshSystemUrlAliasesForMissingUrlWithHistory() + public function testRefreshSystemUrlAliasesForMissingUrlWithHistory(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -1402,7 +1403,7 @@ static function (Connection $connection) use ($folderLocation) { * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException * @throws \Exception */ - public function testRefreshSystemUrlAliasesForMovedLocation() + public function testRefreshSystemUrlAliasesForMovedLocation(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -1434,7 +1435,7 @@ static function (Connection $connection) use ($nestedFolderLocation) { $expr = $queryBuilder->expr(); $queryBuilder ->update('ezurlalias_ml') - ->set('link', $queryBuilder->createPositionalParameter(666, \PDO::PARAM_INT)) + ->set('link', $queryBuilder->createPositionalParameter(666, PDO::PARAM_INT)) ->where( $expr->eq( 'action', @@ -1446,7 +1447,7 @@ static function (Connection $connection) use ($nestedFolderLocation) { ->andWhere( $expr->eq( 'is_original', - $queryBuilder->createPositionalParameter(0, \PDO::PARAM_INT) + $queryBuilder->createPositionalParameter(0, PDO::PARAM_INT) ) ) ->andWhere( @@ -1568,7 +1569,7 @@ protected function assertUrlIsCurrent($lookupUrl, $expectedDestination) * @param int $expectedDestination Expected Location ID * @param string $lookupUrl */ - protected function assertLookupHistory($expectedIsHistory, $expectedDestination, $lookupUrl) + protected function assertLookupHistory($expectedIsHistory, $expectedDestination, string $lookupUrl) { $urlAliasService = $this->getRepository(false)->getURLAliasService(); @@ -1599,7 +1600,7 @@ protected function assertLookupHistory($expectedIsHistory, $expectedDestination, * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - protected function updateContentField(ContentInfo $contentInfo, $fieldDefinitionIdentifier, array $fieldValues) + protected function updateContentField(ContentInfo $contentInfo, string $fieldDefinitionIdentifier, array $fieldValues): Content { $contentService = $this->getRepository(false)->getContentService(); @@ -1624,7 +1625,7 @@ protected function updateContentField(ContentInfo $contentInfo, $fieldDefinition * * @throws \ErrorException */ - public function testDeleteCorruptedUrlAliases() + public function testDeleteCorruptedUrlAliases(): void { $repository = $this->getRepository(); $urlAliasService = $repository->getURLAliasService(); @@ -1694,7 +1695,7 @@ protected function changeSlugConverterConfiguration($key, $value) * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - protected function changeContentTypeUrlAliasSchema($contentTypeIdentifier, $newUrlAliasSchema) + protected function changeContentTypeUrlAliasSchema(string $contentTypeIdentifier, $newUrlAliasSchema) { $contentTypeService = $this->getRepository(false)->getContentTypeService(); @@ -1727,11 +1728,11 @@ private function assertUrlAliasPropertiesSame(array $expectedValues, URLAlias $u private function assertUrlAliasPropertiesCorrect( Location $expectedDestinationLocation, - $expectedPath, + string $expectedPath, array $expectedLanguageCodes, - $expectedIsHistory, + bool $expectedIsHistory, URLAlias $actualUrlAliasValue - ) { + ): void { self::assertPropertiesCorrect( [ 'destination' => $expectedDestinationLocation->id, diff --git a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php index f7deed7e25..397ae3671c 100644 --- a/tests/integration/Core/Repository/URLServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLServiceAuthorizationTest.php @@ -18,7 +18,7 @@ class URLServiceAuthorizationTest extends BaseURLServiceTest * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls */ - public function testFindUrlsThrowsUnauthorizedException() + public function testFindUrlsThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -47,7 +47,7 @@ public function testFindUrlsThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLService::updateUrl */ - public function testUpdateUrlThrowsUnauthorizedException() + public function testUpdateUrlThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -78,7 +78,7 @@ public function testUpdateUrlThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadById */ - public function testLoadByIdThrowsUnauthorizedException() + public function testLoadByIdThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -105,7 +105,7 @@ public function testLoadByIdThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadById */ - public function testLoadByUrlThrowsUnauthorizedException() + public function testLoadByUrlThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/URLServiceTest.php b/tests/integration/Core/Repository/URLServiceTest.php index 6318771c65..37789ec7b3 100644 --- a/tests/integration/Core/Repository/URLServiceTest.php +++ b/tests/integration/Core/Repository/URLServiceTest.php @@ -173,7 +173,7 @@ protected function setUp(): void * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() */ - public function testFindUrls() + public function testFindUrls(): void { $expectedUrls = [ 'https://www.apache.org/', @@ -209,7 +209,7 @@ public function testFindUrls() * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() */ - public function testFindUrlsWithoutCounting() + public function testFindUrlsWithoutCounting(): void { $expectedUrls = [ 'https://www.apache.org/', @@ -248,7 +248,7 @@ public function testFindUrlsWithoutCounting() * * @depends testFindUrls */ - public function testFindUrlsUsingMatchNone() + public function testFindUrlsUsingMatchNone(): void { $query = new URLQuery(); $query->filter = new Criterion\MatchNone(); @@ -263,7 +263,7 @@ public function testFindUrlsUsingMatchNone() * * @depends testFindUrls */ - public function testFindUrlsUsingPatternCriterion() + public function testFindUrlsUsingPatternCriterion(): void { $expectedUrls = [ 'https://www.google.de/', @@ -286,7 +286,7 @@ public function testFindUrlsUsingPatternCriterion() * * @depends testFindUrls */ - public function testFindUrlsUsingValidityCriterionValid() + public function testFindUrlsUsingValidityCriterionValid(): void { $expectedUrls = [ 'https://www.google.com/', @@ -441,7 +441,7 @@ public function testFindUrlsUsingSectionIdentifierOrSectionIdCriterion(): void * * @depends testFindUrls */ - public function testFindUrlsUsingValidityCriterionInvalid() + public function testFindUrlsUsingValidityCriterionInvalid(): void { $expectedUrls = [ '/content/view/tagcloud/2', @@ -460,7 +460,7 @@ public function testFindUrlsUsingValidityCriterionInvalid() * * @depends testFindUrls */ - public function testFindUrlsUsingVisibleOnlyCriterion() + public function testFindUrlsUsingVisibleOnlyCriterion(): void { $expectedUrls = [ 'https://vimeo.com/', @@ -516,7 +516,7 @@ public function testFindUrlsUsingVisibleOnlyCriterionReturnsUniqueItems(): void * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() */ - public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException() + public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException(): void { $query = new URLQuery(); $query->filter = new Criterion\MatchAll(); @@ -537,7 +537,7 @@ public function testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException() * * @covers \Ibexa\Contracts\Core\Repository\URLService::findUrls() */ - public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException() + public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException(): void { $query = new URLQuery(); $query->filter = new Criterion\MatchAll(); @@ -560,7 +560,7 @@ public function testFindUrlsWithInvalidLimitThrowsInvalidArgumentException() * * @depends testFindUrls */ - public function testFindUrlsWithOffset() + public function testFindUrlsWithOffset(): void { $expectedUrls = [ 'https://www.discuz.net/forum.php', @@ -590,7 +590,7 @@ public function testFindUrlsWithOffset() * * @depends testFindUrls */ - public function testFindUrlsWithOffsetAndLimit() + public function testFindUrlsWithOffsetAndLimit(): void { $expectedUrls = [ 'https://www.discuz.net/forum.php', @@ -614,7 +614,7 @@ public function testFindUrlsWithOffsetAndLimit() * * @depends testFindUrls */ - public function testFindUrlsWithLimitZero() + public function testFindUrlsWithLimitZero(): void { $query = new URLQuery(); $query->filter = new Criterion\MatchAll(); @@ -632,7 +632,7 @@ public function testFindUrlsWithLimitZero() * * @dataProvider dataProviderForFindUrlsWithSorting */ - public function testFindUrlsWithSorting(SortClause $sortClause, array $expectedUrls) + public function testFindUrlsWithSorting(SortClause $sortClause, array $expectedUrls): void { $query = new URLQuery(); $query->filter = new Criterion\MatchAll(); @@ -641,7 +641,7 @@ public function testFindUrlsWithSorting(SortClause $sortClause, array $expectedU $this->doTestFindUrls($query, $expectedUrls, count($expectedUrls), false); } - public function dataProviderForFindUrlsWithSorting() + public function dataProviderForFindUrlsWithSorting(): array { $urlsSortedById = [ '/content/view/sitemap/2', @@ -682,7 +682,7 @@ public function dataProviderForFindUrlsWithSorting() * * @covers \Ibexa\Contracts\Core\Repository\URLService::updateUrl() */ - public function testUpdateUrl() + public function testUpdateUrl(): void { $repository = $this->getRepository(); @@ -715,7 +715,7 @@ public function testUpdateUrl() * * @covers \Ibexa\Contracts\Core\Repository\URLService::updateUrl() */ - public function testUpdateUrlStatus() + public function testUpdateUrlStatus(): void { $repository = $this->getRepository(); @@ -753,7 +753,7 @@ public function testUpdateUrlStatus() * * @depends testUpdateUrl */ - public function testUpdateUrlWithNonUniqueUrl() + public function testUpdateUrlWithNonUniqueUrl(): void { $this->expectException(InvalidArgumentException::class); @@ -778,7 +778,7 @@ public function testUpdateUrlWithNonUniqueUrl() * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadById */ - public function testLoadById() + public function testLoadById(): void { $repository = $this->getRepository(); @@ -808,7 +808,7 @@ public function testLoadById() * * @depends testLoadById */ - public function testLoadByIdThrowsNotFoundException() + public function testLoadByIdThrowsNotFoundException(): void { $repository = $this->getRepository(); @@ -826,7 +826,7 @@ public function testLoadByIdThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\URLService::loadByUrl */ - public function testLoadByUrl() + public function testLoadByUrl(): void { $repository = $this->getRepository(); @@ -856,7 +856,7 @@ public function testLoadByUrl() * * @depends testLoadByUrl */ - public function testLoadByUrlThrowsNotFoundException() + public function testLoadByUrlThrowsNotFoundException(): void { $repository = $this->getRepository(); @@ -897,7 +897,7 @@ public function testCreateUpdateStruct() * * @depends testCreateUpdateStruct */ - public function testCreateUpdateStructValues(URLUpdateStruct $updateStruct) + public function testCreateUpdateStructValues(URLUpdateStruct $updateStruct): void { $this->assertPropertiesCorrect([ 'url' => null, @@ -913,7 +913,7 @@ public function testCreateUpdateStructValues(URLUpdateStruct $updateStruct) * * @dataProvider dataProviderForFindUsages */ - public function testFindUsages($urlId, $offset, $limit, array $expectedContentInfos, $expectedTotalCount = null) + public function testFindUsages($urlId, int $offset, int $limit, array $expectedContentInfos, $expectedTotalCount = null): void { $repository = $this->getRepository(); @@ -931,7 +931,7 @@ public function testFindUsages($urlId, $offset, $limit, array $expectedContentIn $this->assertUsagesSearchResultItems($usagesSearchResults, $expectedContentInfos); } - public function dataProviderForFindUsages() + public function dataProviderForFindUsages(): array { return [ // findUsages($url, 0, -1) @@ -946,7 +946,7 @@ public function dataProviderForFindUsages() * * @depends testFindUsages */ - public function testFindUsagesReturnsEmptySearchResults() + public function testFindUsagesReturnsEmptySearchResults(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php index 946a04ea81..43e82e8652 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php @@ -52,7 +52,7 @@ public function testCreateThrowsUnauthorizedException(): void * * @depends Ibexa\Tests\Integration\Core\Repository\URLWildcardServiceTest::testRemove */ - public function testRemoveThrowsUnauthorizedException() + public function testRemoveThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/URLWildcardServiceTest.php b/tests/integration/Core/Repository/URLWildcardServiceTest.php index 68bb9dc187..c065f1decf 100644 --- a/tests/integration/Core/Repository/URLWildcardServiceTest.php +++ b/tests/integration/Core/Repository/URLWildcardServiceTest.php @@ -58,7 +58,7 @@ public function testCreate() * * @depends testCreate */ - public function testCreateSetsIdPropertyOnURLWildcard(URLWildcard $urlWildcard) + public function testCreateSetsIdPropertyOnURLWildcard(URLWildcard $urlWildcard): void { self::assertNotNull($urlWildcard->id); } @@ -72,7 +72,7 @@ public function testCreateSetsIdPropertyOnURLWildcard(URLWildcard $urlWildcard) * * @depends testCreate */ - public function testCreateSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) + public function testCreateSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard): void { $this->assertPropertiesCorrect( [ @@ -91,7 +91,7 @@ public function testCreateSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) * * @depends testCreate */ - public function testCreateWithOptionalForwardParameter() + public function testCreateWithOptionalForwardParameter(): void { $repository = $this->getRepository(); @@ -119,7 +119,7 @@ public function testCreateWithOptionalForwardParameter() * * @depends testCreate */ - public function testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl() + public function testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl(): void { $this->expectException(InvalidArgumentException::class); @@ -144,7 +144,7 @@ public function testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl() * * @depends testCreate */ - public function testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceholdersNotMatch() + public function testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceholdersNotMatch(): void { $this->expectException(ContentValidationException::class); @@ -166,7 +166,7 @@ public function testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceho * * @depends testCreate */ - public function testCreateThrowsContentValidationExceptionWhenPlaceholdersNotValidNumberSequence() + public function testCreateThrowsContentValidationExceptionWhenPlaceholdersNotValidNumberSequence(): void { $this->expectException(ContentValidationException::class); @@ -221,7 +221,7 @@ public function testLoad() * * @depends testLoad */ - public function testLoadSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) + public function testLoadSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard): void { $this->assertPropertiesCorrect( [ @@ -242,7 +242,7 @@ public function testLoadSetsPropertiesOnURLWildcard(URLWildcard $urlWildcard) * * @depends testLoad */ - public function testLoadThrowsNotFoundException(URLWildcard $urlWildcard) + public function testLoadThrowsNotFoundException(URLWildcard $urlWildcard): void { $this->expectException(NotFoundException::class); @@ -307,7 +307,7 @@ public function testUpdate(): void * * @depends testLoad */ - public function testRemove() + public function testRemove(): void { $this->expectException(NotFoundException::class); @@ -337,7 +337,7 @@ public function testRemove() * * @depends testCreate */ - public function testLoadAll() + public function testLoadAll(): void { $repository = $this->getRepository(); @@ -368,7 +368,7 @@ public function testLoadAll() * * @depends testLoadAll */ - public function testLoadAllWithOffsetParameter() + public function testLoadAllWithOffsetParameter(): void { $repository = $this->getRepository(); @@ -393,7 +393,7 @@ public function testLoadAllWithOffsetParameter() * * @depends testLoadAll */ - public function testLoadAllWithOffsetAndLimitParameter() + public function testLoadAllWithOffsetAndLimitParameter(): void { $repository = $this->getRepository(); @@ -418,7 +418,7 @@ public function testLoadAllWithOffsetAndLimitParameter() * * @depends testLoadAll */ - public function testLoadAllReturnsEmptyArrayByDefault() + public function testLoadAllReturnsEmptyArrayByDefault(): void { $repository = $this->getRepository(); @@ -472,7 +472,7 @@ public function testTranslate() * * @depends testTranslate */ - public function testTranslateSetsPropertiesOnTranslationResult(URLWildcardTranslationResult $result) + public function testTranslateSetsPropertiesOnTranslationResult(URLWildcardTranslationResult $result): void { $this->assertPropertiesCorrect( [ @@ -490,7 +490,7 @@ public function testTranslateSetsPropertiesOnTranslationResult(URLWildcardTransl * * @depends testTranslate */ - public function testTranslateWithForwardSetToTrue() + public function testTranslateWithForwardSetToTrue(): void { $repository = $this->getRepository(); @@ -520,7 +520,7 @@ public function testTranslateWithForwardSetToTrue() * * @depends testTranslate */ - public function testTranslateReturnsLongestMatchingWildcard() + public function testTranslateReturnsLongestMatchingWildcard(): void { $repository = $this->getRepository(); @@ -545,7 +545,7 @@ public function testTranslateReturnsLongestMatchingWildcard() * * @depends testTranslate */ - public function testTranslateThrowsNotFoundExceptionWhenNotAliasOrWildcardMatches() + public function testTranslateThrowsNotFoundExceptionWhenNotAliasOrWildcardMatches(): void { $this->expectException(NotFoundException::class); diff --git a/tests/integration/Core/Repository/UserPreferenceServiceTest.php b/tests/integration/Core/Repository/UserPreferenceServiceTest.php index 9abe039bbb..1d5306cd4e 100644 --- a/tests/integration/Core/Repository/UserPreferenceServiceTest.php +++ b/tests/integration/Core/Repository/UserPreferenceServiceTest.php @@ -23,7 +23,7 @@ class UserPreferenceServiceTest extends BaseTest /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::loadUserPreferences() */ - public function testLoadUserPreferences() + public function testLoadUserPreferences(): void { $repository = $this->getRepository(); @@ -41,7 +41,7 @@ public function testLoadUserPreferences() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::getUserPreference() */ - public function testGetUserPreference() + public function testGetUserPreference(): void { $repository = $this->getRepository(); @@ -62,7 +62,7 @@ public function testGetUserPreference() * * @depends testGetUserPreference */ - public function testSetUserPreference() + public function testSetUserPreference(): void { $repository = $this->getRepository(); @@ -89,7 +89,7 @@ public function testSetUserPreference() * * @depends testSetUserPreference */ - public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValue() + public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValue(): void { $this->expectException(InvalidArgumentException::class); @@ -113,7 +113,7 @@ public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValu * * @depends testSetUserPreference */ - public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnEmptyName() + public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnEmptyName(): void { $this->expectException(InvalidArgumentException::class); @@ -134,7 +134,7 @@ public function testSetUserPreferenceThrowsInvalidArgumentExceptionOnEmptyName() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::getUserPreferenceCount() */ - public function testGetUserPreferenceCount() + public function testGetUserPreferenceCount(): void { $repository = $this->getRepository(); diff --git a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php index d8350793de..00a80ea7b1 100644 --- a/tests/integration/Core/Repository/UserServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/UserServiceAuthorizationTest.php @@ -26,7 +26,7 @@ class UserServiceAuthorizationTest extends BaseTest * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroup */ - public function testLoadUserGroupThrowsUnauthorizedException() + public function testLoadUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -80,7 +80,7 @@ public function testLoadUserGroupByRemoteIdThrowsUnauthorizedException(): void * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadSubUserGroups */ - public function testLoadSubUserGroupsThrowsUnauthorizedException() + public function testLoadSubUserGroupsThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -108,7 +108,7 @@ public function testLoadSubUserGroupsThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUserGroup */ - public function testCreateUserGroupThrowsUnauthorizedException() + public function testCreateUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -143,7 +143,7 @@ public function testCreateUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testDeleteUserGroup */ - public function testDeleteUserGroupThrowsUnauthorizedException() + public function testDeleteUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -171,7 +171,7 @@ public function testDeleteUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testMoveUserGroup */ - public function testMoveUserGroupThrowsUnauthorizedException() + public function testMoveUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -206,7 +206,7 @@ public function testMoveUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testUpdateUserGroup */ - public function testUpdateUserGroupThrowsUnauthorizedException() + public function testUpdateUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -244,7 +244,7 @@ public function testUpdateUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testCreateUser */ - public function testCreateUserThrowsUnauthorizedException() + public function testCreateUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -288,7 +288,7 @@ public function testCreateUserThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testDeleteUser */ - public function testDeleteUserThrowsUnauthorizedException() + public function testDeleteUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -312,7 +312,7 @@ public function testDeleteUserThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser() */ - public function testUpdateUserThrowsUnauthorizedException() + public function testUpdateUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -367,7 +367,7 @@ public function testUpdateUserPasswordThrowsUnauthorizedException(): void * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testAssignUserToUserGroup */ - public function testAssignUserToUserGroupThrowsUnauthorizedException() + public function testAssignUserToUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -400,7 +400,7 @@ public function testAssignUserToUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testUnAssignUserFromUserGroup */ - public function testUnAssignUserFromUserGroupThrowsUnauthorizedException() + public function testUnAssignUserFromUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -441,7 +441,7 @@ public function testUnAssignUserFromUserGroupThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUserGroupsOfUser */ - public function testLoadUserGroupsOfUserThrowsUnauthorizedException() + public function testLoadUserGroupsOfUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -468,7 +468,7 @@ public function testLoadUserGroupsOfUserThrowsUnauthorizedException() * * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUsersOfUserGroup */ - public function testLoadUsersOfUserGroupThrowsUnauthorizedException() + public function testLoadUsersOfUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index df35be828b..21ca337e63 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -58,7 +58,7 @@ class UserServiceTest extends BaseTest * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup() */ - public function testLoadUserGroup() + public function testLoadUserGroup(): void { $repository = $this->getRepository(); @@ -104,7 +104,7 @@ public function testLoadUserGroupByRemoteId(): void * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadUserGroup() */ - public function testLoadUserGroupWithNoAccessToParent() + public function testLoadUserGroupWithNoAccessToParent(): void { $repository = $this->getRepository(); @@ -141,7 +141,7 @@ public function testLoadUserGroupWithNoAccessToParent() * * @depends testLoadUserGroup */ - public function testLoadUserGroupThrowsNotFoundException() + public function testLoadUserGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -180,7 +180,7 @@ public function testLoadUserGroupByRemoteIdThrowsNotFoundException(): void * * @depends testLoadUserGroup */ - public function testLoadSubUserGroups() + public function testLoadSubUserGroups(): void { $repository = $this->getRepository(); @@ -205,7 +205,7 @@ public function testLoadSubUserGroups() * * @covers \Ibexa\Contracts\Core\Repository\UserService::loadSubUserGroups */ - public function testLoadSubUserGroupsThrowsNotFoundException() + public function testLoadSubUserGroupsThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -265,7 +265,7 @@ public function testNewUserGroupCreateStruct() * * @depends testNewUserGroupCreateStruct */ - public function testNewUserGroupCreateStructSetsMainLanguageCode($groupCreate) + public function testNewUserGroupCreateStructSetsMainLanguageCode($groupCreate): void { self::assertEquals('eng-US', $groupCreate->mainLanguageCode); } @@ -279,7 +279,7 @@ public function testNewUserGroupCreateStructSetsMainLanguageCode($groupCreate) * * @depends testNewUserGroupCreateStruct */ - public function testNewUserGroupCreateStructSetsContentType($groupCreate) + public function testNewUserGroupCreateStructSetsContentType($groupCreate): void { self::assertInstanceOf( ContentType::class, @@ -294,7 +294,7 @@ public function testNewUserGroupCreateStructSetsContentType($groupCreate) * * @depends testNewUserGroupCreateStruct */ - public function testNewUserGroupCreateStructWithSecondParameter() + public function testNewUserGroupCreateStructWithSecondParameter(): void { $repository = $this->getRepository(); @@ -353,7 +353,7 @@ public function testCreateUserGroup() * * @depends testCreateUserGroup */ - public function testCreateUserGroupSetsExpectedProperties($userGroup) + public function testCreateUserGroupSetsExpectedProperties($userGroup): void { self::assertEquals( [ @@ -372,7 +372,7 @@ public function testCreateUserGroupSetsExpectedProperties($userGroup) * * @depends testCreateUserGroup */ - public function testCreateUserGroupThrowsInvalidArgumentException() + public function testCreateUserGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -408,7 +408,7 @@ public function testCreateUserGroupThrowsInvalidArgumentException() * * @depends testCreateUserGroup */ - public function testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAccept() + public function testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAccept(): void { $this->expectException(InvalidArgumentException::class); @@ -443,7 +443,7 @@ public function testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAcc * * @depends testCreateUserGroup */ - public function testCreateUserGroupWhenMissingField() + public function testCreateUserGroupWhenMissingField(): void { $this->expectException(ContentFieldValidationException::class); @@ -526,7 +526,7 @@ public function testCreateUserGroupInTransactionWithRollback(): void * * @depends testCreateUserGroup */ - public function testDeleteUserGroup() + public function testDeleteUserGroup(): void { $this->expectException(NotFoundException::class); @@ -549,7 +549,7 @@ public function testDeleteUserGroup() * * @covers \Ibexa\Contracts\Core\Repository\UserService::deleteUserGroup */ - public function testDeleteUserGroupThrowsNotFoundException() + public function testDeleteUserGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -579,7 +579,7 @@ public function testDeleteUserGroupThrowsNotFoundException() * @depends testCreateUserGroup * @depends testLoadSubUserGroups */ - public function testMoveUserGroup() + public function testMoveUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -624,7 +624,7 @@ static function ($content) { * * @covers \Ibexa\Contracts\Core\Repository\UserService::moveUserGroup */ - public function testMoveUserGroupThrowsNotFoundException() + public function testMoveUserGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -663,7 +663,7 @@ public function testMoveUserGroupThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserGroupUpdateStruct */ - public function testNewUserGroupUpdateStruct() + public function testNewUserGroupUpdateStruct(): void { $repository = $this->getRepository(); @@ -690,7 +690,7 @@ public function testNewUserGroupUpdateStruct() * @depends testCreateUserGroup * @depends testNewUserGroupUpdateStruct */ - public function testUpdateUserGroup() + public function testUpdateUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -723,7 +723,7 @@ public function testUpdateUserGroup() * * @depends testUpdateUserGroup */ - public function testUpdateUserGroupWithSubContentUpdateStruct() + public function testUpdateUserGroupWithSubContentUpdateStruct(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -764,7 +764,7 @@ public function testUpdateUserGroupWithSubContentUpdateStruct() * * @depends testUpdateUserGroup */ - public function testUpdateUserGroupWithSubContentMetadataUpdateStruct() + public function testUpdateUserGroupWithSubContentMetadataUpdateStruct(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -808,7 +808,7 @@ public function testUpdateUserGroupWithSubContentMetadataUpdateStruct() * * @depends testUpdateUserGroup */ - public function testUpdateUserGroupThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() + public function testUpdateUserGroupThrowsInvalidArgumentExceptionOnFieldTypeNotAccept(): void { $this->expectException(InvalidArgumentException::class); @@ -869,7 +869,7 @@ public function testNewUserCreateStruct() * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUserGroup */ - public function testUpdateUserGroupThrowsContentFieldValidationExceptionOnRequiredFieldEmpty() + public function testUpdateUserGroupThrowsContentFieldValidationExceptionOnRequiredFieldEmpty(): void { $this->expectException(ContentFieldValidationException::class); @@ -894,7 +894,7 @@ public function testUpdateUserGroupThrowsContentFieldValidationExceptionOnRequir * * @depends testNewUserCreateStruct */ - public function testNewUserCreateStructSetsExpectedProperties($userCreate) + public function testNewUserCreateStructSetsExpectedProperties($userCreate): void { self::assertEquals( [ @@ -919,7 +919,7 @@ public function testNewUserCreateStructSetsExpectedProperties($userCreate) * * @depends testNewUserCreateStruct */ - public function testNewUserCreateStructWithFifthParameter() + public function testNewUserCreateStructWithFifthParameter(): void { $repository = $this->getRepository(); @@ -987,7 +987,7 @@ public function testCreateUser() * * @depends testCreateUser */ - public function testCreateUserSetsExpectedProperties(User $user) + public function testCreateUserSetsExpectedProperties(User $user): void { self::assertEquals( [ @@ -1010,7 +1010,7 @@ public function testCreateUserSetsExpectedProperties(User $user) * * @depends testCreateUser */ - public function testCreateUserWhenMissingField() + public function testCreateUserWhenMissingField(): void { $this->expectException(ContentFieldValidationException::class); @@ -1051,7 +1051,7 @@ public function testCreateUserWhenMissingField() * * @depends testCreateUser */ - public function testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() + public function testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept(): void { $this->expectException(InvalidArgumentException::class); @@ -1092,7 +1092,7 @@ public function testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept * * @depends testCreateUser */ - public function testCreateUserThrowsInvalidArgumentException() + public function testCreateUserThrowsInvalidArgumentException(): void { $repository = $this->getRepository(); @@ -1286,7 +1286,7 @@ public function testCreateUserInTransactionWithRollback(): void * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser */ - public function testCreateUserThrowsNotFoundException() + public function testCreateUserThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -1319,7 +1319,7 @@ public function testCreateUserThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser */ - public function testCreateUserWithWeakPasswordThrowsUserPasswordValidationException() + public function testCreateUserWithWeakPasswordThrowsUserPasswordValidationException(): void { $userContentType = $this->createUserContentTypeWithStrongPassword(); @@ -1350,7 +1350,7 @@ public function testCreateUserWithWeakPasswordThrowsUserPasswordValidationExcept * * @covers \Ibexa\Contracts\Core\Repository\UserService::createUser */ - public function testCreateUserWithStrongPassword() + public function testCreateUserWithStrongPassword(): void { $userContentType = $this->createUserContentTypeWithStrongPassword(); @@ -1395,7 +1395,7 @@ public function testLoadUser(): void * * @depends testLoadUser */ - public function testLoadUserThrowsNotFoundException() + public function testLoadUserThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -1460,7 +1460,7 @@ public function testCheckUserCredentialsInvalid(): void * * @depends testCreateUser */ - public function testLoadUserByLogin() + public function testLoadUserByLogin(): void { $repository = $this->getRepository(); @@ -1497,7 +1497,7 @@ public function testLoadUserByLogin() * * @depends testLoadUserByLogin */ - public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin() + public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin(): void { $this->expectException(NotFoundException::class); @@ -1521,7 +1521,7 @@ public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin() * * @depends testLoadUserByLogin */ - public function testLoadUserByLoginWorksForLoginWithWrongCase() + public function testLoadUserByLoginWorksForLoginWithWrongCase(): void { $repository = $this->getRepository(); @@ -1560,7 +1560,7 @@ public function testLoadUserByLoginWorksForLoginWithWrongCase() * * @depends testLoadUserByLogin */ - public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLoginByEmail() + public function testLoadUserByLoginThrowsNotFoundExceptionForUnknownLoginByEmail(): void { $this->expectException(NotFoundException::class); @@ -1603,7 +1603,7 @@ public function testLoadUserByEmail(): void * * @depends testLoadUserByEmail */ - public function testLoadUserByEmailReturnsEmptyInUnknownEmail() + public function testLoadUserByEmailReturnsEmptyInUnknownEmail(): void { $repository = $this->getRepository(); @@ -1628,7 +1628,7 @@ public function testLoadUserByEmailReturnsEmptyInUnknownEmail() * @depends testCreateUser * @depends testLoadUser */ - public function testDeleteUser() + public function testDeleteUser(): void { $this->expectException(NotFoundException::class); @@ -1655,7 +1655,7 @@ public function testDeleteUser() * @depends testCreateUser * @depends testLoadUser */ - public function testDeleteUserDeletesRelatedBookmarks() + public function testDeleteUserDeletesRelatedBookmarks(): void { $repository = $this->getRepository(); @@ -1688,7 +1688,7 @@ public function testDeleteUserDeletesRelatedBookmarks() * * @covers \Ibexa\Contracts\Core\Repository\UserService::newUserUpdateStruct() */ - public function testNewUserUpdateStruct() + public function testNewUserUpdateStruct(): void { $repository = $this->getRepository(); @@ -1841,7 +1841,7 @@ public function testUpdateUserNoPassword(): void * * @depends testUpdateUser */ - public function testUpdateUserUpdatesExpectedProperties(User $user) + public function testUpdateUserUpdatesExpectedProperties(User $user): void { self::assertEquals( [ @@ -1876,7 +1876,7 @@ public function testUpdateUserUpdatesExpectedProperties(User $user) * * @depends testUpdateUser */ - public function testUpdateUserReturnsPublishedVersion(User $user) + public function testUpdateUserReturnsPublishedVersion(User $user): void { self::assertEquals( APIVersionInfo::STATUS_PUBLISHED, @@ -1891,7 +1891,7 @@ public function testUpdateUserReturnsPublishedVersion(User $user) * * @depends testUpdateUser */ - public function testUpdateUserWithContentMetadataUpdateStruct() + public function testUpdateUserWithContentMetadataUpdateStruct(): void { $repository = $this->getRepository(); @@ -1930,7 +1930,7 @@ public function testUpdateUserWithContentMetadataUpdateStruct() * * @depends testUpdateUser */ - public function testUpdateUserWithContentUpdateStruct() + public function testUpdateUserWithContentUpdateStruct(): void { $repository = $this->getRepository(); @@ -1973,7 +1973,7 @@ public function testUpdateUserWithContentUpdateStruct() * * @depends testUpdateUser */ - public function testUpdateUserWhenMissingField() + public function testUpdateUserWhenMissingField(): void { $this->expectException(ContentFieldValidationException::class); @@ -2011,7 +2011,7 @@ public function testUpdateUserWhenMissingField() * * @depends testUpdateUser */ - public function testUpdateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept() + public function testUpdateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept(): void { $this->expectException(InvalidArgumentException::class); @@ -2047,7 +2047,7 @@ public function testUpdateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser */ - public function testUpdateUserWithWeakPasswordThrowsUserPasswordValidationException() + public function testUpdateUserWithWeakPasswordThrowsUserPasswordValidationException(): void { $userService = $this->getRepository()->getUserService(); @@ -2082,7 +2082,7 @@ public function testUpdateUserWithWeakPasswordThrowsUserPasswordValidationExcept * * @covers \Ibexa\Contracts\Core\Repository\UserService::updateUser */ - public function testUpdateUserWithStrongPassword() + public function testUpdateUserWithStrongPassword(): void { $userService = $this->getRepository()->getUserService(); @@ -2191,7 +2191,7 @@ public function testUpdateUserPasswordWithUnsupportedHashType(): void * * @depends testCreateUser */ - public function testLoadUserGroupsOfUser() + public function testLoadUserGroupsOfUser(): void { $repository = $this->getRepository(); @@ -2218,7 +2218,7 @@ public function testLoadUserGroupsOfUser() * * @depends testCreateUser */ - public function testLoadUsersOfUserGroup() + public function testLoadUsersOfUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2247,7 +2247,7 @@ public function testLoadUsersOfUserGroup() * * @depends testLoadUserGroupsOfUser */ - public function testAssignUserToUserGroup() + public function testAssignUserToUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2290,7 +2290,7 @@ public function testAssignUserToUserGroup() * * @depends testAssignUserToUserGroup */ - public function testAssignUserToUserGroupThrowsInvalidArgumentException() + public function testAssignUserToUserGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'user\' is invalid: User is already in the given User Group'); @@ -2353,7 +2353,7 @@ public function testAssignUserToGroupWithLocationsValidation(): void * * @depends testLoadUserGroupsOfUser */ - public function testUnAssignUserFromUserGroup() + public function testUnAssignUserFromUserGroup(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2396,7 +2396,7 @@ public function testUnAssignUserFromUserGroup() * * @depends testUnAssignUserFromUserGroup */ - public function testUnAssignUserFromUserGroupThrowsInvalidArgumentException() + public function testUnAssignUserFromUserGroupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -2425,7 +2425,7 @@ public function testUnAssignUserFromUserGroupThrowsInvalidArgumentException() * * @depends testUnAssignUserFromUserGroup */ - public function testUnAssignUserFromUserGroupThrowsBadStateArgumentException() + public function testUnAssignUserFromUserGroupThrowsBadStateArgumentException(): void { $this->expectException(BadStateException::class); $this->expectExceptionMessage('Argument \'user\' has a bad state: User only has one User Group, cannot unassign from last group'); @@ -2501,7 +2501,7 @@ public function testUnAssignUserToGroupWithLocationValidation(): void public function testLoadUserGroupWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2535,7 +2535,7 @@ public function testLoadUserGroupWithPrioritizedLanguagesList( public function testLoadUserGroupWithPrioritizedLanguagesListAfterMainLanguageUpdate( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $contentService = $repository->getContentService(); @@ -2576,7 +2576,7 @@ public function testLoadUserGroupWithPrioritizedLanguagesListAfterMainLanguageUp public function testLoadSubUserGroupsWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2618,7 +2618,7 @@ public function testLoadSubUserGroupsWithPrioritizedLanguagesList( public function testLoadUserWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2656,7 +2656,7 @@ public function testLoadUserWithPrioritizedLanguagesList( public function testLoadUserWithPrioritizedLanguagesListAfterMainLanguageUpdate( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $contentService = $repository->getContentService(); @@ -2701,7 +2701,7 @@ public function testLoadUserWithPrioritizedLanguagesListAfterMainLanguageUpdate( public function testLoadUserByLoginWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $user = $this->createMultiLanguageUser(); @@ -2739,7 +2739,7 @@ public function testLoadUserByLoginWithPrioritizedLanguagesList( public function testLoadUsersByEmailWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $user = $this->createMultiLanguageUser(); @@ -2778,8 +2778,8 @@ public function testLoadUsersByEmailWithPrioritizedLanguagesList( */ public function testLoadUserGroupsOfUserWithPrioritizedLanguagesList( array $prioritizedLanguages, - $expectedLanguageCode - ) { + ?string $expectedLanguageCode + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); $userGroup = $this->createMultiLanguageUserGroup(); @@ -2812,7 +2812,7 @@ public function testLoadUserGroupsOfUserWithPrioritizedLanguagesList( public function testLoadUsersOfUserGroupWithPrioritizedLanguagesList( array $prioritizedLanguages, $expectedLanguageCode - ) { + ): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2853,7 +2853,7 @@ public function testLoadUsersOfUserGroupWithPrioritizedLanguagesList( * * @return array */ - public function getPrioritizedLanguageList() + public function getPrioritizedLanguageList(): array { return [ [[], null], @@ -2872,7 +2872,7 @@ public function getPrioritizedLanguageList() * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - private function createMultiLanguageUserGroup($parentGroupId = 4) + private function createMultiLanguageUserGroup($parentGroupId = 4): \Ibexa\Contracts\Core\Repository\Values\User\UserGroup { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -2930,7 +2930,7 @@ private function createUserGroupVersion1() * * @return \Ibexa\Contracts\Core\Repository\Values\User\User */ - private function createMultiLanguageUser($userGroupId = 13) + private function createMultiLanguageUser(int $userGroupId = 13): User { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -3039,7 +3039,7 @@ public function testLoadUserByToken(): string * * @param string $originalUserToken */ - public function testUpdateUserToken($originalUserToken) + public function testUpdateUserToken(string $originalUserToken): void { $repository = $this->getRepository(false); $userService = $repository->getUserService(); @@ -3065,7 +3065,7 @@ public function testUpdateUserToken($originalUserToken) * * @param string $userToken */ - public function testExpireUserToken($userToken) + public function testExpireUserToken(string $userToken): void { $this->expectException(NotFoundException::class); @@ -3098,7 +3098,7 @@ public function testLoadUserByTokenThrowsNotFoundException(): void /** * @covers \Ibexa\Contracts\Core\Repository\UserService::validatePassword() */ - public function testValidatePasswordWithDefaultContext() + public function testValidatePasswordWithDefaultContext(): void { $userService = $this->getRepository()->getUserService(); @@ -3114,7 +3114,7 @@ public function testValidatePasswordWithDefaultContext() * * @dataProvider dataProviderForValidatePassword */ - public function testValidatePassword(string $password, array $expectedErrors) + public function testValidatePassword(string $password, array $expectedErrors): void { $userService = $this->getRepository()->getUserService(); $contentType = $this->createUserContentTypeWithStrongPassword(); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php index 3a51f70c1e..fc30a90e6a 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php @@ -23,7 +23,7 @@ class ContentTypeLimitationTest extends BaseLimitationTest * * @throws \ErrorException */ - public function testContentTypeLimitationAllow() + public function testContentTypeLimitationAllow(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -93,7 +93,7 @@ public function testContentTypeLimitationAllow() * * @throws \ErrorException */ - public function testContentTypeLimitationForbid() + public function testContentTypeLimitationForbid(): void { $this->expectException(UnauthorizedException::class); @@ -151,7 +151,7 @@ public function testContentTypeLimitationForbid() /** * @throws \ErrorException */ - public function testContentTypeLimitationForbidVariant() + public function testContentTypeLimitationForbidVariant(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php index fbd07994aa..7cdb95f388 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php @@ -23,7 +23,7 @@ class LocationLimitationTest extends BaseLimitationTest * * @covers \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation */ - public function testLocationLimitationAllow() + public function testLocationLimitationAllow(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -56,7 +56,7 @@ public function testLocationLimitationAllow() ); } - public function testLocationLimitationForbid() + public function testLocationLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php index 415b8b89ac..babc5951ae 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php @@ -18,7 +18,7 @@ */ class NewObjectStateLimitationTest extends BaseLimitationTest { - public function testNewObjectStateLimitationAllow() + public function testNewObjectStateLimitationAllow(): void { $repository = $this->getRepository(); $notLockedState = $this->generateId('objectstate', 2); @@ -62,7 +62,7 @@ public function testNewObjectStateLimitationAllow() * * @throws \ErrorException if a mandatory test fixture not exists. */ - public function testNewObjectStateLimitationForbid() + public function testNewObjectStateLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php index eade460f7d..2f25d17a35 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php @@ -18,7 +18,7 @@ */ class NewSectionLimitationTest extends BaseLimitationTest { - public function testNewSectionLimitationAllow() + public function testNewSectionLimitationAllow(): void { $repository = $this->getRepository(); @@ -69,7 +69,7 @@ public function testNewSectionLimitationAllow() ); } - public function testNewSectionLimitationForbid() + public function testNewSectionLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php index 4bc4c30e5e..a24d7081ce 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php @@ -19,7 +19,7 @@ */ class OwnerLimitationTest extends BaseLimitationTest { - public function testOwnerLimitationAllow() + public function testOwnerLimitationAllow(): void { $this->expectException(NotFoundException::class); @@ -86,7 +86,7 @@ public function testOwnerLimitationAllow() $contentService->loadContent($content->id); } - public function testOwnerLimitationForbid() + public function testOwnerLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php index 2358e08bc6..e34ff65634 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php @@ -19,7 +19,7 @@ */ class ParentContentTypeLimitationTest extends BaseLimitationTest { - public function testParentContentTypeLimitationAllow() + public function testParentContentTypeLimitationAllow(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -67,7 +67,7 @@ public function testParentContentTypeLimitationAllow() ); } - public function testParentContentTypeLimitationForbid() + public function testParentContentTypeLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php index f89a7b3f8b..4d103c5867 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php @@ -19,7 +19,7 @@ */ class ParentDepthLimitationTest extends BaseLimitationTest { - public function testParentDepthLimitationForbid() + public function testParentDepthLimitationForbid(): void { $this->expectException(UnauthorizedException::class); @@ -59,7 +59,7 @@ public function testParentDepthLimitationForbid() ); } - public function testParentDepthLimitationAllow() + public function testParentDepthLimitationAllow(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -104,7 +104,7 @@ public function testParentDepthLimitationAllow() * * @depends testParentDepthLimitationAllow */ - public function testParentDepthLimitationAllowPublish() + public function testParentDepthLimitationAllowPublish(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php index 2e70479ef0..3ac39cdaae 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php @@ -18,7 +18,7 @@ */ class ParentOwnerLimitationTest extends BaseLimitationTest { - public function testParentOwnerLimitationAllow() + public function testParentOwnerLimitationAllow(): void { $repository = $this->getRepository(); @@ -61,7 +61,7 @@ public function testParentOwnerLimitationAllow() ); } - public function testParentOwnerLimitationForbid() + public function testParentOwnerLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php index ed6df96440..6b341f5590 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php @@ -18,7 +18,7 @@ */ class ParentUserGroupLimitationTest extends BaseLimitationTest { - public function testParentUserGroupLimitationAllow() + public function testParentUserGroupLimitationAllow(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -80,7 +80,7 @@ public function testParentUserGroupLimitationAllow() ); } - public function testParentUserGroupLimitationForbid() + public function testParentUserGroupLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php index 436ad323b2..973797bb89 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php @@ -20,7 +20,7 @@ class RolePolicyLimitationTest extends BaseLimitationTest /** * Data provider for {@see testRolePoliciesWithOverlappingLimitations}. */ - public function providerForTestRolePoliciesWithOverlappingLimitations() + public function providerForTestRolePoliciesWithOverlappingLimitations(): array { // get actual locations count for the given subtree when user is (by default) an admin $actualSubtreeLocationsCount = $this->getSubtreeLocationsCount('/1/2/'); @@ -45,10 +45,10 @@ public function providerForTestRolePoliciesWithOverlappingLimitations() * @param string $widePolicyFunction */ public function testRolePoliciesWithOverlappingLimitations( - $expectedSubtreeLocationsCount, - $widePolicyModule, - $widePolicyFunction - ) { + ?int $expectedSubtreeLocationsCount, + string $widePolicyModule, + string $widePolicyFunction + ): void { $repository = $this->getRepository(); $roleService = $repository->getRoleService(); $permissionResolver = $repository->getPermissionResolver(); @@ -104,7 +104,7 @@ public function testRolePoliciesWithOverlappingLimitations( * * @return int|null */ - protected function getSubtreeLocationsCount($subtreePathString) + protected function getSubtreeLocationsCount($subtreePathString): ?int { $criterion = new Criterion\Subtree($subtreePathString); $query = new LocationQuery(['filter' => $criterion]); @@ -152,7 +152,7 @@ protected function createUserInGroup(UserGroup $group) * @param string $function * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] $limitations */ - protected function addPolicyToNewRole(RoleCreateStruct $roleCreateStruct, $module, $function, array $limitations) + protected function addPolicyToNewRole(RoleCreateStruct $roleCreateStruct, string $module, string $function, array $limitations) { $roleService = $this->getRepository()->getRoleService(); $policyCreateStruct = $roleService->newPolicyCreateStruct($module, $function); @@ -171,7 +171,7 @@ protected function addPolicyToNewRole(RoleCreateStruct $roleCreateStruct, $modul * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroup */ - protected function createGroup($groupName, $mainLanguageCode, $parentGroupId) + protected function createGroup($groupName, string $mainLanguageCode, int $parentGroupId): UserGroup { $userService = $this->getRepository()->getUserService(); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php index b1266799f4..3b034c4a78 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php @@ -18,7 +18,7 @@ */ class SectionLimitationTest extends BaseLimitationTest { - public function testSectionLimitationAllow() + public function testSectionLimitationAllow(): void { $repository = $this->getRepository(); @@ -76,7 +76,7 @@ public function testSectionLimitationAllow() ); } - public function testSectionLimitationForbid() + public function testSectionLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php index ac7ff751f9..47966c8253 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php @@ -19,7 +19,7 @@ */ class StatusLimitationTest extends BaseLimitationTest { - public function testStatusLimitationAllow() + public function testStatusLimitationAllow(): void { $repository = $this->getRepository(); $permissionResolver = $repository->getPermissionResolver(); @@ -80,7 +80,7 @@ public function testStatusLimitationAllow() ); } - public function testStatusLimitationForbid() + public function testStatusLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php index fddc5e47f7..be1c59d094 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php @@ -28,7 +28,7 @@ class SubtreeLimitationTest extends BaseLimitationTest * @see \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation * @see \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation */ - public function testSubtreeLimitationAllow() + public function testSubtreeLimitationAllow(): void { $repository = $this->getRepository(); @@ -68,7 +68,7 @@ public function testSubtreeLimitationAllow() * @see \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation * @see \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation */ - public function testSubtreeLimitationForbid() + public function testSubtreeLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php index 34c176d004..4e05424008 100644 --- a/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php +++ b/tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php @@ -20,7 +20,7 @@ */ class UserGroupLimitationTest extends BaseLimitationTest { - public function testUserGroupLimitationAllow() + public function testUserGroupLimitationAllow(): void { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -44,7 +44,7 @@ public function testUserGroupLimitationAllow() ); } - public function testUserGroupLimitationForbid() + public function testUserGroupLimitationForbid(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php index 7d30cdcbf2..def5cbee74 100644 --- a/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php @@ -36,7 +36,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void /** * @dataProvider tagsProvider */ - public function testRegisterFieldType(string $tag) + public function testRegisterFieldType(string $tag): void { $fieldTypeIdentifier = 'field_type_identifier'; $serviceId = 'service_id'; @@ -58,7 +58,7 @@ public function testRegisterFieldType(string $tag) * * @param string $tag */ - public function testRegisterFieldTypeNoAlias(string $tag) + public function testRegisterFieldTypeNoAlias(string $tag): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php index 1efb7e677c..526494fca9 100644 --- a/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php @@ -33,7 +33,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new FieldRegistryPass()); } - public function testRegisterFieldType() + public function testRegisterFieldType(): void { $fieldTypeIdentifier = 'field_type_identifier'; $serviceId = 'service_id'; @@ -50,7 +50,7 @@ public function testRegisterFieldType() ); } - public function testRegisterFieldTypeNoAlias() + public function testRegisterFieldTypeNoAlias(): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php index a1f9e60491..a52cf123d8 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php @@ -26,7 +26,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new CriteriaConverterPass()); } - public function testAddContentHandlers() + public function testAddContentHandlers(): void { $this->setDefinition( 'ibexa.search.legacy.gateway.criteria_converter.content', @@ -47,7 +47,7 @@ public function testAddContentHandlers() ); } - public function testAddLocationHandlers() + public function testAddLocationHandlers(): void { $this->setDefinition( 'ibexa.search.legacy.gateway.criteria_converter.location', diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php index 7cb1b9e5f8..0502c551b9 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php @@ -36,7 +36,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new CriterionFieldValueHandlerRegistryPass()); } - public function testRegisterValueHandler() + public function testRegisterValueHandler(): void { $fieldTypeIdentifier = 'field_type_identifier'; $serviceId = 'service_id'; @@ -56,7 +56,7 @@ public function testRegisterValueHandler() ); } - public function testRegisterValueHandlerNoAlias() + public function testRegisterValueHandlerNoAlias(): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php index 1fa7eb7372..4fe405fcb2 100644 --- a/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php @@ -26,7 +26,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new SortClauseConverterPass()); } - public function testAddContentHandlers() + public function testAddContentHandlers(): void { $this->setDefinition( 'ibexa.search.legacy.gateway.sort_clause_converter.content', @@ -47,7 +47,7 @@ public function testAddContentHandlers() ); } - public function testAddLocationHandlers() + public function testAddLocationHandlers(): void { $this->setDefinition( 'ibexa.search.legacy.gateway.sort_clause_converter.location', @@ -68,7 +68,7 @@ public function testAddLocationHandlers() ); } - public function testAddLocationAndContentHandlers() + public function testAddLocationAndContentHandlers(): void { $this->setDefinition( 'ibexa.search.legacy.gateway.sort_clause_converter.content', diff --git a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php index 3711c3b798..5802cbdae5 100644 --- a/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php @@ -31,7 +31,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void /** * @dataProvider externalStorageHandlerTagsProvider */ - public function testRegisterExternalStorageHandler(string $tag) + public function testRegisterExternalStorageHandler(string $tag): void { $def = new Definition(); $fieldTypeIdentifier = 'field_type_identifier'; @@ -51,7 +51,7 @@ public function testRegisterExternalStorageHandler(string $tag) /** * @dataProvider externalStorageHandlerTagsProvider */ - public function testRegisterExternalStorageHandlerNoAlias(string $tag) + public function testRegisterExternalStorageHandlerNoAlias(string $tag): void { $this->expectException(\LogicException::class); @@ -73,7 +73,7 @@ public function testRegisterExternalStorageHandlerNoAlias(string $tag) /** * @dataProvider externalStorageHandlerGatewayTagsProvider */ - public function testRegisterExternalStorageHandlerWithGateway(string $tag) + public function testRegisterExternalStorageHandlerWithGateway(string $tag): void { $handlerDef = new Definition(); $handlerDef->setClass(GatewayBasedStorageHandler::class); @@ -105,7 +105,7 @@ public function testRegisterExternalStorageHandlerWithGateway(string $tag) /** * @dataProvider externalStorageHandlerGatewayTagsProvider */ - public function testRegisterExternalStorageHandlerWithoutRegisteredGateway(string $tag) + public function testRegisterExternalStorageHandlerWithoutRegisteredGateway(string $tag): void { $this->expectException(\LogicException::class); @@ -130,7 +130,7 @@ public function testRegisterExternalStorageHandlerWithoutRegisteredGateway(strin /** * @dataProvider externalStorageHandlerGatewayTagsProvider */ - public function testRegisterExternalStorageHandlerWithGatewayNoAlias(string $tag) + public function testRegisterExternalStorageHandlerWithGatewayNoAlias(string $tag): void { $this->expectException(\LogicException::class); @@ -161,7 +161,7 @@ public function testRegisterExternalStorageHandlerWithGatewayNoAlias(string $tag /** * @dataProvider externalStorageHandlerGatewayTagsProvider */ - public function testRegisterExternalStorageHandlerWithGatewayNoIdentifier(string $tag) + public function testRegisterExternalStorageHandlerWithGatewayNoIdentifier(string $tag): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php index 9764a3adbd..2a421d456d 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php @@ -33,7 +33,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new FieldValueConverterRegistryPass()); } - public function testRegisterConverterNoLazy() + public function testRegisterConverterNoLazy(): void { $fieldTypeIdentifier = 'fieldtype_identifier'; $serviceId = 'some_service_id'; diff --git a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php index cb71ba5b9c..011a4af10e 100644 --- a/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php +++ b/tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php @@ -36,7 +36,7 @@ protected function registerCompilerPass(ContainerBuilder $container): void $container->addCompilerPass(new RoleLimitationConverterPass()); } - public function testRegisterRoleLimitationConverter() + public function testRegisterRoleLimitationConverter(): void { $serviceId = 'service_id'; $def = new Definition(); diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php index b80516d505..d2707b1ba4 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php @@ -9,6 +9,7 @@ namespace Ibexa\Tests\Core\Base\Container\Compiler\TaggedServiceIdsIterator; use Ibexa\Core\Base\Container\Compiler\TaggedServiceIdsIterator\BackwardCompatibleIterator; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\TaggedContainerInterface; @@ -18,10 +19,10 @@ final class BackwardCompatibleIteratorTest extends TestCase private const EXAMPLE_DEPRECATED_SERVICE_TAG = 'deprecated_tag'; /** @var \Ibexa\Tests\Core\Base\Container\Compiler\TaggedServiceIdsIterator\DeprecationErrorCollector */ - private $deprecationErrorCollector; + private DeprecationErrorCollector $deprecationErrorCollector; /** @var \Symfony\Component\DependencyInjection\TaggedContainerInterface */ - private $container; + private MockObject $container; protected function setUp(): void { diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php index 143e244563..a41d9dc884 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php @@ -15,8 +15,7 @@ */ final class DeprecationErrorCollector { - /** @var array */ - private $errors = []; + private array $errors = []; /** @var callable|null */ private $previousErrorHandler; diff --git a/tests/lib/Collection/ArrayListTest.php b/tests/lib/Collection/ArrayListTest.php index 297c3cd20c..fab9937723 100644 --- a/tests/lib/Collection/ArrayListTest.php +++ b/tests/lib/Collection/ArrayListTest.php @@ -72,7 +72,7 @@ public function testFilter(): void self::assertEquals( $this->createCollection(['7', '9', '10']), - $list->filter(static fn (string $item) => ctype_digit($item)) + $list->filter(static fn (string $item): bool => ctype_digit($item)) ); } diff --git a/tests/lib/Collection/ArrayMapTest.php b/tests/lib/Collection/ArrayMapTest.php index 33d86ac2b8..cccc1ddb69 100644 --- a/tests/lib/Collection/ArrayMapTest.php +++ b/tests/lib/Collection/ArrayMapTest.php @@ -82,16 +82,16 @@ public function testExists(): void { $map = $this->createCollection(self::EXAMPLE_DATA); - self::assertTrue($map->exists(static fn ($value, $key) => $value === 'foo')); - self::assertFalse($map->exists(static fn ($value, $key) => $value === 'non-existing')); + self::assertTrue($map->exists(static fn ($value, $key): bool => $value === 'foo')); + self::assertFalse($map->exists(static fn ($value, $key): bool => $value === 'non-existing')); } public function testForAll(): void { $map = $this->createCollection(self::EXAMPLE_DATA); - self::assertTrue($map->forAll(static fn ($value, $key) => strlen($value) > 2)); - self::assertFalse($map->forAll(static fn ($value, $key) => $value === 'foo')); + self::assertTrue($map->forAll(static fn ($value, $key): bool => strlen($value) > 2)); + self::assertFalse($map->forAll(static fn ($value, $key): bool => $value === 'foo')); } protected function getExampleData(): array diff --git a/tests/lib/Event/AbstractServiceTest.php b/tests/lib/Event/AbstractServiceTest.php index d9c567610e..1746c4f719 100644 --- a/tests/lib/Event/AbstractServiceTest.php +++ b/tests/lib/Event/AbstractServiceTest.php @@ -19,8 +19,8 @@ abstract class AbstractServiceTest extends TestCase public function getEventDispatcher(string $beforeEventName, string $eventName): TraceableEventDispatcher { $eventDispatcher = new EventDispatcher(); - $eventDispatcher->addListener($beforeEventName, static function (BeforeEvent $event) {}); - $eventDispatcher->addListener($eventName, static function (AfterEvent $event) {}); + $eventDispatcher->addListener($beforeEventName, static function (BeforeEvent $event): void {}); + $eventDispatcher->addListener($eventName, static function (AfterEvent $event): void {}); return new TraceableEventDispatcher( $eventDispatcher, diff --git a/tests/lib/Event/BookmarkServiceTest.php b/tests/lib/Event/BookmarkServiceTest.php index 4e79186353..c1a6d9df8a 100644 --- a/tests/lib/Event/BookmarkServiceTest.php +++ b/tests/lib/Event/BookmarkServiceTest.php @@ -17,7 +17,7 @@ class BookmarkServiceTest extends AbstractServiceTest { - public function testCreateBookmarkEvents() + public function testCreateBookmarkEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateBookmarkEvent::class, @@ -42,7 +42,7 @@ public function testCreateBookmarkEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateBookmarkStopPropagationInBeforeEvents() + public function testCreateBookmarkStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateBookmarkEvent::class, @@ -55,7 +55,7 @@ public function testCreateBookmarkStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(BookmarkServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeCreateBookmarkEvent::class, static function (BeforeCreateBookmarkEvent $event) { + $traceableEventDispatcher->addListener(BeforeCreateBookmarkEvent::class, static function (BeforeCreateBookmarkEvent $event): void { $event->stopPropagation(); }, 10); @@ -74,7 +74,7 @@ public function testCreateBookmarkStopPropagationInBeforeEvents() ]); } - public function testDeleteBookmarkEvents() + public function testDeleteBookmarkEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteBookmarkEvent::class, @@ -99,7 +99,7 @@ public function testDeleteBookmarkEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteBookmarkStopPropagationInBeforeEvents() + public function testDeleteBookmarkStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteBookmarkEvent::class, @@ -112,7 +112,7 @@ public function testDeleteBookmarkStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(BookmarkServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteBookmarkEvent::class, static function (BeforeDeleteBookmarkEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteBookmarkEvent::class, static function (BeforeDeleteBookmarkEvent $event): void { $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/ContentServiceTest.php b/tests/lib/Event/ContentServiceTest.php index fe98d7c941..bc42d49b8b 100644 --- a/tests/lib/Event/ContentServiceTest.php +++ b/tests/lib/Event/ContentServiceTest.php @@ -47,7 +47,7 @@ class ContentServiceTest extends AbstractServiceTest { - public function testDeleteContentEvents() + public function testDeleteContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentEvent::class, @@ -75,7 +75,7 @@ public function testDeleteContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnDeleteContentResultInBeforeEvents() + public function testReturnDeleteContentResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentEvent::class, @@ -91,7 +91,7 @@ public function testReturnDeleteContentResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('deleteContent')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteContentEvent::class, static function (BeforeDeleteContentEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteContentEvent::class, static function (BeforeDeleteContentEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); }, 10); @@ -109,7 +109,7 @@ public function testReturnDeleteContentResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteContentStopPropagationInBeforeEvents() + public function testDeleteContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentEvent::class, @@ -125,7 +125,7 @@ public function testDeleteContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('deleteContent')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteContentEvent::class, static function (BeforeDeleteContentEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteContentEvent::class, static function (BeforeDeleteContentEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); $event->stopPropagation(); }, 10); @@ -146,7 +146,7 @@ public function testDeleteContentStopPropagationInBeforeEvents() ]); } - public function testCopyContentEvents() + public function testCopyContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentEvent::class, @@ -176,7 +176,7 @@ public function testCopyContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCopyContentResultInBeforeEvents() + public function testReturnCopyContentResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentEvent::class, @@ -194,7 +194,7 @@ public function testReturnCopyContentResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('copyContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeCopyContentEvent::class, static function (BeforeCopyContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeCopyContentEvent::class, static function (BeforeCopyContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); }, 10); @@ -212,7 +212,7 @@ public function testReturnCopyContentResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCopyContentStopPropagationInBeforeEvents() + public function testCopyContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentEvent::class, @@ -230,7 +230,7 @@ public function testCopyContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('copyContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeCopyContentEvent::class, static function (BeforeCopyContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeCopyContentEvent::class, static function (BeforeCopyContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); $event->stopPropagation(); }, 10); @@ -251,7 +251,7 @@ public function testCopyContentStopPropagationInBeforeEvents() ]); } - public function testUpdateContentEvents() + public function testUpdateContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentEvent::class, @@ -280,7 +280,7 @@ public function testUpdateContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateContentResultInBeforeEvents() + public function testReturnUpdateContentResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentEvent::class, @@ -297,7 +297,7 @@ public function testReturnUpdateContentResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('updateContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeUpdateContentEvent::class, static function (BeforeUpdateContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeUpdateContentEvent::class, static function (BeforeUpdateContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); }, 10); @@ -315,7 +315,7 @@ public function testReturnUpdateContentResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateContentStopPropagationInBeforeEvents() + public function testUpdateContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentEvent::class, @@ -332,7 +332,7 @@ public function testUpdateContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('updateContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeUpdateContentEvent::class, static function (BeforeUpdateContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeUpdateContentEvent::class, static function (BeforeUpdateContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); $event->stopPropagation(); }, 10); @@ -353,7 +353,7 @@ public function testUpdateContentStopPropagationInBeforeEvents() ]); } - public function testDeleteRelationEvents() + public function testDeleteRelationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRelationEvent::class, @@ -379,7 +379,7 @@ public function testDeleteRelationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteRelationStopPropagationInBeforeEvents() + public function testDeleteRelationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRelationEvent::class, @@ -393,7 +393,7 @@ public function testDeleteRelationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteRelationEvent::class, static function (BeforeDeleteRelationEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteRelationEvent::class, static function (BeforeDeleteRelationEvent $event): void { $event->stopPropagation(); }, 10); @@ -412,7 +412,7 @@ public function testDeleteRelationStopPropagationInBeforeEvents() ]); } - public function testCreateContentEvents() + public function testCreateContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentEvent::class, @@ -441,7 +441,7 @@ public function testCreateContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateContentResultInBeforeEvents() + public function testReturnCreateContentResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentEvent::class, @@ -458,7 +458,7 @@ public function testReturnCreateContentResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('createContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeCreateContentEvent::class, static function (BeforeCreateContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeCreateContentEvent::class, static function (BeforeCreateContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); }, 10); @@ -476,7 +476,7 @@ public function testReturnCreateContentResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateContentStopPropagationInBeforeEvents() + public function testCreateContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentEvent::class, @@ -493,7 +493,7 @@ public function testCreateContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('createContent')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeCreateContentEvent::class, static function (BeforeCreateContentEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeCreateContentEvent::class, static function (BeforeCreateContentEvent $event) use ($eventContent): void { $event->setContent($eventContent); $event->stopPropagation(); }, 10); @@ -514,7 +514,7 @@ public function testCreateContentStopPropagationInBeforeEvents() ]); } - public function testHideContentEvents() + public function testHideContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeHideContentEvent::class, @@ -539,7 +539,7 @@ public function testHideContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testHideContentStopPropagationInBeforeEvents() + public function testHideContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeHideContentEvent::class, @@ -552,7 +552,7 @@ public function testHideContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeHideContentEvent::class, static function (BeforeHideContentEvent $event) { + $traceableEventDispatcher->addListener(BeforeHideContentEvent::class, static function (BeforeHideContentEvent $event): void { $event->stopPropagation(); }, 10); @@ -571,7 +571,7 @@ public function testHideContentStopPropagationInBeforeEvents() ]); } - public function testDeleteVersionEvents() + public function testDeleteVersionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteVersionEvent::class, @@ -596,7 +596,7 @@ public function testDeleteVersionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteVersionStopPropagationInBeforeEvents() + public function testDeleteVersionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteVersionEvent::class, @@ -609,7 +609,7 @@ public function testDeleteVersionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteVersionEvent::class, static function (BeforeDeleteVersionEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteVersionEvent::class, static function (BeforeDeleteVersionEvent $event): void { $event->stopPropagation(); }, 10); @@ -628,7 +628,7 @@ public function testDeleteVersionStopPropagationInBeforeEvents() ]); } - public function testAddRelationEvents() + public function testAddRelationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddRelationEvent::class, @@ -657,7 +657,7 @@ public function testAddRelationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnAddRelationResultInBeforeEvents() + public function testReturnAddRelationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddRelationEvent::class, @@ -674,7 +674,7 @@ public function testReturnAddRelationResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('addRelation')->willReturn($relation); - $traceableEventDispatcher->addListener(BeforeAddRelationEvent::class, static function (BeforeAddRelationEvent $event) use ($eventRelation) { + $traceableEventDispatcher->addListener(BeforeAddRelationEvent::class, static function (BeforeAddRelationEvent $event) use ($eventRelation): void { $event->setRelation($eventRelation); }, 10); @@ -692,7 +692,7 @@ public function testReturnAddRelationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAddRelationStopPropagationInBeforeEvents() + public function testAddRelationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddRelationEvent::class, @@ -709,7 +709,7 @@ public function testAddRelationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('addRelation')->willReturn($relation); - $traceableEventDispatcher->addListener(BeforeAddRelationEvent::class, static function (BeforeAddRelationEvent $event) use ($eventRelation) { + $traceableEventDispatcher->addListener(BeforeAddRelationEvent::class, static function (BeforeAddRelationEvent $event) use ($eventRelation): void { $event->setRelation($eventRelation); $event->stopPropagation(); }, 10); @@ -730,7 +730,7 @@ public function testAddRelationStopPropagationInBeforeEvents() ]); } - public function testUpdateContentMetadataEvents() + public function testUpdateContentMetadataEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentMetadataEvent::class, @@ -759,7 +759,7 @@ public function testUpdateContentMetadataEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateContentMetadataResultInBeforeEvents() + public function testReturnUpdateContentMetadataResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentMetadataEvent::class, @@ -776,7 +776,7 @@ public function testReturnUpdateContentMetadataResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('updateContentMetadata')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeUpdateContentMetadataEvent::class, static function (BeforeUpdateContentMetadataEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeUpdateContentMetadataEvent::class, static function (BeforeUpdateContentMetadataEvent $event) use ($eventContent): void { $event->setContent($eventContent); }, 10); @@ -794,7 +794,7 @@ public function testReturnUpdateContentMetadataResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateContentMetadataStopPropagationInBeforeEvents() + public function testUpdateContentMetadataStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentMetadataEvent::class, @@ -811,7 +811,7 @@ public function testUpdateContentMetadataStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('updateContentMetadata')->willReturn($content); - $traceableEventDispatcher->addListener(BeforeUpdateContentMetadataEvent::class, static function (BeforeUpdateContentMetadataEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforeUpdateContentMetadataEvent::class, static function (BeforeUpdateContentMetadataEvent $event) use ($eventContent): void { $event->setContent($eventContent); $event->stopPropagation(); }, 10); @@ -832,7 +832,7 @@ public function testUpdateContentMetadataStopPropagationInBeforeEvents() ]); } - public function testDeleteTranslationEvents() + public function testDeleteTranslationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteTranslationEvent::class, @@ -858,7 +858,7 @@ public function testDeleteTranslationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteTranslationStopPropagationInBeforeEvents() + public function testDeleteTranslationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteTranslationEvent::class, @@ -872,7 +872,7 @@ public function testDeleteTranslationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteTranslationEvent::class, static function (BeforeDeleteTranslationEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteTranslationEvent::class, static function (BeforeDeleteTranslationEvent $event): void { $event->stopPropagation(); }, 10); @@ -891,7 +891,7 @@ public function testDeleteTranslationStopPropagationInBeforeEvents() ]); } - public function testPublishVersionEvents() + public function testPublishVersionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishVersionEvent::class, @@ -920,7 +920,7 @@ public function testPublishVersionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnPublishVersionResultInBeforeEvents() + public function testReturnPublishVersionResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishVersionEvent::class, @@ -937,7 +937,7 @@ public function testReturnPublishVersionResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('publishVersion')->willReturn($content); - $traceableEventDispatcher->addListener(BeforePublishVersionEvent::class, static function (BeforePublishVersionEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforePublishVersionEvent::class, static function (BeforePublishVersionEvent $event) use ($eventContent): void { $event->setContent($eventContent); }, 10); @@ -955,7 +955,7 @@ public function testReturnPublishVersionResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testPublishVersionStopPropagationInBeforeEvents() + public function testPublishVersionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishVersionEvent::class, @@ -972,7 +972,7 @@ public function testPublishVersionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('publishVersion')->willReturn($content); - $traceableEventDispatcher->addListener(BeforePublishVersionEvent::class, static function (BeforePublishVersionEvent $event) use ($eventContent) { + $traceableEventDispatcher->addListener(BeforePublishVersionEvent::class, static function (BeforePublishVersionEvent $event) use ($eventContent): void { $event->setContent($eventContent); $event->stopPropagation(); }, 10); @@ -993,7 +993,7 @@ public function testPublishVersionStopPropagationInBeforeEvents() ]); } - public function testCreateContentDraftEvents() + public function testCreateContentDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentDraftEvent::class, @@ -1023,7 +1023,7 @@ public function testCreateContentDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateContentDraftResultInBeforeEvents() + public function testReturnCreateContentDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentDraftEvent::class, @@ -1041,7 +1041,7 @@ public function testReturnCreateContentDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('createContentDraft')->willReturn($contentDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentDraftEvent::class, static function (BeforeCreateContentDraftEvent $event) use ($eventContentDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentDraftEvent::class, static function (BeforeCreateContentDraftEvent $event) use ($eventContentDraft): void { $event->setContentDraft($eventContentDraft); }, 10); @@ -1059,7 +1059,7 @@ public function testReturnCreateContentDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateContentDraftStopPropagationInBeforeEvents() + public function testCreateContentDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentDraftEvent::class, @@ -1077,7 +1077,7 @@ public function testCreateContentDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); $innerServiceMock->method('createContentDraft')->willReturn($contentDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentDraftEvent::class, static function (BeforeCreateContentDraftEvent $event) use ($eventContentDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentDraftEvent::class, static function (BeforeCreateContentDraftEvent $event) use ($eventContentDraft): void { $event->setContentDraft($eventContentDraft); $event->stopPropagation(); }, 10); @@ -1098,7 +1098,7 @@ public function testCreateContentDraftStopPropagationInBeforeEvents() ]); } - public function testRevealContentEvents() + public function testRevealContentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRevealContentEvent::class, @@ -1123,7 +1123,7 @@ public function testRevealContentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRevealContentStopPropagationInBeforeEvents() + public function testRevealContentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRevealContentEvent::class, @@ -1136,7 +1136,7 @@ public function testRevealContentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRevealContentEvent::class, static function (BeforeRevealContentEvent $event) { + $traceableEventDispatcher->addListener(BeforeRevealContentEvent::class, static function (BeforeRevealContentEvent $event): void { $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/ContentTypeServiceTest.php b/tests/lib/Event/ContentTypeServiceTest.php index 3b916b65bc..5a0e9757ac 100644 --- a/tests/lib/Event/ContentTypeServiceTest.php +++ b/tests/lib/Event/ContentTypeServiceTest.php @@ -53,7 +53,7 @@ class ContentTypeServiceTest extends AbstractServiceTest { - public function testAddFieldDefinitionEvents() + public function testAddFieldDefinitionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddFieldDefinitionEvent::class, @@ -79,7 +79,7 @@ public function testAddFieldDefinitionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAddFieldDefinitionStopPropagationInBeforeEvents() + public function testAddFieldDefinitionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddFieldDefinitionEvent::class, @@ -93,7 +93,7 @@ public function testAddFieldDefinitionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAddFieldDefinitionEvent::class, static function (BeforeAddFieldDefinitionEvent $event) { + $traceableEventDispatcher->addListener(BeforeAddFieldDefinitionEvent::class, static function (BeforeAddFieldDefinitionEvent $event): void { $event->stopPropagation(); }, 10); @@ -112,7 +112,7 @@ public function testAddFieldDefinitionStopPropagationInBeforeEvents() ]); } - public function testDeleteContentTypeGroupEvents() + public function testDeleteContentTypeGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentTypeGroupEvent::class, @@ -137,7 +137,7 @@ public function testDeleteContentTypeGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteContentTypeGroupStopPropagationInBeforeEvents() + public function testDeleteContentTypeGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentTypeGroupEvent::class, @@ -150,7 +150,7 @@ public function testDeleteContentTypeGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteContentTypeGroupEvent::class, static function (BeforeDeleteContentTypeGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteContentTypeGroupEvent::class, static function (BeforeDeleteContentTypeGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -169,7 +169,7 @@ public function testDeleteContentTypeGroupStopPropagationInBeforeEvents() ]); } - public function testCreateContentTypeDraftEvents() + public function testCreateContentTypeDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeDraftEvent::class, @@ -197,7 +197,7 @@ public function testCreateContentTypeDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateContentTypeDraftResultInBeforeEvents() + public function testReturnCreateContentTypeDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeDraftEvent::class, @@ -213,7 +213,7 @@ public function testReturnCreateContentTypeDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentTypeDraft')->willReturn($contentTypeDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeDraftEvent::class, static function (BeforeCreateContentTypeDraftEvent $event) use ($eventContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeDraftEvent::class, static function (BeforeCreateContentTypeDraftEvent $event) use ($eventContentTypeDraft): void { $event->setContentTypeDraft($eventContentTypeDraft); }, 10); @@ -231,7 +231,7 @@ public function testReturnCreateContentTypeDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateContentTypeDraftStopPropagationInBeforeEvents() + public function testCreateContentTypeDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeDraftEvent::class, @@ -247,7 +247,7 @@ public function testCreateContentTypeDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentTypeDraft')->willReturn($contentTypeDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeDraftEvent::class, static function (BeforeCreateContentTypeDraftEvent $event) use ($eventContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeDraftEvent::class, static function (BeforeCreateContentTypeDraftEvent $event) use ($eventContentTypeDraft): void { $event->setContentTypeDraft($eventContentTypeDraft); $event->stopPropagation(); }, 10); @@ -268,7 +268,7 @@ public function testCreateContentTypeDraftStopPropagationInBeforeEvents() ]); } - public function testCreateContentTypeGroupEvents() + public function testCreateContentTypeGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeGroupEvent::class, @@ -296,7 +296,7 @@ public function testCreateContentTypeGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateContentTypeGroupResultInBeforeEvents() + public function testReturnCreateContentTypeGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeGroupEvent::class, @@ -312,7 +312,7 @@ public function testReturnCreateContentTypeGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentTypeGroup')->willReturn($contentTypeGroup); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeGroupEvent::class, static function (BeforeCreateContentTypeGroupEvent $event) use ($eventContentTypeGroup) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeGroupEvent::class, static function (BeforeCreateContentTypeGroupEvent $event) use ($eventContentTypeGroup): void { $event->setContentTypeGroup($eventContentTypeGroup); }, 10); @@ -330,7 +330,7 @@ public function testReturnCreateContentTypeGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateContentTypeGroupStopPropagationInBeforeEvents() + public function testCreateContentTypeGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeGroupEvent::class, @@ -346,7 +346,7 @@ public function testCreateContentTypeGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentTypeGroup')->willReturn($contentTypeGroup); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeGroupEvent::class, static function (BeforeCreateContentTypeGroupEvent $event) use ($eventContentTypeGroup) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeGroupEvent::class, static function (BeforeCreateContentTypeGroupEvent $event) use ($eventContentTypeGroup): void { $event->setContentTypeGroup($eventContentTypeGroup); $event->stopPropagation(); }, 10); @@ -367,7 +367,7 @@ public function testCreateContentTypeGroupStopPropagationInBeforeEvents() ]); } - public function testUpdateContentTypeGroupEvents() + public function testUpdateContentTypeGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentTypeGroupEvent::class, @@ -393,7 +393,7 @@ public function testUpdateContentTypeGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateContentTypeGroupStopPropagationInBeforeEvents() + public function testUpdateContentTypeGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentTypeGroupEvent::class, @@ -407,7 +407,7 @@ public function testUpdateContentTypeGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeUpdateContentTypeGroupEvent::class, static function (BeforeUpdateContentTypeGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeUpdateContentTypeGroupEvent::class, static function (BeforeUpdateContentTypeGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -426,7 +426,7 @@ public function testUpdateContentTypeGroupStopPropagationInBeforeEvents() ]); } - public function testCreateContentTypeEvents() + public function testCreateContentTypeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeEvent::class, @@ -455,7 +455,7 @@ public function testCreateContentTypeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateContentTypeResultInBeforeEvents() + public function testReturnCreateContentTypeResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeEvent::class, @@ -472,7 +472,7 @@ public function testReturnCreateContentTypeResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentType')->willReturn($contentTypeDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeEvent::class, static function (BeforeCreateContentTypeEvent $event) use ($eventContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeEvent::class, static function (BeforeCreateContentTypeEvent $event) use ($eventContentTypeDraft): void { $event->setContentTypeDraft($eventContentTypeDraft); }, 10); @@ -490,7 +490,7 @@ public function testReturnCreateContentTypeResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateContentTypeStopPropagationInBeforeEvents() + public function testCreateContentTypeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateContentTypeEvent::class, @@ -507,7 +507,7 @@ public function testCreateContentTypeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('createContentType')->willReturn($contentTypeDraft); - $traceableEventDispatcher->addListener(BeforeCreateContentTypeEvent::class, static function (BeforeCreateContentTypeEvent $event) use ($eventContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeCreateContentTypeEvent::class, static function (BeforeCreateContentTypeEvent $event) use ($eventContentTypeDraft): void { $event->setContentTypeDraft($eventContentTypeDraft); $event->stopPropagation(); }, 10); @@ -528,7 +528,7 @@ public function testCreateContentTypeStopPropagationInBeforeEvents() ]); } - public function testRemoveContentTypeTranslationEvents() + public function testRemoveContentTypeTranslationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveContentTypeTranslationEvent::class, @@ -557,7 +557,7 @@ public function testRemoveContentTypeTranslationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnRemoveContentTypeTranslationResultInBeforeEvents() + public function testReturnRemoveContentTypeTranslationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveContentTypeTranslationEvent::class, @@ -574,7 +574,7 @@ public function testReturnRemoveContentTypeTranslationResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('removeContentTypeTranslation')->willReturn($newContentTypeDraft); - $traceableEventDispatcher->addListener(BeforeRemoveContentTypeTranslationEvent::class, static function (BeforeRemoveContentTypeTranslationEvent $event) use ($eventNewContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeRemoveContentTypeTranslationEvent::class, static function (BeforeRemoveContentTypeTranslationEvent $event) use ($eventNewContentTypeDraft): void { $event->setNewContentTypeDraft($eventNewContentTypeDraft); }, 10); @@ -592,7 +592,7 @@ public function testReturnRemoveContentTypeTranslationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents() + public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveContentTypeTranslationEvent::class, @@ -609,7 +609,7 @@ public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('removeContentTypeTranslation')->willReturn($newContentTypeDraft); - $traceableEventDispatcher->addListener(BeforeRemoveContentTypeTranslationEvent::class, static function (BeforeRemoveContentTypeTranslationEvent $event) use ($eventNewContentTypeDraft) { + $traceableEventDispatcher->addListener(BeforeRemoveContentTypeTranslationEvent::class, static function (BeforeRemoveContentTypeTranslationEvent $event) use ($eventNewContentTypeDraft): void { $event->setNewContentTypeDraft($eventNewContentTypeDraft); $event->stopPropagation(); }, 10); @@ -630,7 +630,7 @@ public function testRemoveContentTypeTranslationStopPropagationInBeforeEvents() ]); } - public function testUnassignContentTypeGroupEvents() + public function testUnassignContentTypeGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnassignContentTypeGroupEvent::class, @@ -656,7 +656,7 @@ public function testUnassignContentTypeGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUnassignContentTypeGroupStopPropagationInBeforeEvents() + public function testUnassignContentTypeGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnassignContentTypeGroupEvent::class, @@ -670,7 +670,7 @@ public function testUnassignContentTypeGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeUnassignContentTypeGroupEvent::class, static function (BeforeUnassignContentTypeGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeUnassignContentTypeGroupEvent::class, static function (BeforeUnassignContentTypeGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -689,7 +689,7 @@ public function testUnassignContentTypeGroupStopPropagationInBeforeEvents() ]); } - public function testPublishContentTypeDraftEvents() + public function testPublishContentTypeDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishContentTypeDraftEvent::class, @@ -714,7 +714,7 @@ public function testPublishContentTypeDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testPublishContentTypeDraftStopPropagationInBeforeEvents() + public function testPublishContentTypeDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishContentTypeDraftEvent::class, @@ -727,7 +727,7 @@ public function testPublishContentTypeDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforePublishContentTypeDraftEvent::class, static function (BeforePublishContentTypeDraftEvent $event) { + $traceableEventDispatcher->addListener(BeforePublishContentTypeDraftEvent::class, static function (BeforePublishContentTypeDraftEvent $event): void { $event->stopPropagation(); }, 10); @@ -746,7 +746,7 @@ public function testPublishContentTypeDraftStopPropagationInBeforeEvents() ]); } - public function testUpdateFieldDefinitionEvents() + public function testUpdateFieldDefinitionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateFieldDefinitionEvent::class, @@ -773,7 +773,7 @@ public function testUpdateFieldDefinitionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateFieldDefinitionStopPropagationInBeforeEvents() + public function testUpdateFieldDefinitionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateFieldDefinitionEvent::class, @@ -788,7 +788,7 @@ public function testUpdateFieldDefinitionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeUpdateFieldDefinitionEvent::class, static function (BeforeUpdateFieldDefinitionEvent $event) { + $traceableEventDispatcher->addListener(BeforeUpdateFieldDefinitionEvent::class, static function (BeforeUpdateFieldDefinitionEvent $event): void { $event->stopPropagation(); }, 10); @@ -807,7 +807,7 @@ public function testUpdateFieldDefinitionStopPropagationInBeforeEvents() ]); } - public function testRemoveFieldDefinitionEvents() + public function testRemoveFieldDefinitionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveFieldDefinitionEvent::class, @@ -833,7 +833,7 @@ public function testRemoveFieldDefinitionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRemoveFieldDefinitionStopPropagationInBeforeEvents() + public function testRemoveFieldDefinitionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveFieldDefinitionEvent::class, @@ -847,7 +847,7 @@ public function testRemoveFieldDefinitionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRemoveFieldDefinitionEvent::class, static function (BeforeRemoveFieldDefinitionEvent $event) { + $traceableEventDispatcher->addListener(BeforeRemoveFieldDefinitionEvent::class, static function (BeforeRemoveFieldDefinitionEvent $event): void { $event->stopPropagation(); }, 10); @@ -866,7 +866,7 @@ public function testRemoveFieldDefinitionStopPropagationInBeforeEvents() ]); } - public function testAssignContentTypeGroupEvents() + public function testAssignContentTypeGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignContentTypeGroupEvent::class, @@ -892,7 +892,7 @@ public function testAssignContentTypeGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignContentTypeGroupStopPropagationInBeforeEvents() + public function testAssignContentTypeGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignContentTypeGroupEvent::class, @@ -906,7 +906,7 @@ public function testAssignContentTypeGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignContentTypeGroupEvent::class, static function (BeforeAssignContentTypeGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignContentTypeGroupEvent::class, static function (BeforeAssignContentTypeGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -925,7 +925,7 @@ public function testAssignContentTypeGroupStopPropagationInBeforeEvents() ]); } - public function testUpdateContentTypeDraftEvents() + public function testUpdateContentTypeDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentTypeDraftEvent::class, @@ -951,7 +951,7 @@ public function testUpdateContentTypeDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateContentTypeDraftStopPropagationInBeforeEvents() + public function testUpdateContentTypeDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateContentTypeDraftEvent::class, @@ -965,7 +965,7 @@ public function testUpdateContentTypeDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeUpdateContentTypeDraftEvent::class, static function (BeforeUpdateContentTypeDraftEvent $event) { + $traceableEventDispatcher->addListener(BeforeUpdateContentTypeDraftEvent::class, static function (BeforeUpdateContentTypeDraftEvent $event): void { $event->stopPropagation(); }, 10); @@ -984,7 +984,7 @@ public function testUpdateContentTypeDraftStopPropagationInBeforeEvents() ]); } - public function testDeleteContentTypeEvents() + public function testDeleteContentTypeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentTypeEvent::class, @@ -1009,7 +1009,7 @@ public function testDeleteContentTypeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteContentTypeStopPropagationInBeforeEvents() + public function testDeleteContentTypeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteContentTypeEvent::class, @@ -1022,7 +1022,7 @@ public function testDeleteContentTypeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteContentTypeEvent::class, static function (BeforeDeleteContentTypeEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteContentTypeEvent::class, static function (BeforeDeleteContentTypeEvent $event): void { $event->stopPropagation(); }, 10); @@ -1041,7 +1041,7 @@ public function testDeleteContentTypeStopPropagationInBeforeEvents() ]); } - public function testCopyContentTypeEvents() + public function testCopyContentTypeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentTypeEvent::class, @@ -1070,7 +1070,7 @@ public function testCopyContentTypeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCopyContentTypeResultInBeforeEvents() + public function testReturnCopyContentTypeResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentTypeEvent::class, @@ -1087,7 +1087,7 @@ public function testReturnCopyContentTypeResultInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('copyContentType')->willReturn($contentTypeCopy); - $traceableEventDispatcher->addListener(BeforeCopyContentTypeEvent::class, static function (BeforeCopyContentTypeEvent $event) use ($eventContentTypeCopy) { + $traceableEventDispatcher->addListener(BeforeCopyContentTypeEvent::class, static function (BeforeCopyContentTypeEvent $event) use ($eventContentTypeCopy): void { $event->setContentTypeCopy($eventContentTypeCopy); }, 10); @@ -1105,7 +1105,7 @@ public function testReturnCopyContentTypeResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCopyContentTypeStopPropagationInBeforeEvents() + public function testCopyContentTypeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopyContentTypeEvent::class, @@ -1122,7 +1122,7 @@ public function testCopyContentTypeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ContentTypeServiceInterface::class); $innerServiceMock->method('copyContentType')->willReturn($contentTypeCopy); - $traceableEventDispatcher->addListener(BeforeCopyContentTypeEvent::class, static function (BeforeCopyContentTypeEvent $event) use ($eventContentTypeCopy) { + $traceableEventDispatcher->addListener(BeforeCopyContentTypeEvent::class, static function (BeforeCopyContentTypeEvent $event) use ($eventContentTypeCopy): void { $event->setContentTypeCopy($eventContentTypeCopy); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/LanguageServiceTest.php b/tests/lib/Event/LanguageServiceTest.php index c474a8d459..11c03eda5b 100644 --- a/tests/lib/Event/LanguageServiceTest.php +++ b/tests/lib/Event/LanguageServiceTest.php @@ -24,7 +24,7 @@ class LanguageServiceTest extends AbstractServiceTest { - public function testDeleteLanguageEvents() + public function testDeleteLanguageEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteLanguageEvent::class, @@ -49,7 +49,7 @@ public function testDeleteLanguageEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteLanguageStopPropagationInBeforeEvents() + public function testDeleteLanguageStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteLanguageEvent::class, @@ -62,7 +62,7 @@ public function testDeleteLanguageStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteLanguageEvent::class, static function (BeforeDeleteLanguageEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteLanguageEvent::class, static function (BeforeDeleteLanguageEvent $event): void { $event->stopPropagation(); }, 10); @@ -81,7 +81,7 @@ public function testDeleteLanguageStopPropagationInBeforeEvents() ]); } - public function testCreateLanguageEvents() + public function testCreateLanguageEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLanguageEvent::class, @@ -109,7 +109,7 @@ public function testCreateLanguageEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateLanguageResultInBeforeEvents() + public function testReturnCreateLanguageResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLanguageEvent::class, @@ -125,7 +125,7 @@ public function testReturnCreateLanguageResultInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('createLanguage')->willReturn($language); - $traceableEventDispatcher->addListener(BeforeCreateLanguageEvent::class, static function (BeforeCreateLanguageEvent $event) use ($eventLanguage) { + $traceableEventDispatcher->addListener(BeforeCreateLanguageEvent::class, static function (BeforeCreateLanguageEvent $event) use ($eventLanguage): void { $event->setLanguage($eventLanguage); }, 10); @@ -143,7 +143,7 @@ public function testReturnCreateLanguageResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateLanguageStopPropagationInBeforeEvents() + public function testCreateLanguageStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLanguageEvent::class, @@ -159,7 +159,7 @@ public function testCreateLanguageStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('createLanguage')->willReturn($language); - $traceableEventDispatcher->addListener(BeforeCreateLanguageEvent::class, static function (BeforeCreateLanguageEvent $event) use ($eventLanguage) { + $traceableEventDispatcher->addListener(BeforeCreateLanguageEvent::class, static function (BeforeCreateLanguageEvent $event) use ($eventLanguage): void { $event->setLanguage($eventLanguage); $event->stopPropagation(); }, 10); @@ -180,7 +180,7 @@ public function testCreateLanguageStopPropagationInBeforeEvents() ]); } - public function testUpdateLanguageNameEvents() + public function testUpdateLanguageNameEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLanguageNameEvent::class, @@ -209,7 +209,7 @@ public function testUpdateLanguageNameEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateLanguageNameResultInBeforeEvents() + public function testReturnUpdateLanguageNameResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLanguageNameEvent::class, @@ -226,7 +226,7 @@ public function testReturnUpdateLanguageNameResultInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('updateLanguageName')->willReturn($updatedLanguage); - $traceableEventDispatcher->addListener(BeforeUpdateLanguageNameEvent::class, static function (BeforeUpdateLanguageNameEvent $event) use ($eventUpdatedLanguage) { + $traceableEventDispatcher->addListener(BeforeUpdateLanguageNameEvent::class, static function (BeforeUpdateLanguageNameEvent $event) use ($eventUpdatedLanguage): void { $event->setUpdatedLanguage($eventUpdatedLanguage); }, 10); @@ -244,7 +244,7 @@ public function testReturnUpdateLanguageNameResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateLanguageNameStopPropagationInBeforeEvents() + public function testUpdateLanguageNameStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLanguageNameEvent::class, @@ -261,7 +261,7 @@ public function testUpdateLanguageNameStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('updateLanguageName')->willReturn($updatedLanguage); - $traceableEventDispatcher->addListener(BeforeUpdateLanguageNameEvent::class, static function (BeforeUpdateLanguageNameEvent $event) use ($eventUpdatedLanguage) { + $traceableEventDispatcher->addListener(BeforeUpdateLanguageNameEvent::class, static function (BeforeUpdateLanguageNameEvent $event) use ($eventUpdatedLanguage): void { $event->setUpdatedLanguage($eventUpdatedLanguage); $event->stopPropagation(); }, 10); @@ -282,7 +282,7 @@ public function testUpdateLanguageNameStopPropagationInBeforeEvents() ]); } - public function testDisableLanguageEvents() + public function testDisableLanguageEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDisableLanguageEvent::class, @@ -310,7 +310,7 @@ public function testDisableLanguageEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnDisableLanguageResultInBeforeEvents() + public function testReturnDisableLanguageResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDisableLanguageEvent::class, @@ -326,7 +326,7 @@ public function testReturnDisableLanguageResultInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('disableLanguage')->willReturn($disabledLanguage); - $traceableEventDispatcher->addListener(BeforeDisableLanguageEvent::class, static function (BeforeDisableLanguageEvent $event) use ($eventDisabledLanguage) { + $traceableEventDispatcher->addListener(BeforeDisableLanguageEvent::class, static function (BeforeDisableLanguageEvent $event) use ($eventDisabledLanguage): void { $event->setDisabledLanguage($eventDisabledLanguage); }, 10); @@ -344,7 +344,7 @@ public function testReturnDisableLanguageResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDisableLanguageStopPropagationInBeforeEvents() + public function testDisableLanguageStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDisableLanguageEvent::class, @@ -360,7 +360,7 @@ public function testDisableLanguageStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('disableLanguage')->willReturn($disabledLanguage); - $traceableEventDispatcher->addListener(BeforeDisableLanguageEvent::class, static function (BeforeDisableLanguageEvent $event) use ($eventDisabledLanguage) { + $traceableEventDispatcher->addListener(BeforeDisableLanguageEvent::class, static function (BeforeDisableLanguageEvent $event) use ($eventDisabledLanguage): void { $event->setDisabledLanguage($eventDisabledLanguage); $event->stopPropagation(); }, 10); @@ -381,7 +381,7 @@ public function testDisableLanguageStopPropagationInBeforeEvents() ]); } - public function testEnableLanguageEvents() + public function testEnableLanguageEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEnableLanguageEvent::class, @@ -409,7 +409,7 @@ public function testEnableLanguageEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnEnableLanguageResultInBeforeEvents() + public function testReturnEnableLanguageResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEnableLanguageEvent::class, @@ -425,7 +425,7 @@ public function testReturnEnableLanguageResultInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('enableLanguage')->willReturn($enabledLanguage); - $traceableEventDispatcher->addListener(BeforeEnableLanguageEvent::class, static function (BeforeEnableLanguageEvent $event) use ($eventEnabledLanguage) { + $traceableEventDispatcher->addListener(BeforeEnableLanguageEvent::class, static function (BeforeEnableLanguageEvent $event) use ($eventEnabledLanguage): void { $event->setEnabledLanguage($eventEnabledLanguage); }, 10); @@ -443,7 +443,7 @@ public function testReturnEnableLanguageResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testEnableLanguageStopPropagationInBeforeEvents() + public function testEnableLanguageStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEnableLanguageEvent::class, @@ -459,7 +459,7 @@ public function testEnableLanguageStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LanguageServiceInterface::class); $innerServiceMock->method('enableLanguage')->willReturn($enabledLanguage); - $traceableEventDispatcher->addListener(BeforeEnableLanguageEvent::class, static function (BeforeEnableLanguageEvent $event) use ($eventEnabledLanguage) { + $traceableEventDispatcher->addListener(BeforeEnableLanguageEvent::class, static function (BeforeEnableLanguageEvent $event) use ($eventEnabledLanguage): void { $event->setEnabledLanguage($eventEnabledLanguage); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/LocationServiceTest.php b/tests/lib/Event/LocationServiceTest.php index eeeaeec6d5..97cd7ff581 100644 --- a/tests/lib/Event/LocationServiceTest.php +++ b/tests/lib/Event/LocationServiceTest.php @@ -32,7 +32,7 @@ class LocationServiceTest extends AbstractServiceTest { - public function testCopySubtreeEvents() + public function testCopySubtreeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopySubtreeEvent::class, @@ -61,7 +61,7 @@ public function testCopySubtreeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCopySubtreeResultInBeforeEvents() + public function testReturnCopySubtreeResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopySubtreeEvent::class, @@ -78,7 +78,7 @@ public function testReturnCopySubtreeResultInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('copySubtree')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeCopySubtreeEvent::class, static function (BeforeCopySubtreeEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeCopySubtreeEvent::class, static function (BeforeCopySubtreeEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); }, 10); @@ -96,7 +96,7 @@ public function testReturnCopySubtreeResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCopySubtreeStopPropagationInBeforeEvents() + public function testCopySubtreeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCopySubtreeEvent::class, @@ -113,7 +113,7 @@ public function testCopySubtreeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('copySubtree')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeCopySubtreeEvent::class, static function (BeforeCopySubtreeEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeCopySubtreeEvent::class, static function (BeforeCopySubtreeEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); $event->stopPropagation(); }, 10); @@ -134,7 +134,7 @@ public function testCopySubtreeStopPropagationInBeforeEvents() ]); } - public function testDeleteLocationEvents() + public function testDeleteLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteLocationEvent::class, @@ -159,7 +159,7 @@ public function testDeleteLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteLocationStopPropagationInBeforeEvents() + public function testDeleteLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteLocationEvent::class, @@ -172,7 +172,7 @@ public function testDeleteLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteLocationEvent::class, static function (BeforeDeleteLocationEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteLocationEvent::class, static function (BeforeDeleteLocationEvent $event): void { $event->stopPropagation(); }, 10); @@ -191,7 +191,7 @@ public function testDeleteLocationStopPropagationInBeforeEvents() ]); } - public function testUnhideLocationEvents() + public function testUnhideLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnhideLocationEvent::class, @@ -219,7 +219,7 @@ public function testUnhideLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUnhideLocationResultInBeforeEvents() + public function testReturnUnhideLocationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnhideLocationEvent::class, @@ -235,7 +235,7 @@ public function testReturnUnhideLocationResultInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('unhideLocation')->willReturn($revealedLocation); - $traceableEventDispatcher->addListener(BeforeUnhideLocationEvent::class, static function (BeforeUnhideLocationEvent $event) use ($eventRevealedLocation) { + $traceableEventDispatcher->addListener(BeforeUnhideLocationEvent::class, static function (BeforeUnhideLocationEvent $event) use ($eventRevealedLocation): void { $event->setRevealedLocation($eventRevealedLocation); }, 10); @@ -253,7 +253,7 @@ public function testReturnUnhideLocationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUnhideLocationStopPropagationInBeforeEvents() + public function testUnhideLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnhideLocationEvent::class, @@ -269,7 +269,7 @@ public function testUnhideLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('unhideLocation')->willReturn($revealedLocation); - $traceableEventDispatcher->addListener(BeforeUnhideLocationEvent::class, static function (BeforeUnhideLocationEvent $event) use ($eventRevealedLocation) { + $traceableEventDispatcher->addListener(BeforeUnhideLocationEvent::class, static function (BeforeUnhideLocationEvent $event) use ($eventRevealedLocation): void { $event->setRevealedLocation($eventRevealedLocation); $event->stopPropagation(); }, 10); @@ -290,7 +290,7 @@ public function testUnhideLocationStopPropagationInBeforeEvents() ]); } - public function testHideLocationEvents() + public function testHideLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeHideLocationEvent::class, @@ -318,7 +318,7 @@ public function testHideLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnHideLocationResultInBeforeEvents() + public function testReturnHideLocationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeHideLocationEvent::class, @@ -334,7 +334,7 @@ public function testReturnHideLocationResultInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('hideLocation')->willReturn($hiddenLocation); - $traceableEventDispatcher->addListener(BeforeHideLocationEvent::class, static function (BeforeHideLocationEvent $event) use ($eventHiddenLocation) { + $traceableEventDispatcher->addListener(BeforeHideLocationEvent::class, static function (BeforeHideLocationEvent $event) use ($eventHiddenLocation): void { $event->setHiddenLocation($eventHiddenLocation); }, 10); @@ -352,7 +352,7 @@ public function testReturnHideLocationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testHideLocationStopPropagationInBeforeEvents() + public function testHideLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeHideLocationEvent::class, @@ -368,7 +368,7 @@ public function testHideLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('hideLocation')->willReturn($hiddenLocation); - $traceableEventDispatcher->addListener(BeforeHideLocationEvent::class, static function (BeforeHideLocationEvent $event) use ($eventHiddenLocation) { + $traceableEventDispatcher->addListener(BeforeHideLocationEvent::class, static function (BeforeHideLocationEvent $event) use ($eventHiddenLocation): void { $event->setHiddenLocation($eventHiddenLocation); $event->stopPropagation(); }, 10); @@ -389,7 +389,7 @@ public function testHideLocationStopPropagationInBeforeEvents() ]); } - public function testSwapLocationEvents() + public function testSwapLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSwapLocationEvent::class, @@ -415,7 +415,7 @@ public function testSwapLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testSwapLocationStopPropagationInBeforeEvents() + public function testSwapLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSwapLocationEvent::class, @@ -429,7 +429,7 @@ public function testSwapLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeSwapLocationEvent::class, static function (BeforeSwapLocationEvent $event) { + $traceableEventDispatcher->addListener(BeforeSwapLocationEvent::class, static function (BeforeSwapLocationEvent $event): void { $event->stopPropagation(); }, 10); @@ -448,7 +448,7 @@ public function testSwapLocationStopPropagationInBeforeEvents() ]); } - public function testMoveSubtreeEvents() + public function testMoveSubtreeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMoveSubtreeEvent::class, @@ -474,7 +474,7 @@ public function testMoveSubtreeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testMoveSubtreeStopPropagationInBeforeEvents() + public function testMoveSubtreeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMoveSubtreeEvent::class, @@ -488,7 +488,7 @@ public function testMoveSubtreeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeMoveSubtreeEvent::class, static function (BeforeMoveSubtreeEvent $event) { + $traceableEventDispatcher->addListener(BeforeMoveSubtreeEvent::class, static function (BeforeMoveSubtreeEvent $event): void { $event->stopPropagation(); }, 10); @@ -507,7 +507,7 @@ public function testMoveSubtreeStopPropagationInBeforeEvents() ]); } - public function testUpdateLocationEvents() + public function testUpdateLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLocationEvent::class, @@ -536,7 +536,7 @@ public function testUpdateLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateLocationResultInBeforeEvents() + public function testReturnUpdateLocationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLocationEvent::class, @@ -553,7 +553,7 @@ public function testReturnUpdateLocationResultInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('updateLocation')->willReturn($updatedLocation); - $traceableEventDispatcher->addListener(BeforeUpdateLocationEvent::class, static function (BeforeUpdateLocationEvent $event) use ($eventUpdatedLocation) { + $traceableEventDispatcher->addListener(BeforeUpdateLocationEvent::class, static function (BeforeUpdateLocationEvent $event) use ($eventUpdatedLocation): void { $event->setUpdatedLocation($eventUpdatedLocation); }, 10); @@ -571,7 +571,7 @@ public function testReturnUpdateLocationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateLocationStopPropagationInBeforeEvents() + public function testUpdateLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateLocationEvent::class, @@ -588,7 +588,7 @@ public function testUpdateLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('updateLocation')->willReturn($updatedLocation); - $traceableEventDispatcher->addListener(BeforeUpdateLocationEvent::class, static function (BeforeUpdateLocationEvent $event) use ($eventUpdatedLocation) { + $traceableEventDispatcher->addListener(BeforeUpdateLocationEvent::class, static function (BeforeUpdateLocationEvent $event) use ($eventUpdatedLocation): void { $event->setUpdatedLocation($eventUpdatedLocation); $event->stopPropagation(); }, 10); @@ -609,7 +609,7 @@ public function testUpdateLocationStopPropagationInBeforeEvents() ]); } - public function testCreateLocationEvents() + public function testCreateLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLocationEvent::class, @@ -638,7 +638,7 @@ public function testCreateLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateLocationResultInBeforeEvents() + public function testReturnCreateLocationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLocationEvent::class, @@ -655,7 +655,7 @@ public function testReturnCreateLocationResultInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('createLocation')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeCreateLocationEvent::class, static function (BeforeCreateLocationEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeCreateLocationEvent::class, static function (BeforeCreateLocationEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); }, 10); @@ -673,7 +673,7 @@ public function testReturnCreateLocationResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateLocationStopPropagationInBeforeEvents() + public function testCreateLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateLocationEvent::class, @@ -690,7 +690,7 @@ public function testCreateLocationStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(LocationServiceInterface::class); $innerServiceMock->method('createLocation')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeCreateLocationEvent::class, static function (BeforeCreateLocationEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeCreateLocationEvent::class, static function (BeforeCreateLocationEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/NotificationServiceTest.php b/tests/lib/Event/NotificationServiceTest.php index 42676c503e..7d5834bb0f 100644 --- a/tests/lib/Event/NotificationServiceTest.php +++ b/tests/lib/Event/NotificationServiceTest.php @@ -22,7 +22,7 @@ class NotificationServiceTest extends AbstractServiceTest { - public function testCreateNotificationEvents() + public function testCreateNotificationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateNotificationEvent::class, @@ -50,7 +50,7 @@ public function testCreateNotificationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateNotificationResultInBeforeEvents() + public function testReturnCreateNotificationResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateNotificationEvent::class, @@ -88,7 +88,7 @@ static function (BeforeCreateNotificationEvent $event) use ($eventNotification): self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateNotificationStopPropagationInBeforeEvents() + public function testCreateNotificationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateNotificationEvent::class, @@ -129,7 +129,7 @@ static function (BeforeCreateNotificationEvent $event) use ($eventNotification): ]); } - public function testDeleteNotificationEvents() + public function testDeleteNotificationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteNotificationEvent::class, @@ -154,7 +154,7 @@ public function testDeleteNotificationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteNotificationStopPropagationInBeforeEvents() + public function testDeleteNotificationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteNotificationEvent::class, @@ -190,7 +190,7 @@ static function (BeforeDeleteNotificationEvent $event): void { ]); } - public function testMarkNotificationAsReadEvents() + public function testMarkNotificationAsReadEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMarkNotificationAsReadEvent::class, @@ -240,7 +240,7 @@ public function testMarkNotificationAsUnreadEvents(): void self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testMarkNotificationAsReadStopPropagationInBeforeEvents() + public function testMarkNotificationAsReadStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMarkNotificationAsReadEvent::class, diff --git a/tests/lib/Event/ObjectStateServiceTest.php b/tests/lib/Event/ObjectStateServiceTest.php index 2252edd57e..e5ae2c3c9f 100644 --- a/tests/lib/Event/ObjectStateServiceTest.php +++ b/tests/lib/Event/ObjectStateServiceTest.php @@ -35,7 +35,7 @@ class ObjectStateServiceTest extends AbstractServiceTest { - public function testSetContentStateEvents() + public function testSetContentStateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetContentStateEvent::class, @@ -62,7 +62,7 @@ public function testSetContentStateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testSetContentStateStopPropagationInBeforeEvents() + public function testSetContentStateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetContentStateEvent::class, @@ -77,7 +77,7 @@ public function testSetContentStateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeSetContentStateEvent::class, static function (BeforeSetContentStateEvent $event) { + $traceableEventDispatcher->addListener(BeforeSetContentStateEvent::class, static function (BeforeSetContentStateEvent $event): void { $event->stopPropagation(); }, 10); @@ -96,7 +96,7 @@ public function testSetContentStateStopPropagationInBeforeEvents() ]); } - public function testCreateObjectStateGroupEvents() + public function testCreateObjectStateGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateGroupEvent::class, @@ -124,7 +124,7 @@ public function testCreateObjectStateGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateObjectStateGroupResultInBeforeEvents() + public function testReturnCreateObjectStateGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateGroupEvent::class, @@ -140,7 +140,7 @@ public function testReturnCreateObjectStateGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('createObjectStateGroup')->willReturn($objectStateGroup); - $traceableEventDispatcher->addListener(BeforeCreateObjectStateGroupEvent::class, static function (BeforeCreateObjectStateGroupEvent $event) use ($eventObjectStateGroup) { + $traceableEventDispatcher->addListener(BeforeCreateObjectStateGroupEvent::class, static function (BeforeCreateObjectStateGroupEvent $event) use ($eventObjectStateGroup): void { $event->setObjectStateGroup($eventObjectStateGroup); }, 10); @@ -158,7 +158,7 @@ public function testReturnCreateObjectStateGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateObjectStateGroupStopPropagationInBeforeEvents() + public function testCreateObjectStateGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateGroupEvent::class, @@ -174,7 +174,7 @@ public function testCreateObjectStateGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('createObjectStateGroup')->willReturn($objectStateGroup); - $traceableEventDispatcher->addListener(BeforeCreateObjectStateGroupEvent::class, static function (BeforeCreateObjectStateGroupEvent $event) use ($eventObjectStateGroup) { + $traceableEventDispatcher->addListener(BeforeCreateObjectStateGroupEvent::class, static function (BeforeCreateObjectStateGroupEvent $event) use ($eventObjectStateGroup): void { $event->setObjectStateGroup($eventObjectStateGroup); $event->stopPropagation(); }, 10); @@ -195,7 +195,7 @@ public function testCreateObjectStateGroupStopPropagationInBeforeEvents() ]); } - public function testUpdateObjectStateEvents() + public function testUpdateObjectStateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateEvent::class, @@ -224,7 +224,7 @@ public function testUpdateObjectStateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateObjectStateResultInBeforeEvents() + public function testReturnUpdateObjectStateResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateEvent::class, @@ -241,7 +241,7 @@ public function testReturnUpdateObjectStateResultInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('updateObjectState')->willReturn($updatedObjectState); - $traceableEventDispatcher->addListener(BeforeUpdateObjectStateEvent::class, static function (BeforeUpdateObjectStateEvent $event) use ($eventUpdatedObjectState) { + $traceableEventDispatcher->addListener(BeforeUpdateObjectStateEvent::class, static function (BeforeUpdateObjectStateEvent $event) use ($eventUpdatedObjectState): void { $event->setUpdatedObjectState($eventUpdatedObjectState); }, 10); @@ -259,7 +259,7 @@ public function testReturnUpdateObjectStateResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateObjectStateStopPropagationInBeforeEvents() + public function testUpdateObjectStateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateEvent::class, @@ -276,7 +276,7 @@ public function testUpdateObjectStateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('updateObjectState')->willReturn($updatedObjectState); - $traceableEventDispatcher->addListener(BeforeUpdateObjectStateEvent::class, static function (BeforeUpdateObjectStateEvent $event) use ($eventUpdatedObjectState) { + $traceableEventDispatcher->addListener(BeforeUpdateObjectStateEvent::class, static function (BeforeUpdateObjectStateEvent $event) use ($eventUpdatedObjectState): void { $event->setUpdatedObjectState($eventUpdatedObjectState); $event->stopPropagation(); }, 10); @@ -297,7 +297,7 @@ public function testUpdateObjectStateStopPropagationInBeforeEvents() ]); } - public function testCreateObjectStateEvents() + public function testCreateObjectStateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateEvent::class, @@ -326,7 +326,7 @@ public function testCreateObjectStateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateObjectStateResultInBeforeEvents() + public function testReturnCreateObjectStateResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateEvent::class, @@ -343,7 +343,7 @@ public function testReturnCreateObjectStateResultInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('createObjectState')->willReturn($objectState); - $traceableEventDispatcher->addListener(BeforeCreateObjectStateEvent::class, static function (BeforeCreateObjectStateEvent $event) use ($eventObjectState) { + $traceableEventDispatcher->addListener(BeforeCreateObjectStateEvent::class, static function (BeforeCreateObjectStateEvent $event) use ($eventObjectState): void { $event->setObjectState($eventObjectState); }, 10); @@ -361,7 +361,7 @@ public function testReturnCreateObjectStateResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateObjectStateStopPropagationInBeforeEvents() + public function testCreateObjectStateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateObjectStateEvent::class, @@ -378,7 +378,7 @@ public function testCreateObjectStateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('createObjectState')->willReturn($objectState); - $traceableEventDispatcher->addListener(BeforeCreateObjectStateEvent::class, static function (BeforeCreateObjectStateEvent $event) use ($eventObjectState) { + $traceableEventDispatcher->addListener(BeforeCreateObjectStateEvent::class, static function (BeforeCreateObjectStateEvent $event) use ($eventObjectState): void { $event->setObjectState($eventObjectState); $event->stopPropagation(); }, 10); @@ -399,7 +399,7 @@ public function testCreateObjectStateStopPropagationInBeforeEvents() ]); } - public function testUpdateObjectStateGroupEvents() + public function testUpdateObjectStateGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateGroupEvent::class, @@ -428,7 +428,7 @@ public function testUpdateObjectStateGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateObjectStateGroupResultInBeforeEvents() + public function testReturnUpdateObjectStateGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateGroupEvent::class, @@ -445,7 +445,7 @@ public function testReturnUpdateObjectStateGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('updateObjectStateGroup')->willReturn($updatedObjectStateGroup); - $traceableEventDispatcher->addListener(BeforeUpdateObjectStateGroupEvent::class, static function (BeforeUpdateObjectStateGroupEvent $event) use ($eventUpdatedObjectStateGroup) { + $traceableEventDispatcher->addListener(BeforeUpdateObjectStateGroupEvent::class, static function (BeforeUpdateObjectStateGroupEvent $event) use ($eventUpdatedObjectStateGroup): void { $event->setUpdatedObjectStateGroup($eventUpdatedObjectStateGroup); }, 10); @@ -463,7 +463,7 @@ public function testReturnUpdateObjectStateGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateObjectStateGroupStopPropagationInBeforeEvents() + public function testUpdateObjectStateGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateObjectStateGroupEvent::class, @@ -480,7 +480,7 @@ public function testUpdateObjectStateGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); $innerServiceMock->method('updateObjectStateGroup')->willReturn($updatedObjectStateGroup); - $traceableEventDispatcher->addListener(BeforeUpdateObjectStateGroupEvent::class, static function (BeforeUpdateObjectStateGroupEvent $event) use ($eventUpdatedObjectStateGroup) { + $traceableEventDispatcher->addListener(BeforeUpdateObjectStateGroupEvent::class, static function (BeforeUpdateObjectStateGroupEvent $event) use ($eventUpdatedObjectStateGroup): void { $event->setUpdatedObjectStateGroup($eventUpdatedObjectStateGroup); $event->stopPropagation(); }, 10); @@ -501,7 +501,7 @@ public function testUpdateObjectStateGroupStopPropagationInBeforeEvents() ]); } - public function testSetPriorityOfObjectStateEvents() + public function testSetPriorityOfObjectStateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetPriorityOfObjectStateEvent::class, @@ -527,7 +527,7 @@ public function testSetPriorityOfObjectStateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents() + public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetPriorityOfObjectStateEvent::class, @@ -541,7 +541,7 @@ public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeSetPriorityOfObjectStateEvent::class, static function (BeforeSetPriorityOfObjectStateEvent $event) { + $traceableEventDispatcher->addListener(BeforeSetPriorityOfObjectStateEvent::class, static function (BeforeSetPriorityOfObjectStateEvent $event): void { $event->stopPropagation(); }, 10); @@ -560,7 +560,7 @@ public function testSetPriorityOfObjectStateStopPropagationInBeforeEvents() ]); } - public function testDeleteObjectStateGroupEvents() + public function testDeleteObjectStateGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteObjectStateGroupEvent::class, @@ -585,7 +585,7 @@ public function testDeleteObjectStateGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteObjectStateGroupStopPropagationInBeforeEvents() + public function testDeleteObjectStateGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteObjectStateGroupEvent::class, @@ -598,7 +598,7 @@ public function testDeleteObjectStateGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteObjectStateGroupEvent::class, static function (BeforeDeleteObjectStateGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteObjectStateGroupEvent::class, static function (BeforeDeleteObjectStateGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -617,7 +617,7 @@ public function testDeleteObjectStateGroupStopPropagationInBeforeEvents() ]); } - public function testDeleteObjectStateEvents() + public function testDeleteObjectStateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteObjectStateEvent::class, @@ -642,7 +642,7 @@ public function testDeleteObjectStateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteObjectStateStopPropagationInBeforeEvents() + public function testDeleteObjectStateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteObjectStateEvent::class, @@ -655,7 +655,7 @@ public function testDeleteObjectStateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(ObjectStateServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteObjectStateEvent::class, static function (BeforeDeleteObjectStateEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteObjectStateEvent::class, static function (BeforeDeleteObjectStateEvent $event): void { $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/RoleServiceTest.php b/tests/lib/Event/RoleServiceTest.php index 59168bb8d9..32ecfb674d 100644 --- a/tests/lib/Event/RoleServiceTest.php +++ b/tests/lib/Event/RoleServiceTest.php @@ -47,7 +47,7 @@ class RoleServiceTest extends AbstractServiceTest { - public function testPublishRoleDraftEvents() + public function testPublishRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishRoleDraftEvent::class, @@ -72,7 +72,7 @@ public function testPublishRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testPublishRoleDraftStopPropagationInBeforeEvents() + public function testPublishRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforePublishRoleDraftEvent::class, @@ -85,7 +85,7 @@ public function testPublishRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforePublishRoleDraftEvent::class, static function (BeforePublishRoleDraftEvent $event) { + $traceableEventDispatcher->addListener(BeforePublishRoleDraftEvent::class, static function (BeforePublishRoleDraftEvent $event): void { $event->stopPropagation(); }, 10); @@ -104,7 +104,7 @@ public function testPublishRoleDraftStopPropagationInBeforeEvents() ]); } - public function testAssignRoleToUserEvents() + public function testAssignRoleToUserEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignRoleToUserEvent::class, @@ -131,7 +131,7 @@ public function testAssignRoleToUserEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignRoleToUserStopPropagationInBeforeEvents() + public function testAssignRoleToUserStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignRoleToUserEvent::class, @@ -146,7 +146,7 @@ public function testAssignRoleToUserStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignRoleToUserEvent::class, static function (BeforeAssignRoleToUserEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignRoleToUserEvent::class, static function (BeforeAssignRoleToUserEvent $event): void { $event->stopPropagation(); }, 10); @@ -165,7 +165,7 @@ public function testAssignRoleToUserStopPropagationInBeforeEvents() ]); } - public function testUpdateRoleDraftEvents() + public function testUpdateRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateRoleDraftEvent::class, @@ -194,7 +194,7 @@ public function testUpdateRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateRoleDraftResultInBeforeEvents() + public function testReturnUpdateRoleDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateRoleDraftEvent::class, @@ -211,7 +211,7 @@ public function testReturnUpdateRoleDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('updateRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeUpdateRoleDraftEvent::class, static function (BeforeUpdateRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeUpdateRoleDraftEvent::class, static function (BeforeUpdateRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); }, 10); @@ -229,7 +229,7 @@ public function testReturnUpdateRoleDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateRoleDraftStopPropagationInBeforeEvents() + public function testUpdateRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateRoleDraftEvent::class, @@ -246,7 +246,7 @@ public function testUpdateRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('updateRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeUpdateRoleDraftEvent::class, static function (BeforeUpdateRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeUpdateRoleDraftEvent::class, static function (BeforeUpdateRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); $event->stopPropagation(); }, 10); @@ -267,7 +267,7 @@ public function testUpdateRoleDraftStopPropagationInBeforeEvents() ]); } - public function testAssignRoleToUserGroupEvents() + public function testAssignRoleToUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignRoleToUserGroupEvent::class, @@ -294,7 +294,7 @@ public function testAssignRoleToUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignRoleToUserGroupStopPropagationInBeforeEvents() + public function testAssignRoleToUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignRoleToUserGroupEvent::class, @@ -309,7 +309,7 @@ public function testAssignRoleToUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignRoleToUserGroupEvent::class, static function (BeforeAssignRoleToUserGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignRoleToUserGroupEvent::class, static function (BeforeAssignRoleToUserGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -328,7 +328,7 @@ public function testAssignRoleToUserGroupStopPropagationInBeforeEvents() ]); } - public function testUpdatePolicyByRoleDraftEvents() + public function testUpdatePolicyByRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdatePolicyByRoleDraftEvent::class, @@ -358,7 +358,7 @@ public function testUpdatePolicyByRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents() + public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdatePolicyByRoleDraftEvent::class, @@ -376,7 +376,7 @@ public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('updatePolicyByRoleDraft')->willReturn($updatedPolicyDraft); - $traceableEventDispatcher->addListener(BeforeUpdatePolicyByRoleDraftEvent::class, static function (BeforeUpdatePolicyByRoleDraftEvent $event) use ($eventUpdatedPolicyDraft) { + $traceableEventDispatcher->addListener(BeforeUpdatePolicyByRoleDraftEvent::class, static function (BeforeUpdatePolicyByRoleDraftEvent $event) use ($eventUpdatedPolicyDraft): void { $event->setUpdatedPolicyDraft($eventUpdatedPolicyDraft); }, 10); @@ -394,7 +394,7 @@ public function testReturnUpdatePolicyByRoleDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents() + public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdatePolicyByRoleDraftEvent::class, @@ -412,7 +412,7 @@ public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('updatePolicyByRoleDraft')->willReturn($updatedPolicyDraft); - $traceableEventDispatcher->addListener(BeforeUpdatePolicyByRoleDraftEvent::class, static function (BeforeUpdatePolicyByRoleDraftEvent $event) use ($eventUpdatedPolicyDraft) { + $traceableEventDispatcher->addListener(BeforeUpdatePolicyByRoleDraftEvent::class, static function (BeforeUpdatePolicyByRoleDraftEvent $event) use ($eventUpdatedPolicyDraft): void { $event->setUpdatedPolicyDraft($eventUpdatedPolicyDraft); $event->stopPropagation(); }, 10); @@ -433,7 +433,7 @@ public function testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents() ]); } - public function testCreateRoleEvents() + public function testCreateRoleEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleEvent::class, @@ -461,7 +461,7 @@ public function testCreateRoleEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateRoleResultInBeforeEvents() + public function testReturnCreateRoleResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleEvent::class, @@ -477,7 +477,7 @@ public function testReturnCreateRoleResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('createRole')->willReturn($roleDraft); - $traceableEventDispatcher->addListener(BeforeCreateRoleEvent::class, static function (BeforeCreateRoleEvent $event) use ($eventRoleDraft) { + $traceableEventDispatcher->addListener(BeforeCreateRoleEvent::class, static function (BeforeCreateRoleEvent $event) use ($eventRoleDraft): void { $event->setRoleDraft($eventRoleDraft); }, 10); @@ -495,7 +495,7 @@ public function testReturnCreateRoleResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateRoleStopPropagationInBeforeEvents() + public function testCreateRoleStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleEvent::class, @@ -511,7 +511,7 @@ public function testCreateRoleStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('createRole')->willReturn($roleDraft); - $traceableEventDispatcher->addListener(BeforeCreateRoleEvent::class, static function (BeforeCreateRoleEvent $event) use ($eventRoleDraft) { + $traceableEventDispatcher->addListener(BeforeCreateRoleEvent::class, static function (BeforeCreateRoleEvent $event) use ($eventRoleDraft): void { $event->setRoleDraft($eventRoleDraft); $event->stopPropagation(); }, 10); @@ -532,7 +532,7 @@ public function testCreateRoleStopPropagationInBeforeEvents() ]); } - public function testRemovePolicyByRoleDraftEvents() + public function testRemovePolicyByRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemovePolicyByRoleDraftEvent::class, @@ -561,7 +561,7 @@ public function testRemovePolicyByRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents() + public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemovePolicyByRoleDraftEvent::class, @@ -578,7 +578,7 @@ public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('removePolicyByRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeRemovePolicyByRoleDraftEvent::class, static function (BeforeRemovePolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeRemovePolicyByRoleDraftEvent::class, static function (BeforeRemovePolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); }, 10); @@ -596,7 +596,7 @@ public function testReturnRemovePolicyByRoleDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents() + public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemovePolicyByRoleDraftEvent::class, @@ -613,7 +613,7 @@ public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('removePolicyByRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeRemovePolicyByRoleDraftEvent::class, static function (BeforeRemovePolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeRemovePolicyByRoleDraftEvent::class, static function (BeforeRemovePolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); $event->stopPropagation(); }, 10); @@ -634,7 +634,7 @@ public function testRemovePolicyByRoleDraftStopPropagationInBeforeEvents() ]); } - public function testAddPolicyByRoleDraftEvents() + public function testAddPolicyByRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddPolicyByRoleDraftEvent::class, @@ -663,7 +663,7 @@ public function testAddPolicyByRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnAddPolicyByRoleDraftResultInBeforeEvents() + public function testReturnAddPolicyByRoleDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddPolicyByRoleDraftEvent::class, @@ -680,7 +680,7 @@ public function testReturnAddPolicyByRoleDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('addPolicyByRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeAddPolicyByRoleDraftEvent::class, static function (BeforeAddPolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeAddPolicyByRoleDraftEvent::class, static function (BeforeAddPolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); }, 10); @@ -698,7 +698,7 @@ public function testReturnAddPolicyByRoleDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents() + public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAddPolicyByRoleDraftEvent::class, @@ -715,7 +715,7 @@ public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('addPolicyByRoleDraft')->willReturn($updatedRoleDraft); - $traceableEventDispatcher->addListener(BeforeAddPolicyByRoleDraftEvent::class, static function (BeforeAddPolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft) { + $traceableEventDispatcher->addListener(BeforeAddPolicyByRoleDraftEvent::class, static function (BeforeAddPolicyByRoleDraftEvent $event) use ($eventUpdatedRoleDraft): void { $event->setUpdatedRoleDraft($eventUpdatedRoleDraft); $event->stopPropagation(); }, 10); @@ -736,7 +736,7 @@ public function testAddPolicyByRoleDraftStopPropagationInBeforeEvents() ]); } - public function testDeleteRoleEvents() + public function testDeleteRoleEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRoleEvent::class, @@ -761,7 +761,7 @@ public function testDeleteRoleEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteRoleStopPropagationInBeforeEvents() + public function testDeleteRoleStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRoleEvent::class, @@ -774,7 +774,7 @@ public function testDeleteRoleStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteRoleEvent::class, static function (BeforeDeleteRoleEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteRoleEvent::class, static function (BeforeDeleteRoleEvent $event): void { $event->stopPropagation(); }, 10); @@ -793,7 +793,7 @@ public function testDeleteRoleStopPropagationInBeforeEvents() ]); } - public function testDeleteRoleDraftEvents() + public function testDeleteRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRoleDraftEvent::class, @@ -818,7 +818,7 @@ public function testDeleteRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteRoleDraftStopPropagationInBeforeEvents() + public function testDeleteRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteRoleDraftEvent::class, @@ -831,7 +831,7 @@ public function testDeleteRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteRoleDraftEvent::class, static function (BeforeDeleteRoleDraftEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteRoleDraftEvent::class, static function (BeforeDeleteRoleDraftEvent $event): void { $event->stopPropagation(); }, 10); @@ -850,7 +850,7 @@ public function testDeleteRoleDraftStopPropagationInBeforeEvents() ]); } - public function testRemoveRoleAssignmentEvents() + public function testRemoveRoleAssignmentEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveRoleAssignmentEvent::class, @@ -875,7 +875,7 @@ public function testRemoveRoleAssignmentEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRemoveRoleAssignmentStopPropagationInBeforeEvents() + public function testRemoveRoleAssignmentStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveRoleAssignmentEvent::class, @@ -888,7 +888,7 @@ public function testRemoveRoleAssignmentStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRemoveRoleAssignmentEvent::class, static function (BeforeRemoveRoleAssignmentEvent $event) { + $traceableEventDispatcher->addListener(BeforeRemoveRoleAssignmentEvent::class, static function (BeforeRemoveRoleAssignmentEvent $event): void { $event->stopPropagation(); }, 10); @@ -907,7 +907,7 @@ public function testRemoveRoleAssignmentStopPropagationInBeforeEvents() ]); } - public function testCreateRoleDraftEvents() + public function testCreateRoleDraftEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleDraftEvent::class, @@ -935,7 +935,7 @@ public function testCreateRoleDraftEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateRoleDraftResultInBeforeEvents() + public function testReturnCreateRoleDraftResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleDraftEvent::class, @@ -951,7 +951,7 @@ public function testReturnCreateRoleDraftResultInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('createRoleDraft')->willReturn($roleDraft); - $traceableEventDispatcher->addListener(BeforeCreateRoleDraftEvent::class, static function (BeforeCreateRoleDraftEvent $event) use ($eventRoleDraft) { + $traceableEventDispatcher->addListener(BeforeCreateRoleDraftEvent::class, static function (BeforeCreateRoleDraftEvent $event) use ($eventRoleDraft): void { $event->setRoleDraft($eventRoleDraft); }, 10); @@ -969,7 +969,7 @@ public function testReturnCreateRoleDraftResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateRoleDraftStopPropagationInBeforeEvents() + public function testCreateRoleDraftStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateRoleDraftEvent::class, @@ -985,7 +985,7 @@ public function testCreateRoleDraftStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(RoleServiceInterface::class); $innerServiceMock->method('createRoleDraft')->willReturn($roleDraft); - $traceableEventDispatcher->addListener(BeforeCreateRoleDraftEvent::class, static function (BeforeCreateRoleDraftEvent $event) use ($eventRoleDraft) { + $traceableEventDispatcher->addListener(BeforeCreateRoleDraftEvent::class, static function (BeforeCreateRoleDraftEvent $event) use ($eventRoleDraft): void { $event->setRoleDraft($eventRoleDraft); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/SectionServiceTest.php b/tests/lib/Event/SectionServiceTest.php index 5b84b2910d..06028b7a30 100644 --- a/tests/lib/Event/SectionServiceTest.php +++ b/tests/lib/Event/SectionServiceTest.php @@ -27,7 +27,7 @@ class SectionServiceTest extends AbstractServiceTest { - public function testAssignSectionEvents() + public function testAssignSectionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignSectionEvent::class, @@ -53,7 +53,7 @@ public function testAssignSectionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignSectionStopPropagationInBeforeEvents() + public function testAssignSectionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignSectionEvent::class, @@ -67,7 +67,7 @@ public function testAssignSectionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignSectionEvent::class, static function (BeforeAssignSectionEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignSectionEvent::class, static function (BeforeAssignSectionEvent $event): void { $event->stopPropagation(); }, 10); @@ -86,7 +86,7 @@ public function testAssignSectionStopPropagationInBeforeEvents() ]); } - public function testUpdateSectionEvents() + public function testUpdateSectionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateSectionEvent::class, @@ -115,7 +115,7 @@ public function testUpdateSectionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateSectionResultInBeforeEvents() + public function testReturnUpdateSectionResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateSectionEvent::class, @@ -132,7 +132,7 @@ public function testReturnUpdateSectionResultInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); $innerServiceMock->method('updateSection')->willReturn($updatedSection); - $traceableEventDispatcher->addListener(BeforeUpdateSectionEvent::class, static function (BeforeUpdateSectionEvent $event) use ($eventUpdatedSection) { + $traceableEventDispatcher->addListener(BeforeUpdateSectionEvent::class, static function (BeforeUpdateSectionEvent $event) use ($eventUpdatedSection): void { $event->setUpdatedSection($eventUpdatedSection); }, 10); @@ -150,7 +150,7 @@ public function testReturnUpdateSectionResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateSectionStopPropagationInBeforeEvents() + public function testUpdateSectionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateSectionEvent::class, @@ -167,7 +167,7 @@ public function testUpdateSectionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); $innerServiceMock->method('updateSection')->willReturn($updatedSection); - $traceableEventDispatcher->addListener(BeforeUpdateSectionEvent::class, static function (BeforeUpdateSectionEvent $event) use ($eventUpdatedSection) { + $traceableEventDispatcher->addListener(BeforeUpdateSectionEvent::class, static function (BeforeUpdateSectionEvent $event) use ($eventUpdatedSection): void { $event->setUpdatedSection($eventUpdatedSection); $event->stopPropagation(); }, 10); @@ -188,7 +188,7 @@ public function testUpdateSectionStopPropagationInBeforeEvents() ]); } - public function testAssignSectionToSubtreeEvents() + public function testAssignSectionToSubtreeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignSectionToSubtreeEvent::class, @@ -214,7 +214,7 @@ public function testAssignSectionToSubtreeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignSectionToSubtreeStopPropagationInBeforeEvents() + public function testAssignSectionToSubtreeStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignSectionToSubtreeEvent::class, @@ -228,7 +228,7 @@ public function testAssignSectionToSubtreeStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignSectionToSubtreeEvent::class, static function (BeforeAssignSectionToSubtreeEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignSectionToSubtreeEvent::class, static function (BeforeAssignSectionToSubtreeEvent $event): void { $event->stopPropagation(); }, 10); @@ -247,7 +247,7 @@ public function testAssignSectionToSubtreeStopPropagationInBeforeEvents() ]); } - public function testDeleteSectionEvents() + public function testDeleteSectionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteSectionEvent::class, @@ -272,7 +272,7 @@ public function testDeleteSectionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteSectionStopPropagationInBeforeEvents() + public function testDeleteSectionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteSectionEvent::class, @@ -285,7 +285,7 @@ public function testDeleteSectionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeDeleteSectionEvent::class, static function (BeforeDeleteSectionEvent $event) { + $traceableEventDispatcher->addListener(BeforeDeleteSectionEvent::class, static function (BeforeDeleteSectionEvent $event): void { $event->stopPropagation(); }, 10); @@ -304,7 +304,7 @@ public function testDeleteSectionStopPropagationInBeforeEvents() ]); } - public function testCreateSectionEvents() + public function testCreateSectionEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateSectionEvent::class, @@ -332,7 +332,7 @@ public function testCreateSectionEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateSectionResultInBeforeEvents() + public function testReturnCreateSectionResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateSectionEvent::class, @@ -348,7 +348,7 @@ public function testReturnCreateSectionResultInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); $innerServiceMock->method('createSection')->willReturn($section); - $traceableEventDispatcher->addListener(BeforeCreateSectionEvent::class, static function (BeforeCreateSectionEvent $event) use ($eventSection) { + $traceableEventDispatcher->addListener(BeforeCreateSectionEvent::class, static function (BeforeCreateSectionEvent $event) use ($eventSection): void { $event->setSection($eventSection); }, 10); @@ -366,7 +366,7 @@ public function testReturnCreateSectionResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateSectionStopPropagationInBeforeEvents() + public function testCreateSectionStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateSectionEvent::class, @@ -382,7 +382,7 @@ public function testCreateSectionStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(SectionServiceInterface::class); $innerServiceMock->method('createSection')->willReturn($section); - $traceableEventDispatcher->addListener(BeforeCreateSectionEvent::class, static function (BeforeCreateSectionEvent $event) use ($eventSection) { + $traceableEventDispatcher->addListener(BeforeCreateSectionEvent::class, static function (BeforeCreateSectionEvent $event) use ($eventSection): void { $event->setSection($eventSection); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/SettingServiceTest.php b/tests/lib/Event/SettingServiceTest.php index 567dd22b7a..fd43334955 100644 --- a/tests/lib/Event/SettingServiceTest.php +++ b/tests/lib/Event/SettingServiceTest.php @@ -57,7 +57,7 @@ public function testReturnUpdateSettingResultInBeforeEvents(): void $traceableEventDispatcher->addListener( BeforeUpdateSettingEvent::class, - static function (BeforeUpdateSettingEvent $event) use ($eventUpdatedSetting) { + static function (BeforeUpdateSettingEvent $event) use ($eventUpdatedSetting): void { $event->setUpdatedSetting($eventUpdatedSetting); }, 10 @@ -91,7 +91,7 @@ public function testUpdateSettingStopPropagationInBeforeEvents(): void $eventUpdatedSetting = $this->createMock(Setting::class); $traceableEventDispatcher->addListener( BeforeUpdateSettingEvent::class, - static function (BeforeUpdateSettingEvent $event) use ($eventUpdatedSetting) { + static function (BeforeUpdateSettingEvent $event) use ($eventUpdatedSetting): void { $event->setUpdatedSetting($eventUpdatedSetting); $event->stopPropagation(); }, @@ -169,7 +169,7 @@ public function testDeleteSettingStopPropagationInBeforeEvents(): void $traceableEventDispatcher->addListener( BeforeDeleteSettingEvent::class, - static function (BeforeDeleteSettingEvent $event) { + static function (BeforeDeleteSettingEvent $event): void { $event->stopPropagation(); }, 10 @@ -235,7 +235,7 @@ public function testReturnCreateSettingResultInBeforeEvents(): void $setting = $this->createMock(Setting::class); $traceableEventDispatcher->addListener( BeforeCreateSettingEvent::class, - static function (BeforeCreateSettingEvent $event) use ($eventSetting) { + static function (BeforeCreateSettingEvent $event) use ($eventSetting): void { $event->setSetting($eventSetting); }, 10 @@ -269,7 +269,7 @@ public function testCreateSettingStopPropagationInBeforeEvents(): void $setting = $this->createMock(Setting::class); $traceableEventDispatcher->addListener( BeforeCreateSettingEvent::class, - static function (BeforeCreateSettingEvent $event) use ($eventSetting) { + static function (BeforeCreateSettingEvent $event) use ($eventSetting): void { $event->setSetting($eventSetting); $event->stopPropagation(); }, diff --git a/tests/lib/Event/TrashServiceTest.php b/tests/lib/Event/TrashServiceTest.php index 5934c7174f..3ce79912c9 100644 --- a/tests/lib/Event/TrashServiceTest.php +++ b/tests/lib/Event/TrashServiceTest.php @@ -24,7 +24,7 @@ class TrashServiceTest extends AbstractServiceTest { - public function testEmptyTrashEvents() + public function testEmptyTrashEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEmptyTrashEvent::class, @@ -51,7 +51,7 @@ public function testEmptyTrashEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnEmptyTrashResultInBeforeEvents() + public function testReturnEmptyTrashResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEmptyTrashEvent::class, @@ -66,7 +66,7 @@ public function testReturnEmptyTrashResultInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('emptyTrash')->willReturn($resultList); - $traceableEventDispatcher->addListener(BeforeEmptyTrashEvent::class, static function (BeforeEmptyTrashEvent $event) use ($eventResultList) { + $traceableEventDispatcher->addListener(BeforeEmptyTrashEvent::class, static function (BeforeEmptyTrashEvent $event) use ($eventResultList): void { $event->setResultList($eventResultList); }, 10); @@ -84,7 +84,7 @@ public function testReturnEmptyTrashResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testEmptyTrashStopPropagationInBeforeEvents() + public function testEmptyTrashStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeEmptyTrashEvent::class, @@ -99,7 +99,7 @@ public function testEmptyTrashStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('emptyTrash')->willReturn($resultList); - $traceableEventDispatcher->addListener(BeforeEmptyTrashEvent::class, static function (BeforeEmptyTrashEvent $event) use ($eventResultList) { + $traceableEventDispatcher->addListener(BeforeEmptyTrashEvent::class, static function (BeforeEmptyTrashEvent $event) use ($eventResultList): void { $event->setResultList($eventResultList); $event->stopPropagation(); }, 10); @@ -120,7 +120,7 @@ public function testEmptyTrashStopPropagationInBeforeEvents() ]); } - public function testTrashEvents() + public function testTrashEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTrashEvent::class, @@ -148,7 +148,7 @@ public function testTrashEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnTrashResultInBeforeEvents() + public function testReturnTrashResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTrashEvent::class, @@ -164,7 +164,7 @@ public function testReturnTrashResultInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('trash')->willReturn($trashItem); - $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event) use ($eventTrashItem) { + $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event) use ($eventTrashItem): void { $event->setResult($eventTrashItem); }, 10); @@ -182,7 +182,7 @@ public function testReturnTrashResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testTrashStopPropagationInBeforeEvents() + public function testTrashStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTrashEvent::class, @@ -198,7 +198,7 @@ public function testTrashStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('trash')->willReturn($trashItem); - $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event) use ($eventTrashItem) { + $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event) use ($eventTrashItem): void { $event->setResult($eventTrashItem); $event->stopPropagation(); }, 10); @@ -233,7 +233,7 @@ public function testTrashStopPropagationInBeforeEventsSetsNullResult(): void $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->expects(self::never())->method('trash'); - $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event) { + $traceableEventDispatcher->addListener(BeforeTrashEvent::class, static function (BeforeTrashEvent $event): void { $event->setResult(null); $event->stopPropagation(); }, 10); @@ -254,7 +254,7 @@ public function testTrashStopPropagationInBeforeEventsSetsNullResult(): void ]); } - public function testRecoverEvents() + public function testRecoverEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRecoverEvent::class, @@ -283,7 +283,7 @@ public function testRecoverEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnRecoverResultInBeforeEvents() + public function testReturnRecoverResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRecoverEvent::class, @@ -300,7 +300,7 @@ public function testReturnRecoverResultInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('recover')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeRecoverEvent::class, static function (BeforeRecoverEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeRecoverEvent::class, static function (BeforeRecoverEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); }, 10); @@ -318,7 +318,7 @@ public function testReturnRecoverResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRecoverStopPropagationInBeforeEvents() + public function testRecoverStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRecoverEvent::class, @@ -335,7 +335,7 @@ public function testRecoverStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('recover')->willReturn($location); - $traceableEventDispatcher->addListener(BeforeRecoverEvent::class, static function (BeforeRecoverEvent $event) use ($eventLocation) { + $traceableEventDispatcher->addListener(BeforeRecoverEvent::class, static function (BeforeRecoverEvent $event) use ($eventLocation): void { $event->setLocation($eventLocation); $event->stopPropagation(); }, 10); @@ -356,7 +356,7 @@ public function testRecoverStopPropagationInBeforeEvents() ]); } - public function testDeleteTrashItemEvents() + public function testDeleteTrashItemEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteTrashItemEvent::class, @@ -384,7 +384,7 @@ public function testDeleteTrashItemEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnDeleteTrashItemResultInBeforeEvents() + public function testReturnDeleteTrashItemResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteTrashItemEvent::class, @@ -400,7 +400,7 @@ public function testReturnDeleteTrashItemResultInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('deleteTrashItem')->willReturn($result); - $traceableEventDispatcher->addListener(BeforeDeleteTrashItemEvent::class, static function (BeforeDeleteTrashItemEvent $event) use ($eventResult) { + $traceableEventDispatcher->addListener(BeforeDeleteTrashItemEvent::class, static function (BeforeDeleteTrashItemEvent $event) use ($eventResult): void { $event->setResult($eventResult); }, 10); @@ -418,7 +418,7 @@ public function testReturnDeleteTrashItemResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteTrashItemStopPropagationInBeforeEvents() + public function testDeleteTrashItemStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteTrashItemEvent::class, @@ -434,7 +434,7 @@ public function testDeleteTrashItemStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(TrashServiceInterface::class); $innerServiceMock->method('deleteTrashItem')->willReturn($result); - $traceableEventDispatcher->addListener(BeforeDeleteTrashItemEvent::class, static function (BeforeDeleteTrashItemEvent $event) use ($eventResult) { + $traceableEventDispatcher->addListener(BeforeDeleteTrashItemEvent::class, static function (BeforeDeleteTrashItemEvent $event) use ($eventResult): void { $event->setResult($eventResult); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/URLAliasServiceTest.php b/tests/lib/Event/URLAliasServiceTest.php index b529912e0d..a307e03486 100644 --- a/tests/lib/Event/URLAliasServiceTest.php +++ b/tests/lib/Event/URLAliasServiceTest.php @@ -22,7 +22,7 @@ class URLAliasServiceTest extends AbstractServiceTest { - public function testCreateGlobalUrlAliasEvents() + public function testCreateGlobalUrlAliasEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateGlobalUrlAliasEvent::class, @@ -54,7 +54,7 @@ public function testCreateGlobalUrlAliasEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateGlobalUrlAliasResultInBeforeEvents() + public function testReturnCreateGlobalUrlAliasResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateGlobalUrlAliasEvent::class, @@ -74,7 +74,7 @@ public function testReturnCreateGlobalUrlAliasResultInBeforeEvents() $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); $innerServiceMock->method('createGlobalUrlAlias')->willReturn($urlAlias); - $traceableEventDispatcher->addListener(BeforeCreateGlobalUrlAliasEvent::class, static function (BeforeCreateGlobalUrlAliasEvent $event) use ($eventUrlAlias) { + $traceableEventDispatcher->addListener(BeforeCreateGlobalUrlAliasEvent::class, static function (BeforeCreateGlobalUrlAliasEvent $event) use ($eventUrlAlias): void { $event->setUrlAlias($eventUrlAlias); }, 10); @@ -92,7 +92,7 @@ public function testReturnCreateGlobalUrlAliasResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents() + public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateGlobalUrlAliasEvent::class, @@ -112,7 +112,7 @@ public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); $innerServiceMock->method('createGlobalUrlAlias')->willReturn($urlAlias); - $traceableEventDispatcher->addListener(BeforeCreateGlobalUrlAliasEvent::class, static function (BeforeCreateGlobalUrlAliasEvent $event) use ($eventUrlAlias) { + $traceableEventDispatcher->addListener(BeforeCreateGlobalUrlAliasEvent::class, static function (BeforeCreateGlobalUrlAliasEvent $event) use ($eventUrlAlias): void { $event->setUrlAlias($eventUrlAlias); $event->stopPropagation(); }, 10); @@ -133,7 +133,7 @@ public function testCreateGlobalUrlAliasStopPropagationInBeforeEvents() ]); } - public function testRefreshSystemUrlAliasesForLocationEvents() + public function testRefreshSystemUrlAliasesForLocationEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRefreshSystemUrlAliasesForLocationEvent::class, @@ -158,7 +158,7 @@ public function testRefreshSystemUrlAliasesForLocationEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEvents() + public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRefreshSystemUrlAliasesForLocationEvent::class, @@ -171,7 +171,7 @@ public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEve $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRefreshSystemUrlAliasesForLocationEvent::class, static function (BeforeRefreshSystemUrlAliasesForLocationEvent $event) { + $traceableEventDispatcher->addListener(BeforeRefreshSystemUrlAliasesForLocationEvent::class, static function (BeforeRefreshSystemUrlAliasesForLocationEvent $event): void { $event->stopPropagation(); }, 10); @@ -190,7 +190,7 @@ public function testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEve ]); } - public function testCreateUrlAliasEvents() + public function testCreateUrlAliasEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUrlAliasEvent::class, @@ -222,7 +222,7 @@ public function testCreateUrlAliasEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateUrlAliasResultInBeforeEvents() + public function testReturnCreateUrlAliasResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUrlAliasEvent::class, @@ -242,7 +242,7 @@ public function testReturnCreateUrlAliasResultInBeforeEvents() $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); $innerServiceMock->method('createUrlAlias')->willReturn($urlAlias); - $traceableEventDispatcher->addListener(BeforeCreateUrlAliasEvent::class, static function (BeforeCreateUrlAliasEvent $event) use ($eventUrlAlias) { + $traceableEventDispatcher->addListener(BeforeCreateUrlAliasEvent::class, static function (BeforeCreateUrlAliasEvent $event) use ($eventUrlAlias): void { $event->setUrlAlias($eventUrlAlias); }, 10); @@ -260,7 +260,7 @@ public function testReturnCreateUrlAliasResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateUrlAliasStopPropagationInBeforeEvents() + public function testCreateUrlAliasStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUrlAliasEvent::class, @@ -280,7 +280,7 @@ public function testCreateUrlAliasStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); $innerServiceMock->method('createUrlAlias')->willReturn($urlAlias); - $traceableEventDispatcher->addListener(BeforeCreateUrlAliasEvent::class, static function (BeforeCreateUrlAliasEvent $event) use ($eventUrlAlias) { + $traceableEventDispatcher->addListener(BeforeCreateUrlAliasEvent::class, static function (BeforeCreateUrlAliasEvent $event) use ($eventUrlAlias): void { $event->setUrlAlias($eventUrlAlias); $event->stopPropagation(); }, 10); @@ -301,7 +301,7 @@ public function testCreateUrlAliasStopPropagationInBeforeEvents() ]); } - public function testRemoveAliasesEvents() + public function testRemoveAliasesEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveAliasesEvent::class, @@ -326,7 +326,7 @@ public function testRemoveAliasesEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testRemoveAliasesStopPropagationInBeforeEvents() + public function testRemoveAliasesStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveAliasesEvent::class, @@ -339,7 +339,7 @@ public function testRemoveAliasesStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLAliasServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRemoveAliasesEvent::class, static function (BeforeRemoveAliasesEvent $event) { + $traceableEventDispatcher->addListener(BeforeRemoveAliasesEvent::class, static function (BeforeRemoveAliasesEvent $event): void { $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/URLServiceTest.php b/tests/lib/Event/URLServiceTest.php index 35c96695fe..cbb4f12675 100644 --- a/tests/lib/Event/URLServiceTest.php +++ b/tests/lib/Event/URLServiceTest.php @@ -16,7 +16,7 @@ class URLServiceTest extends AbstractServiceTest { - public function testUpdateUrlEvents() + public function testUpdateUrlEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUrlEvent::class, @@ -45,7 +45,7 @@ public function testUpdateUrlEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateUrlResultInBeforeEvents() + public function testReturnUpdateUrlResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUrlEvent::class, @@ -62,7 +62,7 @@ public function testReturnUpdateUrlResultInBeforeEvents() $innerServiceMock = $this->createMock(URLServiceInterface::class); $innerServiceMock->method('updateUrl')->willReturn($updatedUrl); - $traceableEventDispatcher->addListener(BeforeUpdateUrlEvent::class, static function (BeforeUpdateUrlEvent $event) use ($eventUpdatedUrl) { + $traceableEventDispatcher->addListener(BeforeUpdateUrlEvent::class, static function (BeforeUpdateUrlEvent $event) use ($eventUpdatedUrl): void { $event->setUpdatedUrl($eventUpdatedUrl); }, 10); @@ -80,7 +80,7 @@ public function testReturnUpdateUrlResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateUrlStopPropagationInBeforeEvents() + public function testUpdateUrlStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUrlEvent::class, @@ -97,7 +97,7 @@ public function testUpdateUrlStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLServiceInterface::class); $innerServiceMock->method('updateUrl')->willReturn($updatedUrl); - $traceableEventDispatcher->addListener(BeforeUpdateUrlEvent::class, static function (BeforeUpdateUrlEvent $event) use ($eventUpdatedUrl) { + $traceableEventDispatcher->addListener(BeforeUpdateUrlEvent::class, static function (BeforeUpdateUrlEvent $event) use ($eventUpdatedUrl): void { $event->setUpdatedUrl($eventUpdatedUrl); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/URLWildcardServiceTest.php b/tests/lib/Event/URLWildcardServiceTest.php index effd399760..06478562d7 100644 --- a/tests/lib/Event/URLWildcardServiceTest.php +++ b/tests/lib/Event/URLWildcardServiceTest.php @@ -26,7 +26,7 @@ class URLWildcardServiceTest extends AbstractServiceTest /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRemoveEvents() + public function testRemoveEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveEvent::class, @@ -54,7 +54,7 @@ public function testRemoveEvents() /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function testRemoveStopPropagationInBeforeEvents() + public function testRemoveStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeRemoveEvent::class, @@ -67,7 +67,7 @@ public function testRemoveStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLWildcardServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeRemoveEvent::class, static function (BeforeRemoveEvent $event) { + $traceableEventDispatcher->addListener(BeforeRemoveEvent::class, static function (BeforeRemoveEvent $event): void { $event->stopPropagation(); }, 10); @@ -130,7 +130,7 @@ public function testUpdateStopPropagationInBeforeEvents(): void $traceableEventDispatcher->addListener( BeforeUpdateEvent::class, - static function (BeforeUpdateEvent $event) { + static function (BeforeUpdateEvent $event): void { $event->stopPropagation(); }, 10 @@ -159,7 +159,7 @@ static function (BeforeUpdateEvent $event) { ]); } - public function testCreateEvents() + public function testCreateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateEvent::class, @@ -189,7 +189,7 @@ public function testCreateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateResultInBeforeEvents() + public function testReturnCreateResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateEvent::class, @@ -207,7 +207,7 @@ public function testReturnCreateResultInBeforeEvents() $innerServiceMock = $this->createMock(URLWildcardServiceInterface::class); $innerServiceMock->method('create')->willReturn($urlWildcard); - $traceableEventDispatcher->addListener(BeforeCreateEvent::class, static function (BeforeCreateEvent $event) use ($eventUrlWildcard) { + $traceableEventDispatcher->addListener(BeforeCreateEvent::class, static function (BeforeCreateEvent $event) use ($eventUrlWildcard): void { $event->setUrlWildcard($eventUrlWildcard); }, 10); @@ -225,7 +225,7 @@ public function testReturnCreateResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateStopPropagationInBeforeEvents() + public function testCreateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateEvent::class, @@ -243,7 +243,7 @@ public function testCreateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLWildcardServiceInterface::class); $innerServiceMock->method('create')->willReturn($urlWildcard); - $traceableEventDispatcher->addListener(BeforeCreateEvent::class, static function (BeforeCreateEvent $event) use ($eventUrlWildcard) { + $traceableEventDispatcher->addListener(BeforeCreateEvent::class, static function (BeforeCreateEvent $event) use ($eventUrlWildcard): void { $event->setUrlWildcard($eventUrlWildcard); $event->stopPropagation(); }, 10); @@ -264,7 +264,7 @@ public function testCreateStopPropagationInBeforeEvents() ]); } - public function testTranslateEvents() + public function testTranslateEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTranslateEvent::class, @@ -292,7 +292,7 @@ public function testTranslateEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnTranslateResultInBeforeEvents() + public function testReturnTranslateResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTranslateEvent::class, @@ -308,7 +308,7 @@ public function testReturnTranslateResultInBeforeEvents() $innerServiceMock = $this->createMock(URLWildcardServiceInterface::class); $innerServiceMock->method('translate')->willReturn($result); - $traceableEventDispatcher->addListener(BeforeTranslateEvent::class, static function (BeforeTranslateEvent $event) use ($eventResult) { + $traceableEventDispatcher->addListener(BeforeTranslateEvent::class, static function (BeforeTranslateEvent $event) use ($eventResult): void { $event->setResult($eventResult); }, 10); @@ -326,7 +326,7 @@ public function testReturnTranslateResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testTranslateStopPropagationInBeforeEvents() + public function testTranslateStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeTranslateEvent::class, @@ -342,7 +342,7 @@ public function testTranslateStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(URLWildcardServiceInterface::class); $innerServiceMock->method('translate')->willReturn($result); - $traceableEventDispatcher->addListener(BeforeTranslateEvent::class, static function (BeforeTranslateEvent $event) use ($eventResult) { + $traceableEventDispatcher->addListener(BeforeTranslateEvent::class, static function (BeforeTranslateEvent $event) use ($eventResult): void { $event->setResult($eventResult); $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/UserPreferenceServiceTest.php b/tests/lib/Event/UserPreferenceServiceTest.php index 6922b9eea3..ca531bcd22 100644 --- a/tests/lib/Event/UserPreferenceServiceTest.php +++ b/tests/lib/Event/UserPreferenceServiceTest.php @@ -14,7 +14,7 @@ class UserPreferenceServiceTest extends AbstractServiceTest { - public function testSetUserPreferenceEvents() + public function testSetUserPreferenceEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetUserPreferenceEvent::class, @@ -39,7 +39,7 @@ public function testSetUserPreferenceEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testSetUserPreferenceStopPropagationInBeforeEvents() + public function testSetUserPreferenceStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeSetUserPreferenceEvent::class, @@ -52,7 +52,7 @@ public function testSetUserPreferenceStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserPreferenceServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeSetUserPreferenceEvent::class, static function (BeforeSetUserPreferenceEvent $event) { + $traceableEventDispatcher->addListener(BeforeSetUserPreferenceEvent::class, static function (BeforeSetUserPreferenceEvent $event): void { $event->stopPropagation(); }, 10); diff --git a/tests/lib/Event/UserServiceTest.php b/tests/lib/Event/UserServiceTest.php index 6b122d5823..c09850926c 100644 --- a/tests/lib/Event/UserServiceTest.php +++ b/tests/lib/Event/UserServiceTest.php @@ -39,7 +39,7 @@ class UserServiceTest extends AbstractServiceTest { - public function testUpdateUserGroupEvents() + public function testUpdateUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserGroupEvent::class, @@ -68,7 +68,7 @@ public function testUpdateUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateUserGroupResultInBeforeEvents() + public function testReturnUpdateUserGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserGroupEvent::class, @@ -85,7 +85,7 @@ public function testReturnUpdateUserGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUserGroup')->willReturn($updatedUserGroup); - $traceableEventDispatcher->addListener(BeforeUpdateUserGroupEvent::class, static function (BeforeUpdateUserGroupEvent $event) use ($eventUpdatedUserGroup) { + $traceableEventDispatcher->addListener(BeforeUpdateUserGroupEvent::class, static function (BeforeUpdateUserGroupEvent $event) use ($eventUpdatedUserGroup): void { $event->setUpdatedUserGroup($eventUpdatedUserGroup); }, 10); @@ -103,7 +103,7 @@ public function testReturnUpdateUserGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateUserGroupStopPropagationInBeforeEvents() + public function testUpdateUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserGroupEvent::class, @@ -120,7 +120,7 @@ public function testUpdateUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUserGroup')->willReturn($updatedUserGroup); - $traceableEventDispatcher->addListener(BeforeUpdateUserGroupEvent::class, static function (BeforeUpdateUserGroupEvent $event) use ($eventUpdatedUserGroup) { + $traceableEventDispatcher->addListener(BeforeUpdateUserGroupEvent::class, static function (BeforeUpdateUserGroupEvent $event) use ($eventUpdatedUserGroup): void { $event->setUpdatedUserGroup($eventUpdatedUserGroup); $event->stopPropagation(); }, 10); @@ -141,7 +141,7 @@ public function testUpdateUserGroupStopPropagationInBeforeEvents() ]); } - public function testUpdateUserEvents() + public function testUpdateUserEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserEvent::class, @@ -170,7 +170,7 @@ public function testUpdateUserEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateUserResultInBeforeEvents() + public function testReturnUpdateUserResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserEvent::class, @@ -187,7 +187,7 @@ public function testReturnUpdateUserResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUser')->willReturn($updatedUser); - $traceableEventDispatcher->addListener(BeforeUpdateUserEvent::class, static function (BeforeUpdateUserEvent $event) use ($eventUpdatedUser) { + $traceableEventDispatcher->addListener(BeforeUpdateUserEvent::class, static function (BeforeUpdateUserEvent $event) use ($eventUpdatedUser): void { $event->setUpdatedUser($eventUpdatedUser); }, 10); @@ -205,7 +205,7 @@ public function testReturnUpdateUserResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateUserStopPropagationInBeforeEvents() + public function testUpdateUserStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserEvent::class, @@ -222,7 +222,7 @@ public function testUpdateUserStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUser')->willReturn($updatedUser); - $traceableEventDispatcher->addListener(BeforeUpdateUserEvent::class, static function (BeforeUpdateUserEvent $event) use ($eventUpdatedUser) { + $traceableEventDispatcher->addListener(BeforeUpdateUserEvent::class, static function (BeforeUpdateUserEvent $event) use ($eventUpdatedUser): void { $event->setUpdatedUser($eventUpdatedUser); $event->stopPropagation(); }, 10); @@ -243,7 +243,7 @@ public function testUpdateUserStopPropagationInBeforeEvents() ]); } - public function testUnAssignUserFromUserGroupEvents() + public function testUnAssignUserFromUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnAssignUserFromUserGroupEvent::class, @@ -269,7 +269,7 @@ public function testUnAssignUserFromUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents() + public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUnAssignUserFromUserGroupEvent::class, @@ -283,7 +283,7 @@ public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeUnAssignUserFromUserGroupEvent::class, static function (BeforeUnAssignUserFromUserGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeUnAssignUserFromUserGroupEvent::class, static function (BeforeUnAssignUserFromUserGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -302,7 +302,7 @@ public function testUnAssignUserFromUserGroupStopPropagationInBeforeEvents() ]); } - public function testDeleteUserGroupEvents() + public function testDeleteUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserGroupEvent::class, @@ -330,7 +330,7 @@ public function testDeleteUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnDeleteUserGroupResultInBeforeEvents() + public function testReturnDeleteUserGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserGroupEvent::class, @@ -346,7 +346,7 @@ public function testReturnDeleteUserGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('deleteUserGroup')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteUserGroupEvent::class, static function (BeforeDeleteUserGroupEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteUserGroupEvent::class, static function (BeforeDeleteUserGroupEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); }, 10); @@ -364,7 +364,7 @@ public function testReturnDeleteUserGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteUserGroupStopPropagationInBeforeEvents() + public function testDeleteUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserGroupEvent::class, @@ -380,7 +380,7 @@ public function testDeleteUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('deleteUserGroup')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteUserGroupEvent::class, static function (BeforeDeleteUserGroupEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteUserGroupEvent::class, static function (BeforeDeleteUserGroupEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); $event->stopPropagation(); }, 10); @@ -401,7 +401,7 @@ public function testDeleteUserGroupStopPropagationInBeforeEvents() ]); } - public function testAssignUserToUserGroupEvents() + public function testAssignUserToUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignUserToUserGroupEvent::class, @@ -427,7 +427,7 @@ public function testAssignUserToUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testAssignUserToUserGroupStopPropagationInBeforeEvents() + public function testAssignUserToUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeAssignUserToUserGroupEvent::class, @@ -441,7 +441,7 @@ public function testAssignUserToUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeAssignUserToUserGroupEvent::class, static function (BeforeAssignUserToUserGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeAssignUserToUserGroupEvent::class, static function (BeforeAssignUserToUserGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -460,7 +460,7 @@ public function testAssignUserToUserGroupStopPropagationInBeforeEvents() ]); } - public function testDeleteUserEvents() + public function testDeleteUserEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserEvent::class, @@ -488,7 +488,7 @@ public function testDeleteUserEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnDeleteUserResultInBeforeEvents() + public function testReturnDeleteUserResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserEvent::class, @@ -504,7 +504,7 @@ public function testReturnDeleteUserResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('deleteUser')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteUserEvent::class, static function (BeforeDeleteUserEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteUserEvent::class, static function (BeforeDeleteUserEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); }, 10); @@ -522,7 +522,7 @@ public function testReturnDeleteUserResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testDeleteUserStopPropagationInBeforeEvents() + public function testDeleteUserStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeDeleteUserEvent::class, @@ -538,7 +538,7 @@ public function testDeleteUserStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('deleteUser')->willReturn($locations); - $traceableEventDispatcher->addListener(BeforeDeleteUserEvent::class, static function (BeforeDeleteUserEvent $event) use ($eventLocations) { + $traceableEventDispatcher->addListener(BeforeDeleteUserEvent::class, static function (BeforeDeleteUserEvent $event) use ($eventLocations): void { $event->setLocations($eventLocations); $event->stopPropagation(); }, 10); @@ -559,7 +559,7 @@ public function testDeleteUserStopPropagationInBeforeEvents() ]); } - public function testMoveUserGroupEvents() + public function testMoveUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMoveUserGroupEvent::class, @@ -585,7 +585,7 @@ public function testMoveUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testMoveUserGroupStopPropagationInBeforeEvents() + public function testMoveUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeMoveUserGroupEvent::class, @@ -599,7 +599,7 @@ public function testMoveUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); - $traceableEventDispatcher->addListener(BeforeMoveUserGroupEvent::class, static function (BeforeMoveUserGroupEvent $event) { + $traceableEventDispatcher->addListener(BeforeMoveUserGroupEvent::class, static function (BeforeMoveUserGroupEvent $event): void { $event->stopPropagation(); }, 10); @@ -618,7 +618,7 @@ public function testMoveUserGroupStopPropagationInBeforeEvents() ]); } - public function testCreateUserEvents() + public function testCreateUserEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserEvent::class, @@ -647,7 +647,7 @@ public function testCreateUserEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateUserResultInBeforeEvents() + public function testReturnCreateUserResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserEvent::class, @@ -664,7 +664,7 @@ public function testReturnCreateUserResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('createUser')->willReturn($user); - $traceableEventDispatcher->addListener(BeforeCreateUserEvent::class, static function (BeforeCreateUserEvent $event) use ($eventUser) { + $traceableEventDispatcher->addListener(BeforeCreateUserEvent::class, static function (BeforeCreateUserEvent $event) use ($eventUser): void { $event->setUser($eventUser); }, 10); @@ -682,7 +682,7 @@ public function testReturnCreateUserResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateUserStopPropagationInBeforeEvents() + public function testCreateUserStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserEvent::class, @@ -699,7 +699,7 @@ public function testCreateUserStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('createUser')->willReturn($user); - $traceableEventDispatcher->addListener(BeforeCreateUserEvent::class, static function (BeforeCreateUserEvent $event) use ($eventUser) { + $traceableEventDispatcher->addListener(BeforeCreateUserEvent::class, static function (BeforeCreateUserEvent $event) use ($eventUser): void { $event->setUser($eventUser); $event->stopPropagation(); }, 10); @@ -720,7 +720,7 @@ public function testCreateUserStopPropagationInBeforeEvents() ]); } - public function testCreateUserGroupEvents() + public function testCreateUserGroupEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserGroupEvent::class, @@ -749,7 +749,7 @@ public function testCreateUserGroupEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnCreateUserGroupResultInBeforeEvents() + public function testReturnCreateUserGroupResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserGroupEvent::class, @@ -766,7 +766,7 @@ public function testReturnCreateUserGroupResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('createUserGroup')->willReturn($userGroup); - $traceableEventDispatcher->addListener(BeforeCreateUserGroupEvent::class, static function (BeforeCreateUserGroupEvent $event) use ($eventUserGroup) { + $traceableEventDispatcher->addListener(BeforeCreateUserGroupEvent::class, static function (BeforeCreateUserGroupEvent $event) use ($eventUserGroup): void { $event->setUserGroup($eventUserGroup); }, 10); @@ -784,7 +784,7 @@ public function testReturnCreateUserGroupResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testCreateUserGroupStopPropagationInBeforeEvents() + public function testCreateUserGroupStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeCreateUserGroupEvent::class, @@ -801,7 +801,7 @@ public function testCreateUserGroupStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('createUserGroup')->willReturn($userGroup); - $traceableEventDispatcher->addListener(BeforeCreateUserGroupEvent::class, static function (BeforeCreateUserGroupEvent $event) use ($eventUserGroup) { + $traceableEventDispatcher->addListener(BeforeCreateUserGroupEvent::class, static function (BeforeCreateUserGroupEvent $event) use ($eventUserGroup): void { $event->setUserGroup($eventUserGroup); $event->stopPropagation(); }, 10); @@ -822,7 +822,7 @@ public function testCreateUserGroupStopPropagationInBeforeEvents() ]); } - public function testUpdateUserTokenEvents() + public function testUpdateUserTokenEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserTokenEvent::class, @@ -851,7 +851,7 @@ public function testUpdateUserTokenEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testReturnUpdateUserTokenResultInBeforeEvents() + public function testReturnUpdateUserTokenResultInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserTokenEvent::class, @@ -868,7 +868,7 @@ public function testReturnUpdateUserTokenResultInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUserToken')->willReturn($updatedUser); - $traceableEventDispatcher->addListener(BeforeUpdateUserTokenEvent::class, static function (BeforeUpdateUserTokenEvent $event) use ($eventUpdatedUser) { + $traceableEventDispatcher->addListener(BeforeUpdateUserTokenEvent::class, static function (BeforeUpdateUserTokenEvent $event) use ($eventUpdatedUser): void { $event->setUpdatedUser($eventUpdatedUser); }, 10); @@ -886,7 +886,7 @@ public function testReturnUpdateUserTokenResultInBeforeEvents() self::assertSame([], $traceableEventDispatcher->getNotCalledListeners()); } - public function testUpdateUserTokenStopPropagationInBeforeEvents() + public function testUpdateUserTokenStopPropagationInBeforeEvents(): void { $traceableEventDispatcher = $this->getEventDispatcher( BeforeUpdateUserTokenEvent::class, @@ -903,7 +903,7 @@ public function testUpdateUserTokenStopPropagationInBeforeEvents() $innerServiceMock = $this->createMock(UserServiceInterface::class); $innerServiceMock->method('updateUserToken')->willReturn($updatedUser); - $traceableEventDispatcher->addListener(BeforeUpdateUserTokenEvent::class, static function (BeforeUpdateUserTokenEvent $event) use ($eventUpdatedUser) { + $traceableEventDispatcher->addListener(BeforeUpdateUserTokenEvent::class, static function (BeforeUpdateUserTokenEvent $event) use ($eventUpdatedUser): void { $event->setUpdatedUser($eventUpdatedUser); $event->stopPropagation(); }, 10); diff --git a/tests/lib/FieldType/APIFieldTypeTest.php b/tests/lib/FieldType/APIFieldTypeTest.php index 8f5fbd89cf..363765af55 100644 --- a/tests/lib/FieldType/APIFieldTypeTest.php +++ b/tests/lib/FieldType/APIFieldTypeTest.php @@ -12,15 +12,16 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition as APIFieldDefinition; use Ibexa\Core\FieldType\Value; use Ibexa\Core\Repository\Values\ContentType\FieldType; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class APIFieldTypeTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $innerFieldType; + private MockObject $innerFieldType; /** @var \Ibexa\Core\Repository\Values\ContentType\FieldType */ - private $fieldType; + private FieldType $fieldType; protected function setUp(): void { @@ -29,7 +30,7 @@ protected function setUp(): void $this->fieldType = new FieldType($this->innerFieldType); } - public function testValidateValidatorConfigurationNoError() + public function testValidateValidatorConfigurationNoError(): void { $validatorConfig = ['foo' => 'bar']; $validationErrors = []; @@ -42,7 +43,7 @@ public function testValidateValidatorConfigurationNoError() self::assertSame($validationErrors, $this->fieldType->validateValidatorConfiguration($validatorConfig)); } - public function testValidateValidatorConfiguration() + public function testValidateValidatorConfiguration(): void { $validatorConfig = ['foo' => 'bar']; $validationErrors = [ @@ -59,7 +60,7 @@ public function testValidateValidatorConfiguration() self::assertSame($validationErrors, $this->fieldType->validateValidatorConfiguration($validatorConfig)); } - public function testValidateFieldSettingsNoError() + public function testValidateFieldSettingsNoError(): void { $fieldSettings = ['foo' => 'bar']; $validationErrors = []; @@ -72,7 +73,7 @@ public function testValidateFieldSettingsNoError() self::assertSame($validationErrors, $this->fieldType->validateFieldSettings($fieldSettings)); } - public function testValidateFieldSettings() + public function testValidateFieldSettings(): void { $fieldSettings = ['foo' => 'bar']; $validationErrors = [ @@ -89,7 +90,7 @@ public function testValidateFieldSettings() self::assertSame($validationErrors, $this->fieldType->validateFieldSettings($fieldSettings)); } - public function testValidateValueNoError() + public function testValidateValueNoError(): void { $fieldDefinition = $this->getMockForAbstractClass(APIFieldDefinition::class); $value = $this->getMockForAbstractClass(Value::class); @@ -103,7 +104,7 @@ public function testValidateValueNoError() self::assertSame($validationErrors, $this->fieldType->validateValue($fieldDefinition, $value)); } - public function testValidateValue() + public function testValidateValue(): void { $fieldDefinition = $this->getMockForAbstractClass(APIFieldDefinition::class); $value = $this->getMockForAbstractClass(Value::class); diff --git a/tests/lib/FieldType/AuthorTest.php b/tests/lib/FieldType/AuthorTest.php index 0ce6fcd8b4..588c719cb3 100644 --- a/tests/lib/FieldType/AuthorTest.php +++ b/tests/lib/FieldType/AuthorTest.php @@ -10,6 +10,7 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\FieldType\Author\Author; use Ibexa\Core\FieldType\Author\AuthorCollection; +use Ibexa\Core\FieldType\Author\Type; use Ibexa\Core\FieldType\Author\Type as AuthorType; use Ibexa\Core\FieldType\Author\Value as AuthorValue; use Ibexa\Core\FieldType\Value; @@ -21,7 +22,7 @@ class AuthorTest extends FieldTypeTest { /** @var \Ibexa\Core\FieldType\Author\Author[] */ - private $authors; + private array $authors; protected function setUp(): void { @@ -44,7 +45,7 @@ protected function setUp(): void * * @return \Ibexa\Contracts\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new AuthorType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -57,7 +58,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -67,7 +68,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'defaultAuthor' => [ @@ -82,12 +83,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Author\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): AuthorValue { return new AuthorValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -134,7 +135,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -201,7 +202,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -268,7 +269,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -322,7 +323,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -364,7 +365,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -391,7 +392,7 @@ protected function tearDown(): void /** * @covers \Ibexa\Core\FieldType\FieldType::getValidatorConfigurationSchema */ - public function testValidatorConfigurationSchema() + public function testValidatorConfigurationSchema(): void { $ft = $this->createFieldTypeUnderTest(); self::assertEmpty( @@ -403,7 +404,7 @@ public function testValidatorConfigurationSchema() /** * @covers \Ibexa\Core\FieldType\Author\Type::acceptValue */ - public function testAcceptValueInvalidType() + public function testAcceptValueInvalidType(): void { $this->expectException(InvalidArgumentException::class); @@ -414,7 +415,7 @@ public function testAcceptValueInvalidType() /** * @covers \Ibexa\Core\FieldType\Author\Type::acceptValue */ - public function testAcceptValueInvalidFormat() + public function testAcceptValueInvalidFormat(): void { $this->expectException(InvalidArgumentException::class); @@ -427,7 +428,7 @@ public function testAcceptValueInvalidFormat() /** * @covers \Ibexa\Core\FieldType\Author\Type::acceptValue */ - public function testAcceptValueValidFormat() + public function testAcceptValueValidFormat(): void { $ft = $this->createFieldTypeUnderTest(); $author = new Author(); @@ -441,7 +442,7 @@ public function testAcceptValueValidFormat() /** * @covers \Ibexa\Core\FieldType\Author\Value::__construct */ - public function testBuildFieldValueWithoutParam() + public function testBuildFieldValueWithoutParam(): void { $value = new AuthorValue(); self::assertInstanceOf(AuthorCollection::class, $value->authors); @@ -451,7 +452,7 @@ public function testBuildFieldValueWithoutParam() /** * @covers \Ibexa\Core\FieldType\Author\Value::__construct */ - public function testBuildFieldValueWithParam() + public function testBuildFieldValueWithParam(): void { $value = new AuthorValue($this->authors); self::assertInstanceOf(AuthorCollection::class, $value->authors); @@ -461,7 +462,7 @@ public function testBuildFieldValueWithParam() /** * @covers \Ibexa\Core\FieldType\Author\Value::__toString */ - public function testFieldValueToString() + public function testFieldValueToString(): void { $value = new AuthorValue($this->authors); @@ -476,7 +477,7 @@ public function testFieldValueToString() /** * @covers \Ibexa\Core\FieldType\Author\AuthorCollection::offsetSet */ - public function testAddAuthor() + public function testAddAuthor(): void { $value = new AuthorValue(); $value->authors[] = $this->authors[0]; @@ -496,7 +497,7 @@ public function testAddAuthor() /** * @covers \Ibexa\Core\FieldType\Author\AuthorCollection::removeAuthorsById */ - public function testRemoveAuthors() + public function testRemoveAuthors(): void { $existingIds = []; foreach ($this->authors as $author) { diff --git a/tests/lib/FieldType/BaseFieldTypeTest.php b/tests/lib/FieldType/BaseFieldTypeTest.php index f1688903b9..e96bf8fc98 100644 --- a/tests/lib/FieldType/BaseFieldTypeTest.php +++ b/tests/lib/FieldType/BaseFieldTypeTest.php @@ -9,8 +9,10 @@ use Ibexa\Contracts\Core\FieldType\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; +use Ibexa\Contracts\Core\FieldType\Value; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition as APIFieldDefinition; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class BaseFieldTypeTest extends TestCase @@ -512,7 +514,7 @@ protected function getFieldTypeUnderTest() return $this->fieldTypeUnderTest; } - public function testGetFieldTypeIdentifier() + public function testGetFieldTypeIdentifier(): void { self::assertSame( $this->provideFieldTypeIdentifier(), @@ -537,7 +539,7 @@ public function testGetName( ); } - public function testValidatorConfigurationSchema() + public function testValidatorConfigurationSchema(): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -548,7 +550,7 @@ public function testValidatorConfigurationSchema() ); } - public function testSettingsSchema() + public function testSettingsSchema(): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -559,7 +561,7 @@ public function testSettingsSchema() ); } - public function testEmptyValue() + public function testEmptyValue(): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -575,7 +577,7 @@ public function testEmptyValue() * * @dataProvider provideValidInputForAcceptValue */ - public function testAcceptValue($inputValue, $expectedOutputValue) + public function testAcceptValue($inputValue, $expectedOutputValue): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -591,7 +593,7 @@ public function testAcceptValue($inputValue, $expectedOutputValue) /** * Tests that default empty value is unchanged by acceptValue() method. */ - public function testAcceptGetEmptyValue() + public function testAcceptGetEmptyValue(): void { $fieldType = $this->getFieldTypeUnderTest(); $emptyValue = $fieldType->getEmptyValue(); @@ -628,7 +630,7 @@ public function testAcceptValueFailsOnInvalidValues( * * @dataProvider provideInputForToHash */ - public function testToHash($inputValue, $expectedResult) + public function testToHash(Value $inputValue, $expectedResult): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -657,7 +659,7 @@ public function testToHash($inputValue, $expectedResult) * * @dataProvider provideInputForFromHash */ - public function testFromHash($inputHash, $expectedResult) + public function testFromHash($inputHash, $expectedResult): void { $this->assertIsValidHashValue($inputHash); @@ -680,7 +682,7 @@ public function testFromHash($inputHash, $expectedResult) } } - public function testEmptyValueIsEmpty() + public function testEmptyValueIsEmpty(): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -694,7 +696,7 @@ public function testEmptyValueIsEmpty() * * @dataProvider provideValidFieldSettings */ - public function testValidateFieldSettingsValid($inputSettings) + public function testValidateFieldSettingsValid(array $inputSettings): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -716,7 +718,7 @@ public function testValidateFieldSettingsValid($inputSettings) * * @dataProvider provideInvalidFieldSettings */ - public function testValidateFieldSettingsInvalid($inputSettings) + public function testValidateFieldSettingsInvalid(array $inputSettings): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -747,7 +749,7 @@ public function testValidateFieldSettingsInvalid($inputSettings) * * @dataProvider provideValidValidatorConfiguration */ - public function testValidateValidatorConfigurationValid($inputConfiguration) + public function testValidateValidatorConfigurationValid(array $inputConfiguration): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -769,7 +771,7 @@ public function testValidateValidatorConfigurationValid($inputConfiguration) * * @dataProvider provideInvalidValidatorConfiguration */ - public function testValidateValidatorConfigurationInvalid($inputConfiguration) + public function testValidateValidatorConfigurationInvalid(array $inputConfiguration): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -800,7 +802,7 @@ public function testValidateValidatorConfigurationInvalid($inputConfiguration) * * @dataProvider provideValidFieldSettings */ - public function testFieldSettingsToHash($inputSettings) + public function testFieldSettingsToHash(array $inputSettings): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -814,7 +816,7 @@ public function testFieldSettingsToHash($inputSettings) * * @dataProvider provideValidValidatorConfiguration */ - public function testValidatorConfigurationToHash($inputConfiguration) + public function testValidatorConfigurationToHash(array $inputConfiguration): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -828,7 +830,7 @@ public function testValidatorConfigurationToHash($inputConfiguration) * * @dataProvider provideValidFieldSettings */ - public function testFieldSettingsFromHash($inputSettings) + public function testFieldSettingsFromHash(array $inputSettings): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -843,7 +845,7 @@ public function testFieldSettingsFromHash($inputSettings) * * @dataProvider provideValidValidatorConfiguration */ - public function testValidatorConfigurationFromHash($inputConfiguration) + public function testValidatorConfigurationFromHash(array $inputConfiguration): void { $fieldType = $this->getFieldTypeUnderTest(); @@ -895,7 +897,7 @@ protected function assertIsValidHashValue($actualHash, $keyChain = []) /** * @dataProvider provideValidDataForValidate */ - public function testValidateValid($fieldDefinitionData, $value) + public function testValidateValid(array $fieldDefinitionData, MockObject&Value $value): void { $validationErrors = $this->doValidate($fieldDefinitionData, $value); @@ -906,7 +908,7 @@ public function testValidateValid($fieldDefinitionData, $value) /** * @dataProvider provideInvalidDataForValidate */ - public function testValidateInvalid($fieldDefinitionData, $value, $errors) + public function testValidateInvalid(array $fieldDefinitionData, MockObject&Value $value, array $errors): void { $validationErrors = $this->doValidate($fieldDefinitionData, $value); @@ -914,7 +916,7 @@ public function testValidateInvalid($fieldDefinitionData, $value, $errors) self::assertEquals($errors, $validationErrors); } - protected function doValidate($fieldDefinitionData, $value) + protected function doValidate($fieldDefinitionData, Value $value) { $fieldType = $this->getFieldTypeUnderTest(); diff --git a/tests/lib/FieldType/BinaryFileTest.php b/tests/lib/FieldType/BinaryFileTest.php index f0a94eac5d..e51db9b544 100644 --- a/tests/lib/FieldType/BinaryFileTest.php +++ b/tests/lib/FieldType/BinaryFileTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\FieldType\BinaryBase\RouteAwarePathGenerator; use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; use Ibexa\Core\FieldType\BinaryFile\Type as BinaryFileType; +use Ibexa\Core\FieldType\BinaryFile\Value; use Ibexa\Core\FieldType\BinaryFile\Value as BinaryFileValue; use Ibexa\Core\FieldType\FieldType; use Ibexa\Core\FieldType\ValidationError; @@ -44,12 +45,12 @@ protected function createFieldTypeUnderTest(): FieldType return $fieldType; } - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new BinaryFileValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { $baseInput = parent::provideInvalidInputForAcceptValue(); $binaryFileInput = [ @@ -62,7 +63,7 @@ public function provideInvalidInputForAcceptValue() return array_merge($baseInput, $binaryFileInput); } - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -206,7 +207,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -388,7 +389,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -519,7 +520,7 @@ public function provideDataForGetName(): array ]; } - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -543,7 +544,7 @@ public function provideValidDataForValidate() ]; } - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ // File is too large diff --git a/tests/lib/FieldType/CheckboxTest.php b/tests/lib/FieldType/CheckboxTest.php index 10f6963418..0747408150 100644 --- a/tests/lib/FieldType/CheckboxTest.php +++ b/tests/lib/FieldType/CheckboxTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Checkbox\Type; use Ibexa\Core\FieldType\Checkbox\Type as Checkbox; +use Ibexa\Core\FieldType\Checkbox\Value; use Ibexa\Core\FieldType\Checkbox\Value as CheckboxValue; /** @@ -28,7 +30,7 @@ class CheckboxTest extends FieldTypeTest * * @return \Ibexa\Contracts\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Checkbox(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -41,7 +43,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -51,7 +53,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -61,12 +63,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Checkbox\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new CheckboxValue(false); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -109,7 +111,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -158,7 +160,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -207,7 +209,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -224,7 +226,7 @@ public function provideInputForFromHash() /** * @covers \Ibexa\Core\FieldType\Checkbox\Type::toPersistenceValue */ - public function testToPersistenceValue() + public function testToPersistenceValue(): void { $ft = $this->createFieldTypeUnderTest(); $fieldValue = $ft->toPersistenceValue(new CheckboxValue(true)); @@ -236,7 +238,7 @@ public function testToPersistenceValue() /** * @covers \Ibexa\Core\FieldType\Checkbox\Value::__construct */ - public function testBuildFieldValueWithParam() + public function testBuildFieldValueWithParam(): void { $bool = true; $value = new CheckboxValue($bool); @@ -246,7 +248,7 @@ public function testBuildFieldValueWithParam() /** * @covers \Ibexa\Core\FieldType\Checkbox\Value::__construct */ - public function testBuildFieldValueWithoutParam() + public function testBuildFieldValueWithoutParam(): void { $value = new CheckboxValue(); self::assertFalse($value->bool); @@ -255,7 +257,7 @@ public function testBuildFieldValueWithoutParam() /** * @covers \Ibexa\Core\FieldType\Checkbox\Value::__toString */ - public function testFieldValueToString() + public function testFieldValueToString(): void { $valueTrue = new CheckboxValue(true); $valueFalse = new CheckboxValue(false); diff --git a/tests/lib/FieldType/CountryTest.php b/tests/lib/FieldType/CountryTest.php index fbba207340..48c1efaa77 100644 --- a/tests/lib/FieldType/CountryTest.php +++ b/tests/lib/FieldType/CountryTest.php @@ -9,7 +9,9 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\FieldType\Country\Exception\InvalidValue; +use Ibexa\Core\FieldType\Country\Type; use Ibexa\Core\FieldType\Country\Type as Country; +use Ibexa\Core\FieldType\Country\Value; use Ibexa\Core\FieldType\Country\Value as CountryValue; use Ibexa\Core\FieldType\ValidationError; @@ -35,7 +37,7 @@ protected function provideFieldTypeIdentifier(): string * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Country( [ @@ -87,7 +89,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -97,7 +99,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'isMultiple' => [ @@ -112,12 +114,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Country\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new CountryValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -168,7 +170,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -267,7 +269,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -340,7 +342,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -437,7 +439,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -555,7 +557,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index a5d91bf33f..4c948aeb53 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -9,7 +9,9 @@ use DateInterval; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\DateAndTime\Type; use Ibexa\Core\FieldType\DateAndTime\Type as DateAndTime; +use Ibexa\Core\FieldType\DateAndTime\Value; use Ibexa\Core\FieldType\DateAndTime\Value as DateAndTimeValue; use stdClass; @@ -30,7 +32,7 @@ class DateAndTimeTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new DateAndTime(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -43,7 +45,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -53,7 +55,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'useSeconds' => [ @@ -74,12 +76,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new DateAndTimeValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -118,7 +120,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -175,7 +177,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -198,7 +200,7 @@ public function provideInputForToHash() * * @dataProvider provideInputForFromHash */ - public function testFromHash($inputHash, $expectedResult) + public function testFromHash(?array $inputHash, Value $expectedResult): void { $this->assertIsValidHashValue($inputHash); @@ -229,7 +231,7 @@ public function testFromHash($inputHash, $expectedResult) * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { $date = new \DateTime('Tue, 28 Aug 2012 12:20:00 +0200'); @@ -260,7 +262,7 @@ public function provideInputForFromHash() * * @dataProvider provideInputForTimeStringFromHash */ - public function testTimeStringFromHash($inputHash, $intervalSpec) + public function testTimeStringFromHash(array $inputHash, string $intervalSpec): void { $this->assertIsValidHashValue($inputHash); @@ -297,7 +299,7 @@ public function testTimeStringFromHash($inputHash, $intervalSpec) * * @return array */ - public function provideInputForTimeStringFromHash() + public function provideInputForTimeStringFromHash(): array { return [ [ @@ -343,7 +345,7 @@ public function provideInputForTimeStringFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -394,7 +396,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ diff --git a/tests/lib/FieldType/DateTest.php b/tests/lib/FieldType/DateTest.php index 11f9d347db..e62da66988 100644 --- a/tests/lib/FieldType/DateTest.php +++ b/tests/lib/FieldType/DateTest.php @@ -10,7 +10,9 @@ use DateTime; use DateTimeZone; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Date\Type; use Ibexa\Core\FieldType\Date\Type as Date; +use Ibexa\Core\FieldType\Date\Value; use Ibexa\Core\FieldType\Date\Value as DateValue; /** @@ -30,7 +32,7 @@ class DateTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Date(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -43,7 +45,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -53,7 +55,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'defaultType' => [ @@ -66,12 +68,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new DateValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -110,7 +112,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -173,7 +175,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -225,7 +227,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { $dateTime = new DateTime(); @@ -277,7 +279,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -319,7 +321,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ diff --git a/tests/lib/FieldType/EmailAddressTest.php b/tests/lib/FieldType/EmailAddressTest.php index 31468e09e1..328031befd 100644 --- a/tests/lib/FieldType/EmailAddressTest.php +++ b/tests/lib/FieldType/EmailAddressTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\EmailAddress\Type; use Ibexa\Core\FieldType\EmailAddress\Type as EmailAddressType; +use Ibexa\Core\FieldType\EmailAddress\Value; use Ibexa\Core\FieldType\EmailAddress\Value as EmailAddressValue; use Ibexa\Core\FieldType\ValidationError; @@ -29,7 +31,7 @@ class EmailAddressTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $transformationProcessorMock = $this->getTransformationProcessorMock(); @@ -55,7 +57,7 @@ static function ($value, $group): string { * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'EmailAddressValidator' => [], @@ -67,7 +69,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -75,12 +77,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new EmailAddressValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -123,7 +125,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -176,7 +178,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -225,7 +227,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -271,7 +273,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidValidatorConfiguration() + public function provideValidValidatorConfiguration(): array { return [ [ @@ -334,7 +336,7 @@ public function provideValidValidatorConfiguration() * * @return array */ - public function provideInvalidValidatorConfiguration() + public function provideInvalidValidatorConfiguration(): array { return [ [ @@ -424,7 +426,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -500,7 +502,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/EmailAddressValidatorTest.php b/tests/lib/FieldType/EmailAddressValidatorTest.php index 88f7e31326..bb65489337 100644 --- a/tests/lib/FieldType/EmailAddressValidatorTest.php +++ b/tests/lib/FieldType/EmailAddressValidatorTest.php @@ -23,7 +23,7 @@ class EmailAddressValidatorTest extends TestCase /** * This test ensure an EmailAddressValidator can be created. */ - public function testConstructor() + public function testConstructor(): void { self::assertInstanceOf( Validator::class, @@ -37,7 +37,7 @@ public function testConstructor() * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints * @covers \Ibexa\Core\FieldType\Validator::__get */ - public function testConstraintsInitializeGet() + public function testConstraintsInitializeGet(): void { $constraints = [ 'Extent' => 'regex', @@ -54,7 +54,7 @@ public function testConstraintsInitializeGet() * * @covers \Ibexa\Core\FieldType\Validator::getConstraintsSchema */ - public function testGetConstraintsSchema() + public function testGetConstraintsSchema(): void { $constraintsSchema = [ 'Extent' => [ @@ -72,7 +72,7 @@ public function testGetConstraintsSchema() * @covers \Ibexa\Core\FieldType\Validator::__set * @covers \Ibexa\Core\FieldType\Validator::__get */ - public function testConstraintsSetGet() + public function testConstraintsSetGet(): void { $constraints = [ 'Extent' => 'regex', @@ -82,7 +82,7 @@ public function testConstraintsSetGet() self::assertSame($constraints['Extent'], $validator->Extent); } - public function testValidateCorrectEmailAddresses() + public function testValidateCorrectEmailAddresses(): void { $validator = new EmailAddressValidator(); $validator->Extent = 'regex'; @@ -98,7 +98,7 @@ public function testValidateCorrectEmailAddresses() * * @covers \Ibexa\Core\FieldType\Validator\EmailAddressValidator::validate */ - public function testValidateWrongEmailAddresses() + public function testValidateWrongEmailAddresses(): void { $validator = new EmailAddressValidator(); $validator->Extent = 'regex'; diff --git a/tests/lib/FieldType/FieldTypeMockTest.php b/tests/lib/FieldType/FieldTypeMockTest.php index 64eb687d93..7fb93fd8c4 100644 --- a/tests/lib/FieldType/FieldTypeMockTest.php +++ b/tests/lib/FieldType/FieldTypeMockTest.php @@ -13,7 +13,7 @@ class FieldTypeMockTest extends TestCase { - public function testApplyDefaultSettingsThrowsInvalidArgumentException() + public function testApplyDefaultSettingsThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -35,7 +35,7 @@ public function testApplyDefaultSettingsThrowsInvalidArgumentException() * * @covers \Ibexa\Core\FieldType\FieldType::applyDefaultSettings */ - public function testApplyDefaultSettings($initialSettings, $expectedSettings) + public function testApplyDefaultSettings(array $initialSettings, array $expectedSettings): void { /** @var \Ibexa\Core\FieldType\FieldType|\PHPUnit\Framework\MockObject\MockObject $stub */ $stub = $this->getMockForAbstractClass( @@ -94,7 +94,7 @@ public function testApplyDefaultSettings($initialSettings, $expectedSettings) ); } - public function providerForTestApplyDefaultSettings() + public function providerForTestApplyDefaultSettings(): array { return [ [ @@ -161,7 +161,7 @@ public function providerForTestApplyDefaultSettings() ]; } - public function testApplyDefaultValidatorConfigurationEmptyThrowsInvalidArgumentException() + public function testApplyDefaultValidatorConfigurationEmptyThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -178,7 +178,7 @@ public function testApplyDefaultValidatorConfigurationEmptyThrowsInvalidArgument $stub->applyDefaultValidatorConfiguration($validatorConfiguration); } - public function testApplyDefaultValidatorConfigurationEmpty() + public function testApplyDefaultValidatorConfigurationEmpty(): void { /** @var \Ibexa\Core\FieldType\FieldType|\PHPUnit\Framework\MockObject\MockObject $stub */ $stub = $this->getMockForAbstractClass( @@ -208,7 +208,7 @@ public function testApplyDefaultValidatorConfigurationEmpty() /** * @dataProvider providerForTestApplyDefaultValidatorConfiguration */ - public function testApplyDefaultValidatorConfiguration($initialConfiguration, $expectedConfiguration) + public function testApplyDefaultValidatorConfiguration(?array $initialConfiguration, array $expectedConfiguration): void { /** @var \Ibexa\Core\FieldType\FieldType|\PHPUnit\Framework\MockObject\MockObject $stub */ $stub = $this->getMockForAbstractClass( @@ -247,7 +247,7 @@ public function testApplyDefaultValidatorConfiguration($initialConfiguration, $e ); } - public function providerForTestApplyDefaultValidatorConfiguration() + public function providerForTestApplyDefaultValidatorConfiguration(): array { $defaultConfiguration = [ 'TestValidator' => [ diff --git a/tests/lib/FieldType/FileSizeValidatorTest.php b/tests/lib/FieldType/FileSizeValidatorTest.php index 029e074202..5da70e3b3c 100644 --- a/tests/lib/FieldType/FileSizeValidatorTest.php +++ b/tests/lib/FieldType/FileSizeValidatorTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\PropertyNotFoundException; use Ibexa\Contracts\Core\Repository\Values\Translation\Message; use Ibexa\Contracts\Core\Repository\Values\Translation\Plural; +use Ibexa\Core\FieldType\BinaryFile\Value; use Ibexa\Core\FieldType\BinaryFile\Value as BinaryFileValue; use Ibexa\Core\FieldType\Validator; use Ibexa\Core\FieldType\Validator\FileSizeValidator; @@ -35,7 +36,7 @@ protected function getMaxFileSize(): int /** * This test ensure an FileSizeValidator can be created. */ - public function testConstructor() + public function testConstructor(): void { self::assertInstanceOf( Validator::class, @@ -49,7 +50,7 @@ public function testConstructor() * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints * @covers \Ibexa\Core\FieldType\Validator::__get */ - public function testConstraintsInitializeGet() + public function testConstraintsInitializeGet(): void { $constraints = [ 'maxFileSize' => 4096, @@ -66,7 +67,7 @@ public function testConstraintsInitializeGet() * * @covers \Ibexa\Core\FieldType\Validator::getConstraintsSchema */ - public function testGetConstraintsSchema() + public function testGetConstraintsSchema(): void { $constraintsSchema = [ 'maxFileSize' => [ @@ -84,7 +85,7 @@ public function testGetConstraintsSchema() * @covers \Ibexa\Core\FieldType\Validator::__set * @covers \Ibexa\Core\FieldType\Validator::__get */ - public function testConstraintsSetGet() + public function testConstraintsSetGet(): void { $constraints = [ 'maxFileSize' => 4096, @@ -99,7 +100,7 @@ public function testConstraintsSetGet() * * @covers \Ibexa\Core\FieldType\Validator::initializeWithConstraints */ - public function testInitializeBadConstraint() + public function testInitializeBadConstraint(): void { $this->expectException(PropertyNotFoundException::class); @@ -117,7 +118,7 @@ public function testInitializeBadConstraint() * * @covers \Ibexa\Core\FieldType\Validator::__set */ - public function testSetBadConstraint() + public function testSetBadConstraint(): void { $this->expectException(PropertyNotFoundException::class); @@ -130,7 +131,7 @@ public function testSetBadConstraint() * * @covers \Ibexa\Core\FieldType\Validator::__get */ - public function testGetBadConstraint() + public function testGetBadConstraint(): void { $this->expectException(PropertyNotFoundException::class); @@ -148,7 +149,7 @@ public function testGetBadConstraint() * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validate * @covers \Ibexa\Core\FieldType\Validator::getMessage */ - public function testValidateCorrectValues($size) + public function testValidateCorrectValues(int $size): void { self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $validator = new FileSizeValidator(); @@ -162,7 +163,7 @@ public function testValidateCorrectValues($size) * * @return \Ibexa\Core\FieldType\BinaryFile\Value */ - protected function getBinaryFileValue($size) + protected function getBinaryFileValue($size): Value { self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $value = new BinaryFileValue($this->createMock(IOServiceInterface::class)); @@ -171,7 +172,7 @@ protected function getBinaryFileValue($size) return $value; } - public function providerForValidateOK() + public function providerForValidateOK(): array { return [ [0], @@ -187,7 +188,7 @@ public function providerForValidateOK() * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validate */ - public function testValidateWrongValues($size, $message, $values) + public function testValidateWrongValues(int $size, array $message, array $values): void { self::markTestSkipped('BinaryFile field type does not use this validator anymore.'); $validator = new FileSizeValidator(); @@ -217,7 +218,7 @@ public function testValidateWrongValues($size, $message, $values) ); } - public function providerForValidateKO() + public function providerForValidateKO(): array { return [ [ @@ -238,7 +239,7 @@ public function providerForValidateKO() * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ - public function testValidateConstraintsCorrectValues($constraints) + public function testValidateConstraintsCorrectValues(array $constraints): void { $validator = new FileSizeValidator(); @@ -247,7 +248,7 @@ public function testValidateConstraintsCorrectValues($constraints) ); } - public function providerForValidateConstraintsOK() + public function providerForValidateConstraintsOK(): array { return [ [ @@ -267,7 +268,7 @@ public function providerForValidateConstraintsOK() * * @covers \Ibexa\Core\FieldType\Validator\FileSizeValidator::validateConstraints */ - public function testValidateConstraintsWrongValues($constraints, $expectedMessages, $values) + public function testValidateConstraintsWrongValues(array $constraints, array $expectedMessages, array $values): void { $validator = new FileSizeValidator(); $messages = $validator->validateConstraints($constraints); @@ -286,7 +287,7 @@ public function testValidateConstraintsWrongValues($constraints, $expectedMessag ); } - public function providerForValidateConstraintsKO() + public function providerForValidateConstraintsKO(): array { return [ [ diff --git a/tests/lib/FieldType/FloatTest.php b/tests/lib/FieldType/FloatTest.php index 7200b33660..0b1f0636f0 100644 --- a/tests/lib/FieldType/FloatTest.php +++ b/tests/lib/FieldType/FloatTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Float\Type; use Ibexa\Core\FieldType\Float\Type as FloatType; +use Ibexa\Core\FieldType\Float\Value; use Ibexa\Core\FieldType\Float\Value as FloatValue; use Ibexa\Core\FieldType\ValidationError; @@ -29,7 +31,7 @@ class FloatTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new FloatType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -42,7 +44,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'FloatValueValidator' => [ @@ -63,7 +65,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -73,12 +75,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Float\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new FloatValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -125,7 +127,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -190,7 +192,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -239,7 +241,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -281,7 +283,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidValidatorConfiguration() + public function provideValidValidatorConfiguration(): array { return [ [ @@ -368,7 +370,7 @@ public function provideValidValidatorConfiguration() * * @return array */ - public function provideInvalidValidatorConfiguration() + public function provideInvalidValidatorConfiguration(): array { return [ [ @@ -458,7 +460,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -539,7 +541,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/Generic/GenericTest.php b/tests/lib/FieldType/Generic/GenericTest.php index 4a8ca0ac9a..fa46ad8d8a 100644 --- a/tests/lib/FieldType/Generic/GenericTest.php +++ b/tests/lib/FieldType/Generic/GenericTest.php @@ -12,8 +12,11 @@ use Ibexa\Contracts\Core\FieldType\ValueSerializerInterface; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Tests\Core\FieldType\BaseFieldTypeTest; +use Ibexa\Tests\Core\FieldType\Generic\Stubs\Type; use Ibexa\Tests\Core\FieldType\Generic\Stubs\Type as GenericFieldTypeStub; +use Ibexa\Tests\Core\FieldType\Generic\Stubs\Value; use Ibexa\Tests\Core\FieldType\Generic\Stubs\Value as GenericFieldValueStub; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\ConstraintViolationListInterface; @@ -22,10 +25,10 @@ class GenericTest extends BaseFieldTypeTest { /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $serializer; + private ValueSerializerInterface $serializer; /** @var \Symfony\Component\Validator\Validator\ValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $validator; + private MockObject $validator; protected function setUp(): void { @@ -53,7 +56,7 @@ public function testValidateValid($fieldDefinitionData, $value): void */ public function testValidateInvalid($fieldDefinitionData, $value, $errors): void { - $constraintViolationList = new ConstraintViolationList(array_map(static function (ValidationError $error) { + $constraintViolationList = new ConstraintViolationList(array_map(static function (ValidationError $error): ConstraintViolation { return new ConstraintViolation((string) $error->getTranslatableMessage()); }, $errors)); @@ -70,7 +73,7 @@ protected function provideFieldTypeIdentifier(): string return 'generic'; } - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { return new GenericFieldTypeStub($this->serializer, $this->validator); } @@ -85,7 +88,7 @@ protected function getSettingsSchemaExpectation(): array return []; } - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new GenericFieldValueStub(); } @@ -165,7 +168,7 @@ private function createSerializerMock(): ValueSerializerInterface $serializer ->method('normalize') - ->willReturnCallback(static function (GenericFieldValueStub $value) { + ->willReturnCallback(static function (GenericFieldValueStub $value): array { return [ 'value' => $value->getValue(), ]; @@ -173,7 +176,7 @@ private function createSerializerMock(): ValueSerializerInterface $serializer ->method('denormalize') - ->willReturnCallback(function (array $data, string $valueClass) { + ->willReturnCallback(function (array $data, string $valueClass): Value { $this->assertEquals($valueClass, GenericFieldValueStub::class); return new GenericFieldValueStub($data['value']); diff --git a/tests/lib/FieldType/Generic/Stubs/Value.php b/tests/lib/FieldType/Generic/Stubs/Value.php index cda857ccb0..4540103566 100644 --- a/tests/lib/FieldType/Generic/Stubs/Value.php +++ b/tests/lib/FieldType/Generic/Stubs/Value.php @@ -24,7 +24,7 @@ public function getValue() return $this->value; } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php index f564441e91..8048a5a14e 100644 --- a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php +++ b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\FieldType\Value; use Ibexa\Core\FieldType\ValueSerializer\SymfonySerializerAdapter; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; @@ -22,19 +23,19 @@ class SymfonySerializerAdapterTest extends TestCase private const TEST_CONTEXT = ['foo' => 'bar']; /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $normalizer; + private MockObject $normalizer; /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $denomalizer; + private MockObject $denomalizer; /** @var \Symfony\Component\Serializer\Encoder\EncoderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $encoder; + private MockObject $encoder; /** @var \Symfony\Component\Serializer\Encoder\DecoderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $decoder; + private MockObject $decoder; /** @var \Ibexa\Core\FieldType\ValueSerializer\SymfonySerializerAdapter */ - private $adapter; + private SymfonySerializerAdapter $adapter; protected function setUp(): void { diff --git a/tests/lib/FieldType/ISBNTest.php b/tests/lib/FieldType/ISBNTest.php index 38cc00a5ff..f636d6ebf9 100644 --- a/tests/lib/FieldType/ISBNTest.php +++ b/tests/lib/FieldType/ISBNTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\ISBN\Type; use Ibexa\Core\FieldType\ISBN\Type as ISBN; use Ibexa\Core\FieldType\ISBN\Value as ISBNValue; use Ibexa\Core\FieldType\ValidationError; @@ -29,7 +30,7 @@ class ISBNTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new ISBN('9789722514095'); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -42,7 +43,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -52,7 +53,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'isISBN13' => [ @@ -67,7 +68,7 @@ protected function getEmptyValueExpectation(): ISBNValue return new ISBNValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -118,7 +119,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -171,7 +172,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -216,7 +217,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -245,7 +246,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -290,7 +291,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/Image/IO/LegacyTest.php b/tests/lib/FieldType/Image/IO/LegacyTest.php index 33a74ea5b1..c927fc790f 100644 --- a/tests/lib/FieldType/Image/IO/LegacyTest.php +++ b/tests/lib/FieldType/Image/IO/LegacyTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\IO\IOServiceInterface; use Ibexa\Core\IO\Values\BinaryFile; use Ibexa\Core\IO\Values\BinaryFileCreateStruct; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class LegacyTest extends TestCase @@ -26,14 +27,14 @@ class LegacyTest extends TestCase * * @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $publishedIoServiceMock; + protected MockObject $publishedIoServiceMock; /** * Internal IOService instance for draft images. * * @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $draftIoServiceMock; + protected MockObject $draftIoServiceMock; protected function setUp(): void { @@ -47,7 +48,7 @@ protected function setUp(): void ); } - public function testNewBinaryCreateStructFromLocalFile() + public function testNewBinaryCreateStructFromLocalFile(): void { $path = '/tmp/file.png'; $struct = new BinaryFileCreateStruct(); @@ -65,7 +66,7 @@ public function testNewBinaryCreateStructFromLocalFile() ); } - public function testExists() + public function testExists(): void { $path = 'path/file.png'; $this->publishedIoServiceMock @@ -84,7 +85,7 @@ public function testExists() /** * Standard binary file, with regular id. */ - public function testLoadBinaryFile() + public function testLoadBinaryFile(): void { $id = 'path/file.jpg'; $binaryFile = new BinaryFile(['id' => $id]); @@ -106,7 +107,7 @@ public function testLoadBinaryFile() /** * Load from internal draft binary file path. */ - public function testLoadBinaryFileDraftInternalPath() + public function testLoadBinaryFileDraftInternalPath(): void { $internalId = 'var/test/storage/images-versioned/path/file.jpg'; $id = 'path/file.jpg'; @@ -129,7 +130,7 @@ public function testLoadBinaryFileDraftInternalPath() /** * Load from internal published binary file path. */ - public function testLoadBinaryFilePublishedInternalPath() + public function testLoadBinaryFilePublishedInternalPath(): void { $internalId = 'var/test/storage/images/path/file.jpg'; $id = 'path/file.jpg'; @@ -152,7 +153,7 @@ public function testLoadBinaryFilePublishedInternalPath() /** * Load from external draft binary file path. */ - public function testLoadBinaryFileDraftExternalPath() + public function testLoadBinaryFileDraftExternalPath(): void { $id = 'path/file.jpg'; $binaryFile = new BinaryFile(['id' => $id]); @@ -175,7 +176,7 @@ public function testLoadBinaryFileDraftExternalPath() ); } - public function testLoadBinaryFileByUriWithPublishedFile() + public function testLoadBinaryFileByUriWithPublishedFile(): void { $binaryFileUri = 'var/test/images/an/image.png'; $binaryFile = new BinaryFile(['id' => 'an/image.png']); @@ -191,7 +192,7 @@ public function testLoadBinaryFileByUriWithPublishedFile() ); } - public function testLoadBinaryFileByUriWithDraftFile() + public function testLoadBinaryFileByUriWithDraftFile(): void { $binaryFileUri = 'var/test/images-versioned/an/image.png'; $binaryFile = new BinaryFile(['id' => 'an/image.png']); @@ -214,7 +215,7 @@ public function testLoadBinaryFileByUriWithDraftFile() ); } - public function testGetFileContents() + public function testGetFileContents(): void { $contents = 'some contents'; $path = 'path/file.png'; @@ -240,7 +241,7 @@ public function testGetFileContents() ); } - public function testGetFileContentsOfDraft() + public function testGetFileContentsOfDraft(): void { $contents = 'some contents'; $path = 'path/file.png'; @@ -266,7 +267,7 @@ public function testGetFileContentsOfDraft() ); } - public function testGetMimeType() + public function testGetMimeType(): void { $path = 'path/file.png'; $mimeType = 'image/png'; @@ -291,7 +292,7 @@ public function testGetMimeType() ); } - public function testGetMimeTypeOfDraft() + public function testGetMimeTypeOfDraft(): void { $path = 'path/file.png'; $mimeType = 'image/png'; @@ -316,7 +317,7 @@ public function testGetMimeTypeOfDraft() ); } - public function testCreateBinaryFile() + public function testCreateBinaryFile(): void { $createStruct = new BinaryFileCreateStruct(); $binaryFile = new BinaryFile(); @@ -335,7 +336,7 @@ public function testCreateBinaryFile() ); } - public function testGetUri() + public function testGetUri(): void { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock @@ -352,7 +353,7 @@ public function testGetUri() ); } - public function testGetFileInputStream() + public function testGetFileInputStream(): void { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock @@ -369,7 +370,7 @@ public function testGetFileInputStream() ); } - public function testDeleteBinaryFile() + public function testDeleteBinaryFile(): void { $binaryFile = new BinaryFile(); $this->publishedIoServiceMock @@ -382,7 +383,7 @@ public function testDeleteBinaryFile() $this->service->deleteBinaryFile($binaryFile); } - public function testNewBinaryCreateStructFromUploadedFile() + public function testNewBinaryCreateStructFromUploadedFile(): void { $struct = new BinaryFileCreateStruct(); $this->publishedIoServiceMock diff --git a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php index a9ecee1dd0..83a3c0e8d4 100644 --- a/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php +++ b/tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php @@ -22,7 +22,7 @@ class LegacyPathGeneratorTest extends TestCase * * @dataProvider provideStoragePathForFieldData */ - public function testGetStoragePathForField($data, $expectedPath) + public function testGetStoragePathForField(array $data, string $expectedPath): void { $pathGenerator = new LegacyPathGenerator(); @@ -36,7 +36,7 @@ public function testGetStoragePathForField($data, $expectedPath) ); } - public function provideStoragePathForFieldData() + public function provideStoragePathForFieldData(): array { return [ [ diff --git a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php index 60c17983ed..7870c19b41 100644 --- a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php +++ b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php @@ -23,6 +23,7 @@ use Ibexa\Core\Repository\Values\Content\VersionInfo; use Ibexa\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class AssetMapperTest extends TestCase @@ -30,19 +31,18 @@ class AssetMapperTest extends TestCase public const EXAMPLE_CONTENT_ID = 487; /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private $contentService; + private MockObject $contentService; /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private $locationService; + private MockObject $locationService; /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private $contentTypeService; + private MockObject $contentTypeService; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private ConfigResolverInterface $configResolver; - /** @var array */ - private $mappings = [ + private array $mappings = [ 'content_type_identifier' => 'image', 'content_field_identifier' => 'image', 'name_field_identifier' => 'name', diff --git a/tests/lib/FieldType/ImageAssetTest.php b/tests/lib/FieldType/ImageAssetTest.php index a85e2cbb94..4f26b0f266 100644 --- a/tests/lib/FieldType/ImageAssetTest.php +++ b/tests/lib/FieldType/ImageAssetTest.php @@ -20,7 +20,9 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\FieldType\Image\Value; use Ibexa\Core\FieldType\ImageAsset; +use Ibexa\Core\FieldType\ImageAsset\Type; use Ibexa\Core\FieldType\ValidationError; +use PHPUnit\Framework\MockObject\MockObject; /** * @group fieldType @@ -31,13 +33,13 @@ class ImageAssetTest extends FieldTypeTest private const DESTINATION_CONTENT_ID = 14; /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private $contentServiceMock; + private MockObject $contentServiceMock; /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper|\PHPUnit\Framework\MockObject\MockObject */ - private $assetMapperMock; + private MockObject $assetMapperMock; /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $contentHandlerMock; + private MockObject $contentHandlerMock; /** * {@inheritdoc} @@ -81,15 +83,15 @@ protected function setUp(): void */ protected function provideFieldTypeIdentifier(): string { - return ImageAsset\Type::FIELD_TYPE_IDENTIFIER; + return Type::FIELD_TYPE_IDENTIFIER; } /** * {@inheritdoc} */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { - return new ImageAsset\Type( + return new Type( $this->contentServiceMock, $this->assetMapperMock, $this->contentHandlerMock @@ -115,7 +117,7 @@ protected function getSettingsSchemaExpectation(): array /** * {@inheritdoc} */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): ImageAsset\Value { return new ImageAsset\Value(); } @@ -232,7 +234,7 @@ public function provideInvalidDataForValidate(): array /** * {@inheritdoc} */ - public function testValidateNonAsset() + public function testValidateNonAsset(): void { $destinationContentId = 7; $destinationContent = $this->createMock(Content::class); @@ -412,7 +414,7 @@ public function testGetName( self::assertSame($expected, $name); } - public function testIsSearchable() + public function testIsSearchable(): void { self::assertTrue($this->getFieldTypeUnderTest()->isSearchable()); } @@ -420,7 +422,7 @@ public function testIsSearchable() /** * @covers \Ibexa\Core\FieldType\Relation\Type::getRelations */ - public function testGetRelations() + public function testGetRelations(): void { $destinationContentId = 7; $fieldType = $this->createFieldTypeUnderTest(); diff --git a/tests/lib/FieldType/ImageTest.php b/tests/lib/FieldType/ImageTest.php index a15395812c..ffbcf50099 100644 --- a/tests/lib/FieldType/ImageTest.php +++ b/tests/lib/FieldType/ImageTest.php @@ -10,11 +10,14 @@ use Ibexa\Contracts\Core\IO\MimeTypeDetector; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Image\Type; use Ibexa\Core\FieldType\Image\Type as ImageType; +use Ibexa\Core\FieldType\Image\Value; use Ibexa\Core\FieldType\Image\Value as ImageValue; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator; use Ibexa\Core\FieldType\Validator\ImageValidator; +use PHPUnit\Framework\MockObject\MockObject; /** * @group fieldType @@ -66,7 +69,7 @@ protected function getMimeTypeDetectorMock() * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new ImageType( [ @@ -80,7 +83,7 @@ protected function createFieldTypeUnderTest() return $fieldType; } - private function getBlackListValidatorMock() + private function getBlackListValidatorMock(): MockObject { return $this ->getMockBuilder(FileExtensionBlackListValidator::class) @@ -91,7 +94,7 @@ private function getBlackListValidatorMock() ->getMock(); } - private function getImageValidatorMock() + private function getImageValidatorMock(): MockObject { return $this ->getMockBuilder(ImageValidator::class) @@ -99,7 +102,7 @@ private function getImageValidatorMock() ->getMock(); } - private function getConfigResolverMock() + private function getConfigResolverMock(): MockObject { $configResolver = $this ->createMock(ConfigResolverInterface::class); @@ -117,7 +120,7 @@ private function getConfigResolverMock() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'FileSizeValidator' => [ @@ -140,7 +143,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'mimeTypes' => [ @@ -155,12 +158,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Image\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new ImageValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -237,7 +240,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -333,7 +336,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -432,7 +435,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -566,7 +569,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -654,7 +657,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ 'file is too large' => [ diff --git a/tests/lib/FieldType/IntegerTest.php b/tests/lib/FieldType/IntegerTest.php index b9c73b56b5..4fa979132a 100644 --- a/tests/lib/FieldType/IntegerTest.php +++ b/tests/lib/FieldType/IntegerTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Integer\Type; use Ibexa\Core\FieldType\Integer\Type as Integer; +use Ibexa\Core\FieldType\Integer\Value; use Ibexa\Core\FieldType\Integer\Value as IntegerValue; use Ibexa\Core\FieldType\ValidationError; @@ -29,7 +31,7 @@ class IntegerTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Integer(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -42,7 +44,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'IntegerValueValidator' => [ @@ -63,7 +65,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -71,12 +73,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new IntegerValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -123,7 +125,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -180,7 +182,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -229,7 +231,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -271,7 +273,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidValidatorConfiguration() + public function provideValidValidatorConfiguration(): array { return [ [ @@ -358,7 +360,7 @@ public function provideValidValidatorConfiguration() * * @return array */ - public function provideInvalidValidatorConfiguration() + public function provideInvalidValidatorConfiguration(): array { return [ [ @@ -448,7 +450,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -529,7 +531,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/KeywordTest.php b/tests/lib/FieldType/KeywordTest.php index 953b08311a..95eee21529 100644 --- a/tests/lib/FieldType/KeywordTest.php +++ b/tests/lib/FieldType/KeywordTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Keyword\Type; use Ibexa\Core\FieldType\Keyword\Type as KeywordType; +use Ibexa\Core\FieldType\Keyword\Value; use Ibexa\Core\FieldType\Keyword\Value as KeywordValue; /** @@ -28,7 +30,7 @@ class KeywordTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new KeywordType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -41,7 +43,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -51,7 +53,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -59,12 +61,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new KeywordValue([]); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -103,7 +105,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -164,7 +166,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -213,7 +215,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ diff --git a/tests/lib/FieldType/MapLocationTest.php b/tests/lib/FieldType/MapLocationTest.php index 52ff1a046c..4ef9c9abe2 100644 --- a/tests/lib/FieldType/MapLocationTest.php +++ b/tests/lib/FieldType/MapLocationTest.php @@ -8,7 +8,8 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; -use Ibexa\Core\FieldType\MapLocation; +use Ibexa\Core\FieldType\MapLocation\Type; +use Ibexa\Core\FieldType\MapLocation\Value; class MapLocationTest extends FieldTypeTest { @@ -23,9 +24,9 @@ class MapLocationTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { - $fieldType = new MapLocation\Type(); + $fieldType = new Type(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); return $fieldType; @@ -36,7 +37,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -46,7 +47,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -54,12 +55,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { - return new MapLocation\Value(); + return new Value(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -67,7 +68,7 @@ public function provideInvalidInputForAcceptValue() InvalidArgumentException::class, ], [ - new MapLocation\Value( + new Value( [ 'latitude' => 'foo', ] @@ -75,7 +76,7 @@ public function provideInvalidInputForAcceptValue() InvalidArgumentException::class, ], [ - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 'bar', @@ -84,7 +85,7 @@ public function provideInvalidInputForAcceptValue() InvalidArgumentException::class, ], [ - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, @@ -125,20 +126,20 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ null, - new MapLocation\Value(), + new Value(), ], [ [], - new MapLocation\Value(), + new Value(), ], [ - new MapLocation\Value(), - new MapLocation\Value(), + new Value(), + new Value(), ], [ [ @@ -146,7 +147,7 @@ public function provideValidInputForAcceptValue() 'longitude' => 42.23, 'address' => 'Nowhere', ], - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, @@ -160,7 +161,7 @@ public function provideValidInputForAcceptValue() 'longitude' => 42, 'address' => 'Somewhere', ], - new MapLocation\Value( + new Value( [ 'latitude' => 23, 'longitude' => 42, @@ -169,14 +170,14 @@ public function provideValidInputForAcceptValue() ), ], [ - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, 'address' => 'Nowhere', ] ), - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, @@ -222,15 +223,15 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ - new MapLocation\Value(), + new Value(), null, ], [ - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, @@ -283,12 +284,12 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ null, - new MapLocation\Value(), + new Value(), ], [ [ @@ -296,7 +297,7 @@ public function provideInputForFromHash() 'longitude' => 42.23, 'address' => 'Nowhere', ], - new MapLocation\Value( + new Value( [ 'latitude' => 23.42, 'longitude' => 42.23, @@ -316,7 +317,7 @@ public function provideDataForGetName(): array { return [ [$this->getEmptyValueExpectation(), '', [], 'en_GB'], - [new MapLocation\Value(['address' => 'Bag End, The Shire']), 'Bag End, The Shire', [], 'en_GB'], + [new Value(['address' => 'Bag End, The Shire']), 'Bag End, The Shire', [], 'en_GB'], ]; } } diff --git a/tests/lib/FieldType/MediaTest.php b/tests/lib/FieldType/MediaTest.php index 5933628d7a..b029c8e5a7 100644 --- a/tests/lib/FieldType/MediaTest.php +++ b/tests/lib/FieldType/MediaTest.php @@ -9,7 +9,9 @@ use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\FieldType\BinaryFile\Value as BinaryFileValue; +use Ibexa\Core\FieldType\Media\Type; use Ibexa\Core\FieldType\Media\Type as MediaType; +use Ibexa\Core\FieldType\Media\Value; use Ibexa\Core\FieldType\Media\Value as MediaValue; use Ibexa\Core\FieldType\ValidationError; @@ -30,7 +32,7 @@ class MediaTest extends BinaryBaseTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new MediaType([$this->getBlackListValidatorMock()]); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -38,12 +40,12 @@ protected function createFieldTypeUnderTest() return $fieldType; } - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new MediaValue(); } - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'mediaType' => [ @@ -53,7 +55,7 @@ protected function getSettingsSchemaExpectation() ]; } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { $baseInput = parent::provideInvalidInputForAcceptValue(); $binaryFileInput = [ @@ -86,7 +88,7 @@ public function provideInvalidInputForAcceptValue() return array_merge($baseInput, $binaryFileInput); } - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -320,7 +322,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -490,7 +492,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -605,7 +607,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -647,7 +649,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -687,7 +689,7 @@ public function provideDataForGetName(): array ]; } - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -711,7 +713,7 @@ public function provideValidDataForValidate() ]; } - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ // File is too large diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index d452daec28..879fadd0da 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -17,6 +17,7 @@ use Ibexa\Core\FieldType\RelationList\Value; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\Repository\Validator\TargetContentValidatorInterface; +use PHPUnit\Framework\MockObject\MockObject; class RelationListTest extends FieldTypeTest { @@ -24,10 +25,10 @@ class RelationListTest extends FieldTypeTest private const DESTINATION_CONTENT_ID_22 = 22; /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private $contentHandler; + private MockObject $contentHandler; /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $targetContentValidator; + private MockObject $targetContentValidator; protected function setUp(): void { @@ -107,7 +108,7 @@ protected function createFieldTypeUnderTest(): RelationList * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return [ 'RelationListValueValidator' => [ @@ -124,7 +125,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'selectionMethod' => [ @@ -151,13 +152,13 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\RelationList\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { // @todo FIXME: Is this correct? return new Value(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -196,7 +197,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -253,7 +254,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -302,7 +303,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -338,7 +339,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -424,7 +425,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -488,7 +489,7 @@ public function provideInValidFieldSettings() * * @return array */ - public function provideValidValidatorConfiguration() + public function provideValidValidatorConfiguration(): array { return [ [ @@ -553,7 +554,7 @@ public function provideValidValidatorConfiguration() * * @return array */ - public function provideInvalidValidatorConfiguration() + public function provideInvalidValidatorConfiguration(): array { return [ [ @@ -630,7 +631,7 @@ public function provideInvalidValidatorConfiguration() * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -740,7 +741,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ @@ -839,7 +840,7 @@ private function generateContentTypeValidationError(string $contentTypeIdentifie /** * @covers \Ibexa\Core\FieldType\Relation\Type::getRelations */ - public function testGetRelations() + public function testGetRelations(): void { $ft = $this->createFieldTypeUnderTest(); self::assertEquals( diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index 54a149a8a1..78761a860d 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -14,19 +14,21 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Relation; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Relation\Type; use Ibexa\Core\FieldType\Relation\Type as RelationType; use Ibexa\Core\FieldType\Relation\Value; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\Repository\Validator\TargetContentValidatorInterface; +use PHPUnit\Framework\MockObject\MockObject; class RelationTest extends FieldTypeTest { private const DESTINATION_CONTENT_ID = 14; - private $contentHandler; + private MockObject $contentHandler; /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $targetContentValidator; + private MockObject $targetContentValidator; protected function setUp(): void { @@ -73,7 +75,7 @@ protected function setUp(): void * * @return \Ibexa\Core\FieldType\Relation\Type */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new RelationType( $this->contentHandler, @@ -89,7 +91,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -99,7 +101,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'selectionMethod' => [ @@ -126,12 +128,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Relation\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new Value(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -170,7 +172,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -223,7 +225,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -272,7 +274,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -308,7 +310,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -349,7 +351,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -380,7 +382,7 @@ public function provideInValidFieldSettings() /** * @covers \Ibexa\Core\FieldType\Relation\Type::getRelations */ - public function testGetRelations() + public function testGetRelations(): void { $ft = $this->createFieldTypeUnderTest(); self::assertEquals( diff --git a/tests/lib/FieldType/SelectionTest.php b/tests/lib/FieldType/SelectionTest.php index 7b05fc327e..ffdd78faaf 100644 --- a/tests/lib/FieldType/SelectionTest.php +++ b/tests/lib/FieldType/SelectionTest.php @@ -9,7 +9,9 @@ use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Selection\Type; use Ibexa\Core\FieldType\Selection\Type as Selection; +use Ibexa\Core\FieldType\Selection\Value; use Ibexa\Core\FieldType\Selection\Value as SelectionValue; use Ibexa\Core\FieldType\ValidationError; @@ -30,7 +32,7 @@ class SelectionTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Selection(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -43,7 +45,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -53,7 +55,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'isMultiple' => [ @@ -76,12 +78,12 @@ protected function getSettingsSchemaExpectation() * * @return \Ibexa\Core\FieldType\Selection\Value */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new SelectionValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -124,7 +126,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -181,7 +183,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -230,7 +232,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -266,7 +268,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -310,7 +312,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ @@ -432,7 +434,7 @@ public function provideDataForGetName(): array * * @return array */ - public function provideValidDataForValidate() + public function provideValidDataForValidate(): array { return [ [ @@ -555,7 +557,7 @@ public function provideValidDataForValidate() * * @return array */ - public function provideInvalidDataForValidate() + public function provideInvalidDataForValidate(): array { return [ [ diff --git a/tests/lib/FieldType/TimeTest.php b/tests/lib/FieldType/TimeTest.php index c7cf1c510d..615de5fdf9 100644 --- a/tests/lib/FieldType/TimeTest.php +++ b/tests/lib/FieldType/TimeTest.php @@ -9,7 +9,9 @@ use DateTime; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Time\Type; use Ibexa\Core\FieldType\Time\Type as Time; +use Ibexa\Core\FieldType\Time\Value; use Ibexa\Core\FieldType\Time\Value as TimeValue; /** @@ -29,7 +31,7 @@ class TimeTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new Time(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -42,7 +44,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -52,7 +54,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ 'useSeconds' => [ @@ -69,12 +71,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new TimeValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -113,7 +115,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { $dateTime = new DateTime(); // change timezone to UTC (+00:00) to be able to calculate proper TimeValue @@ -191,7 +193,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -244,7 +246,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -284,7 +286,7 @@ public function provideInputForFromHash() * * @return array */ - public function provideValidFieldSettings() + public function provideValidFieldSettings(): array { return [ [ @@ -328,7 +330,7 @@ public function provideValidFieldSettings() * * @return array */ - public function provideInValidFieldSettings() + public function provideInValidFieldSettings(): array { return [ [ diff --git a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php index d5a1db5a68..d353888e91 100644 --- a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php +++ b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php @@ -21,7 +21,7 @@ class DoctrineStorageTest extends TestCase /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::getIdUrlMap */ - public function testGetIdUrlMap() + public function testGetIdUrlMap(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); @@ -41,7 +41,7 @@ public function testGetIdUrlMap() /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::getUrlIdMap */ - public function testGetUrlIdMap() + public function testGetUrlIdMap(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); @@ -65,7 +65,7 @@ public function testGetUrlIdMap() /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::insertUrl */ - public function testInsertUrl() + public function testInsertUrl(): void { $gateway = $this->getStorageGateway(); @@ -111,7 +111,7 @@ public function testInsertUrl() /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::linkUrl */ - public function testLinkUrl() + public function testLinkUrl(): void { $gateway = $this->getStorageGateway(); @@ -148,7 +148,7 @@ public function testLinkUrl() /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::unlinkUrl */ - public function testUnlinkUrl() + public function testUnlinkUrl(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); diff --git a/tests/lib/FieldType/Url/UrlStorageTest.php b/tests/lib/FieldType/Url/UrlStorageTest.php index 9d8c0c9857..a6d01df0ac 100644 --- a/tests/lib/FieldType/Url/UrlStorageTest.php +++ b/tests/lib/FieldType/Url/UrlStorageTest.php @@ -12,12 +12,13 @@ use Ibexa\Contracts\Core\Persistence\Content\FieldValue; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\Url\UrlStorage; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; class UrlStorageTest extends TestCase { - public function testStoreFieldDataWithExistingUrl() + public function testStoreFieldDataWithExistingUrl(): void { $versionInfo = new VersionInfo(['versionNo' => 24]); $fieldValue = new FieldValue(['externalData' => 'http://ibexa.co']); @@ -51,7 +52,7 @@ public function testStoreFieldDataWithExistingUrl() self::assertEquals(12, $field->value->data['urlId']); } - public function testStoreFieldDataWithNewUrl() + public function testStoreFieldDataWithNewUrl(): void { $versionInfo = new VersionInfo(['versionNo' => 24]); $fieldValue = new FieldValue(['externalData' => 'http://ibexa.co']); @@ -91,7 +92,7 @@ public function testStoreFieldDataWithNewUrl() self::assertEquals(12, $field->value->data['urlId']); } - public function testStoreFieldDataWithEmptyUrl() + public function testStoreFieldDataWithEmptyUrl(): void { $versionInfo = new VersionInfo(['versionNo' => 24]); $fieldValue = new FieldValue(['externalData' => '']); @@ -121,7 +122,7 @@ public function testStoreFieldDataWithEmptyUrl() self::assertNull($field->value->data); } - public function testGetFieldData() + public function testGetFieldData(): void { $versionInfo = new VersionInfo(); $fieldValue = new FieldValue(['data' => ['urlId' => 12]]); @@ -140,7 +141,7 @@ public function testGetFieldData() self::assertEquals('http://ibexa.co', $field->value->externalData); } - public function testGetFieldDataNotFound() + public function testGetFieldDataNotFound(): void { $versionInfo = new VersionInfo(); $fieldValue = new FieldValue(['data' => ['urlId' => 12]]); @@ -165,7 +166,7 @@ public function testGetFieldDataNotFound() self::assertEquals('', $field->value->externalData); } - public function testGetFieldDataWithEmptyUrlId() + public function testGetFieldDataWithEmptyUrlId(): void { $versionInfo = new VersionInfo(); $fieldValue = new FieldValue(['data' => ['urlId' => null]]); @@ -187,7 +188,7 @@ public function testGetFieldDataWithEmptyUrlId() self::assertNull($field->value->externalData); } - public function testDeleteFieldData() + public function testDeleteFieldData(): void { $versionInfo = new VersionInfo(['versionNo' => 24]); $fieldIds = [12, 23, 34]; @@ -204,7 +205,7 @@ public function testDeleteFieldData() $storage->deleteFieldData($versionInfo, $fieldIds); } - public function testHasFieldData() + public function testHasFieldData(): void { $storage = $this->getPartlyMockedStorage($this->getGatewayMock()); @@ -216,7 +217,7 @@ public function testHasFieldData() * * @return \Ibexa\Core\FieldType\Url\UrlStorage|\PHPUnit\Framework\MockObject\MockObject */ - protected function getPartlyMockedStorage(StorageGatewayInterface $gateway) + protected function getPartlyMockedStorage(StorageGatewayInterface $gateway): MockObject { return $this->getMockBuilder(UrlStorage::class) ->setMethods(null) @@ -230,7 +231,7 @@ protected function getPartlyMockedStorage(StorageGatewayInterface $gateway) } /** @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $loggerMock; + protected ?MockObject $loggerMock = null; /** * @return \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject @@ -247,7 +248,7 @@ protected function getLoggerMock() } /** @var \Ibexa\Core\FieldType\Url\UrlStorage\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * @return \Ibexa\Core\FieldType\Url\UrlStorage\Gateway|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/lib/FieldType/UrlTest.php b/tests/lib/FieldType/UrlTest.php index 40de5967cd..8021af715d 100644 --- a/tests/lib/FieldType/UrlTest.php +++ b/tests/lib/FieldType/UrlTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; +use Ibexa\Core\FieldType\Url\Type; use Ibexa\Core\FieldType\Url\Type as UrlType; +use Ibexa\Core\FieldType\Url\Value; use Ibexa\Core\FieldType\Url\Value as UrlValue; /** @@ -28,7 +30,7 @@ class UrlTest extends FieldTypeTest * * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest() + protected function createFieldTypeUnderTest(): Type { $fieldType = new UrlType(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -41,7 +43,7 @@ protected function createFieldTypeUnderTest() * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return []; } @@ -51,7 +53,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return []; } @@ -59,12 +61,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new UrlValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -107,7 +109,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -160,7 +162,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { return [ [ @@ -219,7 +221,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ diff --git a/tests/lib/FieldType/UserTest.php b/tests/lib/FieldType/UserTest.php index eddebb1ef4..1737511d7d 100644 --- a/tests/lib/FieldType/UserTest.php +++ b/tests/lib/FieldType/UserTest.php @@ -16,6 +16,7 @@ use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\FieldType\User\Type; use Ibexa\Core\FieldType\User\Type as UserType; +use Ibexa\Core\FieldType\User\Value; use Ibexa\Core\FieldType\User\Value as UserValue; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\Persistence\Cache\UserHandler; @@ -61,7 +62,7 @@ protected function createFieldTypeUnderTest(): UserType * * @return array */ - protected function getValidatorConfigurationSchemaExpectation() + protected function getValidatorConfigurationSchemaExpectation(): array { return (new UserValidatorConfigurationSchemaProvider()) ->getExpectedValidatorConfigurationSchema(); @@ -72,7 +73,7 @@ protected function getValidatorConfigurationSchemaExpectation() * * @return array */ - protected function getSettingsSchemaExpectation() + protected function getSettingsSchemaExpectation(): array { return [ UserType::PASSWORD_TTL_SETTING => [ @@ -97,12 +98,12 @@ protected function getSettingsSchemaExpectation() /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation() + protected function getEmptyValueExpectation(): Value { return new UserValue(); } - public function provideInvalidInputForAcceptValue() + public function provideInvalidInputForAcceptValue(): array { return [ [ @@ -141,7 +142,7 @@ public function provideInvalidInputForAcceptValue() * * @return array */ - public function provideValidInputForAcceptValue() + public function provideValidInputForAcceptValue(): array { return [ [ @@ -224,7 +225,7 @@ public function provideValidInputForAcceptValue() * * @return array */ - public function provideInputForToHash() + public function provideInputForToHash(): array { $passwordUpdatedAt = new DateTimeImmutable(); @@ -292,7 +293,7 @@ public function provideInputForToHash() * * @return array */ - public function provideInputForFromHash() + public function provideInputForFromHash(): array { return [ [ @@ -688,7 +689,7 @@ public function providerForTestValidate(): array 'email' ), ], - static function (InvocationMocker $loadByLoginInvocationMocker) { + static function (InvocationMocker $loadByLoginInvocationMocker): void { $loadByLoginInvocationMocker->willThrowException( new NotFoundException('user', 'user') ); @@ -716,7 +717,7 @@ static function (InvocationMocker $loadByLoginInvocationMocker) { 'username' ), ], - function (InvocationMocker $loadByLoginInvocationMocker) { + function (InvocationMocker $loadByLoginInvocationMocker): void { $loadByLoginInvocationMocker->willReturn( $this->createMock(UserValue::class) ); diff --git a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php index e7d07f3481..8a830b4786 100644 --- a/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php +++ b/tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php @@ -18,19 +18,20 @@ use Ibexa\Core\Repository\Permission\PermissionResolver; use Ibexa\Core\Repository\Repository; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class SudoMainLocationLoaderTest extends TestCase { /** @var \Ibexa\Core\Helper\ContentInfoLocationLoader\SudoMainLocationLoader */ - private $loader; + private SudoMainLocationLoader $loader; protected function setUp(): void { $this->loader = new SudoMainLocationLoader($this->getRepositoryMock()); } - public function testLoadLocationNoMainLocation() + public function testLoadLocationNoMainLocation(): void { $this->expectException(NotFoundException::class); @@ -43,7 +44,7 @@ public function testLoadLocationNoMainLocation() $this->loader->loadLocation($contentInfo); } - public function testLoadLocation() + public function testLoadLocation(): void { $contentInfo = new ContentInfo(['mainLocationId' => 42]); $location = new Location(); @@ -67,7 +68,7 @@ public function testLoadLocation() self::assertSame($location, $this->loader->loadLocation($contentInfo)); } - public function testLoadLocationError() + public function testLoadLocationError(): void { $this->expectException(NotFoundException::class); @@ -139,7 +140,7 @@ private function getLocationServiceMock() /** * @return \Ibexa\Core\Repository\Permission\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private function getPermissionResolverMock() + private function getPermissionResolverMock(): MockObject { $configResolverMock = $this->createMock(ConfigResolverInterface::class); $configResolverMock diff --git a/tests/lib/Helper/ContentPreviewHelperTest.php b/tests/lib/Helper/ContentPreviewHelperTest.php index 59afe15726..14f630f877 100644 --- a/tests/lib/Helper/ContentPreviewHelperTest.php +++ b/tests/lib/Helper/ContentPreviewHelperTest.php @@ -14,19 +14,20 @@ use Ibexa\Core\MVC\Symfony\MVCEvents; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; class ContentPreviewHelperTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $eventDispatcher; + private MockObject $eventDispatcher; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessRouter; + private MockObject $siteAccessRouter; /** @var \Ibexa\Core\Helper\ContentPreviewHelper */ - private $previewHelper; + private ContentPreviewHelper $previewHelper; protected function setUp(): void { @@ -36,7 +37,7 @@ protected function setUp(): void $this->previewHelper = new ContentPreviewHelper($this->eventDispatcher, $this->siteAccessRouter); } - public function testChangeConfigScope() + public function testChangeConfigScope(): void { $newSiteAccessName = 'test'; $newSiteAccess = new SiteAccess($newSiteAccessName); @@ -61,7 +62,7 @@ public function testChangeConfigScope() ); } - public function testRestoreConfigScope() + public function testRestoreConfigScope(): void { $originalSiteAccess = new SiteAccess('foo', 'bar'); $event = new ScopeChangeEvent($originalSiteAccess); @@ -77,7 +78,7 @@ public function testRestoreConfigScope() ); } - public function testPreviewActive() + public function testPreviewActive(): void { $originalSiteAccess = new SiteAccess('foo', 'bar'); $this->previewHelper->setSiteAccess($originalSiteAccess); @@ -91,7 +92,7 @@ public function testPreviewActive() self::assertNotSame($originalSiteAccess, $this->previewHelper->getOriginalSiteAccess()); } - public function testPreviewedContent() + public function testPreviewedContent(): void { self::assertNull($this->previewHelper->getPreviewedContent()); $content = $this->createMock(APIContent::class); @@ -99,7 +100,7 @@ public function testPreviewedContent() self::assertSame($content, $this->previewHelper->getPreviewedContent()); } - public function testPreviewedLocation() + public function testPreviewedLocation(): void { self::assertNull($this->previewHelper->getPreviewedLocation()); $location = $this->createMock(APILocation::class); diff --git a/tests/lib/Helper/FieldHelperTest.php b/tests/lib/Helper/FieldHelperTest.php index 02de654da1..7794833f27 100644 --- a/tests/lib/Helper/FieldHelperTest.php +++ b/tests/lib/Helper/FieldHelperTest.php @@ -18,18 +18,19 @@ use Ibexa\Core\Helper\FieldHelper; use Ibexa\Core\Helper\TranslationHelper; use Ibexa\Core\Repository\Values\ContentType\FieldType; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class FieldHelperTest extends TestCase { /** @var \Ibexa\Core\Helper\FieldHelper */ - private $fieldHelper; + private FieldHelper $fieldHelper; /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private $fieldTypeServiceMock; + private MockObject $fieldTypeServiceMock; /** @var \Ibexa\Core\Helper\TranslationHelper|\PHPUnit\Framework\MockObject\MockObject */ - private $translationHelper; + private MockObject $translationHelper; protected function setUp(): void { @@ -39,7 +40,7 @@ protected function setUp(): void $this->fieldHelper = new FieldHelper($this->translationHelper, $this->fieldTypeServiceMock); } - public function testIsFieldEmpty() + public function testIsFieldEmpty(): void { $contentTypeId = 123; $contentInfo = new ContentInfo(['contentTypeId' => $contentTypeId]); @@ -85,7 +86,7 @@ public function testIsFieldEmpty() self::assertTrue($this->fieldHelper->isFieldEmpty($content, $fieldDefIdentifier)); } - public function testIsFieldNotEmpty() + public function testIsFieldNotEmpty(): void { $contentTypeId = 123; $contentInfo = new ContentInfo(['contentTypeId' => $contentTypeId]); diff --git a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php index ad5e3f82db..45aa3b5523 100644 --- a/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php +++ b/tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php @@ -27,7 +27,7 @@ class ArrayTranslatorFieldsGroupsListTest extends TestCase private const DEFAULT_GROUP_ID = self::SECOND_GROUP_ID; private const DEFAULT_GROUP_NAME = self::SECOND_GROUP_NAME; - private $translatorMock; + private ?MockObject $translatorMock = null; public function testTranslatesGroups(): void { diff --git a/tests/lib/Helper/PreviewLocationProviderTest.php b/tests/lib/Helper/PreviewLocationProviderTest.php index 2db4957a3e..30c18fddd2 100644 --- a/tests/lib/Helper/PreviewLocationProviderTest.php +++ b/tests/lib/Helper/PreviewLocationProviderTest.php @@ -15,18 +15,19 @@ use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class PreviewLocationProviderTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private $locationService; + private MockObject $locationService; /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationHandler; + private MockObject $locationHandler; /** @var \Ibexa\Core\Helper\PreviewLocationProvider */ - private $provider; + private PreviewLocationProvider $provider; protected function setUp(): void { @@ -37,7 +38,7 @@ protected function setUp(): void $this->provider = new PreviewLocationProvider($this->locationService, $this->locationHandler); } - public function testGetPreviewLocationDraft() + public function testGetPreviewLocationDraft(): void { $contentId = 123; $parentLocationId = 456; @@ -60,7 +61,7 @@ public function testGetPreviewLocationDraft() self::assertEquals($parentLocationId, $location->parentLocationId); } - public function testGetPreviewLocation() + public function testGetPreviewLocation(): void { $contentId = 123; $locationId = 456; @@ -84,7 +85,7 @@ public function testGetPreviewLocation() self::assertSame($content, $location->getContent()); } - public function testGetPreviewLocationNoLocation() + public function testGetPreviewLocationNoLocation(): void { $contentId = 123; $content = $this->getContentMock($contentId); diff --git a/tests/lib/Helper/TranslationHelperTest.php b/tests/lib/Helper/TranslationHelperTest.php index 54bbf4f1a6..a44b1fa213 100644 --- a/tests/lib/Helper/TranslationHelperTest.php +++ b/tests/lib/Helper/TranslationHelperTest.php @@ -14,30 +14,31 @@ use Ibexa\Core\Helper\TranslationHelper; use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; class TranslationHelperTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private MockObject $contentService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $logger; + private MockObject $logger; /** @var \Ibexa\Core\Helper\TranslationHelper */ - private $translationHelper; + private TranslationHelper $translationHelper; - private $siteAccessByLanguages; + private array $siteAccessByLanguages; /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Field[] */ - private $translatedFields; + private array $translatedFields; /** @var string[] */ - private $translatedNames; + private array $translatedNames; protected function setUp(): void { @@ -74,7 +75,7 @@ protected function setUp(): void /** * @return \Ibexa\Core\Repository\Values\Content\Content */ - private function generateContent() + private function generateContent(): Content { return new Content( [ @@ -87,7 +88,7 @@ private function generateContent() /** * @return \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo */ - private function generateVersionInfo() + private function generateVersionInfo(): VersionInfo { return new VersionInfo( [ @@ -103,7 +104,7 @@ private function generateVersionInfo() * @param array $prioritizedLanguages * @param string $expectedLocale */ - public function testGetTranslatedName(array $prioritizedLanguages, $expectedLocale) + public function testGetTranslatedName(array $prioritizedLanguages, string $expectedLocale): void { $content = $this->generateContent(); $this->configResolver @@ -121,7 +122,7 @@ public function testGetTranslatedName(array $prioritizedLanguages, $expectedLoca * @param array $prioritizedLanguages * @param string $expectedLocale */ - public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, $expectedLocale) + public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, string $expectedLocale): void { $versionInfo = $this->generateVersionInfo(); $contentInfo = new ContentInfo(['id' => 123]); @@ -140,7 +141,7 @@ public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, self::assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo)); } - public function getTranslatedNameProvider() + public function getTranslatedNameProvider(): array { return [ [['fre-FR', 'eng-GB'], 'fre-FR'], @@ -151,7 +152,7 @@ public function getTranslatedNameProvider() ]; } - public function testGetTranslatedNameByContentInfoForcedLanguage() + public function testGetTranslatedNameByContentInfoForcedLanguage(): void { $versionInfo = $this->generateVersionInfo(); $contentInfo = new ContentInfo(['id' => 123]); @@ -169,7 +170,7 @@ public function testGetTranslatedNameByContentInfoForcedLanguage() self::assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-US')); } - public function testGetTranslatedNameByContentInfoForcedLanguageMainLanguage() + public function testGetTranslatedNameByContentInfoForcedLanguageMainLanguage(): void { $name = 'Name in main language'; $mainLanguage = 'eng-GB'; @@ -194,7 +195,7 @@ public function testGetTranslatedNameByContentInfoForcedLanguageMainLanguage() ); } - public function testGetTranslatedNameForcedLanguage() + public function testGetTranslatedNameForcedLanguage(): void { $content = $this->generateContent(); $this->configResolver @@ -211,7 +212,7 @@ public function testGetTranslatedNameForcedLanguage() * @param array $prioritizedLanguages * @param string $expectedLocale */ - public function getTranslatedField(array $prioritizedLanguages, $expectedLocale) + public function getTranslatedField(array $prioritizedLanguages, string $expectedLocale): void { $content = $this->generateContent(); $this->configResolver @@ -223,7 +224,7 @@ public function getTranslatedField(array $prioritizedLanguages, $expectedLocale) self::assertSame($this->translatedFields[$expectedLocale], $this->translationHelper->getTranslatedField($content, 'test')); } - public function getTranslatedFieldProvider() + public function getTranslatedFieldProvider(): array { return [ [['fre-FR', 'eng-GB'], 'fre-FR'], @@ -234,7 +235,7 @@ public function getTranslatedFieldProvider() ]; } - public function testGetTranslationSiteAccessUnkownLanguage() + public function testGetTranslationSiteAccessUnkownLanguage(): void { $this->configResolver ->expects(self::exactly(2)) @@ -258,7 +259,7 @@ public function testGetTranslationSiteAccessUnkownLanguage() /** * @dataProvider getTranslationSiteAccessProvider */ - public function testGetTranslationSiteAccess($language, array $translationSiteAccesses, array $relatedSiteAccesses, $expectedResult) + public function testGetTranslationSiteAccess(string $language, array $translationSiteAccesses, array $relatedSiteAccesses, ?string $expectedResult): void { $this->configResolver ->expects(self::exactly(2)) @@ -275,7 +276,7 @@ public function testGetTranslationSiteAccess($language, array $translationSiteAc self::assertSame($expectedResult, $this->translationHelper->getTranslationSiteAccess($language)); } - public function getTranslationSiteAccessProvider() + public function getTranslationSiteAccessProvider(): array { return [ ['eng-GB', ['fre', 'eng', 'heb'], ['esl', 'fre', 'eng', 'heb'], 'eng'], @@ -293,7 +294,7 @@ public function getTranslationSiteAccessProvider() ]; } - public function testGetAvailableLanguagesWithTranslationSiteAccesses() + public function testGetAvailableLanguagesWithTranslationSiteAccesses(): void { $this->configResolver ->expects(self::any()) @@ -314,7 +315,7 @@ public function testGetAvailableLanguagesWithTranslationSiteAccesses() self::assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages()); } - public function testGetAvailableLanguagesWithoutTranslationSiteAccesses() + public function testGetAvailableLanguagesWithoutTranslationSiteAccesses(): void { $this->configResolver ->expects(self::any()) diff --git a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php index 8b3e0b1fb6..781b4a4b3b 100644 --- a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php +++ b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\IO\Values\BinaryFile; use Ibexa\Core\IO\Values\BinaryFileCreateStruct; use Ibexa\Core\MVC\Symfony\Event\ScopeChangeEvent; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class ConfigScopeChangeAwareIOServiceTest extends TestCase @@ -25,10 +26,10 @@ final class ConfigScopeChangeAwareIOServiceTest extends TestCase protected $ioService; /** @var \Ibexa\Core\IO\ConfigScopeChangeAwareIOService|\PHPUnit\Framework\MockObject\MockObject */ - protected $innerIOService; + protected MockObject $innerIOService; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $configResolver; + protected MockObject $configResolver; protected function setUp(): void { diff --git a/tests/lib/IO/FilePathNormalizer/FlysystemTest.php b/tests/lib/IO/FilePathNormalizer/FlysystemTest.php index 35e933257c..ad8698e538 100644 --- a/tests/lib/IO/FilePathNormalizer/FlysystemTest.php +++ b/tests/lib/IO/FilePathNormalizer/FlysystemTest.php @@ -11,15 +11,16 @@ use Ibexa\Core\IO\FilePathNormalizer\Flysystem; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; use League\Flysystem\WhitespacePathNormalizer; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class FlysystemTest extends TestCase { /** @var \Ibexa\Core\IO\FilePathNormalizer\Flysystem */ - private $filePathNormalizer; + private Flysystem $filePathNormalizer; /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter|\PHPUnit\Framework\MockObject\MockObject */ - private $slugConverter; + private MockObject $slugConverter; public function setUp(): void { diff --git a/tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php b/tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php index 98e0aad30f..bfdd74e17e 100644 --- a/tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php +++ b/tests/lib/IO/Flysystem/Adapter/DynamicPathFilesystemAdapterDecoratorTest.php @@ -376,7 +376,7 @@ private function createFileAttributesPathMock(string $path): MockObject /** * @param string|int $returnValue */ - private function createFileAttributesMock(string $methodName, $returnValue): MockObject + private function createFileAttributesMock(string $methodName, int|string $returnValue): MockObject { $fileAttributesMock = $this->createMock(FileAttributes::class); $fileAttributesMock diff --git a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php index e09f9f9bbe..a29316c89b 100644 --- a/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOBinarydataHandler/FlysystemTest.php @@ -59,7 +59,7 @@ public function testCreate(): void $this->handler->create($spiBinaryFileCreateStruct); } - public function testDelete() + public function testDelete(): void { $this->filesystem ->expects(self::once()) diff --git a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php index 88ae2c8324..e607f2d634 100644 --- a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php @@ -12,20 +12,22 @@ use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct as SPIBinaryFileCreateStruct; use Ibexa\Core\IO\Exception\BinaryFileNotFoundException; use Ibexa\Core\IO\IOMetadataHandler\Flysystem; +use League\Flysystem\FilesystemOperator; use League\Flysystem\UnableToRetrieveMetadata; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class FlysystemTest extends TestCase { /** @var \Ibexa\Core\IO\IOMetadataHandler|\PHPUnit\Framework\MockObject\MockObject */ - private $handler; + private Flysystem $handler; /** @var \League\Flysystem\FilesystemOperator|\PHPUnit\Framework\MockObject\MockObject */ - private $filesystem; + private MockObject $filesystem; protected function setUp(): void { - $this->filesystem = $this->createMock(\League\Flysystem\FilesystemOperator::class); + $this->filesystem = $this->createMock(FilesystemOperator::class); $this->handler = new Flysystem($this->filesystem); } @@ -63,7 +65,7 @@ public function testCreate(): void self::assertEquals($expectedSpiBinaryFile, $spiBinaryFile); } - public function testDelete() + public function testDelete(): void { $this->filesystem->expects(self::never())->method('delete'); $this->handler->delete('prefix/my/file.png'); diff --git a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php index e32feed3ef..9951407284 100644 --- a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php +++ b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php @@ -18,21 +18,22 @@ use Ibexa\Core\IO\Exception\BinaryFileNotFoundException; use Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster; use Ibexa\Core\IO\UrlDecorator; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class LegacyDFSClusterTest extends TestCase { /** @var \Ibexa\Core\IO\IOMetadataHandler&\PHPUnit\Framework\MockObject\MockObject */ - private $handler; + private LegacyDFSCluster $handler; /** @var \Doctrine\DBAL\Connection&\PHPUnit\Framework\MockObject\MockObject */ - private $dbalMock; + private MockObject $dbalMock; /** @var \Doctrine\DBAL\Query\QueryBuilder&\PHPUnit\Framework\MockObject\MockObject */ - private $qbMock; + private MockObject $qbMock; /** @var \Ibexa\Core\IO\UrlDecorator&\PHPUnit\Framework\MockObject\MockObject */ - private $urlDecoratorMock; + private MockObject $urlDecoratorMock; protected function setUp(): void { @@ -66,7 +67,7 @@ public function providerCreate(): iterable /** * @dataProvider providerCreate */ - public function testCreate(string $id, string $mimeType, int $size, \DateTime $mtime, \DateTime $mtimeExpected): void + public function testCreate(string $id, string $mimeType, int $size, DateTime $mtime, DateTime $mtimeExpected): void { $this->dbalMock ->expects(self::once()) @@ -200,7 +201,7 @@ public function testDeletedirectory(): void /** * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function createDbalStatementMock() + protected function createDbalStatementMock(): MockObject { return $this->createMock(Statement::class); } diff --git a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php index 8bf1beac7b..c91fa82b53 100644 --- a/tests/lib/IO/MimeTypeDetector/FileInfoTest.php +++ b/tests/lib/IO/MimeTypeDetector/FileInfoTest.php @@ -25,7 +25,7 @@ protected function getFixture(): string return __DIR__ . '/../../_fixtures/squirrel-developers.jpg'; } - public function testGetFromPath() + public function testGetFromPath(): void { self::assertEquals( $this->mimeTypeDetector->getFromPath( @@ -35,7 +35,7 @@ public function testGetFromPath() ); } - public function testGetFromBuffer() + public function testGetFromBuffer(): void { self::assertEquals( $this->mimeTypeDetector->getFromBuffer( diff --git a/tests/lib/IO/UrlDecorator/PrefixTest.php b/tests/lib/IO/UrlDecorator/PrefixTest.php index 90b32f4561..f23bede3dd 100644 --- a/tests/lib/IO/UrlDecorator/PrefixTest.php +++ b/tests/lib/IO/UrlDecorator/PrefixTest.php @@ -18,7 +18,7 @@ class PrefixTest extends TestCase /** * @dataProvider provideData */ - public function testDecorate($url, $prefix, $decoratedUrl) + public function testDecorate(string $url, string $prefix, string $decoratedUrl): void { $decorator = $this->buildDecorator($prefix); @@ -31,7 +31,7 @@ public function testDecorate($url, $prefix, $decoratedUrl) /** * @dataProvider provideData */ - public function testUndecorate($url, $prefix, $decoratedUrl) + public function testUndecorate(string $url, string $prefix, string $decoratedUrl): void { $decorator = $this->buildDecorator($prefix); @@ -51,7 +51,7 @@ protected function buildDecorator(string $prefix): UrlDecorator return new Prefix($ioConfigResolverMock); } - public function provideData() + public function provideData(): array { return [ [ diff --git a/tests/lib/IO/UrlRedecoratorTest.php b/tests/lib/IO/UrlRedecoratorTest.php index 45ede2b84b..8213190490 100644 --- a/tests/lib/IO/UrlRedecoratorTest.php +++ b/tests/lib/IO/UrlRedecoratorTest.php @@ -9,18 +9,19 @@ use Ibexa\Core\IO\UrlDecorator; use Ibexa\Core\IO\UrlRedecorator; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class UrlRedecoratorTest extends TestCase { /** @var \Ibexa\Core\IO\UrlRedecorator|\PHPUnit\Framework\MockObject\MockObject */ - private $redecorator; + private UrlRedecorator $redecorator; /** @var \Ibexa\Core\IO\UrlDecorator|\PHPUnit\Framework\MockObject\MockObject */ - private $sourceDecoratorMock; + private ?MockObject $sourceDecoratorMock = null; /** @var \Ibexa\Core\IO\UrlDecorator|\PHPUnit\Framework\MockObject\MockObject */ - private $targetDecoratorMock; + private ?MockObject $targetDecoratorMock = null; protected function setUp(): void { @@ -30,7 +31,7 @@ protected function setUp(): void ); } - public function testRedecorateFromSource() + public function testRedecorateFromSource(): void { $this->sourceDecoratorMock ->expects(self::once()) @@ -50,7 +51,7 @@ public function testRedecorateFromSource() ); } - public function testRedecorateFromTarget() + public function testRedecorateFromTarget(): void { $this->targetDecoratorMock ->expects(self::once()) diff --git a/tests/lib/Limitation/Base.php b/tests/lib/Limitation/Base.php index be8b5d3153..9f1ec7a8dc 100644 --- a/tests/lib/Limitation/Base.php +++ b/tests/lib/Limitation/Base.php @@ -9,15 +9,16 @@ use Ibexa\Contracts\Core\Persistence\Handler as SPIHandler; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class Base extends TestCase { /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $persistenceHandlerMock; + private ?MockObject $persistenceHandlerMock = null; /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|\PHPUnit\Framework\MockObject\MockObject */ - private $userMock; + private ?MockObject $userMock = null; /** * @param array $mockMethods For specifying the methods to mock, all by default diff --git a/tests/lib/Limitation/BlockingLimitationTypeTest.php b/tests/lib/Limitation/BlockingLimitationTypeTest.php index fedcabed5b..1004c1ed13 100644 --- a/tests/lib/Limitation/BlockingLimitationTypeTest.php +++ b/tests/lib/Limitation/BlockingLimitationTypeTest.php @@ -27,7 +27,7 @@ class BlockingLimitationTypeTest extends Base /** * @return \Ibexa\Core\Limitation\BlockingLimitationType */ - public function testConstruct() + public function testConstruct(): BlockingLimitationType { return new BlockingLimitationType('Test'); } @@ -35,7 +35,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new BlockingLimitation('Test', [])], @@ -51,7 +51,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation * @param \Ibexa\Core\Limitation\BlockingLimitationType $limitationType */ - public function testAcceptValue(BlockingLimitation $limitation, BlockingLimitationType $limitationType) + public function testAcceptValue(BlockingLimitation $limitation, BlockingLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -59,7 +59,7 @@ public function testAcceptValue(BlockingLimitation $limitation, BlockingLimitati /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -74,7 +74,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\BlockingLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, BlockingLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, BlockingLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -84,7 +84,7 @@ public function testAcceptValueException(Limitation $limitation, BlockingLimitat /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new BlockingLimitation('Test', ['limitationValues' => ['ezjscore::call']])], @@ -97,7 +97,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation */ - public function testValidatePass(BlockingLimitation $limitation) + public function testValidatePass(BlockingLimitation $limitation): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -109,7 +109,7 @@ public function testValidatePass(BlockingLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new BlockingLimitation('Test', []), 1], @@ -124,7 +124,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation * @param int $errorCount */ - public function testValidateError(BlockingLimitation $limitation, $errorCount) + public function testValidateError(BlockingLimitation $limitation, int $errorCount): void { $this->getPersistenceMock() ->expects(self::never()) @@ -142,7 +142,7 @@ public function testValidateError(BlockingLimitation $limitation, $errorCount) * * @param \Ibexa\Core\Limitation\BlockingLimitationType $limitationType */ - public function testBuildValue(BlockingLimitationType $limitationType) + public function testBuildValue(BlockingLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -155,7 +155,7 @@ public function testBuildValue(BlockingLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ // ContentInfo, no access @@ -198,7 +198,7 @@ public function testEvaluate( BlockingLimitation $limitation, ValueObject $object, array $targets - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -225,7 +225,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -244,7 +244,7 @@ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, array $targets - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -274,7 +274,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\BlockingLimitationType $limitationType */ - public function testGetCriterion(BlockingLimitationType $limitationType) + public function testGetCriterion(BlockingLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new BlockingLimitation('Test', []), @@ -291,7 +291,7 @@ public function testGetCriterion(BlockingLimitationType $limitationType) * * @param \Ibexa\Core\Limitation\BlockingLimitationType $limitationType */ - public function testValueSchema(BlockingLimitationType $limitationType) + public function testValueSchema(BlockingLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); diff --git a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php index 6fb780eff5..74c847a0ec 100644 --- a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php @@ -24,6 +24,7 @@ use Ibexa\Core\Limitation\ContentTypeLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -31,7 +32,7 @@ class ContentTypeLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $contentTypeHandlerMock; + private MockObject $contentTypeHandlerMock; /** * Setup Location Handler mock. @@ -54,7 +55,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\ContentTypeLimitationType */ - public function testConstruct() + public function testConstruct(): ContentTypeLimitationType { return new ContentTypeLimitationType($this->getPersistenceMock()); } @@ -62,7 +63,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new ContentTypeLimitation()], @@ -79,7 +80,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation $limitation * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testAcceptValue(ContentTypeLimitation $limitation, ContentTypeLimitationType $limitationType) + public function testAcceptValue(ContentTypeLimitation $limitation, ContentTypeLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -87,7 +88,7 @@ public function testAcceptValue(ContentTypeLimitation $limitation, ContentTypeLi /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -103,7 +104,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, ContentTypeLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, ContentTypeLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -113,7 +114,7 @@ public function testAcceptValueException(Limitation $limitation, ContentTypeLimi /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new ContentTypeLimitation()], @@ -127,7 +128,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation $limitation */ - public function testValidatePass(ContentTypeLimitation $limitation) + public function testValidatePass(ContentTypeLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -153,7 +154,7 @@ public function testValidatePass(ContentTypeLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new ContentTypeLimitation(), 0], @@ -168,7 +169,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation $limitation * @param int $errorCount */ - public function testValidateError(ContentTypeLimitation $limitation, $errorCount) + public function testValidateError(ContentTypeLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -201,7 +202,7 @@ public function testValidateError(ContentTypeLimitation $limitation, $errorCount * * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testBuildValue(ContentTypeLimitationType $limitationType) + public function testBuildValue(ContentTypeLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -214,7 +215,7 @@ public function testBuildValue(ContentTypeLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); @@ -312,7 +313,7 @@ public function testEvaluate( ValueObject $object, array $targets, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -340,7 +341,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -365,7 +366,7 @@ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, array $targets - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -395,7 +396,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testGetCriterionInvalidValue(ContentTypeLimitationType $limitationType) + public function testGetCriterionInvalidValue(ContentTypeLimitationType $limitationType): void { $this->expectException(\RuntimeException::class); @@ -410,7 +411,7 @@ public function testGetCriterionInvalidValue(ContentTypeLimitationType $limitati * * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testGetCriterionSingleValue(ContentTypeLimitationType $limitationType) + public function testGetCriterionSingleValue(ContentTypeLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new ContentTypeLimitation(['limitationValues' => [9]]), @@ -429,7 +430,7 @@ public function testGetCriterionSingleValue(ContentTypeLimitationType $limitatio * * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testGetCriterionMultipleValues(ContentTypeLimitationType $limitationType) + public function testGetCriterionMultipleValues(ContentTypeLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new ContentTypeLimitation(['limitationValues' => [9, 55]]), @@ -448,7 +449,7 @@ public function testGetCriterionMultipleValues(ContentTypeLimitationType $limita * * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType */ - public function testValueSchema(ContentTypeLimitationType $limitationType) + public function testValueSchema(ContentTypeLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); diff --git a/tests/lib/Limitation/LocationLimitationTypeTest.php b/tests/lib/Limitation/LocationLimitationTypeTest.php index 82186c4dfd..4fa8e3b5ab 100644 --- a/tests/lib/Limitation/LocationLimitationTypeTest.php +++ b/tests/lib/Limitation/LocationLimitationTypeTest.php @@ -23,6 +23,7 @@ use Ibexa\Core\Limitation\LocationLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -30,7 +31,7 @@ class LocationLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationHandlerMock; + private MockObject $locationHandlerMock; /** * Setup Location Handler mock. @@ -53,7 +54,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\LocationLimitationType */ - public function testConstruct() + public function testConstruct(): LocationLimitationType { return new LocationLimitationType($this->getPersistenceMock()); } @@ -61,7 +62,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new LocationLimitation()], @@ -78,7 +79,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation $limitation * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testAcceptValue(LocationLimitation $limitation, LocationLimitationType $limitationType) + public function testAcceptValue(LocationLimitation $limitation, LocationLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -86,7 +87,7 @@ public function testAcceptValue(LocationLimitation $limitation, LocationLimitati /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -102,7 +103,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, LocationLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, LocationLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -112,7 +113,7 @@ public function testAcceptValueException(Limitation $limitation, LocationLimitat /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new LocationLimitation()], @@ -126,7 +127,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation $limitation */ - public function testValidatePass(LocationLimitation $limitation) + public function testValidatePass(LocationLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -152,7 +153,7 @@ public function testValidatePass(LocationLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new LocationLimitation(), 0], @@ -167,7 +168,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\LocationLimitation $limitation * @param int $errorCount */ - public function testValidateError(LocationLimitation $limitation, $errorCount) + public function testValidateError(LocationLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -200,7 +201,7 @@ public function testValidateError(LocationLimitation $limitation, $errorCount) * * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testBuildValue(LocationLimitationType $limitationType) + public function testBuildValue(LocationLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -213,7 +214,7 @@ public function testBuildValue(LocationLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); @@ -345,7 +346,7 @@ public function testEvaluate( $targets, array $persistenceLocations, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -386,7 +387,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -426,9 +427,9 @@ public function providerForTestEvaluateInvalidArgument() public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, - $targets, + ?array $targets, array $persistenceLocations - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -458,7 +459,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testGetCriterionInvalidValue(LocationLimitationType $limitationType) + public function testGetCriterionInvalidValue(LocationLimitationType $limitationType): void { $this->expectException(\RuntimeException::class); @@ -473,7 +474,7 @@ public function testGetCriterionInvalidValue(LocationLimitationType $limitationT * * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testGetCriterionSingleValue(LocationLimitationType $limitationType) + public function testGetCriterionSingleValue(LocationLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new LocationLimitation(['limitationValues' => [9]]), @@ -492,7 +493,7 @@ public function testGetCriterionSingleValue(LocationLimitationType $limitationTy * * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testGetCriterionMultipleValues(LocationLimitationType $limitationType) + public function testGetCriterionMultipleValues(LocationLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new LocationLimitation(['limitationValues' => [9, 55]]), @@ -511,7 +512,7 @@ public function testGetCriterionMultipleValues(LocationLimitationType $limitatio * * @param \Ibexa\Core\Limitation\LocationLimitationType $limitationType */ - public function testValueSchema(LocationLimitationType $limitationType) + public function testValueSchema(LocationLimitationType $limitationType): void { self::assertEquals( LocationLimitationType::VALUE_SCHEMA_LOCATION_ID, diff --git a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php index 73fb5aabf1..23cb7d6be6 100644 --- a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php @@ -21,6 +21,7 @@ use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\VersionInfo; use Ibexa\Core\Repository\Values\ObjectState\ObjectState; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -28,7 +29,7 @@ class NewObjectStateLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $objectStateHandlerMock; + private MockObject $objectStateHandlerMock; /** * Setup Handler mock. @@ -51,7 +52,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\NewObjectStateLimitationType */ - public function testConstruct() + public function testConstruct(): NewObjectStateLimitationType { return new NewObjectStateLimitationType($this->getPersistenceMock()); } @@ -59,7 +60,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new NewObjectStateLimitation()], @@ -76,7 +77,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation $limitation * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType */ - public function testAcceptValue(NewObjectStateLimitation $limitation, NewObjectStateLimitationType $limitationType) + public function testAcceptValue(NewObjectStateLimitation $limitation, NewObjectStateLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -84,7 +85,7 @@ public function testAcceptValue(NewObjectStateLimitation $limitation, NewObjectS /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -100,7 +101,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, NewObjectStateLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, NewObjectStateLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -110,7 +111,7 @@ public function testAcceptValueException(Limitation $limitation, NewObjectStateL /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new NewObjectStateLimitation()], @@ -124,7 +125,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation $limitation */ - public function testValidatePass(NewObjectStateLimitation $limitation) + public function testValidatePass(NewObjectStateLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -150,7 +151,7 @@ public function testValidatePass(NewObjectStateLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new NewObjectStateLimitation(), 0], @@ -165,7 +166,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation $limitation * @param int $errorCount */ - public function testValidateError(NewObjectStateLimitation $limitation, $errorCount) + public function testValidateError(NewObjectStateLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -198,7 +199,7 @@ public function testValidateError(NewObjectStateLimitation $limitation, $errorCo * * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType */ - public function testBuildValue(NewObjectStateLimitationType $limitationType) + public function testBuildValue(NewObjectStateLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -211,7 +212,7 @@ public function testBuildValue(NewObjectStateLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ // ContentInfo, no access @@ -267,7 +268,7 @@ public function testEvaluate( ValueObject $object, array $targets, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -295,7 +296,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -326,7 +327,7 @@ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, array $targets - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -356,7 +357,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType */ - public function testGetCriterion(NewObjectStateLimitationType $limitationType) + public function testGetCriterion(NewObjectStateLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); @@ -371,7 +372,7 @@ public function testGetCriterion(NewObjectStateLimitationType $limitationType) * * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType */ - public function testValueSchema(NewObjectStateLimitationType $limitationType) + public function testValueSchema(NewObjectStateLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); diff --git a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php index 341498cf3a..90e9e98702 100644 --- a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Limitation\ObjectStateLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -25,13 +26,13 @@ class ObjectStateLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $objectStateHandlerMock; + private MockObject $objectStateHandlerMock; /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group[] */ - private $allObjectStateGroups; + private array $allObjectStateGroups; /** @var array */ - private $loadObjectStatesMap; + private array $loadObjectStatesMap; /** * Setup Handler mock. @@ -78,7 +79,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\ObjectStateLimitationType */ - public function testConstruct() + public function testConstruct(): ObjectStateLimitationType { return new ObjectStateLimitationType($this->getPersistenceMock()); } @@ -153,8 +154,8 @@ public function providerForTestEvaluate(): array public function testEvaluate( ObjectStateLimitation $limitation, ValueObject $object, - $expected - ) { + bool $expected + ): void { $getContentStateMap = [ [ 1, @@ -212,7 +213,7 @@ public function testEvaluate( * * @param \Ibexa\Core\Limitation\ObjectStateLimitationType $limitationType */ - public function testGetCriterionInvalidValue(ObjectStateLimitationType $limitationType) + public function testGetCriterionInvalidValue(ObjectStateLimitationType $limitationType): void { $this->expectException(\RuntimeException::class); @@ -227,7 +228,7 @@ public function testGetCriterionInvalidValue(ObjectStateLimitationType $limitati * * @param \Ibexa\Core\Limitation\ObjectStateLimitationType $limitationType */ - public function testGetCriterionSingleValue(ObjectStateLimitationType $limitationType) + public function testGetCriterionSingleValue(ObjectStateLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new ObjectStateLimitation(['limitationValues' => [2]]), @@ -241,7 +242,7 @@ public function testGetCriterionSingleValue(ObjectStateLimitationType $limitatio self::assertEquals([2], $criterion->value); } - public function testGetCriterionMultipleValuesFromSingleGroup() + public function testGetCriterionMultipleValuesFromSingleGroup(): void { $this->getPersistenceMock() ->method('objectStateHandler') @@ -270,7 +271,7 @@ public function testGetCriterionMultipleValuesFromSingleGroup() self::assertEquals([1, 2], $criterion->value); } - public function testGetCriterionMultipleValuesFromMultipleGroups() + public function testGetCriterionMultipleValuesFromMultipleGroups(): void { $this->getPersistenceMock() ->method('objectStateHandler') diff --git a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php index 28393bdd5f..419467a03e 100644 --- a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php @@ -25,6 +25,7 @@ use Ibexa\Core\Limitation\ParentContentTypeLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -32,13 +33,13 @@ class ParentContentTypeLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationHandlerMock; + private MockObject $locationHandlerMock; /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $contentTypeHandlerMock; + private MockObject $contentTypeHandlerMock; /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $contentHandlerMock; + private MockObject $contentHandlerMock; /** * Setup Location Handler mock. @@ -65,7 +66,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\ParentContentTypeLimitationType */ - public function testConstruct() + public function testConstruct(): ParentContentTypeLimitationType { return new ParentContentTypeLimitationType($this->getPersistenceMock()); } @@ -73,7 +74,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new ParentContentTypeLimitation()], @@ -90,7 +91,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation $limitation * @param \Ibexa\Core\Limitation\ParentContentTypeLimitationType $limitationType */ - public function testAcceptValue(ParentContentTypeLimitation $limitation, ParentContentTypeLimitationType $limitationType) + public function testAcceptValue(ParentContentTypeLimitation $limitation, ParentContentTypeLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -98,7 +99,7 @@ public function testAcceptValue(ParentContentTypeLimitation $limitation, ParentC /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -115,7 +116,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\ParentContentTypeLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, ParentContentTypeLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, ParentContentTypeLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -125,7 +126,7 @@ public function testAcceptValueException(Limitation $limitation, ParentContentTy /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new ParentContentTypeLimitation()], @@ -139,7 +140,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation $limitation */ - public function testValidatePass(ParentContentTypeLimitation $limitation) + public function testValidatePass(ParentContentTypeLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -166,7 +167,7 @@ public function testValidatePass(ParentContentTypeLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new ParentContentTypeLimitation(), 0], @@ -181,7 +182,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentContentTypeLimitation $limitation * @param int $errorCount */ - public function testValidateError(ParentContentTypeLimitation $limitation, $errorCount) + public function testValidateError(ParentContentTypeLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -214,7 +215,7 @@ public function testValidateError(ParentContentTypeLimitation $limitation, $erro * * @param \Ibexa\Core\Limitation\ParentContentTypeLimitationType $limitationType */ - public function testBuildValue(ParentContentTypeLimitationType $limitationType) + public function testBuildValue(ParentContentTypeLimitationType $limitationType): void { $expected = ['test', 'test' => '1']; $value = $limitationType->buildValue($expected); @@ -224,7 +225,7 @@ public function testBuildValue(ParentContentTypeLimitationType $limitationType) self::assertEquals($expected, $value->limitationValues); } - protected function getTestEvaluateContentMock() + protected function getTestEvaluateContentMock(): MockObject { $contentMock = $this->createMock(APIContent::class); @@ -236,7 +237,7 @@ protected function getTestEvaluateContentMock() return $contentMock; } - protected function getTestEvaluateVersionInfoMock() + protected function getTestEvaluateVersionInfoMock(): MockObject { $versionInfoMock = $this->createMock(APIVersionInfo::class); @@ -251,7 +252,7 @@ protected function getTestEvaluateVersionInfoMock() /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ // ContentInfo, with API targets, no access @@ -447,7 +448,7 @@ public function providerForTestEvaluate() ]; } - protected function assertContentHandlerExpectations($callNo, $persistenceCalled, $contentId, $contentInfo) + protected function assertContentHandlerExpectations(int $callNo, $persistenceCalled, $contentId, $contentInfo) { $this->getPersistenceMock() ->expects(self::at($callNo + ($persistenceCalled ? 1 : 0))) @@ -467,10 +468,10 @@ protected function assertContentHandlerExpectations($callNo, $persistenceCalled, public function testEvaluate( ParentContentTypeLimitation $limitation, ValueObject $object, - $targets, + ?array $targets, array $persistence, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -572,7 +573,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -609,7 +610,7 @@ public function providerForTestEvaluateInvalidArgument() /** * @dataProvider providerForTestEvaluateInvalidArgument */ - public function testEvaluateInvalidArgument(Limitation $limitation, ValueObject $object, $targets) + public function testEvaluateInvalidArgument(Limitation $limitation, ValueObject $object, ?array $targets): void { $this->expectException(InvalidArgumentException::class); @@ -639,7 +640,7 @@ public function testEvaluateInvalidArgument(Limitation $limitation, ValueObject * * @param \Ibexa\Core\Limitation\ParentContentTypeLimitationType $limitationType */ - public function testGetCriterionInvalidValue(ParentContentTypeLimitationType $limitationType) + public function testGetCriterionInvalidValue(ParentContentTypeLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); @@ -654,7 +655,7 @@ public function testGetCriterionInvalidValue(ParentContentTypeLimitationType $li * * @param \Ibexa\Core\Limitation\ParentContentTypeLimitationType $limitationType */ - public function testValueSchema(ParentContentTypeLimitationType $limitationType) + public function testValueSchema(ParentContentTypeLimitationType $limitationType): void { self::markTestIncomplete('Method is not implemented yet: ' . __METHOD__); } diff --git a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php index 6015d56b0e..58b07f8e8b 100644 --- a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php @@ -20,6 +20,7 @@ use Ibexa\Core\Limitation\ParentDepthLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -27,7 +28,7 @@ class ParentDepthLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationHandlerMock; + private MockObject $locationHandlerMock; /** * Setup Location Handler mock. @@ -50,7 +51,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\ParentDepthLimitationType */ - public function testConstruct() + public function testConstruct(): ParentDepthLimitationType { return new ParentDepthLimitationType($this->getPersistenceMock()); } @@ -58,7 +59,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new ParentDepthLimitation()], @@ -75,7 +76,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation $limitation * @param \Ibexa\Core\Limitation\ParentDepthLimitationType $limitationType */ - public function testAcceptValue(ParentDepthLimitation $limitation, ParentDepthLimitationType $limitationType) + public function testAcceptValue(ParentDepthLimitation $limitation, ParentDepthLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -83,7 +84,7 @@ public function testAcceptValue(ParentDepthLimitation $limitation, ParentDepthLi /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -99,7 +100,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\ParentDepthLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, ParentDepthLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, ParentDepthLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -109,7 +110,7 @@ public function testAcceptValueException(Limitation $limitation, ParentDepthLimi /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new ParentDepthLimitation()], @@ -125,7 +126,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ParentDepthLimitation $limitation */ - public function testValidatePass(ParentDepthLimitation $limitation, ParentDepthLimitationType $limitationType) + public function testValidatePass(ParentDepthLimitation $limitation, ParentDepthLimitationType $limitationType): void { $validationErrors = $limitationType->validate($limitation); self::assertEmpty($validationErrors); @@ -136,7 +137,7 @@ public function testValidatePass(ParentDepthLimitation $limitation, ParentDepthL * * @param \Ibexa\Core\Limitation\ParentDepthLimitationType $limitationType */ - public function testBuildValue(ParentDepthLimitationType $limitationType) + public function testBuildValue(ParentDepthLimitationType $limitationType): void { $expected = [2, 7]; $value = $limitationType->buildValue($expected); @@ -152,7 +153,7 @@ public function testBuildValue(ParentDepthLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); @@ -285,10 +286,10 @@ public function providerForTestEvaluate() public function testEvaluate( ParentDepthLimitation $limitation, ValueObject $object, - $targets, + ?array $targets, array $persistenceLocations, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -346,7 +347,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -386,9 +387,9 @@ public function providerForTestEvaluateInvalidArgument() public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, - $targets, + ?array $targets, array $persistenceLocations - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance diff --git a/tests/lib/Limitation/RoleLimitationTypeTest.php b/tests/lib/Limitation/RoleLimitationTypeTest.php index ea6035ea61..07273e52dd 100644 --- a/tests/lib/Limitation/RoleLimitationTypeTest.php +++ b/tests/lib/Limitation/RoleLimitationTypeTest.php @@ -157,7 +157,7 @@ public function testValidateError(UserRoleLimitation $limitation, int $errorCoun self::assertCount($errorCount, $validationErrors); } - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [ @@ -204,7 +204,7 @@ public function testEvaluate( self::assertEquals($expected, $value); } - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ 'valid_role_limitation' => [ diff --git a/tests/lib/Limitation/SectionLimitationTypeTest.php b/tests/lib/Limitation/SectionLimitationTypeTest.php index fdb938866d..9e48acf8ff 100644 --- a/tests/lib/Limitation/SectionLimitationTypeTest.php +++ b/tests/lib/Limitation/SectionLimitationTypeTest.php @@ -26,6 +26,7 @@ use Ibexa\Core\Limitation\SectionLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -33,7 +34,7 @@ class SectionLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Section\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $sectionHandlerMock; + private MockObject $sectionHandlerMock; /** * Setup Location Handler mock. @@ -56,7 +57,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\SectionLimitationType */ - public function testConstruct() + public function testConstruct(): SectionLimitationType { return new SectionLimitationType($this->getPersistenceMock()); } @@ -64,7 +65,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new SectionLimitation()], @@ -81,7 +82,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation $limitation * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testAcceptValue(SectionLimitation $limitation, SectionLimitationType $limitationType) + public function testAcceptValue(SectionLimitation $limitation, SectionLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -89,7 +90,7 @@ public function testAcceptValue(SectionLimitation $limitation, SectionLimitation /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -108,7 +109,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, SectionLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, SectionLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -118,7 +119,7 @@ public function testAcceptValueException(Limitation $limitation, SectionLimitati /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new SectionLimitation()], @@ -132,7 +133,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation $limitation */ - public function testValidatePass(SectionLimitation $limitation) + public function testValidatePass(SectionLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -163,7 +164,7 @@ public function testValidatePass(SectionLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new SectionLimitation(), 0], @@ -178,7 +179,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation $limitation * @param int $errorCount */ - public function testValidateError(SectionLimitation $limitation, $errorCount) + public function testValidateError(SectionLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -211,7 +212,7 @@ public function testValidateError(SectionLimitation $limitation, $errorCount) * * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testBuildValue(SectionLimitationType $limitationType) + public function testBuildValue(SectionLimitationType $limitationType): void { $expected = ['test', 'test' => '33']; $value = $limitationType->buildValue($expected); @@ -224,7 +225,7 @@ public function testBuildValue(SectionLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); @@ -355,9 +356,9 @@ public function providerForTestEvaluate() public function testEvaluate( SectionLimitation $limitation, ValueObject $object, - $targets, + ?array $targets, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -383,7 +384,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -401,8 +402,8 @@ public function providerForTestEvaluateInvalidArgument() public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, - $targets - ) { + ?array $targets + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -431,7 +432,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testGetCriterionInvalidValue(SectionLimitationType $limitationType) + public function testGetCriterionInvalidValue(SectionLimitationType $limitationType): void { $this->expectException(\RuntimeException::class); @@ -446,7 +447,7 @@ public function testGetCriterionInvalidValue(SectionLimitationType $limitationTy * * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testGetCriterionSingleValue(SectionLimitationType $limitationType) + public function testGetCriterionSingleValue(SectionLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new SectionLimitation(['limitationValues' => ['9']]), @@ -465,7 +466,7 @@ public function testGetCriterionSingleValue(SectionLimitationType $limitationTyp * * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testGetCriterionMultipleValues(SectionLimitationType $limitationType) + public function testGetCriterionMultipleValues(SectionLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new SectionLimitation(['limitationValues' => ['9', '55']]), @@ -484,7 +485,7 @@ public function testGetCriterionMultipleValues(SectionLimitationType $limitation * * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType */ - public function testValueSchema(SectionLimitationType $limitationType) + public function testValueSchema(SectionLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); diff --git a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php index 2996a4f4a5..05d3d2d713 100644 --- a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php +++ b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php @@ -15,6 +15,7 @@ use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Limitation\SiteAccessLimitationType; use Ibexa\Core\MVC\Symfony\SiteAccess; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -22,7 +23,7 @@ class SiteAccessLimitationTypeTest extends Base { /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessServiceMock; + private MockObject $siteAccessServiceMock; protected function setUp(): void { @@ -40,7 +41,7 @@ protected function setUp(): void /** * @return \Ibexa\Core\Limitation\SiteAccessLimitationType */ - public function testConstruct() + public function testConstruct(): SiteAccessLimitationType { return new SiteAccessLimitationType( $this->siteAccessServiceMock @@ -50,7 +51,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new SiteAccessLimitation()], @@ -88,7 +89,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SiteAccessLimitation $limitation * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testAcceptValue(SiteAccessLimitation $limitation, SiteAccessLimitationType $limitationType) + public function testAcceptValue(SiteAccessLimitation $limitation, SiteAccessLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -96,7 +97,7 @@ public function testAcceptValue(SiteAccessLimitation $limitation, SiteAccessLimi /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -112,7 +113,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, SiteAccessLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, SiteAccessLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -122,7 +123,7 @@ public function testAcceptValueException(Limitation $limitation, SiteAccessLimit /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new SiteAccessLimitation(), 0], @@ -171,7 +172,7 @@ public function providerForTestValidateError() * @param int $errorCount * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testValidateError(SiteAccessLimitation $limitation, $errorCount, SiteAccessLimitationType $limitationType) + public function testValidateError(SiteAccessLimitation $limitation, int $errorCount, SiteAccessLimitationType $limitationType): void { $validationErrors = $limitationType->validate($limitation); self::assertCount($errorCount, $validationErrors); @@ -182,7 +183,7 @@ public function testValidateError(SiteAccessLimitation $limitation, $errorCount, * * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testBuildValue(SiteAccessLimitationType $limitationType) + public function testBuildValue(SiteAccessLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -195,7 +196,7 @@ public function testBuildValue(SiteAccessLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ // SiteAccess, no access @@ -229,7 +230,7 @@ public function testEvaluate( ValueObject $object, $expected, SiteAccessLimitationType $limitationType - ) { + ): void { $userMock = $this->getUserMock(); $userMock->expects(self::never())->method(self::anything()); @@ -246,7 +247,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -271,7 +272,7 @@ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, SiteAccessLimitationType $limitationType - ) { + ): void { $this->expectException(InvalidArgumentException::class); $userMock = $this->getUserMock(); @@ -289,7 +290,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testGetCriterion(SiteAccessLimitationType $limitationType) + public function testGetCriterion(SiteAccessLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); @@ -301,7 +302,7 @@ public function testGetCriterion(SiteAccessLimitationType $limitationType) * * @param \Ibexa\Core\Limitation\SiteAccessLimitationType $limitationType */ - public function testValueSchema(SiteAccessLimitationType $limitationType) + public function testValueSchema(SiteAccessLimitationType $limitationType): void { self::markTestSkipped('Method valueSchema() is not implemented'); } diff --git a/tests/lib/Limitation/StatusLimitationTypeTest.php b/tests/lib/Limitation/StatusLimitationTypeTest.php index 5960d445b3..e855bf3aa1 100644 --- a/tests/lib/Limitation/StatusLimitationTypeTest.php +++ b/tests/lib/Limitation/StatusLimitationTypeTest.php @@ -19,6 +19,7 @@ use Ibexa\Core\Limitation\StatusLimitationType; use Ibexa\Core\Repository\Values\Content\VersionInfo; use Ibexa\Core\Repository\Values\User\User; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -28,7 +29,7 @@ class StatusLimitationTypeTest extends Base /** * @return \Ibexa\Core\Limitation\StatusLimitationType */ - public function testConstruct() + public function testConstruct(): StatusLimitationType { return new StatusLimitationType(); } @@ -36,7 +37,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new StatusLimitation()], @@ -63,7 +64,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\StatusLimitation $limitation * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testAcceptValue(StatusLimitation $limitation, StatusLimitationType $limitationType) + public function testAcceptValue(StatusLimitation $limitation, StatusLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -71,7 +72,7 @@ public function testAcceptValue(StatusLimitation $limitation, StatusLimitationTy /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -87,7 +88,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, StatusLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, StatusLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -97,7 +98,7 @@ public function testAcceptValueException(Limitation $limitation, StatusLimitatio /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new StatusLimitation(), 0], @@ -157,7 +158,7 @@ public function providerForTestValidateError() * @param int $errorCount * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testValidateError(StatusLimitation $limitation, $errorCount, StatusLimitationType $limitationType) + public function testValidateError(StatusLimitation $limitation, int $errorCount, StatusLimitationType $limitationType): void { $validationErrors = $limitationType->validate($limitation); self::assertCount($errorCount, $validationErrors); @@ -168,7 +169,7 @@ public function testValidateError(StatusLimitation $limitation, $errorCount, Sta * * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testBuildValue(StatusLimitationType $limitationType) + public function testBuildValue(StatusLimitationType $limitationType): void { $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); @@ -178,7 +179,7 @@ public function testBuildValue(StatusLimitationType $limitationType) self::assertEquals($expected, $value->limitationValues); } - protected function getVersionInfoMock($shouldBeCalled = true) + protected function getVersionInfoMock($shouldBeCalled = true): MockObject { $versionInfoMock = $this->getMockBuilder(APIVersionInfo::class) ->disableOriginalConstructor() @@ -201,7 +202,7 @@ protected function getVersionInfoMock($shouldBeCalled = true) return $versionInfoMock; } - protected function getContentMock() + protected function getContentMock(): MockObject { $contentMock = $this->getMockBuilder(APIContent::class) ->setConstructorArgs([]) @@ -219,7 +220,7 @@ protected function getContentMock() /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { return [ // VersionInfo, no access @@ -271,7 +272,7 @@ public function testEvaluate( ValueObject $object, $expected, StatusLimitationType $limitationType - ) { + ): void { $userMock = $this->getUserMock(); $userMock->expects(self::never()) ->method(self::anything()); @@ -290,7 +291,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { $versionInfoMock = $this->getMockBuilder(APIVersionInfo::class) ->setConstructorArgs([]) @@ -320,7 +321,7 @@ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, StatusLimitationType $limitationType - ) { + ): void { $this->expectException(InvalidArgumentException::class); $userMock = $this->getUserMock(); @@ -339,7 +340,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testGetCriterion(StatusLimitationType $limitationType) + public function testGetCriterion(StatusLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); @@ -351,7 +352,7 @@ public function testGetCriterion(StatusLimitationType $limitationType) * * @param \Ibexa\Core\Limitation\StatusLimitationType $limitationType */ - public function testValueSchema(StatusLimitationType $limitationType) + public function testValueSchema(StatusLimitationType $limitationType): void { self::markTestSkipped('Method valueSchema() is not implemented'); } diff --git a/tests/lib/Limitation/SubtreeLimitationTypeTest.php b/tests/lib/Limitation/SubtreeLimitationTypeTest.php index eb7464c8f8..08070ea81b 100644 --- a/tests/lib/Limitation/SubtreeLimitationTypeTest.php +++ b/tests/lib/Limitation/SubtreeLimitationTypeTest.php @@ -26,6 +26,7 @@ use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\Query\Criterion\PermissionSubtree; +use PHPUnit\Framework\MockObject\MockObject; /** * Test Case for LimitationType. @@ -33,7 +34,7 @@ class SubtreeLimitationTypeTest extends Base { /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationHandlerMock; + private MockObject $locationHandlerMock; /** * Setup Location Handler mock. @@ -56,7 +57,7 @@ protected function tearDown(): void /** * @return \Ibexa\Core\Limitation\SubtreeLimitationType */ - public function testConstruct() + public function testConstruct(): SubtreeLimitationType { return new SubtreeLimitationType($this->getPersistenceMock()); } @@ -64,7 +65,7 @@ public function testConstruct() /** * @return array */ - public function providerForTestAcceptValue() + public function providerForTestAcceptValue(): array { return [ [new SubtreeLimitation()], @@ -81,7 +82,7 @@ public function providerForTestAcceptValue() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation $limitation * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testAcceptValue(SubtreeLimitation $limitation, SubtreeLimitationType $limitationType) + public function testAcceptValue(SubtreeLimitation $limitation, SubtreeLimitationType $limitationType): void { $limitationType->acceptValue($limitation); } @@ -89,7 +90,7 @@ public function testAcceptValue(SubtreeLimitation $limitation, SubtreeLimitation /** * @return array */ - public function providerForTestAcceptValueException() + public function providerForTestAcceptValueException(): array { return [ [new ObjectStateLimitation()], @@ -108,7 +109,7 @@ public function providerForTestAcceptValueException() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation $limitation * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testAcceptValueException(Limitation $limitation, SubtreeLimitationType $limitationType) + public function testAcceptValueException(Limitation $limitation, SubtreeLimitationType $limitationType): void { $this->expectException(InvalidArgumentException::class); @@ -118,7 +119,7 @@ public function testAcceptValueException(Limitation $limitation, SubtreeLimitati /** * @return array */ - public function providerForTestValidatePass() + public function providerForTestValidatePass(): array { return [ [new SubtreeLimitation()], @@ -132,7 +133,7 @@ public function providerForTestValidatePass() * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation $limitation */ - public function testValidatePass(SubtreeLimitation $limitation) + public function testValidatePass(SubtreeLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -164,7 +165,7 @@ public function testValidatePass(SubtreeLimitation $limitation) /** * @return array */ - public function providerForTestValidateError() + public function providerForTestValidateError(): array { return [ [new SubtreeLimitation(), 0], @@ -179,7 +180,7 @@ public function providerForTestValidateError() * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation $limitation * @param int $errorCount */ - public function testValidateError(SubtreeLimitation $limitation, $errorCount) + public function testValidateError(SubtreeLimitation $limitation, int $errorCount): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() @@ -208,7 +209,7 @@ public function testValidateError(SubtreeLimitation $limitation, $errorCount) self::assertCount($errorCount, $validationErrors); } - public function testValidateErrorWrongPath() + public function testValidateErrorWrongPath(): void { $limitation = new SubtreeLimitation(['limitationValues' => ['/1/2/42/']]); @@ -242,7 +243,7 @@ public function testValidateErrorWrongPath() * * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testBuildValue(SubtreeLimitationType $limitationType) + public function testBuildValue(SubtreeLimitationType $limitationType): void { $expected = ['test', 'test' => '/1/999/']; $value = $limitationType->buildValue($expected); @@ -255,7 +256,7 @@ public function testBuildValue(SubtreeLimitationType $limitationType) /** * @return array */ - public function providerForTestEvaluate() + public function providerForTestEvaluate(): array { // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); @@ -403,7 +404,7 @@ public function testEvaluate( $targets, array $persistenceLocations, $expected - ) { + ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -456,7 +457,7 @@ public function testEvaluate( /** * @return array */ - public function providerForTestEvaluateInvalidArgument() + public function providerForTestEvaluateInvalidArgument(): array { return [ // invalid limitation @@ -482,9 +483,9 @@ public function providerForTestEvaluateInvalidArgument() public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, - $targets, + ?array $targets, array $persistenceLocations - ) { + ): void { $this->expectException(InvalidArgumentException::class); // Need to create inline instead of depending on testConstruct() to get correct mock instance @@ -514,7 +515,7 @@ public function testEvaluateInvalidArgument( * * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testGetCriterionInvalidValue(SubtreeLimitationType $limitationType) + public function testGetCriterionInvalidValue(SubtreeLimitationType $limitationType): void { $this->expectException(\RuntimeException::class); @@ -529,7 +530,7 @@ public function testGetCriterionInvalidValue(SubtreeLimitationType $limitationTy * * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testGetCriterionSingleValue(SubtreeLimitationType $limitationType) + public function testGetCriterionSingleValue(SubtreeLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new SubtreeLimitation(['limitationValues' => ['/1/9/']]), @@ -550,7 +551,7 @@ public function testGetCriterionSingleValue(SubtreeLimitationType $limitationTyp * * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testGetCriterionMultipleValues(SubtreeLimitationType $limitationType) + public function testGetCriterionMultipleValues(SubtreeLimitationType $limitationType): void { $criterion = $limitationType->getCriterion( new SubtreeLimitation(['limitationValues' => ['/1/9/', '/1/55/']]), @@ -571,7 +572,7 @@ public function testGetCriterionMultipleValues(SubtreeLimitationType $limitation * * @param \Ibexa\Core\Limitation\SubtreeLimitationType $limitationType */ - public function testValueSchema(SubtreeLimitationType $limitationType) + public function testValueSchema(SubtreeLimitationType $limitationType): void { self::assertEquals( SubtreeLimitationType::VALUE_SCHEMA_LOCATION_PATH, diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php index fa3e894fe0..e3c9683402 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php @@ -19,12 +19,12 @@ public function __construct(array $subMatchers) $this->subMatchers = $subMatchers; } - public function match() + public function match(): never { throw new NotImplementedException(__METHOD__); } - public function reverseMatch($siteAccessName) + public function reverseMatch($siteAccessName): never { throw new NotImplementedException(__METHOD__); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php index 93df93a591..42843fe793 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php @@ -22,17 +22,17 @@ public function __construct($data = null) $this->data = $data; } - public function setRequest(SimplifiedRequest $request) + public function setRequest(SimplifiedRequest $request): never { throw new NotImplementedException(__METHOD__); } - public function match() + public function match(): never { throw new NotImplementedException(__METHOD__); } - public function getName() + public function getName(): never { throw new NotImplementedException(__METHOD__); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php index 5ce34687a8..991669b78d 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php @@ -13,7 +13,7 @@ final class RegexMatcher extends BaseRegex { - public function getName() + public function getName(): never { throw new NotImplementedException(__METHOD__); } diff --git a/tests/lib/MVC/Symfony/Controller/ControllerTest.php b/tests/lib/MVC/Symfony/Controller/ControllerTest.php index 3bf3bc6b31..27b2eb436e 100644 --- a/tests/lib/MVC/Symfony/Controller/ControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/ControllerTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\MVC\Symfony\Controller; use Ibexa\Core\MVC\Symfony\Controller\Controller; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Response; @@ -21,13 +22,13 @@ class ControllerTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\Controller\Controller */ - protected $controller; + protected MockObject $controller; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $templateEngineMock; + protected MockObject $templateEngineMock; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $containerMock; + protected MockObject $containerMock; protected function setUp(): void { @@ -41,7 +42,7 @@ protected function setUp(): void ->will(self::returnValue($this->templateEngineMock)); } - public function testRender() + public function testRender(): void { $view = 'some:valid:view.html.twig'; $params = ['foo' => 'bar', 'truc' => 'muche']; @@ -56,7 +57,7 @@ public function testRender() self::assertSame($tplResult, $response->getContent()); } - public function testRenderWithResponse() + public function testRenderWithResponse(): void { $response = new Response(); $view = 'some:valid:view.html.twig'; diff --git a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php index 09c47f2133..79cb947c98 100644 --- a/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php +++ b/tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php @@ -14,7 +14,7 @@ class RouteReferenceGenerationEventTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $routeReference = new RouteReference('foo'); $request = new Request(); @@ -23,7 +23,7 @@ public function testConstruct() self::assertSame($request, $event->getRequest()); } - public function testGetSet() + public function testGetSet(): void { $routeReference = new RouteReference('foo'); $request = new Request(); diff --git a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php index c44d0c463b..8869d4efb5 100644 --- a/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php +++ b/tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php @@ -13,7 +13,7 @@ class ScopeChangeEventTest extends TestCase { - public function testGetSiteAccess() + public function testGetSiteAccess(): void { $siteAccess = new SiteAccess('foo', 'test'); $event = new ScopeChangeEvent($siteAccess); diff --git a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php index 9732352854..4af21247f1 100644 --- a/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php +++ b/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php @@ -45,7 +45,7 @@ private function getRegistry(array $providers): GenericVariableProviderRegistry private function getProvider(string $identifier): VariableProvider { return new class($identifier) implements VariableProvider { - private $identifier; + private string $identifier; public function __construct(string $identifier) { diff --git a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php index ce13fc1191..94fa73d125 100644 --- a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php @@ -12,13 +12,14 @@ use Ibexa\Core\MVC\Symfony\EventListener\LanguageSwitchListener; use Ibexa\Core\MVC\Symfony\MVCEvents; use Ibexa\Core\MVC\Symfony\Routing\RouteReference; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; class LanguageSwitchListenerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $translationHelper; + private MockObject $translationHelper; protected function setUp(): void { @@ -28,7 +29,7 @@ protected function setUp(): void ->getMock(); } - public function testGetSubscribedEvents() + public function testGetSubscribedEvents(): void { self::assertSame( [MVCEvents::ROUTE_REFERENCE_GENERATION => 'onRouteReferenceGeneration'], @@ -36,7 +37,7 @@ public function testGetSubscribedEvents() ); } - public function testOnRouteReferenceGenerationNoLanguage() + public function testOnRouteReferenceGenerationNoLanguage(): void { $this->translationHelper ->expects(self::never()) @@ -47,7 +48,7 @@ public function testOnRouteReferenceGenerationNoLanguage() $listener->onRouteReferenceGeneration($event); } - public function testOnRouteReferenceGeneration() + public function testOnRouteReferenceGeneration(): void { $language = 'fre-FR'; $routeReference = new RouteReference('foo', ['language' => $language]); @@ -66,7 +67,7 @@ public function testOnRouteReferenceGeneration() self::assertSame($expectedSiteAccess, $routeReference->get('siteaccess')); } - public function testOnRouteReferenceGenerationNoTranslationSiteAccess() + public function testOnRouteReferenceGenerationNoTranslationSiteAccess(): void { $language = 'fre-FR'; $routeReference = new RouteReference('foo', ['language' => $language]); diff --git a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php index c6af688b58..266f4b4dc7 100644 --- a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php @@ -17,21 +17,22 @@ use Ibexa\Core\FieldType\ImageAsset\Value as ImageAssetValue; use Ibexa\Core\MVC\Symfony\FieldType\ImageAsset\ParameterProvider; use Ibexa\Core\Repository\SiteAccessAware\Repository; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ParameterProviderTest extends TestCase { /** @var \Ibexa\Core\Repository\SiteAccessAware\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private $repository; + private MockObject $repository; /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionsResolver; + private MockObject $permissionsResolver; /** @var \Ibexa\Core\MVC\Symfony\FieldType\ImageAsset\ParameterProvider */ - private $parameterProvider; + private ParameterProvider $parameterProvider; /** @var \Ibexa\Contracts\Core\Repository\FieldType|\PHPUnit\Framework\MockObject\MockObject */ - private $fieldType; + private MockObject $fieldType; protected function setUp(): void { @@ -68,7 +69,7 @@ public function dataProviderForTestGetViewParameters(): array /** * @dataProvider dataProviderForTestGetViewParameters */ - public function testGetViewParameters($status, array $expected): void + public function testGetViewParameters(int $status, array $expected): void { $destinationContentId = 1; @@ -76,7 +77,7 @@ public function testGetViewParameters($status, array $expected): void ->method('isEmptyValue') ->willReturn(false); - $closure = static function (Repository $repository) use ($destinationContentId) { + $closure = static function (Repository $repository) use ($destinationContentId): \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo { return $repository->getContentService()->loadContentInfo($destinationContentId); }; @@ -104,7 +105,7 @@ public function testGetViewParametersHandleNotFoundException(): void ->method('isEmptyValue') ->willReturn(false); - $closure = static function (Repository $repository) use ($destinationContentId) { + $closure = static function (Repository $repository) use ($destinationContentId): \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo { return $repository->getContentService()->loadContentInfo($destinationContentId); }; diff --git a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php index 5000f84fc3..cb0efbc461 100644 --- a/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php @@ -18,7 +18,7 @@ class ParameterProviderTest extends TestCase { - public function providerForTestGetViewParameters() + public function providerForTestGetViewParameters(): array { return [ [ContentInfo::STATUS_DRAFT, ['available' => true]], @@ -30,7 +30,7 @@ public function providerForTestGetViewParameters() /** * @dataProvider providerForTestGetViewParameters */ - public function testGetViewParameters($status, array $expected) + public function testGetViewParameters(int $status, array $expected): void { $contentServiceMock = $this->createMock(ContentService::class); $contentServiceMock @@ -47,7 +47,7 @@ public function testGetViewParameters($status, array $expected) TestCase::assertSame($parameters, $expected); } - public function testNotFoundGetViewParameters() + public function testNotFoundGetViewParameters(): void { $contentId = 123; @@ -64,7 +64,7 @@ public function testNotFoundGetViewParameters() TestCase::assertSame($parameters, ['available' => false]); } - public function testUnauthorizedGetViewParameters() + public function testUnauthorizedGetViewParameters(): void { $contentId = 123; diff --git a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php index 7a5aa2df1b..dfa4665251 100644 --- a/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php @@ -16,7 +16,7 @@ class ParameterProviderTest extends TestCase { - public function providerForTestGetViewParameters() + public function providerForTestGetViewParameters(): array { return [ [[123, 456, 789], ['available' => [123 => true, 456 => true, 789 => false]]], @@ -29,13 +29,13 @@ public function providerForTestGetViewParameters() /** * @dataProvider providerForTestGetViewParameters */ - public function testGetViewParameters(array $desinationContentIds, array $expected) + public function testGetViewParameters(array $desinationContentIds, array $expected): void { $contentServiceMock = $this->createMock(ContentService::class); $contentServiceMock ->method('loadContentInfoList') ->with($desinationContentIds) - ->will(self::returnCallback(static function ($arg) { + ->will(self::returnCallback(static function ($arg): array { $return = []; if (in_array(123, $arg)) { $return[123] = new ContentInfo(['status' => ContentInfo::STATUS_DRAFT]); @@ -60,7 +60,7 @@ public function testGetViewParameters(array $desinationContentIds, array $expect TestCase::assertSame($parameters, $expected); } - public function testNotFoundGetViewParameters() + public function testNotFoundGetViewParameters(): void { $contentId = 123; @@ -78,7 +78,7 @@ public function testNotFoundGetViewParameters() TestCase::assertSame($parameters, ['available' => [$contentId => false]]); } - public function testUnauthorizedGetViewParameters() + public function testUnauthorizedGetViewParameters(): void { $contentId = 123; diff --git a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php index 4efcc292c7..2aeeacc9cf 100644 --- a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php @@ -16,6 +16,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Core\FieldType\User\Value; use Ibexa\Core\MVC\Symfony\FieldType\User\ParameterProvider; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ParameterProviderTest extends TestCase @@ -23,13 +24,13 @@ class ParameterProviderTest extends TestCase private const EXAMPLE_USER_ID = 1; /** @var \Ibexa\Contracts\Core\Repository\UserService|\PHPUnit\Framework\MockObject\MockObject */ - private $userService; + private MockObject $userService; /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|\PHPUnit\Framework\MockObject\MockObject */ - private $user; + private MockObject $user; /** @var \Ibexa\Core\MVC\Symfony\FieldType\User\ParameterProvider */ - private $parameterProvider; + private ParameterProvider $parameterProvider; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php index 3b76fdbefb..aaaa045157 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Core\MVC\Symfony\FieldType\View\ParameterProvider\LocaleParameterProvider; use Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; @@ -17,7 +18,7 @@ class LocaleParameterProviderTest extends TestCase { - public function providerForTestGetViewParameters() + public function providerForTestGetViewParameters(): array { return [ [true, 'fr_FR'], @@ -28,7 +29,7 @@ public function providerForTestGetViewParameters() /** * @dataProvider providerForTestGetViewParameters */ - public function testGetViewParameters($hasRequestLocale, $expectedLocale) + public function testGetViewParameters(bool $hasRequestLocale, string $expectedLocale): void { $field = new Field(['languageCode' => 'cro-HR']); $parameterProvider = new LocaleParameterProvider($this->getLocaleConverterMock()); @@ -39,7 +40,7 @@ public function testGetViewParameters($hasRequestLocale, $expectedLocale) ); } - protected function getRequestStackMock($hasLocale) + protected function getRequestStackMock($hasLocale): RequestStack { $requestStack = new RequestStack(); $parameterBagMock = $this->createMock(ParameterBag::class); @@ -62,7 +63,7 @@ protected function getRequestStackMock($hasLocale) return $requestStack; } - protected function getLocaleConverterMock() + protected function getLocaleConverterMock(): MockObject { $mock = $this->createMock(LocaleConverterInterface::class); diff --git a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php index cfe023e1e9..98c6897fd9 100644 --- a/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php @@ -16,7 +16,7 @@ */ class ParameterProviderRegistryTest extends TestCase { - public function testSetHasParameterProvider() + public function testSetHasParameterProvider(): void { $registry = new ParameterProviderRegistry(); self::assertFalse($registry->hasParameterProvider('foo')); @@ -27,7 +27,7 @@ public function testSetHasParameterProvider() self::assertTrue($registry->hasParameterProvider('foo')); } - public function testGetParameterProviderFail() + public function testGetParameterProviderFail(): void { $this->expectException(\InvalidArgumentException::class); @@ -35,7 +35,7 @@ public function testGetParameterProviderFail() $registry->getParameterProvider('foo'); } - public function testGetParameterProvider() + public function testGetParameterProvider(): void { $provider = $this->createMock(ParameterProviderInterface::class); $registry = new ParameterProviderRegistry(); diff --git a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php index 8c70d0bccf..48a2b4d3ef 100644 --- a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php +++ b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Repository\Values\UserPreference\UserPreference; use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\MVC\Symfony\Locale\UserLanguagePreferenceProvider; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\HeaderBag; use Symfony\Component\HttpFoundation\Request; @@ -25,13 +26,13 @@ class UserLanguagePreferenceProviderTest extends TestCase private const LANGUAGE_PREFERENCE_VALUE = 'no'; /** @var \Ibexa\Core\MVC\Symfony\Locale\UserLanguagePreferenceProviderInterface */ - private $userLanguagePreferenceProvider; + private UserLanguagePreferenceProvider $userLanguagePreferenceProvider; /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\HttpFoundation\RequestStack */ - private $requestStackMock; + private MockObject $requestStackMock; /** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */ - private $userPreferenceServiceMock; + private MockObject $userPreferenceServiceMock; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php index f3e8732076..98f0442fa6 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php @@ -10,12 +10,13 @@ use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth as DepthMatcher; class DepthTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth */ - private $matcher; + private Depth $matcher; protected function setUp(): void { @@ -33,13 +34,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -86,7 +87,7 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -96,7 +97,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ @@ -129,7 +130,7 @@ public function matchContentInfoProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForDepth($depth) + private function generateRepositoryMockForDepth(int $depth) { $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock->expects(self::once()) diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php index 2959b0219d..f268edf72e 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php @@ -9,13 +9,14 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content as ContentIdMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; class ContentTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content */ - private $matcher; + private Content $matcher; protected function setUp(): void { @@ -33,13 +34,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -72,7 +73,7 @@ public function matchLocationProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateLocationForContentId($contentId) + private function generateLocationForContentId(int $contentId) { $location = $this->getLocationMock(); $location @@ -97,13 +98,13 @@ private function generateLocationForContentId($contentId) * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, ContentInfo $contentInfo, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php index 8c6370436c..03938bef84 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php @@ -17,7 +17,7 @@ class ContentTypeGroupTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup */ - private $matcher; + private ContentTypeGroupIdMatcher $matcher; protected function setUp(): void { @@ -35,7 +35,7 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -46,7 +46,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider() + public function matchLocationProvider(): array { $data = []; @@ -107,7 +107,7 @@ private function generateLocationMock() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -118,7 +118,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { $data = []; @@ -156,7 +156,7 @@ public function matchContentInfoProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForContentTypeGroupId($contentTypeGroupId) + private function generateRepositoryMockForContentTypeGroupId(int $contentTypeGroupId) { $contentTypeServiceMock = $this->createMock(ContentTypeService::class); $contentTypeMock = $this->getMockForAbstractClass(ContentType::class); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php index df7b957a80..28b95f08f9 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php @@ -9,13 +9,14 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType as ContentTypeIdMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; class ContentTypeTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType */ - private $matcher; + private ContentType $matcher; protected function setUp(): void { @@ -33,13 +34,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation($matchingConfig, Location $location, $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { $data = []; @@ -77,7 +78,7 @@ public function matchLocationProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateLocationForContentType($contentTypeId) + private function generateLocationForContentType(int $contentTypeId) { $location = $this->getLocationMock(); $location @@ -114,13 +115,13 @@ private function generateContentInfoForContentType($contentTypeId) * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) + public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { $data = []; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php index 6ad5d5464b..ac49ebf1b1 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php @@ -15,7 +15,7 @@ class LocationTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Location */ - private $matcher; + private LocationIdMatcher $matcher; protected function setUp(): void { @@ -33,13 +33,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -75,13 +75,13 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, ContentInfo $contentInfo, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php index 28f0db3723..45ee288337 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php @@ -9,6 +9,7 @@ use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType as ParentContentTypeMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; @@ -18,7 +19,7 @@ class ParentContentTypeTest extends BaseTest private const EXAMPLE_PARENT_LOCATION_ID = 2; /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType */ - private $matcher; + private ParentContentType $matcher; protected function setUp(): void { @@ -33,7 +34,7 @@ protected function setUp(): void * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForContentTypeId($contentTypeId) + private function generateRepositoryMockForContentTypeId(int $contentTypeId) { $parentContentInfo = $this->getContentInfoMock([ 'contentTypeId' => $contentTypeId, @@ -87,7 +88,7 @@ private function generateRepositoryMockForContentTypeId($contentTypeId) * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -97,7 +98,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -134,7 +135,7 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php index 08e3775115..1a2bd39937 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php @@ -10,13 +10,14 @@ use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation as ParentLocationIdMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; class ParentLocationTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation */ - private $matcher; + private ParentLocation $matcher; protected function setUp(): void { @@ -34,13 +35,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -77,7 +78,7 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -87,7 +88,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ @@ -120,7 +121,7 @@ public function matchContentInfoProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForParentLocationId($parentLocationId) + private function generateRepositoryMockForParentLocationId(int $parentLocationId) { $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock->expects(self::once()) diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php index 8591a28605..18622d9311 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php @@ -9,13 +9,14 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote as RemoteIdMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; class RemoteTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote */ - private $matcher; + private Remote $matcher; protected function setUp(): void { @@ -33,13 +34,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(string|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -75,13 +76,13 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) + public function testMatchContentInfo(string|array $matchingConfig, ContentInfo $contentInfo, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php index 86961f1732..778d04a77b 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php @@ -9,13 +9,14 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section as SectionIdMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; class SectionTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section */ - private $matcher; + private Section $matcher; protected function setUp(): void { @@ -33,13 +34,13 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location $location * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Location $location, $expectedResult) + public function testMatchLocation(int|array $matchingConfig, Location $location, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchLocation($location)); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -72,7 +73,7 @@ public function matchLocationProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateLocationForSectionId($sectionId) + private function generateLocationForSectionId(int $sectionId) { $location = $this->getLocationMock(); $location @@ -97,13 +98,13 @@ private function generateLocationForSectionId($sectionId) * @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, ContentInfo $contentInfo, $expectedResult) + public function testMatchContentInfo(int|array $matchingConfig, ContentInfo $contentInfo, bool $expectedResult): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame($expectedResult, $this->matcher->matchContentInfo($contentInfo)); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php index ae5cd0c989..b1ca1f6637 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php @@ -16,7 +16,7 @@ class ContentTypeTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType */ - private $matcher; + private ContentTypeIdentifierMatcher $matcher; protected function setUp(): void { @@ -34,7 +34,7 @@ protected function setUp(): void * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -45,7 +45,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider() + public function matchLocationProvider(): array { $data = []; @@ -106,7 +106,7 @@ private function generateLocationMock() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -119,7 +119,7 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider() + public function matchContentInfoProvider(): array { $data = []; @@ -157,7 +157,7 @@ public function matchContentInfoProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForContentTypeIdentifier($contentTypeIdentifier) + private function generateRepositoryMockForContentTypeIdentifier(string $contentTypeIdentifier) { $contentTypeMock = $this ->getMockBuilder(ContentType::class) diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php index 299acbe3ab..9e8f5a75dd 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType as ParentContentTypeMatcher; use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; @@ -20,7 +21,7 @@ class ParentContentTypeTest extends BaseTest private const EXAMPLE_PARENT_LOCATION_ID = 2; /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType */ - private $matcher; + private ParentContentType $matcher; protected function setUp(): void { @@ -35,7 +36,7 @@ protected function setUp(): void * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForContentTypeIdentifier($contentTypeIdentifier) + private function generateRepositoryMockForContentTypeIdentifier(string $contentTypeIdentifier) { $parentContentInfo = $this->getContentInfoMock([ 'mainLocationId' => self::EXAMPLE_LOCATION_ID, @@ -108,7 +109,7 @@ private function generateRepositoryMockForContentTypeIdentifier($contentTypeIden * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation(string|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -120,7 +121,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -157,7 +158,7 @@ public function matchLocationProvider() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo(string|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php index 0b9e0cd348..c88a6ac867 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php @@ -17,7 +17,7 @@ class SectionTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section */ - private $matcher; + private SectionIdentifierMatcher $matcher; protected function setUp(): void { @@ -32,7 +32,7 @@ protected function setUp(): void * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForSectionIdentifier($sectionIdentifier) + private function generateRepositoryMockForSectionIdentifier(string $sectionIdentifier) { $sectionServiceMock = $this->createMock(SectionService::class); $sectionServiceMock->expects(self::once()) @@ -74,7 +74,7 @@ private function generateRepositoryMockForSectionIdentifier($sectionIdentifier) * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation(string|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -95,7 +95,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchSectionProvider() + public function matchSectionProvider(): array { return [ [ @@ -132,7 +132,7 @@ public function matchSectionProvider() * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult) + public function testMatchContentInfo(string|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php index 347751cfd8..5bbe30698d 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued; +use PHPUnit\Framework\MockObject\MockObject; class MultipleValuedTest extends BaseTest { @@ -17,7 +18,7 @@ class MultipleValuedTest extends BaseTest * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::getValues */ - public function testSetMatchingConfig($matchingConfig) + public function testSetMatchingConfig(string $matchingConfig): void { $matcher = $this->getMultipleValuedMatcherMock(); $matcher->setMatchingConfig($matchingConfig); @@ -35,7 +36,7 @@ public function testSetMatchingConfig($matchingConfig) * * @return array */ - public function matchingConfigProvider() + public function matchingConfigProvider(): array { return [ [ @@ -51,14 +52,14 @@ public function matchingConfigProvider() * @covers \Ibexa\Core\MVC\RepositoryAware::setRepository * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::getRepository */ - public function testInjectRepository() + public function testInjectRepository(): void { $matcher = $this->getMultipleValuedMatcherMock(); $matcher->setRepository($this->repositoryMock); self::assertSame($this->repositoryMock, $matcher->getRepository()); } - private function getMultipleValuedMatcherMock() + private function getMultipleValuedMatcherMock(): MockObject { return $this->getMockForAbstractClass(MultipleValued::class); } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php index 614906d3fa..8221bf4b04 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php @@ -16,7 +16,7 @@ class UrlAliasTest extends BaseTest { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias */ - private $matcher; + private UrlAliasMatcher $matcher; protected function setUp(): void { @@ -33,7 +33,7 @@ protected function setUp(): void * @param string $matchingConfig * @param string[] $expectedValues */ - public function testSetMatchingConfig($matchingConfig, $expectedValues) + public function testSetMatchingConfig(string|array $matchingConfig, array $expectedValues): void { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame( @@ -42,7 +42,7 @@ public function testSetMatchingConfig($matchingConfig, $expectedValues) ); } - public function setMatchingConfigProvider() + public function setMatchingConfigProvider(): array { return [ ['/foo/bar/', ['foo/bar']], @@ -60,7 +60,7 @@ public function setMatchingConfigProvider() * * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForUrlAlias($path) + private function generateRepositoryMockForUrlAlias(string $path) { // First an url alias that will never match, then the right url alias. // This ensures to test even if the location has several url aliases. @@ -108,7 +108,7 @@ private function generateRepositoryMockForUrlAlias($path) * @param \Ibexa\Contracts\Core\Repository\Repository $repository * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult) + public function testMatchLocation(string|array $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -118,7 +118,7 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider() + public function matchLocationProvider(): array { return [ [ @@ -153,7 +153,7 @@ public function matchLocationProvider() * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias::matchContentInfo * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias::setMatchingConfig */ - public function testMatchContentInfo() + public function testMatchContentInfo(): void { $this->expectException(\RuntimeException::class); diff --git a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php index 89e4322bd1..f46d86f0dc 100644 --- a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php +++ b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php @@ -11,15 +11,16 @@ use Ibexa\Core\MVC\Symfony\Matcher\ClassNameMatcherFactory; use Ibexa\Core\MVC\Symfony\Matcher\DynamicallyConfiguredMatcherFactoryDecorator; use Ibexa\Core\MVC\Symfony\View\ContentView; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class DynamicallyConfiguredMatcherFactoryDecoratorTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ConfigurableMatcherFactoryInterface */ - private $innerMatcherFactory; + private MockObject $innerMatcherFactory; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolver; + private MockObject $configResolver; public function setUp(): void { @@ -33,7 +34,7 @@ public function setUp(): void /** * @dataProvider matchConfigProvider */ - public function testMatch($parameterName, $namespace, $scope, $viewsConfiguration, $matchedConfig): void + public function testMatch(string $parameterName, $namespace, $scope, array $viewsConfiguration, array $matchedConfig): void { $view = $this->createMock(ContentView::class); $this->configResolver->expects(self::atLeastOnce())->method('getParameter')->with( diff --git a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php index 51fc9a6c9e..218bc3c99a 100644 --- a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessRouterInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\URILexer; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; @@ -20,13 +21,13 @@ class GeneratorTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator|\PHPUnit\Framework\MockObject\MockObject */ - private $generator; + private MockObject $generator; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessRouter; + private MockObject $siteAccessRouter; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $logger; + private MockObject $logger; protected function setUp(): void { @@ -38,7 +39,7 @@ protected function setUp(): void $this->generator->setLogger($this->logger); } - public function generateProvider() + public function generateProvider(): array { return [ ['foo_bar', [], UrlGeneratorInterface::ABSOLUTE_PATH], @@ -56,7 +57,7 @@ public function generateProvider() /** * @dataProvider generateProvider */ - public function testSimpleGenerate($urlResource, array $parameters, $referenceType) + public function testSimpleGenerate(string|Location|\stdClass $urlResource, array $parameters, int $referenceType): void { $matcher = $this->createMock(URILexer::class); $this->generator->setSiteAccess(new SiteAccess('test', 'fake', $matcher)); @@ -89,7 +90,7 @@ public function testSimpleGenerate($urlResource, array $parameters, $referenceTy /** * @dataProvider generateProvider */ - public function testGenerateWithSiteAccessNoReverseMatch($urlResource, array $parameters, $referenceType) + public function testGenerateWithSiteAccessNoReverseMatch(string|Location|\stdClass $urlResource, array $parameters, int $referenceType): void { $matcher = $this->createMock(URILexer::class); $this->generator->setSiteAccess(new SiteAccess('test', 'test', $matcher)); diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php index 91320c47b1..0ef6218ae3 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\Routing\Generator\RouteReferenceGenerator; use Ibexa\Core\MVC\Symfony\Routing\RouteReference; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; @@ -20,7 +21,7 @@ class RouteReferenceGeneratorTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $dispatcher; + private MockObject $dispatcher; protected function setUp(): void { @@ -28,7 +29,7 @@ protected function setUp(): void $this->dispatcher = $this->createMock(EventDispatcherInterface::class); } - public function testGenerateNullResource() + public function testGenerateNullResource(): void { $currentRouteName = 'my_route'; $currentRouteParams = ['foo' => 'bar']; @@ -53,7 +54,7 @@ public function testGenerateNullResource() self::assertSame($currentRouteParams, $reference->getParams()); } - public function testGenerateNullResourceAndPassedParams() + public function testGenerateNullResourceAndPassedParams(): void { $currentRouteName = 'my_route'; $currentRouteParams = ['foo' => 'bar']; @@ -83,7 +84,7 @@ public function testGenerateNullResourceAndPassedParams() /** * @dataProvider generateGenerator */ - public function testGenerate($resource, array $params) + public function testGenerate(string|Location $resource, array $params): void { $currentRouteName = 'my_route'; $currentRouteParams = ['foo' => 'bar']; @@ -108,7 +109,7 @@ public function testGenerate($resource, array $params) self::assertSame($params, $reference->getParams()); } - public function testGenerateNullResourceWithoutRoute() + public function testGenerateNullResourceWithoutRoute(): void { $currentRouteName = 'my_route'; $currentRouteParams = ['foo' => 'bar']; @@ -129,7 +130,7 @@ public function testGenerateNullResourceWithoutRoute() self::assertInstanceOf(RouteReference::class, $reference); } - public function generateGenerator() + public function generateGenerator(): array { return [ ['my_route', ['hello' => 'world', 'isIt' => true]], diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php index f8d4dc37ed..c4c6ab8c85 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php @@ -12,7 +12,7 @@ class RouteReferenceTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $route = 'my_route'; $params = ['foo' => 'bar', 'some' => 'thing']; @@ -21,7 +21,7 @@ public function testConstruct() self::assertSame($params, $reference->getParams()); } - public function testGetSetRoute() + public function testGetSetRoute(): void { $initialRoute = 'foo'; $newRoute = 'bar'; @@ -32,7 +32,7 @@ public function testGetSetRoute() self::assertSame($newRoute, $reference->getRoute()); } - public function testGetSetParams() + public function testGetSetParams(): void { $reference = new RouteReference('foo'); self::assertSame([], $reference->getParams()); @@ -53,7 +53,7 @@ public function testGetSetParams() self::assertSame($defaultValue, $reference->get('url', $defaultValue)); } - public function testRemoveParam() + public function testRemoveParam(): void { $reference = new RouteReference('foo'); $reference->set('foo', 'bar'); diff --git a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php index 0222afb723..1e59ac4f55 100644 --- a/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php +++ b/tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php @@ -21,7 +21,7 @@ class SimplifiedRequestTest extends TestCase * * @dataProvider fromUrlProvider */ - public function testFromUrl($url, $expectedRequest) + public function testFromUrl(string $url, SimplifiedRequest $expectedRequest): void { self::assertEquals( $expectedRequest, @@ -49,7 +49,7 @@ public function testStrictGetters(): void self::assertSame(['param' => 'bar', 'param2' => 'bar2'], $request->getQueryParams()); } - public function fromUrlProvider() + public function fromUrlProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php index 845f3bdcca..a562cf6974 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php @@ -21,6 +21,7 @@ use Ibexa\Core\Repository\Permission\PermissionResolver; use Ibexa\Core\Repository\Repository; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use Symfony\Component\Routing\RouterInterface; @@ -28,28 +29,28 @@ class UrlAliasGeneratorTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $repository; + private MockObject $repository; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $urlAliasService; + private MockObject $urlAliasService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $locationService; + private MockObject $locationService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $router; + private MockObject $router; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $logger; + private MockObject $logger; /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator */ - private $urlAliasGenerator; + private UrlAliasGenerator $urlAliasGenerator; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $siteAccessRouter; + private MockObject $siteAccessRouter; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; protected function setUp(): void { @@ -100,7 +101,7 @@ protected function setUp(): void $this->urlAliasGenerator->setSiteAccessRouter($this->siteAccessRouter); } - public function testGetPathPrefixByRootLocationId() + public function testGetPathPrefixByRootLocationId(): void { $rootLocationId = 123; $rootLocation = new Location(['id' => $rootLocationId]); @@ -123,7 +124,7 @@ public function testGetPathPrefixByRootLocationId() /** * @dataProvider providerTestIsPrefixExcluded */ - public function testIsPrefixExcluded($uri, $expectedIsExcluded) + public function testIsPrefixExcluded(string $uri, bool $expectedIsExcluded): void { $this->urlAliasGenerator->setExcludedUriPrefixes( [ @@ -135,7 +136,7 @@ public function testIsPrefixExcluded($uri, $expectedIsExcluded) self::assertSame($expectedIsExcluded, $this->urlAliasGenerator->isUriPrefixExcluded($uri)); } - public function providerTestIsPrefixExcluded() + public function providerTestIsPrefixExcluded(): array { return [ ['/foo/bar', false], @@ -152,7 +153,7 @@ public function providerTestIsPrefixExcluded() ]; } - public function testLoadLocation() + public function testLoadLocation(): void { $locationId = 123; $location = new Location(['id' => $locationId]); @@ -167,7 +168,7 @@ public function testLoadLocation() /** * @dataProvider providerTestDoGenerate */ - public function testDoGenerate(URLAlias $urlAlias, array $parameters, $expected) + public function testDoGenerate(URLAlias $urlAlias, array $parameters, string $expected): void { $location = new Location(['id' => 123]); $this->urlAliasService @@ -181,7 +182,7 @@ public function testDoGenerate(URLAlias $urlAlias, array $parameters, $expected) self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); } - public function providerTestDoGenerate() + public function providerTestDoGenerate(): array { return [ 'without_parameters' => [ @@ -212,7 +213,7 @@ public function providerTestDoGenerate() * * @param array $parameters */ - public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $parameters, string $expected) + public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $parameters, string $expected): void { $siteaccessName = 'foo'; $parameters += ['siteaccess' => $siteaccessName]; @@ -258,7 +259,7 @@ public function testDoGenerateWithSiteAccessParam(URLAlias $urlAlias, array $par ->method('loadLocation') ->will( self::returnCallback( - static function ($locationId) { + static function ($locationId): Location { return new Location(['id' => $locationId]); } ) @@ -268,7 +269,7 @@ static function ($locationId) { ->method('reverseLookup') ->will( self::returnCallback( - static function ($location) use ($treeRootUrlAlias) { + static function ($location) use ($treeRootUrlAlias): \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias { return $treeRootUrlAlias[$location->id]; } ) @@ -279,7 +280,7 @@ static function ($location) use ($treeRootUrlAlias) { self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, $parameters)); } - public function providerTestDoGenerateWithSiteaccess() + public function providerTestDoGenerateWithSiteaccess(): array { return [ [ @@ -293,7 +294,7 @@ public function providerTestDoGenerateWithSiteaccess() '/baz', ], [ - new UrlAlias(['path' => '/special-chars-"<>\'']), + new URLAlias(['path' => '/special-chars-"<>\'']), [], '/special-chars-%22%3C%3E%27', ], @@ -308,12 +309,12 @@ public function providerTestDoGenerateWithSiteaccess() '/baz#qux', ], 'fragment_and_special_chars' => [ - new UrlAlias(['path' => '/special-chars-"<>\'']), + new URLAlias(['path' => '/special-chars-"<>\'']), ['_fragment' => 'qux'], '/special-chars-%22%3C%3E%27#qux', ], 'fragment_site_siteaccess_and_params' => [ - new UrlAlias(['path' => '/foo/bar/baz']), + new URLAlias(['path' => '/foo/bar/baz']), ['_fragment' => 'qux', 'siteaccess' => 'bar', 'some' => 'foo'], '/baz?some=foo#qux', ], @@ -398,7 +399,7 @@ public function testDoGenerateWithSiteAccessLoadsLocationWithLanguages(): void ); } - public function testDoGenerateNoUrlAlias() + public function testDoGenerateNoUrlAlias(): void { $location = new Location(['id' => 123, 'contentInfo' => new ContentInfo(['id' => 456])]); $uri = "/content/location/$location->id"; @@ -422,7 +423,7 @@ public function testDoGenerateNoUrlAlias() /** * @dataProvider providerTestDoGenerateRootLocation */ - public function testDoGenerateRootLocation(URLAlias $urlAlias, $isOutsideAndNotExcluded, $expected, $pathPrefix) + public function testDoGenerateRootLocation(URLAlias $urlAlias, bool $isOutsideAndNotExcluded, string $expected, string $pathPrefix): void { $excludedPrefixes = ['/products', '/shared']; $rootLocationId = 456; @@ -458,65 +459,65 @@ public function testDoGenerateRootLocation(URLAlias $urlAlias, $isOutsideAndNotE self::assertSame($expected, $this->urlAliasGenerator->doGenerate($location, [])); } - public function providerTestDoGenerateRootLocation() + public function providerTestDoGenerateRootLocation(): array { return [ [ - new UrlAlias(['path' => '/my/root-folder/foo/bar']), + new URLAlias(['path' => '/my/root-folder/foo/bar']), false, '/foo/bar', '/my/root-folder', ], [ - new UrlAlias(['path' => '/my/root-folder/something']), + new URLAlias(['path' => '/my/root-folder/something']), false, '/something', '/my/root-folder', ], [ - new UrlAlias(['path' => '/my/root-folder']), + new URLAlias(['path' => '/my/root-folder']), false, '/', '/my/root-folder', ], [ - new UrlAlias(['path' => '/foo/bar']), + new URLAlias(['path' => '/foo/bar']), false, '/foo/bar', '/', ], [ - new UrlAlias(['path' => '/something']), + new URLAlias(['path' => '/something']), false, '/something', '/', ], [ - new UrlAlias(['path' => '/']), + new URLAlias(['path' => '/']), false, '/', '/', ], [ - new UrlAlias(['path' => '/outside/tree/foo/bar']), + new URLAlias(['path' => '/outside/tree/foo/bar']), true, '/outside/tree/foo/bar', '/my/root-folder', ], [ - new UrlAlias(['path' => '/products/ibexa-dxp']), + new URLAlias(['path' => '/products/ibexa-dxp']), false, '/products/ibexa-dxp', '/my/root-folder', ], [ - new UrlAlias(['path' => '/shared/some-content']), + new URLAlias(['path' => '/shared/some-content']), false, '/shared/some-content', '/my/root-folder', ], [ - new UrlAlias(['path' => '/products/ibexa-dxp']), + new URLAlias(['path' => '/products/ibexa-dxp']), false, '/products/ibexa-dxp', '/prod', @@ -524,7 +525,7 @@ public function providerTestDoGenerateRootLocation() ]; } - protected function getPermissionResolverMock() + protected function getPermissionResolverMock(): MockObject { $configResolverMock = $this->createMock(ConfigResolverInterface::class); $configResolverMock diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php index 52ebd9be49..2f008b5850 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php @@ -21,6 +21,7 @@ use Ibexa\Core\MVC\Symfony\View\Manager as ViewManager; use Ibexa\Core\Repository\Repository; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; @@ -34,19 +35,19 @@ class UrlAliasRouterTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $repository; + protected MockObject $repository; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $urlAliasService; + protected MockObject $urlAliasService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $locationService; + protected MockObject $locationService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $contentService; + protected MockObject $contentService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $urlALiasGenerator; + protected MockObject $urlALiasGenerator; protected $requestContext; @@ -94,12 +95,12 @@ protected function setUp(): void * * @return \Ibexa\Core\MVC\Symfony\Routing\UrlAliasRouter */ - protected function getRouter(LocationService $locationService, URLAliasService $urlAliasService, ContentService $contentService, UrlAliasGenerator $urlAliasGenerator, RequestContext $requestContext) + protected function getRouter(LocationService $locationService, URLAliasService $urlAliasService, ContentService $contentService, UrlAliasGenerator $urlAliasGenerator, RequestContext $requestContext): UrlAliasRouter { return new UrlAliasRouter($locationService, $urlAliasService, $contentService, $urlAliasGenerator, $requestContext); } - public function testRequestContext() + public function testRequestContext(): void { self::assertSame($this->requestContext, $this->router->getContext()); $newContext = new RequestContext(); @@ -111,7 +112,7 @@ public function testRequestContext() self::assertSame($newContext, $this->router->getContext()); } - public function testMatch() + public function testMatch(): void { $this->expectException(\RuntimeException::class); @@ -121,12 +122,12 @@ public function testMatch() /** * @dataProvider providerTestSupports */ - public function testSupports($routeReference, $isSupported) + public function testSupports(Location|\stdClass|string $routeReference, bool $isSupported): void { self::assertSame($isSupported, $this->router->supports($routeReference)); } - public function providerTestSupports() + public function providerTestSupports(): array { return [ [new Location(), true], @@ -136,7 +137,7 @@ public function providerTestSupports() ]; } - public function testGetRouteCollection() + public function testGetRouteCollection(): void { self::assertInstanceOf(RouteCollection::class, $this->router->getRouteCollection()); } @@ -162,14 +163,14 @@ protected function getRequestByPathInfo($pathInfo) return $request; } - public function testMatchRequestLocation() + public function testMatchRequestLocation(): void { $pathInfo = '/foo/bar'; $destinationId = 123; $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, ] @@ -196,7 +197,7 @@ public function testMatchRequestLocation() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationWithCaseRedirect() + public function testMatchRequestLocationWithCaseRedirect(): void { $pathInfo = '/Foo/bAR'; $urlAliasPath = '/foo/bar'; @@ -204,7 +205,7 @@ public function testMatchRequestLocationWithCaseRedirect() $urlAlias = new URLAlias( [ 'path' => $urlAliasPath, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, ] @@ -238,7 +239,7 @@ public function testMatchRequestLocationWithCaseRedirect() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationWrongCaseUriPrefixExcluded() + public function testMatchRequestLocationWrongCaseUriPrefixExcluded(): void { $pathInfo = '/Foo/bAR'; $urlAliasPath = '/foo/bar'; @@ -246,7 +247,7 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded() $urlAlias = new URLAlias( [ 'path' => $urlAliasPath, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, ] @@ -280,14 +281,14 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationCorrectCaseUriPrefixExcluded() + public function testMatchRequestLocationCorrectCaseUriPrefixExcluded(): void { $pathInfo = $urlAliasPath = '/foo/bar'; $destinationId = 123; $urlAlias = new URLAlias( [ 'path' => $urlAliasPath, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, ] @@ -321,7 +322,7 @@ public function testMatchRequestLocationCorrectCaseUriPrefixExcluded() self::assertSame($pathInfo, $request->attributes->get('semanticPathinfo')); } - public function testMatchRequestLocationHistory() + public function testMatchRequestLocationHistory(): void { $pathInfo = '/foo/bar'; $newPathInfo = '/foo/bar-new'; @@ -333,7 +334,7 @@ public function testMatchRequestLocationHistory() $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => true, ] @@ -368,14 +369,14 @@ public function testMatchRequestLocationHistory() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationCustom() + public function testMatchRequestLocationCustom(): void { $pathInfo = '/foo/bar'; $destinationId = 123; $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, 'isCustom' => true, @@ -404,7 +405,7 @@ public function testMatchRequestLocationCustom() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestLocationCustomForward() + public function testMatchRequestLocationCustomForward(): void { $pathInfo = '/foo/bar'; $newPathInfo = '/foo/bar-new'; @@ -416,7 +417,7 @@ public function testMatchRequestLocationCustomForward() $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::LOCATION, + 'type' => URLAlias::LOCATION, 'destination' => $destinationId, 'isHistory' => false, 'isCustom' => true, @@ -460,7 +461,7 @@ public function testMatchRequestLocationCustomForward() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestFail() + public function testMatchRequestFail(): void { $this->expectException(ResourceNotFoundException::class); @@ -474,7 +475,7 @@ public function testMatchRequestFail() $this->router->matchRequest($request); } - public function testMatchRequestResource() + public function testMatchRequestResource(): void { $pathInfo = '/hello_content/hello_search'; $destination = '/content/search'; @@ -482,7 +483,7 @@ public function testMatchRequestResource() [ 'destination' => $destination, 'path' => $pathInfo, - 'type' => UrlAlias::RESOURCE, + 'type' => URLAlias::RESOURCE, ] ); $request = $this->getRequestByPathInfo($pathInfo); @@ -500,7 +501,7 @@ public function testMatchRequestResource() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestResourceWithRedirect() + public function testMatchRequestResourceWithRedirect(): void { $pathInfo = '/hello_content/hello_search'; $destination = '/content/search'; @@ -508,7 +509,7 @@ public function testMatchRequestResourceWithRedirect() [ 'destination' => $destination, 'path' => $pathInfo, - 'type' => UrlAlias::RESOURCE, + 'type' => URLAlias::RESOURCE, 'forward' => true, ] ); @@ -527,7 +528,7 @@ public function testMatchRequestResourceWithRedirect() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestResourceWithCaseRedirect() + public function testMatchRequestResourceWithCaseRedirect(): void { $pathInfo = '/heLLo_contEnt/hEllo_SEarch'; $urlAliasPath = '/hello_content/hello_search'; @@ -536,7 +537,7 @@ public function testMatchRequestResourceWithCaseRedirect() [ 'destination' => $destination, 'path' => $urlAliasPath, - 'type' => UrlAlias::RESOURCE, + 'type' => URLAlias::RESOURCE, 'forward' => false, ] ); @@ -564,7 +565,7 @@ public function testMatchRequestResourceWithCaseRedirect() * Tests that forwarding custom alias will redirect to the resource destination rather than * to the case-corrected alias. */ - public function testMatchRequestResourceCaseIncorrectWithForwardRedirect() + public function testMatchRequestResourceCaseIncorrectWithForwardRedirect(): void { $pathInfo = '/heLLo_contEnt/hEllo_SEarch'; $urlAliasPath = '/hello_content/hello_search'; @@ -573,7 +574,7 @@ public function testMatchRequestResourceCaseIncorrectWithForwardRedirect() [ 'destination' => $destination, 'path' => $urlAliasPath, - 'type' => UrlAlias::RESOURCE, + 'type' => URLAlias::RESOURCE, 'forward' => true, ] ); @@ -592,13 +593,13 @@ public function testMatchRequestResourceCaseIncorrectWithForwardRedirect() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestVirtual() + public function testMatchRequestVirtual(): void { $pathInfo = '/foo/bar'; $urlAlias = new URLAlias( [ 'path' => $pathInfo, - 'type' => UrlAlias::VIRTUAL, + 'type' => URLAlias::VIRTUAL, ] ); $request = $this->getRequestByPathInfo($pathInfo); @@ -616,14 +617,14 @@ public function testMatchRequestVirtual() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testMatchRequestVirtualWithCaseRedirect() + public function testMatchRequestVirtualWithCaseRedirect(): void { $pathInfo = '/Foo/bAR'; $urlAliasPath = '/foo/bar'; $urlAlias = new URLAlias( [ 'path' => $urlAliasPath, - 'type' => UrlAlias::VIRTUAL, + 'type' => URLAlias::VIRTUAL, ] ); $request = $this->getRequestByPathInfo($pathInfo); @@ -646,7 +647,7 @@ public function testMatchRequestVirtualWithCaseRedirect() self::assertEquals($expected, $this->router->matchRequest($request)); } - public function testGenerateFail() + public function testGenerateFail(): void { $this->expectException(RouteNotFoundException::class); @@ -681,21 +682,21 @@ public function testGenerateWithRouteObject(): void ); } - public function testGenerateNoLocation() + public function testGenerateNoLocation(): void { $this->expectException(\InvalidArgumentException::class); $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, ['foo' => 'bar']); } - public function testGenerateInvalidLocation() + public function testGenerateInvalidLocation(): void { $this->expectException(\LogicException::class); $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, ['location' => new \stdClass()]); } - public function testGenerateWithLocationId() + public function testGenerateWithLocationId(): void { $locationId = 123; $location = new Location(['id' => $locationId]); @@ -722,7 +723,7 @@ public function testGenerateWithLocationId() ); } - public function testGenerateWithLocationAsParameter() + public function testGenerateWithLocationAsParameter(): void { $locationId = 123; $location = new Location(['id' => $locationId]); @@ -744,7 +745,7 @@ public function testGenerateWithLocationAsParameter() ); } - public function testGenerateWithContentId() + public function testGenerateWithContentId(): void { $locationId = 123; $contentId = 456; @@ -778,7 +779,7 @@ public function testGenerateWithContentId() ); } - public function testGenerateWithContentIdWithMissingMainLocation() + public function testGenerateWithContentIdWithMissingMainLocation(): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php index d196b24bd0..09f251e5c1 100644 --- a/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php +++ b/tests/lib/MVC/Symfony/Security/HttpUtilsTest.php @@ -18,7 +18,7 @@ class HttpUtilsTest extends TestCase /** * @dataProvider generateUriStandardProvider */ - public function testGenerateUriStandard($uri, $isUriRouteName, $expected) + public function testGenerateUriStandard(string $uri, bool $isUriRouteName, string $expected): void { $urlGenerator = $this->createMock(UrlGeneratorInterface::class); $httpUtils = new HttpUtils($urlGenerator); @@ -39,7 +39,7 @@ public function testGenerateUriStandard($uri, $isUriRouteName, $expected) self::assertSame($expected, $httpUtils->generateUri($request, $uri)); } - public function generateUriStandardProvider() + public function generateUriStandardProvider(): array { return [ ['http://localhost/foo/bar', false, 'http://localhost/foo/bar'], @@ -53,7 +53,7 @@ public function generateUriStandardProvider() /** * @dataProvider generateUriProvider */ - public function testGenerateUri($uri, $isUriRouteName, $siteAccessUri, $expected) + public function testGenerateUri(string $uri, bool $isUriRouteName, ?string $siteAccessUri, string $expected): void { $siteAccess = new SiteAccess('test', 'test'); if ($uri[0] === '/') { @@ -86,7 +86,7 @@ public function testGenerateUri($uri, $isUriRouteName, $siteAccessUri, $expected self::assertSame($expected, $res); } - public function generateUriProvider() + public function generateUriProvider(): array { return [ ['http://localhost/foo/bar', false, null, 'http://localhost/foo/bar'], @@ -97,7 +97,7 @@ public function generateUriProvider() ]; } - public function testCheckRequestPathStandard() + public function testCheckRequestPathStandard(): void { $httpUtils = new HttpUtils(); $httpUtils->setSiteAccess(new SiteAccess('test')); @@ -108,7 +108,7 @@ public function testCheckRequestPathStandard() /** * @dataProvider checkRequestPathProvider */ - public function testCheckRequestPath($path, $siteAccessUri, $requestUri, $expected) + public function testCheckRequestPath(string $path, ?string $siteAccessUri, string $requestUri, bool $expected): void { $siteAccess = new SiteAccess('test', 'test'); if ($siteAccessUri !== null) { @@ -127,7 +127,7 @@ public function testCheckRequestPath($path, $siteAccessUri, $requestUri, $expect self::assertSame($expected, $httpUtils->checkRequestPath($request, $path)); } - public function checkRequestPathProvider() + public function checkRequestPathProvider(): array { return [ ['/foo/bar', null, 'http://localhost/foo/bar', true], diff --git a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php index 8760a1b6db..504ba21ab4 100644 --- a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php +++ b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php @@ -18,6 +18,7 @@ use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\VersionInfo; use Ibexa\Core\Repository\Values\User\User as APIUser; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\Exception\DisabledException; use Throwable; @@ -27,10 +28,10 @@ final class UserCheckerTest extends TestCase private const EXAMPLE_USER_ID = 14; /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $userServiceMock; + private MockObject $userServiceMock; /** @var \Ibexa\Core\MVC\Symfony\Security\UserChecker */ - private $userChecker; + private UserChecker $userChecker; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Security/UserTest.php b/tests/lib/MVC/Symfony/Security/UserTest.php index 5561078ba1..a4a34ad599 100644 --- a/tests/lib/MVC/Symfony/Security/UserTest.php +++ b/tests/lib/MVC/Symfony/Security/UserTest.php @@ -16,7 +16,7 @@ class UserTest extends TestCase { - public function testConstruct() + public function testConstruct(): void { $login = 'my_username'; $passwordHash = 'encoded_password'; @@ -48,7 +48,7 @@ public function testConstruct() self::assertNull($user->getSalt()); } - public function testIsEqualTo() + public function testIsEqualTo(): void { $userId = 123; $apiUser = $this->createMock(APIUser::class); @@ -70,7 +70,7 @@ public function testIsEqualTo() self::assertTrue($user->isEqualTo($user2)); } - public function testIsNotEqualTo() + public function testIsNotEqualTo(): void { $apiUser = $this->createMock(APIUser::class); $apiUser @@ -91,7 +91,7 @@ public function testIsNotEqualTo() self::assertFalse($user->isEqualTo($user2)); } - public function testIsEqualToNotSameUserType() + public function testIsEqualToNotSameUserType(): void { $user = new User($this->createMock(APIUser::class)); $user2 = $this->createMock(ReferenceUserInterface::class); @@ -102,7 +102,7 @@ public function testIsEqualToNotSameUserType() self::assertFalse($user->isEqualTo($user2)); } - public function testSetAPIUser() + public function testSetAPIUser(): void { $apiUserA = $this->createMock(APIUser::class); $apiUserB = $this->createMock(APIUser::class); diff --git a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php index b4ac50d84b..49c72f69db 100644 --- a/tests/lib/MVC/Symfony/Security/UserWrappedTest.php +++ b/tests/lib/MVC/Symfony/Security/UserWrappedTest.php @@ -77,7 +77,7 @@ public function testRegularUser(): void self::assertSame($originalUser, $user->getWrappedUser()); } - public function testIsEqualTo() + public function testIsEqualTo(): void { $originalUser = $this->createMock(UserEquatableInterface::class); $user = new UserWrapped($originalUser, $this->apiUser); diff --git a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php index 2d8261b14c..a98c03b74c 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\Controller\Content\ViewController; use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute; use Ibexa\Core\MVC\Symfony\Security\Authorization\Voter\CoreVoter; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; @@ -19,7 +20,7 @@ class CoreVoterTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; + private MockObject $permissionResolver; protected function setUp(): void { @@ -30,13 +31,13 @@ protected function setUp(): void /** * @dataProvider supportsAttributeProvider */ - public function testSupportsAttribute($attribute, $expectedResult) + public function testSupportsAttribute(string|Attribute|\stdClass|array $attribute, bool $expectedResult): void { $voter = new CoreVoter($this->permissionResolver); self::assertSame($expectedResult, $voter->supportsAttribute($attribute)); } - public function supportsAttributeProvider() + public function supportsAttributeProvider(): array { return [ ['foo', false], @@ -58,13 +59,13 @@ public function supportsAttributeProvider() /** * @dataProvider supportsClassProvider */ - public function testSupportsClass($class) + public function testSupportsClass(string $class): void { $voter = new CoreVoter($this->permissionResolver); self::assertTrue($voter->supportsClass($class)); } - public function supportsClassProvider() + public function supportsClassProvider(): array { return [ ['foo'], @@ -77,7 +78,7 @@ public function supportsClassProvider() /** * @dataProvider voteInvalidAttributeProvider */ - public function testVoteInvalidAttribute(array $attributes) + public function testVoteInvalidAttribute(array $attributes): void { $voter = new CoreVoter($this->permissionResolver); self::assertSame( @@ -90,7 +91,7 @@ public function testVoteInvalidAttribute(array $attributes) ); } - public function voteInvalidAttributeProvider() + public function voteInvalidAttributeProvider(): array { return [ [[]], @@ -113,7 +114,7 @@ public function voteInvalidAttributeProvider() /** * @dataProvider voteProvider */ - public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResult) + public function testVote(Attribute $attribute, ?bool $repositoryCanUser, int $expectedResult): void { $voter = new CoreVoter($this->permissionResolver); if ($repositoryCanUser !== null) { @@ -138,7 +139,7 @@ public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResu ); } - public function voteProvider() + public function voteProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php index 971b646df8..140e35b84b 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute; use Ibexa\Core\MVC\Symfony\Security\Authorization\Voter\ValueObjectVoter; use Ibexa\Core\Repository\Permission\PermissionResolver; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; @@ -19,7 +20,7 @@ class ValueObjectVoterTest extends TestCase { /** @var \Ibexa\Core\Repository\Permission\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; + private MockObject $permissionResolver; protected function setUp(): void { @@ -30,13 +31,13 @@ protected function setUp(): void /** * @dataProvider supportsAttributeProvider */ - public function testSupportsAttribute($attribute, $expectedResult) + public function testSupportsAttribute(string|Attribute|\stdClass|array $attribute, bool $expectedResult): void { $voter = new ValueObjectVoter($this->permissionResolver); self::assertSame($expectedResult, $voter->supportsAttribute($attribute)); } - public function supportsAttributeProvider() + public function supportsAttributeProvider(): array { return [ ['foo', false], @@ -58,13 +59,13 @@ public function supportsAttributeProvider() /** * @dataProvider supportsClassProvider */ - public function testSupportsClass($class) + public function testSupportsClass(string $class): void { $voter = new ValueObjectVoter($this->permissionResolver); self::assertTrue($voter->supportsClass($class)); } - public function supportsClassProvider() + public function supportsClassProvider(): array { return [ ['foo'], @@ -77,7 +78,7 @@ public function supportsClassProvider() /** * @dataProvider voteInvalidAttributeProvider */ - public function testVoteInvalidAttribute(array $attributes) + public function testVoteInvalidAttribute(array $attributes): void { $voter = new ValueObjectVoter($this->permissionResolver); self::assertSame( @@ -90,7 +91,7 @@ public function testVoteInvalidAttribute(array $attributes) ); } - public function voteInvalidAttributeProvider() + public function voteInvalidAttributeProvider(): array { return [ [[]], @@ -104,7 +105,7 @@ public function voteInvalidAttributeProvider() /** * @dataProvider voteProvider */ - public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResult) + public function testVote(Attribute $attribute, bool $repositoryCanUser, int $expectedResult): void { $voter = new ValueObjectVoter($this->permissionResolver); $targets = isset($attribute->limitations['targets']) ? $attribute->limitations['targets'] : []; @@ -124,7 +125,7 @@ public function testVote(Attribute $attribute, $repositoryCanUser, $expectedResu ); } - public function voteProvider() + public function voteProvider(): array { return [ [ diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php index 8db7c5688b..692ba53a3c 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php @@ -15,12 +15,13 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilder; use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class CompoundAndTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $matcherBuilder; + private MockObject $matcherBuilder; protected function setUp(): void { @@ -39,7 +40,7 @@ public function testConstruct() /** * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd */ - private function buildMatcher() + private function buildMatcher(): LogicalAnd { return new LogicalAnd( [ @@ -71,7 +72,7 @@ private function buildMatcher() /** * @depends testConstruct */ - public function testSetMatcherBuilder(Compound $compoundMatcher) + public function testSetMatcherBuilder(Compound $compoundMatcher): void { $this ->matcherBuilder @@ -94,7 +95,7 @@ public function testSetMatcherBuilder(Compound $compoundMatcher) * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request * @param $expectedMatch */ - public function testMatch(SimplifiedRequest $request, $expectedMatch) + public function testMatch(SimplifiedRequest $request, $expectedMatch): void { $compoundMatcher = $this->buildMatcher(); $compoundMatcher->setRequest($request); @@ -102,7 +103,7 @@ public function testMatch(SimplifiedRequest $request, $expectedMatch) self::assertSame($expectedMatch, $compoundMatcher->match()); } - public function testSetRequest() + public function testSetRequest(): void { $compoundMatcher = new LogicalAnd( [ @@ -138,7 +139,7 @@ public function testSetRequest() $compoundMatcher->setRequest($request); } - public function matchProvider() + public function matchProvider(): array { return [ [SimplifiedRequest::fromUrl('http://fr.ezpublish.dev/eng'), 'fr_eng'], @@ -152,7 +153,7 @@ public function matchProvider() ]; } - public function testReverseMatchSiteAccessNotConfigured() + public function testReverseMatchSiteAccessNotConfigured(): void { $compoundMatcher = $this->buildMatcher(); $this->matcherBuilder @@ -165,7 +166,7 @@ public function testReverseMatchSiteAccessNotConfigured() self::assertNull($compoundMatcher->reverseMatch('not_configured_sa')); } - public function testReverseMatchNotVersatile() + public function testReverseMatchNotVersatile(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -215,7 +216,7 @@ public function testReverseMatchNotVersatile() self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } - public function testReverseMatchFail() + public function testReverseMatchFail(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -263,7 +264,7 @@ public function testReverseMatchFail() self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } - public function testReverseMatch() + public function testReverseMatch(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -317,7 +318,7 @@ public function testReverseMatch() } } - public function testSerialize() + public function testSerialize(): void { $matcher = new LogicalAnd([]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, '/foo/bar')); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php index dad491048d..cdeb4e41ee 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php @@ -15,12 +15,13 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilder; use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class CompoundOrTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ - private $matcherBuilder; + private MockObject $matcherBuilder; protected function setUp(): void { @@ -58,7 +59,7 @@ private function buildMatcher(): LogicalOr /** * @depends testConstruct */ - public function testSetMatcherBuilder(Compound $compoundMatcher) + public function testSetMatcherBuilder(Compound $compoundMatcher): void { $this->matcherBuilder ->expects(self::any()) @@ -80,7 +81,7 @@ public function testSetMatcherBuilder(Compound $compoundMatcher) * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request * @param string $expectedMatch */ - public function testMatch(SimplifiedRequest $request, $expectedMatch) + public function testMatch(SimplifiedRequest $request, $expectedMatch): void { $compoundMatcher = $this->buildMatcher(); $compoundMatcher->setRequest($request); @@ -88,7 +89,7 @@ public function testMatch(SimplifiedRequest $request, $expectedMatch) self::assertSame($expectedMatch, $compoundMatcher->match()); } - public function matchProvider() + public function matchProvider(): array { return [ [SimplifiedRequest::fromUrl('http://fr.ezpublish.dev/eng'), 'fr_eng'], @@ -103,7 +104,7 @@ public function matchProvider() ]; } - public function testReverseMatchSiteAccessNotConfigured() + public function testReverseMatchSiteAccessNotConfigured(): void { $compoundMatcher = $this->buildMatcher(); $this->matcherBuilder @@ -116,7 +117,7 @@ public function testReverseMatchSiteAccessNotConfigured() self::assertNull($compoundMatcher->reverseMatch('not_configured_sa')); } - public function testReverseMatchNotVersatile() + public function testReverseMatchNotVersatile(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -167,7 +168,7 @@ public function testReverseMatchNotVersatile() self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } - public function testReverseMatchFail() + public function testReverseMatchFail(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -215,7 +216,7 @@ public function testReverseMatchFail() self::assertNull($compoundMatcher->reverseMatch($siteAccessName)); } - public function testReverseMatch1() + public function testReverseMatch1(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -266,7 +267,7 @@ public function testReverseMatch1() } } - public function testReverseMatch2() + public function testReverseMatch2(): void { $request = $this->createMock(SimplifiedRequest::class); $siteAccessName = 'fr_eng'; @@ -319,7 +320,7 @@ public function testReverseMatch2() } } - public function testSerialize() + public function testSerialize(): void { $matcher = new LogicalOr([]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, '/foo/bar')); diff --git a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php index 4a053016fc..4721706753 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php @@ -9,6 +9,8 @@ use Ibexa\Core\MVC\Symfony\Component\Serializer\SerializerTrait; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; +use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd; +use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalOr; use PHPUnit\Framework\TestCase; class MatcherSerializationTest extends TestCase @@ -20,7 +22,7 @@ class MatcherSerializationTest extends TestCase * * @dataProvider matcherProvider */ - public function testDeserialize(Matcher $matcher, $expected = null): void + public function testDeserialize(Matcher $matcher, LogicalAnd|LogicalOr $expected = null): void { $serializedMatcher = $this->serializeMatcher($matcher); @@ -42,7 +44,7 @@ public function testDeserialize(Matcher $matcher, $expected = null): void /** * @return string */ - private function serializeMatcher(Matcher $matcher) + private function serializeMatcher(Matcher $matcher): string { return $this->getSerializer()->serialize( $matcher, @@ -77,7 +79,7 @@ public function matcherProvider(): iterable Matcher\Map\URI::class => new Matcher\Map\URI([]), Matcher\Map\Host::class => new Matcher\Map\Host([]), ]; - $logicalAnd = new Matcher\Compound\LogicalAnd( + $logicalAnd = new LogicalAnd( [ [ 'match' => 'site_access_name', @@ -85,10 +87,10 @@ public function matcherProvider(): iterable ] ); $logicalAnd->setSubMatchers($subMatchers); - $expectedLogicalAnd = new Matcher\Compound\LogicalAnd([]); + $expectedLogicalAnd = new LogicalAnd([]); $expectedLogicalAnd->setSubMatchers($expectedSubMatchers); - $logicalOr = new Matcher\Compound\LogicalOr( + $logicalOr = new LogicalOr( [ [ 'match' => 'site_access_name', @@ -96,7 +98,7 @@ public function matcherProvider(): iterable ] ); $logicalOr->setSubMatchers($subMatchers); - $expectedLogicalOr = new Matcher\Compound\LogicalOr([]); + $expectedLogicalOr = new LogicalOr([]); $expectedLogicalOr->setSubMatchers($expectedSubMatchers); $expectedMapURI = new Matcher\Map\URI([]); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php index c774ec8d2b..e3c5b7f026 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php @@ -24,10 +24,10 @@ final class ChainSiteAccessProviderTest extends TestCase private const SA_GROUP = 'group'; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface[] */ - private $providers; + private array $providers; /** @var array */ - private $groupsBySiteAccess; + private array $groupsBySiteAccess; protected function setUp(): void { @@ -163,7 +163,7 @@ private function createSiteAcccess(string $name, array $groupNames = []): SiteAc StaticSiteAccessProvider::class ); $undefinedSiteAccess->groups = array_map( - static function (string $groupName) { + static function (string $groupName): SiteAccessGroup { return new SiteAccessGroup($groupName); }, $groupNames diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php index 79b9f905e4..f772e3253b 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php @@ -43,7 +43,7 @@ public function testConstruct(): Router /** * @dataProvider matchProvider */ - public function testMatch(SimplifiedRequest $request, string $siteAccess) + public function testMatch(SimplifiedRequest $request, string $siteAccess): void { $router = $this->createRouter(); $sa = $router->match($request); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php index 8a7eb4a0af..a6449ec02e 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php @@ -73,7 +73,7 @@ public function matchProvider(): array ]; } - public function testGetName() + public function testGetName(): void { $matcher = new HostMapMatcher(['host' => 'foo'], []); self::assertSame('host:map', $matcher->getName()); @@ -85,7 +85,7 @@ public function testGetName() /** * @dataProvider reverseMatchProvider */ - public function testReverseMatch($siteAccessName, $elementNumber, SimplifiedRequest $request, $expectedHost) + public function testReverseMatch(string $siteAccessName, int $elementNumber, SimplifiedRequest $request, string $expectedHost): void { $matcher = new HostElement([$elementNumber]); $matcher->setRequest($request); @@ -94,7 +94,7 @@ public function testReverseMatch($siteAccessName, $elementNumber, SimplifiedRequ self::assertSame($expectedHost, $result->getRequest()->getHost()); } - public function reverseMatchProvider() + public function reverseMatchProvider(): array { return [ ['foo', 1, SimplifiedRequest::fromUrl('http://bar.example.com/'), 'foo.example.com'], @@ -104,14 +104,14 @@ public function reverseMatchProvider() ]; } - public function testReverseMatchFail() + public function testReverseMatchFail(): void { $matcher = new HostElement([3]); $matcher->setRequest(new SimplifiedRequest('http', 'ibexa.co')); self::assertNull($matcher->reverseMatch('foo')); } - public function testSerialize() + public function testSerialize(): void { $matcher = new HostElement([1]); $matcher->setRequest(new SimplifiedRequest('http', 'ibexa.co', 80, '/foo/bar')); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php index 7e9d96c9c8..75d9e7c97f 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php @@ -83,7 +83,7 @@ public function matchProvider(): array ]; } - public function testSetGetRequestMapHost() + public function testSetGetRequestMapHost(): void { $mapKey = 'phoenix-rises.fm'; $request = new SimplifiedRequest('http', $mapKey); @@ -93,14 +93,14 @@ public function testSetGetRequestMapHost() self::assertSame($mapKey, $matcher->getMapKey()); } - public function testReverseHostMatchFail() + public function testReverseHostMatchFail(): void { $config = ['foo' => 'bar']; $matcher = new Host($config); self::assertNull($matcher->reverseMatch('non_existent')); } - public function testReverseMatchHost() + public function testReverseMatchHost(): void { $config = [ 'ibexa.co' => 'some_siteaccess', @@ -119,7 +119,7 @@ public function testReverseMatchHost() self::assertSame('phoenix-rises.fm', $result->getRequest()->getHost()); } - public function testSetGetRequestMapPort() + public function testSetGetRequestMapPort(): void { $mapKey = 8000; $request = new SimplifiedRequest('http', '', $mapKey); @@ -129,14 +129,14 @@ public function testSetGetRequestMapPort() self::assertSame((string)$mapKey, $matcher->getMapKey()); } - public function testReversePortMatchFail() + public function testReversePortMatchFail(): void { $config = ['foo' => 8080]; $matcher = new Port($config); self::assertNull($matcher->reverseMatch('non_existent')); } - public function testReverseMatchPort() + public function testReverseMatchPort(): void { $config = [ '80' => 'some_siteaccess', diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php index c185d744ef..2c7c7b1ae1 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php @@ -71,13 +71,13 @@ public function matchProvider(): array ]; } - public function testGetName() + public function testGetName(): void { $matcher = new HostTextMatcher(['host' => 'foo'], []); self::assertSame('host:text', $matcher->getName()); } - public function testReverseMatch() + public function testReverseMatch(): void { $matcher = new HostTextMatcher( [ diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php index a78712c5cc..26f775a5f0 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php @@ -20,7 +20,7 @@ class RouterMapURITest extends TestCase * * @dataProvider setRequestProvider */ - public function testSetGetRequest($config, $pathinfo, $expectedMapKey) + public function testSetGetRequest(array $config, string $pathinfo, string $expectedMapKey): void { $request = new SimplifiedRequest('http', '', 80, $pathinfo); $matcher = new URIMapMatcher($config); @@ -35,7 +35,7 @@ public function testSetGetRequest($config, $pathinfo, $expectedMapKey) * * @dataProvider fixupURIProvider */ - public function testAnalyseURI($uri, $expectedFixedUpURI) + public function testAnalyseURI(string $uri, string $expectedFixedUpURI): void { $matcher = new URIMapMatcher([]); $matcher->setRequest( @@ -53,7 +53,7 @@ public function testAnalyseURI($uri, $expectedFixedUpURI) * * @dataProvider fixupURIProvider */ - public function testAnalyseLink($fullUri, $linkUri) + public function testAnalyseLink(string $fullUri, string $linkUri): void { $matcher = new URIMapMatcher([]); $matcher->setRequest( @@ -65,7 +65,7 @@ public function testAnalyseLink($fullUri, $linkUri) self::assertSame($fullUri, $unserializedMatcher->analyseLink($linkUri)); } - public function setRequestProvider() + public function setRequestProvider(): array { return [ [['foo' => 'bar'], '/bar/baz', 'bar'], @@ -73,7 +73,7 @@ public function setRequestProvider() ]; } - public function fixupURIProvider() + public function fixupURIProvider(): array { return [ ['/foo', '/'], @@ -86,14 +86,14 @@ public function fixupURIProvider() ]; } - public function testReverseMatchFail() + public function testReverseMatchFail(): void { $config = ['foo' => 'bar']; $matcher = new URIMapMatcher($config); self::assertNull($matcher->reverseMatch('non_existent')); } - public function testReverseMatch() + public function testReverseMatch(): void { $config = [ 'some_uri' => 'some_siteaccess', diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php index 20b5399ca3..9071ee3efb 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php @@ -75,7 +75,7 @@ public function matchProvider(): array ]; } - public function testGetName() + public function testGetName(): void { $matcher = new PortMatcher(['port' => '8080', 'scheme' => 'http'], []); self::assertSame('port', $matcher->getName()); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php index e18e03a063..85d518b4fd 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php @@ -25,7 +25,7 @@ protected function tearDown(): void parent::tearDown(); } - public function testConstructDebug() + public function testConstructDebug(): Router { return $this->createRouter(true); } @@ -33,7 +33,7 @@ public function testConstructDebug() /** * @dataProvider matchProvider */ - public function testMatch(SimplifiedRequest $request, $siteAccess) + public function testMatch(SimplifiedRequest $request, string $siteAccess): void { $router = $this->createRouter(); $sa = $router->match($request); @@ -44,7 +44,7 @@ public function testMatch(SimplifiedRequest $request, $siteAccess) $router->setSiteAccess(); } - public function testMatchWithDevEnvFail() + public function testMatchWithDevEnvFail(): void { $router = $this->createRouter(true); putenv('EZPUBLISH_SITEACCESS=' . self::UNDEFINED_SA_NAME); @@ -57,7 +57,7 @@ public function testMatchWithDevEnvFail() $router->match(new SimplifiedRequest()); } - public function testMatchWithProdEnvFail() + public function testMatchWithProdEnvFail(): void { $router = $this->createRouter(); putenv('EZPUBLISH_SITEACCESS=' . self::UNDEFINED_SA_NAME); @@ -70,7 +70,7 @@ public function testMatchWithProdEnvFail() $router->match(new SimplifiedRequest()); } - public function testMatchWithEnv() + public function testMatchWithEnv(): void { $router = $this->createRouter(); putenv('EZPUBLISH_SITEACCESS=' . self::ENV_SA_NAME); @@ -163,7 +163,7 @@ public function matchProvider(): array ]; } - public function testMatchByNameInvalidSiteAccess() + public function testMatchByNameInvalidSiteAccess(): void { $this->expectException(\InvalidArgumentException::class); @@ -178,7 +178,7 @@ public function testMatchByNameInvalidSiteAccess() $router->matchByName('bar'); } - public function testMatchByName() + public function testMatchByName(): void { $matcherBuilder = $this->createMock(MatcherBuilderInterface::class); $logger = $this->createMock(LoggerInterface::class); @@ -230,7 +230,7 @@ public function testMatchByName() self::assertSame($matchedSiteAccess, $siteAccess->name); } - public function testMatchByNameNoVersatileMatcher() + public function testMatchByNameNoVersatileMatcher(): void { $matcherBuilder = $this->createMock(MatcherBuilderInterface::class); $logger = $this->createMock(LoggerInterface::class); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php index b5367500ba..2639d21305 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php @@ -74,7 +74,7 @@ public function matchProvider(): array * * @dataProvider analyseProvider */ - public function testAnalyseURI($level, $uri, $expectedFixedUpURI) + public function testAnalyseURI(int $level, string $uri, string $expectedFixedUpURI): void { $matcher = new URIElementMatcher([$level]); $matcher->setRequest( @@ -90,7 +90,7 @@ public function testAnalyseURI($level, $uri, $expectedFixedUpURI) * * @dataProvider analyseProvider */ - public function testAnalyseURILevelAsInt($level, $uri, $expectedFixedUpURI) + public function testAnalyseURILevelAsInt(int $level, string $uri, string $expectedFixedUpURI): void { $matcher = new URIElementMatcher($level); $matcher->setRequest( @@ -106,7 +106,7 @@ public function testAnalyseURILevelAsInt($level, $uri, $expectedFixedUpURI) * * @dataProvider analyseProvider */ - public function testAnalyseLink($level, $fullUri, $linkUri) + public function testAnalyseLink(int $level, string $fullUri, string $linkUri): void { $matcher = new URIElementMatcher([$level]); $matcher->setRequest( @@ -115,7 +115,7 @@ public function testAnalyseLink($level, $fullUri, $linkUri) self::assertSame($fullUri, $matcher->analyseLink($linkUri)); } - public function analyseProvider() + public function analyseProvider(): array { return [ [2, '/my/siteaccess/foo/bar', '/foo/bar'], @@ -136,7 +136,7 @@ public function analyseProvider() /** * @dataProvider reverseMatchProvider */ - public function testReverseMatch($siteAccessName, $originalPathinfo) + public function testReverseMatch(string $siteAccessName, string $originalPathinfo): void { $expectedSiteAccessPath = str_replace('_', '/', $siteAccessName); $matcher = new URIElementMatcher([2]); @@ -149,7 +149,7 @@ public function testReverseMatch($siteAccessName, $originalPathinfo) self::assertSame('/foo/bar/baz', $result->analyseURI("/$expectedSiteAccessPath/foo/bar/baz")); } - public function reverseMatchProvider() + public function reverseMatchProvider(): array { return [ ['some_thing', '/foo/bar'], @@ -157,14 +157,14 @@ public function reverseMatchProvider() ]; } - public function testReverseMatchFail() + public function testReverseMatchFail(): void { $matcher = new URIElementMatcher([2]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, '/my/siteaccess/foo/bar')); self::assertNull($matcher->reverseMatch('another_siteaccess_again_dont_tell_me')); } - public function testSerialize() + public function testSerialize(): void { $matcher = new URIElementMatcher([2]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, '/foo/bar')); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php index 070ac79390..1b9cf1cecb 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php @@ -67,7 +67,7 @@ public function matchProvider(): array ]; } - public function testGetName() + public function testGetName(): void { $matcher = new URIElementMatcher([]); self::assertSame('uri:element', $matcher->getName()); @@ -79,7 +79,7 @@ public function testGetName() * * @dataProvider analyseProvider */ - public function testAnalyseURI($uri, $expectedFixedUpURI) + public function testAnalyseURI(string $uri, string $expectedFixedUpURI): void { $matcher = new URIElementMatcher([1]); $matcher->setRequest( @@ -94,7 +94,7 @@ public function testAnalyseURI($uri, $expectedFixedUpURI) * * @dataProvider analyseProvider */ - public function testAnalyseLink($fullUri, $linkUri) + public function testAnalyseLink(string $fullUri, string $linkUri): void { $matcher = new URIElementMatcher([1]); $matcher->setRequest( @@ -103,7 +103,7 @@ public function testAnalyseLink($fullUri, $linkUri) self::assertSame($fullUri, $matcher->analyseLink($linkUri)); } - public function analyseProvider() + public function analyseProvider(): array { return [ ['/my_siteaccess/foo/bar', '/foo/bar'], @@ -114,7 +114,7 @@ public function analyseProvider() /** * @dataProvider reverseMatchProvider */ - public function testReverseMatch($siteAccessName, $originalPathinfo) + public function testReverseMatch(string $siteAccessName, string $originalPathinfo): void { $matcher = new URIElementMatcher([1]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, $originalPathinfo)); @@ -125,7 +125,7 @@ public function testReverseMatch($siteAccessName, $originalPathinfo) self::assertSame('/foo/bar/baz', $result->analyseURI("/$siteAccessName/foo/bar/baz")); } - public function reverseMatchProvider() + public function reverseMatchProvider(): array { return [ ['something', '/foo/bar'], @@ -136,7 +136,7 @@ public function reverseMatchProvider() ]; } - public function testSerialize() + public function testSerialize(): void { $matcher = new URIElementMatcher([1]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, '/foo/bar')); diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php index bcc90d3241..6904a08651 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php @@ -73,13 +73,13 @@ public function matchProvider(): array ]; } - public function testGetName() + public function testGetName(): void { $matcher = new URITextMatcher([], []); self::assertSame('uri:text', $matcher->getName()); } - public function testAnalyseURI() + public function testAnalyseURI(): void { $siteAccessURI = '/footestbar'; $semanticURI = '/something/hoho'; @@ -94,7 +94,7 @@ public function testAnalyseURI() self::assertSame($semanticURI, $matcher->analyseURI($siteAccessURI . $semanticURI)); } - public function testAnalyseLink() + public function testAnalyseLink(): void { $siteAccessURI = '/footestbar'; $semanticURI = '/something/hoho'; @@ -109,7 +109,7 @@ public function testAnalyseLink() self::assertSame($siteAccessURI . $semanticURI, $matcher->analyseLink($semanticURI)); } - public function testReverseMatch() + public function testReverseMatch(): void { $semanticURI = '/hihi/hoho'; $matcher = new URITextMatcher( diff --git a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php index 7ef230d7ee..641a145765 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php @@ -15,6 +15,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Provider\StaticSiteAccessProvider; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class SiteAccessServiceTest extends TestCase @@ -24,19 +25,19 @@ class SiteAccessServiceTest extends TestCase private const SA_GROUP = 'group'; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $provider; + private MockObject $provider; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - private $siteAccess; + private SiteAccess $siteAccess; /** @var \ArrayIterator */ - private $availableSiteAccesses; + private ArrayIterator $availableSiteAccesses; /** @var array */ - private $configResolverParameters; + private array $configResolverParameters; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php index c4ada9c45b..6f93b233e2 100644 --- a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php +++ b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\MVC\Symfony\Routing\UrlAliasRouter; use Ibexa\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Templating\GlobalHelper; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; @@ -26,19 +27,19 @@ class GlobalHelperTest extends TestCase protected $helper; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $container; + protected MockObject $container; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $locationService; + protected MockObject $locationService; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $configResolver; + protected MockObject $configResolver; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $router; + protected MockObject $router; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $translationHelper; + protected MockObject $translationHelper; protected function setUp(): void { @@ -52,7 +53,7 @@ protected function setUp(): void $this->helper = new GlobalHelper($this->configResolver, $this->locationService, $this->router, $this->translationHelper); } - public function testGetSiteaccess() + public function testGetSiteaccess(): void { $request = new Request(); $requestStack = new RequestStack(); @@ -64,7 +65,7 @@ public function testGetSiteaccess() self::assertSame($siteAccess, $this->helper->getSiteaccess()); } - public function testGetViewParameters() + public function testGetViewParameters(): void { $request = Request::create('/foo'); $viewParameters = [ @@ -80,7 +81,7 @@ public function testGetViewParameters() self::assertSame($viewParameters, $this->helper->getViewParameters()); } - public function testGetViewParametersString() + public function testGetViewParametersString(): void { $request = Request::create('/foo'); $viewParametersString = '/(foo)/bar/(toto)/tata/(somethingelse)/héhé-høhø'; @@ -92,7 +93,7 @@ public function testGetViewParametersString() self::assertSame($viewParametersString, $this->helper->getViewParametersString()); } - public function testGetRequestedUriString() + public function testGetRequestedUriString(): void { $request = Request::create('/ibexa_demo_site/foo/bar'); $semanticPathinfo = '/foo/bar'; @@ -104,7 +105,7 @@ public function testGetRequestedUriString() self::assertSame($semanticPathinfo, $this->helper->getRequestedUriString()); } - public function testGetSystemUriStringNoUrlAlias() + public function testGetSystemUriStringNoUrlAlias(): void { $request = Request::create('/ibexa_demo_site/foo/bar'); $semanticPathinfo = '/foo/bar'; @@ -116,7 +117,7 @@ public function testGetSystemUriStringNoUrlAlias() self::assertSame($semanticPathinfo, $this->helper->getSystemUriString()); } - public function testGetSystemUriString() + public function testGetSystemUriString(): void { $locationId = 123; $contentId = 456; @@ -145,12 +146,12 @@ public function testGetSystemUriString() self::assertSame($expectedSystemUriString, $this->helper->getSystemUriString()); } - public function testGetConfigResolver() + public function testGetConfigResolver(): void { self::assertSame($this->configResolver, $this->helper->getConfigResolver()); } - public function testGetRootLocation() + public function testGetRootLocation(): void { $rootLocationId = 2; $this->configResolver @@ -173,7 +174,7 @@ public function testGetRootLocation() self::assertSame($rootLocation, $this->helper->getRootLocation()); } - public function testGetTranslationSiteAccess() + public function testGetTranslationSiteAccess(): void { $language = 'fre-FR'; $siteaccess = 'fre'; @@ -186,7 +187,7 @@ public function testGetTranslationSiteAccess() self::assertSame($siteaccess, $this->helper->getTranslationSiteAccess($language)); } - public function testGetAvailableLanguages() + public function testGetAvailableLanguages(): void { $languages = ['fre-FR', 'eng-GB', 'esl-ES']; $this->translationHelper diff --git a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php index 9c3189249f..c5f054f624 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderStrategyTest.php @@ -22,11 +22,9 @@ private function createRenderStrategy( string $supportsClass = ValueObject::class ): SPIRenderStrategy { return new class($rendered, $supportsClass) implements SPIRenderStrategy { - /** @var string */ - private $rendered; + private string $rendered; - /** @var string */ - private $supportsClass; + private string $supportsClass; public function __construct(string $rendered, string $supportsClass) { diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php index 788126e5dc..92fae1be58 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php @@ -23,6 +23,7 @@ use Ibexa\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Repository\Values\ContentType\FieldDefinitionCollection; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; /** @@ -33,13 +34,13 @@ class ContentExtensionTest extends FileSystemTwigIntegrationTestCase { /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private $fieldHelperMock; + private ?MockObject $fieldHelperMock = null; /** @var array */ - private $fieldDefinitions = []; + private array $fieldDefinitions = []; /** @var int[] */ - private $identityMap = []; + private array $identityMap = []; public function getExtensions() { @@ -75,7 +76,7 @@ public function getFixturesDir() * * @return \Ibexa\Core\Repository\Values\Content\Content */ - protected function getContent(string $contentTypeIdentifier, array $fieldsData, array $namesData = []) + protected function getContent(string $contentTypeIdentifier, array $fieldsData, array $namesData = []): Content { if (!array_key_exists($contentTypeIdentifier, $this->identityMap)) { $this->identityMap[$contentTypeIdentifier] = count($this->identityMap) + 1; @@ -142,7 +143,7 @@ protected function getContentAwareObject(string $contentTypeIdentifier, array $f return $mock; } - private function getConfigResolverMock() + private function getConfigResolverMock(): MockObject { $mock = $this->createMock(ConfigResolverInterface::class); // Signature: ConfigResolverInterface->getParameter( $paramName, $namespace = null, $scope = null ) @@ -174,7 +175,7 @@ private function getFieldsGroupsListMock(): FieldsGroupsList return $fieldsGroupsList; } - protected function getField($isEmpty) + protected function getField($isEmpty): Field { $field = new Field(['fieldDefIdentifier' => 'testfield', 'value' => null]); @@ -189,7 +190,7 @@ protected function getField($isEmpty) /** * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function getRepositoryMock() + protected function getRepositoryMock(): MockObject { $mock = $this->createMock(Repository::class); @@ -203,7 +204,7 @@ protected function getRepositoryMock() /** * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function getContentTypeServiceMock() + protected function getContentTypeServiceMock(): MockObject { $mock = $this->createMock(ContentTypeService::class); @@ -211,7 +212,7 @@ protected function getContentTypeServiceMock() ->method('loadContentType') ->will( self::returnCallback( - function ($contentTypeId) { + function ($contentTypeId): ContentType { return new ContentType( [ 'identifier' => $contentTypeId, diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php index 95c0a10644..315214b13d 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php @@ -22,12 +22,13 @@ use Ibexa\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Repository\Values\ContentType\FieldDefinitionCollection; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; use Twig\Environment; class FieldRenderingExtensionIntegrationTest extends FileSystemTwigIntegrationTestCase { - private $fieldDefinitions = []; + private array $fieldDefinitions = []; public function getExtensions() { @@ -60,7 +61,7 @@ public function getFixturesDir() return __DIR__ . '/_fixtures/field_rendering_functions/'; } - public function getFieldDefinition($typeIdentifier, $id = null, $settings = []) + public function getFieldDefinition($typeIdentifier, $id = null, $settings = []): FieldDefinition { return new FieldDefinition( [ @@ -80,7 +81,7 @@ public function getFieldDefinition($typeIdentifier, $id = null, $settings = []) * * @return \Ibexa\Core\Repository\Values\Content\Content */ - protected function getContent($contentTypeIdentifier, array $fieldsData, array $namesData = []) + protected function getContent($contentTypeIdentifier, array $fieldsData, array $namesData = []): Content { $fields = []; foreach ($fieldsData as $fieldTypeIdentifier => $fieldsArray) { @@ -147,12 +148,12 @@ protected function getContentAwareObject(string $contentTypeIdentifier, array $f return $mock; } - private function getTemplatePath($tpl): string + private function getTemplatePath(string $tpl): string { return 'templates/' . $tpl; } - private function getConfigResolverMock() + private function getConfigResolverMock(): MockObject { $mock = $this->createMock(ConfigResolverInterface::class); // Signature: ConfigResolverInterface->getParameter( $paramName, $namespace = null, $scope = null ) diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php index da79e8c9ee..41c266954d 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface; use Ibexa\Core\MVC\Symfony\Templating\Twig\Extension\FileSizeExtension; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Contracts\Translation\TranslatorInterface; use Twig\Test\IntegrationTestCase; @@ -31,7 +32,7 @@ class FileSizeExtensionTest extends IntegrationTestCase /** * @param \Symfony\Contracts\Translation\TranslatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $translatorMock; + protected ?MockObject $translatorMock = null; /** * @param \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject @@ -41,7 +42,7 @@ class FileSizeExtensionTest extends IntegrationTestCase /** * @param \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $localeConverterInterfaceMock; + protected ?MockObject $localeConverterInterfaceMock = null; /** * @param string $locale @@ -56,7 +57,7 @@ protected function setConfigurationLocale($locale, $defaultLocale) /** * @return string $locale */ - public function getLocale() + public function getLocale(): array { return [$this->locale]; } @@ -79,7 +80,7 @@ protected function getFixturesDir(): string /** * @return \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected function getConfigResolverInterfaceMock() + protected function getConfigResolverInterfaceMock(): MockObject { $configResolverInterfaceMock = $this->createMock(ConfigResolverInterface::class); $configResolverInterfaceMock->expects(self::any()) @@ -93,7 +94,7 @@ protected function getConfigResolverInterfaceMock() /** * @return \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected function getLocaleConverterInterfaceMock() + protected function getLocaleConverterInterfaceMock(): MockObject { $this->localeConverterInterfaceMock = $this->createMock(LocaleConverterInterface::class); $this->localeConverterInterfaceMock->expects(self::any()) @@ -113,14 +114,14 @@ protected function getLocaleConverterInterfaceMock() /** * @return \Symfony\Contracts\Translation\TranslatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected function getTranslatorInterfaceMock() + protected function getTranslatorInterfaceMock(): MockObject { $that = $this; $this->translatorMock = $this->createMock(TranslatorInterface::class); $this->translatorMock ->expects(self::any())->method('trans')->will( self::returnCallback( - static function ($suffixes) use ($that) { + static function (string $suffixes) use ($that) { foreach ($that->getLocale() as $value) { if ($value === 'fre-FR') { return $suffixes . ' French version'; diff --git a/tests/lib/MVC/Symfony/Translation/fixtures/ContentValidationExceptionUsageStub.php b/tests/lib/MVC/Symfony/Translation/fixtures/ContentValidationExceptionUsageStub.php index 6235c3b8a0..c3c77fabfe 100644 --- a/tests/lib/MVC/Symfony/Translation/fixtures/ContentValidationExceptionUsageStub.php +++ b/tests/lib/MVC/Symfony/Translation/fixtures/ContentValidationExceptionUsageStub.php @@ -18,7 +18,7 @@ final class ContentValidationExceptionUsageStub /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException */ - public function foo(): void + public function foo(): never { throw new ContentValidationException( 'Content with ID %contentId% could not be found', diff --git a/tests/lib/MVC/Symfony/Translation/fixtures/ForbiddenExceptionUsageStub.php b/tests/lib/MVC/Symfony/Translation/fixtures/ForbiddenExceptionUsageStub.php index e40290d0bb..066545154a 100644 --- a/tests/lib/MVC/Symfony/Translation/fixtures/ForbiddenExceptionUsageStub.php +++ b/tests/lib/MVC/Symfony/Translation/fixtures/ForbiddenExceptionUsageStub.php @@ -18,7 +18,7 @@ final class ForbiddenExceptionUsageStub /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException */ - public function foo(): void + public function foo(): never { throw new ForbiddenException('Forbidden exception'); } diff --git a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php index ce4d1b3007..9cf237b227 100644 --- a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php +++ b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php @@ -25,6 +25,7 @@ use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionClass; use Symfony\Component\HttpFoundation\ParameterBag; @@ -37,25 +38,25 @@ class ContentViewBuilderTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private $repository; + private MockObject $repository; /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ - private $viewConfigurator; + private MockObject $viewConfigurator; /** @var \Ibexa\Core\MVC\Symfony\View\ParametersInjector|\PHPUnit\Framework\MockObject\MockObject */ - private $parametersInjector; + private MockObject $parametersInjector; /** @var \Ibexa\Core\Helper\ContentInfoLocationLoader|\PHPUnit\Framework\MockObject\MockObject */ - private $contentInfoLocationLoader; + private MockObject $contentInfoLocationLoader; /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ContentViewBuilder|\PHPUnit\Framework\MockObject\MockObject */ - private $contentViewBuilder; + private ContentViewBuilder $contentViewBuilder; /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionResolver; + private MockObject $permissionResolver; /** @var \Symfony\Component\HttpFoundation\RequestStack|\PHPUnit\Framework\MockObject\MockObject */ - private $requestStack; + private MockObject $requestStack; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/View/ContentViewTest.php b/tests/lib/MVC/Symfony/View/ContentViewTest.php index 0708c32dce..de2bea42be 100644 --- a/tests/lib/MVC/Symfony/View/ContentViewTest.php +++ b/tests/lib/MVC/Symfony/View/ContentViewTest.php @@ -21,22 +21,20 @@ class ContentViewTest extends AbstractViewTest { /** * Params that are always returned by this view. - * - * @var array */ - private $valueParams = ['content' => null]; + private array $valueParams = ['content' => null]; /** * @dataProvider constructProvider */ - public function testConstruct($templateIdentifier, array $params) + public function testConstruct(string|\Closure $templateIdentifier, array $params): void { $contentView = new ContentView($templateIdentifier, $params); self::assertSame($templateIdentifier, $contentView->getTemplateIdentifier()); self::assertSame($this->valueParams + $params, $contentView->getParameters()); } - public function constructProvider() + public function constructProvider(): array { return [ ['some:valid:identifier', ['foo' => 'bar']], @@ -60,14 +58,14 @@ static function (): bool { /** * @dataProvider constructFailProvider */ - public function testConstructFail($templateIdentifier) + public function testConstructFail(int|\stdClass|array $templateIdentifier): void { $this->expectException(InvalidArgumentType::class); new ContentView($templateIdentifier); } - public function constructFailProvider() + public function constructFailProvider(): array { return [ [123], diff --git a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php index fec5439591..4c4b4838c2 100644 --- a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php +++ b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\MVC\Symfony\MVCEvents; use Ibexa\Core\MVC\Symfony\View\ContentView; use Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Twig\Environment; @@ -19,13 +20,13 @@ class TemplateRendererTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer */ - private $renderer; + private TemplateRenderer $renderer; /** @var \Twig\Environment|\PHPUnit\Framework\MockObject\MockObject */ - private $templateEngineMock; + private MockObject $templateEngineMock; /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $eventDispatcherMock; + private MockObject $eventDispatcherMock; protected function setUp(): void { @@ -37,7 +38,7 @@ protected function setUp(): void ); } - public function testRender() + public function testRender(): void { $view = $this->createView(); $view->setTemplateIdentifier('path/to/template.html.twig'); @@ -61,7 +62,7 @@ public function testRender() $this->renderer->render($view); } - public function testRenderNoViewTemplate() + public function testRenderNoViewTemplate(): void { $this->expectException(NoViewTemplateException::class); @@ -71,7 +72,7 @@ public function testRenderNoViewTemplate() /** * @return \Ibexa\Core\MVC\Symfony\View\View */ - protected function createView() + protected function createView(): ContentView { $view = new ContentView(); diff --git a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php index a147ea4ae4..5cf2b31363 100644 --- a/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php +++ b/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php @@ -27,7 +27,7 @@ private function getRegistry(array $providers): GenericVariableProviderRegistry private function getProvider(string $identifier): VariableProvider { return new class($identifier) implements VariableProvider { - private $identifier; + private string $identifier; public function __construct(string $identifier) { diff --git a/tests/lib/MVC/Symfony/View/ViewManagerTest.php b/tests/lib/MVC/Symfony/View/ViewManagerTest.php index 0d5935bb4a..a869577535 100644 --- a/tests/lib/MVC/Symfony/View/ViewManagerTest.php +++ b/tests/lib/MVC/Symfony/View/ViewManagerTest.php @@ -18,6 +18,7 @@ use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\VersionInfo; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Twig\Environment; @@ -28,24 +29,24 @@ class ViewManagerTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\View\Manager */ - private $viewManager; + private Manager $viewManager; /** @var \PHPUnit\Framework\MockObject\MockObject|\Twig\Environment */ - private $templateEngineMock; + private MockObject $templateEngineMock; /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\EventDispatcher\EventDispatcherInterface */ - private $eventDispatcherMock; + private MockObject $eventDispatcherMock; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\Repository */ - private $repositoryMock; + private MockObject $repositoryMock; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private $configResolverMock; + private MockObject $configResolverMock; /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ - private $viewConfigurator; + private MockObject $viewConfigurator; - private $viewBaseLayout = 'IbexaCoreBundle::viewbase.html.twig'; + private string $viewBaseLayout = 'IbexaCoreBundle::viewbase.html.twig'; protected function setUp(): void { @@ -65,7 +66,7 @@ protected function setUp(): void ); } - public function testRenderContent() + public function testRenderContent(): void { $content = new Content( ['versionInfo' => new VersionInfo(['contentInfo' => new ContentInfo()])] @@ -78,7 +79,7 @@ public function testRenderContent() ->method('configure') ->will( self::returnCallback( - static function (View $view) use ($templateIdentifier) { + static function (View $view) use ($templateIdentifier): void { $view->setTemplateIdentifier($templateIdentifier); } ) @@ -98,7 +99,7 @@ static function (View $view) use ($templateIdentifier) { self::assertSame($expectedTemplateResult, $this->viewManager->renderContent($content, 'customViewType', $params)); } - public function testRenderContentWithClosure() + public function testRenderContentWithClosure(): void { $content = new Content( ['versionInfo' => new VersionInfo(['contentInfo' => new ContentInfo()])] @@ -114,7 +115,7 @@ public function testRenderContentWithClosure() ->method('configure') ->will( self::returnCallback( - static function (View $view) use ($closure) { + static function (View $view) use ($closure): void { $view->setTemplateIdentifier($closure); } ) @@ -132,7 +133,7 @@ static function (View $view) use ($closure) { self::assertEqualsCanonicalizing($expectedTemplateResult, $templateResult); } - public function testRenderLocation() + public function testRenderLocation(): void { $content = new Content(['versionInfo' => new VersionInfo(['contentInfo' => new ContentInfo()])]); $location = new Location(['contentInfo' => new ContentInfo()]); @@ -145,7 +146,7 @@ public function testRenderLocation() ->method('configure') ->will( self::returnCallback( - static function (View $view) use ($templateIdentifier) { + static function (View $view) use ($templateIdentifier): void { $view->setTemplateIdentifier($templateIdentifier); } ) @@ -181,7 +182,7 @@ static function (View $view) use ($templateIdentifier) { self::assertSame($expectedTemplateResult, $this->viewManager->renderLocation($location, 'customViewType', $params)); } - public function testRenderLocationWithContentPassed() + public function testRenderLocationWithContentPassed(): void { $content = new Content(['versionInfo' => new VersionInfo(['contentInfo' => new ContentInfo()])]); $location = new Location(['contentInfo' => new ContentInfo()]); @@ -194,7 +195,7 @@ public function testRenderLocationWithContentPassed() ->method('configure') ->will( self::returnCallback( - static function (View $view) use ($templateIdentifier) { + static function (View $view) use ($templateIdentifier): void { $view->setTemplateIdentifier($templateIdentifier); } ) @@ -232,7 +233,7 @@ static function (View $view) use ($templateIdentifier) { self::assertSame($expectedTemplateResult, $this->viewManager->renderLocation($location, 'customViewType', $params)); } - public function testRenderLocationWithClosure() + public function testRenderLocationWithClosure(): void { $content = new Content(['versionInfo' => new VersionInfo(['contentInfo' => new ContentInfo()])]); $location = new Location(['contentInfo' => new ContentInfo()]); @@ -247,7 +248,7 @@ public function testRenderLocationWithClosure() ->method('configure') ->will( self::returnCallback( - static function (View $view) use ($closure) { + static function (View $view) use ($closure): void { $view->setTemplateIdentifier($closure); } ) diff --git a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php index a0e2be28d9..5b4297c253 100644 --- a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php +++ b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php @@ -17,6 +17,7 @@ use Ibexa\Core\Pagination\Pagerfanta\ContentSearchHitAdapter; use Ibexa\Core\Pagination\Pagerfanta\FixedSearchResultHitAdapter; use Ibexa\Core\Pagination\Pagerfanta\LocationSearchHitAdapter; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class SearchHitAdapterFactoryTest extends TestCase @@ -26,10 +27,10 @@ final class SearchHitAdapterFactoryTest extends TestCase ]; /** @var \Ibexa\Contracts\Core\Repository\SearchService|\PHPUnit\Framework\MockObject\MockObject */ - private $searchService; + private MockObject $searchService; /** @var \Ibexa\Core\Pagination\Pagerfanta\AdapterFactory\SearchHitAdapterFactory */ - private $searchHitAdapterFactory; + private SearchHitAdapterFactory $searchHitAdapterFactory; protected function setUp(): void { diff --git a/tests/lib/Pagination/ContentFilteringAdapterTest.php b/tests/lib/Pagination/ContentFilteringAdapterTest.php index d788e69013..8340009134 100644 --- a/tests/lib/Pagination/ContentFilteringAdapterTest.php +++ b/tests/lib/Pagination/ContentFilteringAdapterTest.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; use Ibexa\Core\Pagination\Pagerfanta\ContentFilteringAdapter; use Ibexa\Tests\Core\Search\TestCase; +use PHPUnit\Framework\MockObject\MockObject; final class ContentFilteringAdapterTest extends TestCase { @@ -23,7 +24,7 @@ final class ContentFilteringAdapterTest extends TestCase ]; /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private $contentService; + private MockObject $contentService; protected function setUp(): void { diff --git a/tests/lib/Pagination/LocationFilteringAdapterTest.php b/tests/lib/Pagination/LocationFilteringAdapterTest.php index 794623e229..b92deeecee 100644 --- a/tests/lib/Pagination/LocationFilteringAdapterTest.php +++ b/tests/lib/Pagination/LocationFilteringAdapterTest.php @@ -14,6 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; use Ibexa\Core\Pagination\Pagerfanta\LocationFilteringAdapter; use Ibexa\Tests\Core\Search\TestCase; +use PHPUnit\Framework\MockObject\MockObject; final class LocationFilteringAdapterTest extends TestCase { @@ -23,7 +24,7 @@ final class LocationFilteringAdapterTest extends TestCase ]; /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private $locationService; + private MockObject $locationService; protected function setUp(): void { diff --git a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php index a13c39df08..1bc6e0717d 100644 --- a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php @@ -33,6 +33,7 @@ use Ibexa\Core\Persistence\Cache\UrlWildcardHandler as CacheUrlWildcardHandler; use Ibexa\Core\Persistence\Cache\UserHandler as CacheUserHandler; use Ibexa\Core\Persistence\Cache\UserPreferenceHandler as CacheUserPreferenceHandler; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\CacheItem; @@ -42,25 +43,25 @@ abstract class AbstractBaseHandlerTest extends TestCase { /** @var \Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter|\PHPUnit\Framework\MockObject\MockObject */ - protected $cacheMock; + protected MockObject $cacheMock; /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $persistenceHandlerMock; + protected MockObject $persistenceHandlerMock; /** @var \Ibexa\Core\Persistence\Cache\Handler */ protected $persistenceCacheHandler; /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger|\PHPUnit\Framework\MockObject\MockObject */ - protected $loggerMock; + protected MockObject $loggerMock; /** @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache|\PHPUnit\Framework\MockObject\MockObject */ - protected $inMemoryMock; + protected MockObject $inMemoryMock; /** @var \Closure */ protected $cacheItemsClosure; /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $cacheIdentifierGeneratorMock; + protected MockObject $cacheIdentifierGeneratorMock; /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer */ protected $cacheIdentifierSanitizer; @@ -69,7 +70,7 @@ abstract class AbstractBaseHandlerTest extends TestCase protected $locationPathConverter; /** @var \Ibexa\Core\Persistence\Cache\CacheIndicesValidatorInterface */ - protected $cacheIndicesValidator; + protected MockObject $cacheIndicesValidator; /** * Setup the HandlerTest. @@ -112,7 +113,7 @@ protected function setUp(): void ); $this->cacheItemsClosure = \Closure::bind( - static function ($key, $value, $isHit, $defaultLifetime = 0) { + static function ($key, $value, $isHit, $defaultLifetime = 0): CacheItem { $item = new CacheItem(); $item->key = $key; $item->value = $value; diff --git a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php index ff2041a8e5..6d8b117deb 100644 --- a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php @@ -38,7 +38,7 @@ final public function testUnCachedMethods( array $tags = null, $key = null, $returnValue = null - ) { + ): void { $handlerMethodName = $this->getHandlerMethodName(); $this->loggerMock->expects(self::once())->method('logCall'); @@ -136,7 +136,7 @@ final public function testLoadMethodsCacheHit( $data = null, bool $multi = false, array $additionalCalls = [] - ) { + ): void { $cacheItem = $this->getCacheItem($key, $multi ? reset($data) : $data); $handlerMethodName = $this->getHandlerMethodName(); @@ -215,7 +215,7 @@ final public function testLoadMethodsCacheMiss( $data = null, bool $multi = false, array $additionalCalls = [] - ) { + ): void { $cacheItem = $this->getCacheItem($key, null); $handlerMethodName = $this->getHandlerMethodName(); diff --git a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php index b7ed47a072..4ea92bb734 100644 --- a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php @@ -39,7 +39,7 @@ final public function testUnCachedMethods( array $key = null, $returnValue = null, bool $callInnerHandler = true - ) { + ): void { $handlerMethodName = $this->getHandlerMethodName(); $this->loggerMock->expects(self::once())->method('logCall'); @@ -136,7 +136,7 @@ final public function testLoadMethodsCacheHit( $data = null, bool $multi = false, array $additionalCalls = [] - ) { + ): void { $cacheItem = $this->getCacheItem($key, $multi ? reset($data) : $data); $handlerMethodName = $this->getHandlerMethodName(); @@ -217,7 +217,7 @@ final public function testLoadMethodsCacheMiss( $data = null, bool $multi = false, array $additionalCalls = [] - ) { + ): void { $cacheItem = $this->getCacheItem($key, null); $handlerMethodName = $this->getHandlerMethodName(); diff --git a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php index a27674cb6d..56bcf5202e 100644 --- a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php +++ b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php @@ -10,6 +10,7 @@ use Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter; use Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface; use Symfony\Component\Cache\CacheItem; @@ -23,13 +24,13 @@ class InMemoryClearingProxyAdapterTest extends TestCase protected $cache; /** @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected $innerPool; + protected MockObject $innerPool; /** @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache|\PHPUnit\Framework\MockObject\MockObject */ - protected $inMemory; + protected MockObject $inMemory; /** @var \Closure */ - private $cacheItemsClosure; + private ?\Closure $cacheItemsClosure; /** * Setup the HandlerTest. @@ -47,7 +48,7 @@ protected function setUp(): void ); $this->cacheItemsClosure = \Closure::bind( - static function ($key, $value, $isHit, $defaultLifetime = 0, $tags = []) { + static function ($key, $value, $isHit, $defaultLifetime = 0, $tags = []): CacheItem { $item = new CacheItem(); $item->isTaggable = true; $item->key = $key; @@ -75,7 +76,7 @@ protected function tearDown(): void parent::tearDown(); } - public function testGetItem() + public function testGetItem(): void { $item = $this->createCacheItem('first'); @@ -91,7 +92,7 @@ public function testGetItem() self::assertSame($item, $returnedItem); } - public function testGetItems() + public function testGetItems(): void { $items = [ 'first' => $this->createCacheItem('first'), @@ -113,7 +114,7 @@ public function testGetItems() /** * Symfony uses generators with getItems() so we need to make sure we handle that. */ - public function testGetItemsWithGenerator() + public function testGetItemsWithGenerator(): void { $items = [ 'first' => $this->createCacheItem('first'), @@ -132,7 +133,7 @@ public function testGetItemsWithGenerator() self::assertSame($items, $returnedItems); } - public function testHasItem() + public function testHasItem(): void { $this->innerPool ->expects(self::once()) @@ -148,7 +149,7 @@ public function testHasItem() /** * @dataProvider providerForDelete */ - public function testDelete(string $method, $argument) + public function testDelete(string $method, string|array $argument): void { $this->innerPool ->expects(self::once()) @@ -179,7 +180,7 @@ public function providerForDelete(): array * * @dataProvider providerForClearAndInvalidation */ - public function testClearAndInvalidation(string $method, $argument) + public function testClearAndInvalidation(string $method, string|array $argument): void { if ($argument) { $this->innerPool @@ -218,7 +219,7 @@ public function providerForClearAndInvalidation(): array * * @return \Symfony\Component\Cache\CacheItem */ - private function createCacheItem($key, $tags = [], $value = true) + private function createCacheItem(string $key, $tags = [], $value = true) { $cacheItemsClosure = $this->cacheItemsClosure; diff --git a/tests/lib/Persistence/Cache/ContentHandlerTest.php b/tests/lib/Persistence/Cache/ContentHandlerTest.php index 2ab1b775cd..546e8a2716 100644 --- a/tests/lib/Persistence/Cache/ContentHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentHandlerTest.php @@ -437,7 +437,7 @@ public function providerForCachedLoadMethodsMiss(): array ]; } - public function testDeleteContent() + public function testDeleteContent(): void { $this->loggerMock->expects(self::once())->method('logCall'); diff --git a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php index 4798e79d7d..6c23fafd61 100644 --- a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php @@ -402,7 +402,7 @@ public function providerForCachedLoadMethodsMiss(): array /** * Test cache invalidation when publishing Content type. */ - public function testPublish() + public function testPublish(): void { $tags = ['t-5', 'tm', 'cft-5']; $method = 'publish'; diff --git a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php index dcc7eb690d..e0ed76fb3f 100644 --- a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php +++ b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php @@ -18,7 +18,7 @@ final class CacheIdentifierGeneratorTest extends TestCase { /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - private $cacheIdentifierGenerator; + private CacheIdentifierGenerator $cacheIdentifierGenerator; public function setUp(): void { diff --git a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php index 90f3c80055..ab01c8d20f 100644 --- a/tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php +++ b/tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php @@ -17,7 +17,7 @@ final class CacheIdentifierSanitizerTest extends TestCase { /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer */ - private $cacheIdentifierSanitizer; + private CacheIdentifierSanitizer $cacheIdentifierSanitizer; public function setUp(): void { diff --git a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php index 4ae79bdc3d..9353040ec0 100644 --- a/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php +++ b/tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php @@ -49,7 +49,7 @@ public function testGetByKey(): void self::assertNull($this->cache->get('first')); $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['first']; }); self::assertSame($obj, $this->cache->get('first')); @@ -64,7 +64,7 @@ public function testGetBySecondaryIndex(): void self::assertNull($this->cache->get('secondary')); $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first', 'secondary']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['first', 'secondary']; }); self::assertSame($obj, $this->cache->get('first')); self::assertSame($obj, $this->cache->get('secondary')); @@ -81,7 +81,7 @@ public function testGetByList(): void self::assertNull($this->cache->get('list')); $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first']; }, 'list'); + $this->cache->setMulti([$obj], static function ($o): array { return ['first']; }, 'list'); self::assertSame($obj, $this->cache->get('first')); self::assertSame([$obj], $this->cache->get('list')); @@ -95,7 +95,7 @@ public function testGetByList(): void public function testDeleted(): void { $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first', 'second']; }, 'list'); + $this->cache->setMulti([$obj], static function ($o): array { return ['first', 'second']; }, 'list'); self::assertSame($obj, $this->cache->get('first')); self::assertSame($obj, $this->cache->get('second')); @@ -117,7 +117,7 @@ public function testDeleted(): void public function testClear(): void { $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first', 'second']; }, 'list'); + $this->cache->setMulti([$obj], static function ($o): array { return ['first', 'second']; }, 'list'); self::assertSame($obj, $this->cache->get('first')); self::assertSame($obj, $this->cache->get('second')); @@ -134,7 +134,7 @@ public function testClear(): void public function testSetWhenReachingSetLimit(): void { $obj = new \stdClass(); - $this->cache->setMulti([$obj, $obj], static function ($o) { return ['first', 'second']; }, 'list'); + $this->cache->setMulti([$obj, $obj], static function ($o): array { return ['first', 'second']; }, 'list'); self::assertNull($this->cache->get('first')); self::assertNull($this->cache->get('second')); @@ -144,14 +144,14 @@ public function testSetWhenReachingSetLimit(): void public function testSetWhenReachingTotalLimit(): void { $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['second']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['third']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['fourth']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['fifth']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['sixth']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['seventh']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['eight']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['first']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['second']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['third']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['fourth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['fifth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['sixth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['seventh']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['eight']; }); self::assertNull($this->cache->get('first')); self::assertNull($this->cache->get('second')); @@ -169,19 +169,19 @@ public function testSetWhenReachingTotalLimit(): void public function testAccessCountsWhenReachingTotalLimit(): void { $obj = new \stdClass(); - $this->cache->setMulti([$obj], static function ($o) { return ['first']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['second']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['third']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['fourth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['first']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['second']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['third']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['fourth']; }); // Make sure these are read before we set further objects. $this->cache->get('first'); $this->cache->get('third'); - $this->cache->setMulti([$obj], static function ($o) { return ['fifth']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['sixth']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['seventh']; }); - $this->cache->setMulti([$obj], static function ($o) { return ['eight']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['fifth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['sixth']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['seventh']; }); + $this->cache->setMulti([$obj], static function ($o): array { return ['eight']; }); self::assertSame($obj, $this->cache->get('first')); self::assertNull($this->cache->get('second')); diff --git a/tests/lib/Persistence/Cache/LocationPathConverterTest.php b/tests/lib/Persistence/Cache/LocationPathConverterTest.php index 49acecf2dc..0249666592 100644 --- a/tests/lib/Persistence/Cache/LocationPathConverterTest.php +++ b/tests/lib/Persistence/Cache/LocationPathConverterTest.php @@ -17,7 +17,7 @@ final class LocationPathConverterTest extends TestCase { /** @var \Ibexa\Core\Persistence\Cache\LocationPathConverter */ - private $locationPathConverter; + private LocationPathConverter $locationPathConverter; public function setUp(): void { diff --git a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php index b25070b469..6c1f017f4e 100644 --- a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php @@ -17,13 +17,13 @@ */ class PersistenceHandlerTest extends AbstractBaseHandlerTest { - public function testHandler() + public function testHandler(): void { self::assertInstanceOf(SPIPersistence\Handler::class, $this->persistenceCacheHandler); self::assertInstanceOf(Cache\Handler::class, $this->persistenceCacheHandler); } - public function testContentHandler() + public function testContentHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentHandler(); @@ -31,7 +31,7 @@ public function testContentHandler() self::assertInstanceOf(Cache\ContentHandler::class, $handler); } - public function testLanguageHandler() + public function testLanguageHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentLanguageHandler(); @@ -39,7 +39,7 @@ public function testLanguageHandler() self::assertInstanceOf(Cache\ContentLanguageHandler::class, $handler); } - public function testContentTypeHandler() + public function testContentTypeHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->contentTypeHandler(); @@ -47,7 +47,7 @@ public function testContentTypeHandler() self::assertInstanceOf(Cache\ContentTypeHandler::class, $handler); } - public function testContentLocationHandler() + public function testContentLocationHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->locationHandler(); @@ -55,7 +55,7 @@ public function testContentLocationHandler() self::assertInstanceOf(Cache\LocationHandler::class, $handler); } - public function testTrashHandler() + public function testTrashHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->trashHandler(); @@ -63,7 +63,7 @@ public function testTrashHandler() self::assertInstanceOf(Cache\TrashHandler::class, $handler); } - public function testObjectStateHandler() + public function testObjectStateHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->objectStateHandler(); @@ -71,7 +71,7 @@ public function testObjectStateHandler() self::assertInstanceOf(Cache\ObjectStateHandler::class, $handler); } - public function testSectionHandler() + public function testSectionHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->sectionHandler(); @@ -79,7 +79,7 @@ public function testSectionHandler() self::assertInstanceOf(Cache\SectionHandler::class, $handler); } - public function testUserHandler() + public function testUserHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->userHandler(); @@ -87,7 +87,7 @@ public function testUserHandler() self::assertInstanceOf(Cache\UserHandler::class, $handler); } - public function testUrlAliasHandler() + public function testUrlAliasHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->urlAliasHandler(); @@ -95,7 +95,7 @@ public function testUrlAliasHandler() self::assertInstanceOf(Cache\UrlAliasHandler::class, $handler); } - public function testUrlWildcardHandler() + public function testUrlWildcardHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->urlWildcardHandler(); @@ -103,7 +103,7 @@ public function testUrlWildcardHandler() self::assertInstanceOf(Cache\UrlWildcardHandler::class, $handler); } - public function testTransactionHandler() + public function testTransactionHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); $handler = $this->persistenceCacheHandler->transactionHandler(); diff --git a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php index ca0ed86d59..3595df6593 100644 --- a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php @@ -36,12 +36,12 @@ protected function tearDown(): void parent::tearDown(); } - public function testGetName() + public function testGetName(): void { self::assertEquals(PersistenceLogger::NAME, $this->logger->getName()); } - public function testGetCalls() + public function testGetCalls(): void { self::assertEquals([], $this->logger->getCalls()); } @@ -61,7 +61,7 @@ public function testLogCall() * * @param \Ibexa\Core\Persistence\Cache\PersistenceLogger $logger */ - public function testGetCallValues($logger) + public function testGetCallValues($logger): void { $calls = $logger->getCalls(); // As we don't care about the hash index we get the array values instead diff --git a/tests/lib/Persistence/Cache/TransactionHandlerTest.php b/tests/lib/Persistence/Cache/TransactionHandlerTest.php index 702043ec60..d567798518 100644 --- a/tests/lib/Persistence/Cache/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Cache/TransactionHandlerTest.php @@ -47,7 +47,7 @@ public function providerForCachedLoadMethodsMiss(): array ]; } - public function testRollback() + public function testRollback(): void { $this->loggerMock ->expects(self::once()) @@ -75,7 +75,7 @@ public function testRollback() $handler->rollback(); } - public function testCommitStopsCacheTransaction() + public function testCommitStopsCacheTransaction(): void { $this->loggerMock ->expects(self::once()) @@ -99,7 +99,7 @@ public function testCommitStopsCacheTransaction() $handler->commit(); } - public function testBeginTransactionStartsCacheTransaction() + public function testBeginTransactionStartsCacheTransaction(): void { $this->loggerMock ->expects(self::once()) diff --git a/tests/lib/Persistence/Cache/TrashHandlerTest.php b/tests/lib/Persistence/Cache/TrashHandlerTest.php index 05251183eb..82bcdd74c2 100644 --- a/tests/lib/Persistence/Cache/TrashHandlerTest.php +++ b/tests/lib/Persistence/Cache/TrashHandlerTest.php @@ -52,7 +52,7 @@ public function providerForCachedLoadMethodsMiss(): array ]; } - public function testRecover() + public function testRecover(): void { $originalLocationId = 6; $targetLocationId = 2; @@ -115,7 +115,7 @@ public function testRecover() $handler->recover($originalLocationId, $targetLocationId); } - public function testTrashSubtree() + public function testTrashSubtree(): void { $locationId = 6; $contentId = 42; @@ -174,7 +174,7 @@ public function testTrashSubtree() $handler->trashSubtree($locationId); } - public function testDeleteTrashItem() + public function testDeleteTrashItem(): void { $trashedId = 6; $contentId = 42; @@ -243,7 +243,7 @@ public function testDeleteTrashItem() $handler->deleteTrashItem($trashedId); } - public function testEmptyTrash() + public function testEmptyTrash(): void { $trashedId = 6; $contentId = 42; diff --git a/tests/lib/Persistence/Cache/URLHandlerTest.php b/tests/lib/Persistence/Cache/URLHandlerTest.php index 9188a2138c..9a362a78fc 100644 --- a/tests/lib/Persistence/Cache/URLHandlerTest.php +++ b/tests/lib/Persistence/Cache/URLHandlerTest.php @@ -122,7 +122,7 @@ public function testUpdateUrlWhenAddressIsUpdated(): void $handler->updateUrl($urlId, $updateStruct); } - public function testUpdateUrlStatusIsUpdated() + public function testUpdateUrlStatusIsUpdated(): void { $urlId = 1; $updateStruct = new URLUpdateStruct(); diff --git a/tests/lib/Persistence/Cache/UserHandlerTest.php b/tests/lib/Persistence/Cache/UserHandlerTest.php index 7d926db583..ca30d0866d 100644 --- a/tests/lib/Persistence/Cache/UserHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserHandlerTest.php @@ -467,7 +467,7 @@ public function providerForCachedLoadMethodsMiss(): array ]; } - public function testPublishRoleDraftFromExistingRole() + public function testPublishRoleDraftFromExistingRole(): void { $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SPIUserHandler::class); @@ -512,7 +512,7 @@ public function testPublishRoleDraftFromExistingRole() $handler->publishRoleDraft($roleDraftId); } - public function testPublishNewRoleDraft() + public function testPublishNewRoleDraft(): void { $this->loggerMock->expects(self::once())->method('logCall'); $innerHandlerMock = $this->createMock(SPIUserHandler::class); @@ -537,7 +537,7 @@ public function testPublishNewRoleDraft() $handler->publishRoleDraft($roleDraftId); } - public function testAssignRole() + public function testAssignRole(): void { $innerUserHandlerMock = $this->createMock(SPIUserHandler::class); $innerLocationHandlerMock = $this->createMock(SPILocationHandler::class); diff --git a/tests/lib/Persistence/DatabaseConnectionFactory.php b/tests/lib/Persistence/DatabaseConnectionFactory.php index 4dda3c350b..dde97680e7 100644 --- a/tests/lib/Persistence/DatabaseConnectionFactory.php +++ b/tests/lib/Persistence/DatabaseConnectionFactory.php @@ -19,13 +19,10 @@ class DatabaseConnectionFactory { /** * Associative array of [driver => AbstractPlatform]. - * - * @var array */ - private $databasePlatforms = []; + private array $databasePlatforms; - /** @var \Doctrine\Common\EventManager */ - private $eventManager; + private EventManager $eventManager; /** * Connection Pool for re-using already created connection. @@ -34,7 +31,7 @@ class DatabaseConnectionFactory * * @var \Doctrine\DBAL\Connection[] */ - private static $connectionPool; + private static ?array $connectionPool = null; /** * @param \Ibexa\DoctrineSchema\Database\DbPlatform\DbPlatformInterface[] $databasePlatforms diff --git a/tests/lib/Persistence/FieldTypeRegistryTest.php b/tests/lib/Persistence/FieldTypeRegistryTest.php index f8b7aff505..51f574d386 100644 --- a/tests/lib/Persistence/FieldTypeRegistryTest.php +++ b/tests/lib/Persistence/FieldTypeRegistryTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException; use Ibexa\Core\Persistence\FieldTypeRegistry; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\FieldTypeRegistry @@ -31,7 +32,7 @@ public function testConstructor(): void ); } - public function testGetFieldTypeInstance() + public function testGetFieldTypeInstance(): void { $instance = $this->getFieldTypeMock(); $registry = new FieldTypeRegistry([self::FIELD_TYPE_IDENTIFIER => $instance]); @@ -44,7 +45,7 @@ public function testGetFieldTypeInstance() /** * @since 5.3.2 */ - public function testGetNotFound() + public function testGetNotFound(): void { $this->expectException(FieldTypeNotFoundException::class); @@ -55,7 +56,7 @@ public function testGetNotFound() /** * BC with 5.0-5.3.2. */ - public function testGetNotFoundBCException() + public function testGetNotFoundBCException(): void { $this->expectException(\RuntimeException::class); @@ -63,7 +64,7 @@ public function testGetNotFoundBCException() $registry->getFieldType('not-found'); } - public function testGetNotInstance() + public function testGetNotInstance(): void { $this->expectException(\TypeError::class); @@ -71,7 +72,7 @@ public function testGetNotInstance() $registry->getFieldType(self::FIELD_TYPE_IDENTIFIER); } - public function testRegister() + public function testRegister(): void { $fieldType = $this->getFieldTypeMock(); $registry = new FieldTypeRegistry([]); @@ -88,7 +89,7 @@ public function testRegister() * * @return \Ibexa\Contracts\Core\Persistence\FieldType */ - protected function getFieldTypeMock() + protected function getFieldTypeMock(): MockObject { return $this->createMock(SPIFieldType::class); } diff --git a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php index c3c70e7678..8ffcd66e50 100644 --- a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\IO\UrlRedecoratorInterface; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class ImageConverterTest extends TestCase @@ -26,13 +27,13 @@ final class ImageConverterTest extends TestCase private const MIME_TYPES_STORAGE_VALUE = '["image\/png","image\/jpeg"]'; /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter */ - private $imageConverter; + private ImageConverter $imageConverter; /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $urlRedecorator; + private MockObject $urlRedecorator; /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php index a79b51c757..0e48618b2a 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php @@ -34,7 +34,7 @@ protected function setUp(): void $this->insertDatabaseFixture(__DIR__ . '/../_fixtures/bookmarks.php'); } - public function testInsertBookmark() + public function testInsertBookmark(): void { $id = $this->getGateway()->insertBookmark(new Bookmark([ 'userId' => 14, @@ -51,14 +51,14 @@ public function testInsertBookmark() ], $data); } - public function testDeleteBookmark() + public function testDeleteBookmark(): void { $this->getGateway()->deleteBookmark(self::EXISTING_BOOKMARK_ID); self::assertEmpty($this->loadBookmark(self::EXISTING_BOOKMARK_ID)); } - public function testLoadBookmarkDataById() + public function testLoadBookmarkDataById(): void { self::assertEquals( [self::EXISTING_BOOKMARK_DATA], @@ -66,7 +66,7 @@ public function testLoadBookmarkDataById() ); } - public function testLoadBookmarkDataByUserIdAndLocationId() + public function testLoadBookmarkDataByUserIdAndLocationId(): void { $data = $this->getGateway()->loadBookmarkDataByUserIdAndLocationId( (int) self::EXISTING_BOOKMARK_DATA['user_id'], @@ -79,7 +79,7 @@ public function testLoadBookmarkDataByUserIdAndLocationId() /** * @dataProvider dataProviderForLoadUserBookmarks */ - public function testLoadUserBookmarks(int $userId, int $offset, int $limit, array $expected) + public function testLoadUserBookmarks(int $userId, int $offset, int $limit, array $expected): void { self::assertEquals($expected, $this->getGateway()->loadUserBookmarks($userId, $offset, $limit)); } @@ -87,7 +87,7 @@ public function testLoadUserBookmarks(int $userId, int $offset, int $limit, arra /** * @dataProvider dataProviderForLoadUserBookmarks */ - public function testCountUserBookmarks(int $userId, int $offset, int $limit, array $expected) + public function testCountUserBookmarks(int $userId, int $offset, int $limit, array $expected): void { self::assertEquals(count($expected), $this->getGateway()->countUserBookmarks($userId)); } @@ -101,7 +101,7 @@ public function dataProviderForLoadUserBookmarks(): array return $row['user_id'] == $userId; }); - usort($rows, static function ($a, $b): int { + usort($rows, static function (array $a, array $b): int { return $b['id'] <=> $a['id']; }); @@ -117,7 +117,7 @@ public function dataProviderForLoadUserBookmarks(): array ]; } - public function testLocationSwapped() + public function testLocationSwapped(): void { $bookmark1Id = 3; $bookmark2Id = 4; diff --git a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php index 1b9e0c99f6..52c7d0c561 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php @@ -13,6 +13,7 @@ use Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; use Ibexa\Core\Persistence\Legacy\Bookmark\Handler; use Ibexa\Core\Persistence\Legacy\Bookmark\Mapper; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class HandlerTest extends TestCase @@ -20,13 +21,13 @@ class HandlerTest extends TestCase public const BOOKMARK_ID = 7; /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private $gateway; + private MockObject $gateway; /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private $mapper; + private MockObject $mapper; /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Handler */ - private $handler; + private Handler $handler; protected function setUp(): void { @@ -35,7 +36,7 @@ protected function setUp(): void $this->handler = new Handler($this->gateway, $this->mapper); } - public function testCreate() + public function testCreate(): void { $createStruct = new CreateStruct([ 'locationId' => 54, @@ -64,7 +65,7 @@ public function testCreate() self::assertEquals($bookmark->id, self::BOOKMARK_ID); } - public function testDelete() + public function testDelete(): void { $this->gateway ->expects(self::once()) @@ -74,7 +75,7 @@ public function testDelete() $this->handler->delete(self::BOOKMARK_ID); } - public function testLoadByUserIdAndLocationIdExistingBookmark() + public function testLoadByUserIdAndLocationIdExistingBookmark(): void { $userId = 87; $locationId = 54; @@ -107,7 +108,7 @@ public function testLoadByUserIdAndLocationIdExistingBookmark() self::assertEquals([$locationId => $object], $this->handler->loadByUserIdAndLocationId($userId, [$locationId])); } - public function testLoadByUserIdAndLocationIdNonExistingBookmark() + public function testLoadByUserIdAndLocationIdNonExistingBookmark(): void { $userId = 87; $locationId = 54; @@ -127,7 +128,7 @@ public function testLoadByUserIdAndLocationIdNonExistingBookmark() self::assertEmpty($this->handler->loadByUserIdAndLocationId($userId, [$locationId])); } - public function testLoadUserBookmarks() + public function testLoadUserBookmarks(): void { $userId = 87; $offset = 50; @@ -176,7 +177,7 @@ public function testLoadUserBookmarks() self::assertEquals($objects, $this->handler->loadUserBookmarks($userId, $offset, $limit)); } - public function testLocationSwapped() + public function testLocationSwapped(): void { $location1Id = 1; $location2Id = 2; diff --git a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php index 3e88f1cd1e..b7887f773c 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/MapperTest.php @@ -19,14 +19,14 @@ class MapperTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Mapper */ - private $mapper; + private Mapper $mapper; protected function setUp(): void { $this->mapper = new Mapper(); } - public function testCreateBookmarkFromCreateStruct() + public function testCreateBookmarkFromCreateStruct(): void { $createStruct = new CreateStruct([ 'locationId' => 54, @@ -39,7 +39,7 @@ public function testCreateBookmarkFromCreateStruct() ]), $this->mapper->createBookmarkFromCreateStruct($createStruct)); } - public function testExtractBookmarksFromRows() + public function testExtractBookmarksFromRows(): void { $rows = [ [ diff --git a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php index b3737f54c7..fd93f1e490 100644 --- a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php @@ -33,6 +33,7 @@ use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway as UrlAliasGateway; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; use ReflectionException; /** @@ -54,63 +55,63 @@ class ContentHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * Location gateway mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGatewayMock; + protected ?MockObject $locationGatewayMock = null; /** * Type gateway mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - protected $typeGatewayMock; + protected ?MockObject $typeGatewayMock = null; /** * Mapper mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $mapperMock; + protected ?MockObject $mapperMock = null; /** * Field handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected $fieldHandlerMock; + protected ?MockObject $fieldHandlerMock = null; /** * Location handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler */ - protected $treeHandlerMock; + protected ?MockObject $treeHandlerMock = null; /** * Slug converter mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter */ - protected $slugConverterMock; + protected ?MockObject $slugConverterMock = null; /** * Location handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ - protected $urlAliasGatewayMock; + protected ?MockObject $urlAliasGatewayMock = null; /** * ContentType handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Handler */ - protected $contentTypeHandlerMock; + protected ?MockObject $contentTypeHandlerMock = null; /** * @var \PHPUnit\Framework\MockObject\MockObject&\Ibexa\Core\Persistence\Legacy\Content\Language\Handler @@ -120,7 +121,7 @@ class ContentHandlerTest extends TestCase /** * @todo Current method way to complex to test, refactor! */ - public function testCreate() + public function testCreate(): void { $handler = $this->getContentHandler(); @@ -215,7 +216,7 @@ public function testCreate() ); } - public function testPublishFirstVersion() + public function testPublishFirstVersion(): void { $handler = $this->getPartlyMockedHandler(['loadVersionInfo']); @@ -292,7 +293,7 @@ public function testPublishFirstVersion() $handler->publish(23, 1, $metadataUpdateStruct); } - public function testPublish() + public function testPublish(): void { $handler = $this->getPartlyMockedHandler(['loadVersionInfo', 'setStatus']); @@ -375,7 +376,7 @@ public function testPublish() $handler->publish(23, 2, $metadataUpdateStruct); } - public function testCreateDraftFromVersion() + public function testCreateDraftFromVersion(): void { $handler = $this->getPartlyMockedHandler(['load']); @@ -472,7 +473,7 @@ public function testCreateDraftFromVersion() ); } - public function testLoad() + public function testLoad(): void { $handler = $this->getContentHandler(); @@ -517,7 +518,7 @@ public function testLoad() ); } - public function testLoadContentList() + public function testLoadContentList(): void { $handler = $this->getContentHandler(); @@ -569,7 +570,7 @@ public function testLoadContentList() ); } - public function testLoadContentInfoByRemoteId() + public function testLoadContentInfoByRemoteId(): void { $contentInfoData = [new ContentInfo()]; $this->getGatewayMock()->expects(self::once()) @@ -591,7 +592,7 @@ public function testLoadContentInfoByRemoteId() ); } - public function testLoadErrorNotFound() + public function testLoadErrorNotFound(): void { $this->expectException(NotFoundException::class); @@ -616,7 +617,7 @@ public function testLoadErrorNotFound() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentFixtureForDraft(int $id = 23, int $versionNo = 2) + protected function getContentFixtureForDraft(int $id = 23, int $versionNo = 2): Content { $content = new Content(); $content->versionInfo = new VersionInfo(); @@ -632,7 +633,7 @@ protected function getContentFixtureForDraft(int $id = 23, int $versionNo = 2) return $content; } - public function testUpdateContent() + public function testUpdateContent(): void { $handler = $this->getPartlyMockedHandler(['load', 'loadContentInfo']); @@ -730,7 +731,7 @@ public function testUpdateContent() ); } - public function testUpdateMetadata() + public function testUpdateMetadata(): void { $handler = $this->getPartlyMockedHandler(['load', 'loadContentInfo']); @@ -765,7 +766,7 @@ public function testUpdateMetadata() self::assertInstanceOf(ContentInfo::class, $resultContentInfo); } - public function testUpdateMetadataUpdatesPathIdentificationString() + public function testUpdateMetadataUpdatesPathIdentificationString(): void { $handler = $this->getPartlyMockedHandler(['load', 'loadContentInfo']); $locationGatewayMock = $this->getLocationGatewayMock(); @@ -888,7 +889,7 @@ public function testLoadRelationList(): void ); } - public function testLoadReverseRelations() + public function testLoadReverseRelations(): void { $handler = $this->getContentHandler(); @@ -917,7 +918,7 @@ public function testLoadReverseRelations() ); } - public function testAddRelation() + public function testAddRelation(): void { // expected relation object after creation $expectedRelationObject = new Relation(); @@ -928,7 +929,7 @@ public function testAddRelation() $expectedRelationObject->type = RelationValue::COMMON; // relation create struct - $relationCreateStruct = new Relation\CreateStruct(); + $relationCreateStruct = new RelationCreateStruct(); $relationCreateStruct->destinationContentId = 66; $relationCreateStruct->sourceContentId = 23; $relationCreateStruct->sourceContentVersionNo = 1; @@ -961,7 +962,7 @@ public function testAddRelation() ); } - public function testRemoveRelation() + public function testRemoveRelation(): void { $gatewayMock = $this->getGatewayMock(); @@ -975,7 +976,7 @@ public function testRemoveRelation() $this->getContentHandler()->removeRelation(1, RelationValue::COMMON); } - protected function getRelationFixture() + protected function getRelationFixture(): Relation { $relation = new Relation(); $relation->id = self::RELATION_ID; @@ -991,7 +992,7 @@ protected function getRelationFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\CreateStruct */ - public function getCreateStructFixture() + public function getCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); @@ -1020,7 +1021,7 @@ public function getCreateStructFixture() return $struct; } - public function testLoadDraftsForUser() + public function testLoadDraftsForUser(): void { $handler = $this->getContentHandler(); $rows = [['ezcontentobject_version_contentobject_id' => 42, 'ezcontentobject_version_version' => 2]]; @@ -1051,7 +1052,7 @@ public function testLoadDraftsForUser() ); } - public function testListVersions() + public function testListVersions(): void { $handler = $this->getContentHandler(); @@ -1071,7 +1072,7 @@ public function testListVersions() ); } - public function testRemoveRawContent() + public function testRemoveRawContent(): void { $handler = $this->getContentHandler(); $treeHandlerMock = $this->getTreeHandlerMock(); @@ -1087,7 +1088,7 @@ public function testRemoveRawContent() /** * Test for the deleteContent() method. */ - public function testDeleteContentWithLocations() + public function testDeleteContentWithLocations(): void { $handlerMock = $this->getPartlyMockedHandler(['getAllLocationIds']); $gatewayMock = $this->getGatewayMock(); @@ -1112,7 +1113,7 @@ public function testDeleteContentWithLocations() /** * Test for the deleteContent() method. */ - public function testDeleteContentWithoutLocations() + public function testDeleteContentWithoutLocations(): void { $handlerMock = $this->getPartlyMockedHandler(['removeRawContent']); $gatewayMock = $this->getGatewayMock(); @@ -1128,7 +1129,7 @@ public function testDeleteContentWithoutLocations() $handlerMock->deleteContent(23); } - public function testDeleteVersion() + public function testDeleteVersion(): void { $handler = $this->getContentHandler(); @@ -1190,7 +1191,7 @@ public function testDeleteVersion() $handler->deleteVersion(225, 2); } - public function testCopySingleVersion() + public function testCopySingleVersion(): void { $handler = $this->getPartlyMockedHandler(['load', 'internalCreate']); $gatewayMock = $this->getGatewayMock(); @@ -1251,7 +1252,7 @@ public function testCopySingleVersion() ); } - public function testCopyAllVersions() + public function testCopyAllVersions(): void { $handler = $this->getPartlyMockedHandler( [ @@ -1403,7 +1404,7 @@ public function testCopyAllVersions() ); } - public function testCopyThrowsNotFoundExceptionContentNotFound() + public function testCopyThrowsNotFoundExceptionContentNotFound(): void { $this->expectException(NotFoundException::class); @@ -1421,7 +1422,7 @@ public function testCopyThrowsNotFoundExceptionContentNotFound() $handler->copy(23); } - public function testCopyThrowsNotFoundExceptionVersionNotFound() + public function testCopyThrowsNotFoundExceptionVersionNotFound(): void { $this->expectException(NotFoundException::class); @@ -1439,7 +1440,7 @@ public function testCopyThrowsNotFoundExceptionVersionNotFound() $result = $handler->copy(23, 32); } - public function testSetStatus() + public function testSetStatus(): void { $handler = $this->getContentHandler(); @@ -1544,7 +1545,7 @@ protected function getContentHandler() * * @return \Ibexa\Core\Persistence\Legacy\Content\Handler */ - protected function getPartlyMockedHandler(array $methods) + protected function getPartlyMockedHandler(array $methods): MockObject { return $this->getMockBuilder(Handler::class) ->setMethods($methods) diff --git a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php index 4325bff99a..2dcb93c603 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php @@ -22,6 +22,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\FieldHandler @@ -33,35 +34,35 @@ class FieldHandlerTest extends LanguageAwareTestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGatewayMock; + protected ?MockObject $contentGatewayMock = null; /** * Mapper mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $mapperMock; + protected ?MockObject $mapperMock = null; /** * Storage handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $storageHandlerMock; + protected ?MockObject $storageHandlerMock = null; /** * Field type registry mock. * * @var \Ibexa\Core\Persistence\FieldTypeRegistry */ - protected $fieldTypeRegistryMock; + protected ?MockObject $fieldTypeRegistryMock = null; /** * Field type mock. * * @var \Ibexa\Contracts\Core\FieldType\FieldType */ - protected $fieldTypeMock; + protected ?MockObject $fieldTypeMock = null; /** * @param bool $storageHandlerUpdatesFields @@ -125,7 +126,7 @@ protected function assertCreateNewFields($storageHandlerUpdatesFields = false) )->will(self::returnValue($storageHandlerUpdatesFields)); } - public function testCreateNewFields() + public function testCreateNewFields(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -143,7 +144,7 @@ public function testCreateNewFields() ); } - public function testCreateNewFieldsUpdatingStorageHandler() + public function testCreateNewFieldsUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $contentGatewayMock = $this->getContentGatewayMock(); @@ -212,7 +213,7 @@ protected function assertCreateNewFieldsForMainLanguage($storageHandlerUpdatesFi } } - public function testCreateNewFieldsForMainLanguage() + public function testCreateNewFieldsForMainLanguage(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -230,7 +231,7 @@ public function testCreateNewFieldsForMainLanguage() ); } - public function testCreateNewFieldsForMainLanguageUpdatingStorageHandler() + public function testCreateNewFieldsForMainLanguageUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $contentGatewayMock = $this->getContentGatewayMock(); @@ -298,7 +299,7 @@ protected function assertCreateExistingFieldsInNewVersion($storageHandlerUpdates } } - public function testCreateExistingFieldsInNewVersion() + public function testCreateExistingFieldsInNewVersion(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -313,7 +314,7 @@ public function testCreateExistingFieldsInNewVersion() $fieldHandler->createExistingFieldsInNewVersion($this->getContentFixture()); } - public function testCreateExistingFieldsInNewVersionUpdatingStorageHandler() + public function testCreateExistingFieldsInNewVersionUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $contentGatewayMock = $this->getContentGatewayMock(); @@ -336,7 +337,7 @@ public function testCreateExistingFieldsInNewVersionUpdatingStorageHandler() $fieldHandler->createExistingFieldsInNewVersion($this->getContentFixture()); } - public function testLoadExternalFieldData() + public function testLoadExternalFieldData(): void { $fieldHandler = $this->getFieldHandler(); @@ -355,7 +356,7 @@ public function testLoadExternalFieldData() /** * @param bool $storageHandlerUpdatesFields */ - public function assertUpdateFieldsWithNewLanguage($storageHandlerUpdatesFields = false) + public function assertUpdateFieldsWithNewLanguage($storageHandlerUpdatesFields = false): void { $contentGatewayMock = $this->getContentGatewayMock(); $fieldTypeMock = $this->getFieldTypeMock(); @@ -412,7 +413,7 @@ public function assertUpdateFieldsWithNewLanguage($storageHandlerUpdatesFields = )->will(self::returnValue($storageHandlerUpdatesFields)); } - public function testUpdateFieldsWithNewLanguage() + public function testUpdateFieldsWithNewLanguage(): void { $mapperMock = $this->getMapperMock(); $fieldHandler = $this->getFieldHandler(); @@ -444,7 +445,7 @@ public function testUpdateFieldsWithNewLanguage() ); } - public function testUpdateFieldsWithNewLanguageUpdatingStorageHandler() + public function testUpdateFieldsWithNewLanguageUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -487,7 +488,7 @@ public function testUpdateFieldsWithNewLanguageUpdatingStorageHandler() /** * @param bool $storageHandlerUpdatesFields */ - public function assertUpdateFieldsExistingLanguages($storageHandlerUpdatesFields = false) + public function assertUpdateFieldsExistingLanguages($storageHandlerUpdatesFields = false): void { $storageHandlerMock = $this->getStorageHandlerMock(); @@ -537,7 +538,7 @@ public function assertUpdateFieldsExistingLanguages($storageHandlerUpdatesFields } } - public function testUpdateFieldsExistingLanguages() + public function testUpdateFieldsExistingLanguages(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -564,7 +565,7 @@ public function testUpdateFieldsExistingLanguages() ); } - public function testUpdateFieldsExistingLanguagesUpdatingStorageHandler() + public function testUpdateFieldsExistingLanguagesUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -594,7 +595,7 @@ public function testUpdateFieldsExistingLanguagesUpdatingStorageHandler() /** * @param bool $storageHandlerUpdatesFields */ - public function assertUpdateFieldsForInitialLanguage($storageHandlerUpdatesFields = false) + public function assertUpdateFieldsForInitialLanguage($storageHandlerUpdatesFields = false): void { $storageHandlerMock = $this->getStorageHandlerMock(); @@ -643,7 +644,7 @@ public function assertUpdateFieldsForInitialLanguage($storageHandlerUpdatesField } } - public function testUpdateFieldsForInitialLanguage() + public function testUpdateFieldsForInitialLanguage(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -665,7 +666,7 @@ public function testUpdateFieldsForInitialLanguage() ); } - public function testUpdateFieldsForInitialLanguageUpdatingStorageHandler() + public function testUpdateFieldsForInitialLanguageUpdatingStorageHandler(): void { $fieldHandler = $this->getFieldHandler(); $mapperMock = $this->getMapperMock(); @@ -695,7 +696,7 @@ public function testUpdateFieldsForInitialLanguageUpdatingStorageHandler() ); } - public function testDeleteFields() + public function testDeleteFields(): void { $fieldHandler = $this->getFieldHandler(); @@ -731,7 +732,7 @@ public function testDeleteFields() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentPartialFieldsFixture() + protected function getContentPartialFieldsFixture(): Content { $content = new Content(); $content->versionInfo = new VersionInfo(); @@ -769,7 +770,7 @@ protected function getContentPartialFieldsFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentNoFieldsFixture() + protected function getContentNoFieldsFixture(): Content { $content = new Content(); $content->versionInfo = new VersionInfo(); @@ -789,7 +790,7 @@ protected function getContentNoFieldsFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentSingleLanguageFixture() + protected function getContentSingleLanguageFixture(): Content { $content = new Content(); $content->versionInfo = new VersionInfo(); @@ -866,7 +867,7 @@ protected function getContentFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function getContentTypeFixture() + protected function getContentTypeFixture(): Type { $contentType = new Type(); $firstFieldDefinition = new FieldDefinition( @@ -904,7 +905,7 @@ protected function getContentTypeFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\UpdateStruct */ - protected function getUpdateStructFixture() + protected function getUpdateStructFixture(): UpdateStruct { $struct = new UpdateStruct(); @@ -929,7 +930,7 @@ protected function getUpdateStructFixture() * * @return \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected function getFieldHandler() + protected function getFieldHandler(): FieldHandler { $mock = new FieldHandler( $this->getContentGatewayMock(), diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php index 9d606ac506..6f01b9641a 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php @@ -30,7 +30,7 @@ class AuthorTest extends TestCase protected $converter; /** @var \Ibexa\Core\FieldType\Author\Author[] */ - private $authors; + private array $authors; protected function setUp(): void { @@ -49,7 +49,7 @@ protected function tearDown(): void parent::tearDown(); } - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = $this->authors; @@ -79,7 +79,7 @@ public function testToStorageValue() self::assertEmpty($this->authors, 'All authors have not been converted as expected'); } - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = <<data = true; @@ -49,7 +49,7 @@ public function testToStorageValue() * @group fieldType * @group ezboolean */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataInt = 1; @@ -66,7 +66,7 @@ public function testToFieldValue() * @group fieldType * @group ezboolean */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $defaultBool = false; $storageFieldDef = new StorageFieldDefinition(); @@ -89,7 +89,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group ezboolean */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $defaultBool = true; $fieldDef = new PersistenceFieldDefinition(); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php index 7d2f97f0bc..df8bf969ab 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php @@ -30,7 +30,7 @@ protected function setUp(): void $this->converter = new CountryConverter(); } - public function providerForTestToStorageValue() + public function providerForTestToStorageValue(): array { return [ [['BE', 'FR'], 'belgium,france', 'BE,FR', 'belgium,france'], @@ -44,7 +44,7 @@ public function providerForTestToStorageValue() * * @dataProvider providerForTestToStorageValue */ - public function testToStorageValue($data, $sortKey, $dataText, $sortKeyString) + public function testToStorageValue(?array $data, string $sortKey, string $dataText, string $sortKeyString): void { $value = new FieldValue(); $value->data = $data; @@ -56,7 +56,7 @@ public function testToStorageValue($data, $sortKey, $dataText, $sortKeyString) self::assertSame($sortKeyString, $storageFieldValue->sortKeyString); } - public function providerForTestToFieldValue() + public function providerForTestToFieldValue(): array { return [ ['BE,FR', 'belgium,france', ['BE', 'FR']], @@ -70,7 +70,7 @@ public function providerForTestToFieldValue() * * @dataProvider providerForTestToFieldValue */ - public function testToFieldValue($dataText, $sortKeyString, $data) + public function testToFieldValue(string $dataText, string $sortKeyString, ?array $data): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = $dataText; @@ -85,7 +85,7 @@ public function testToFieldValue($dataText, $sortKeyString, $data) * @group fieldType * @group country */ - public function testToStorageFieldDefinitionMultiple() + public function testToStorageFieldDefinitionMultiple(): void { $defaultValue = new FieldValue(); $defaultValue->data = ['BE', 'FR']; @@ -120,7 +120,7 @@ public function testToStorageFieldDefinitionMultiple() * @group fieldType * @group country */ - public function testToStorageFieldDefinitionSingle() + public function testToStorageFieldDefinitionSingle(): void { $fieldTypeConstraints = new FieldTypeConstraints(); $fieldTypeConstraints->fieldSettings = new FieldSettings( @@ -151,7 +151,7 @@ public function testToStorageFieldDefinitionSingle() * @group fieldType * @group country */ - public function testToFieldDefinitionMultiple() + public function testToFieldDefinitionMultiple(): void { $fieldDef = new PersistenceFieldDefinition(); @@ -178,7 +178,7 @@ public function testToFieldDefinitionMultiple() * @group fieldType * @group country */ - public function testToFieldDefinitionSingle() + public function testToFieldDefinitionSingle(): void { $fieldDef = new PersistenceFieldDefinition(); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php index ee2a043484..234ca7fab9 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php @@ -44,12 +44,12 @@ protected function setUp(): void * @group fieldType * @group dateTime */ - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = [ 'timestamp' => $this->date->getTimestamp(), - 'rfc850' => $this->date->format(\DateTime::RFC850), + 'rfc850' => $this->date->format(DateTime::RFC850), ]; $value->sortKey = $this->date->getTimestamp(); $storageFieldValue = new StorageFieldValue(); @@ -64,7 +64,7 @@ public function testToStorageValue() * @group fieldType * @group dateTime */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataInt = $this->date->getTimestamp(); @@ -88,7 +88,7 @@ public function testToFieldValue() * @group fieldType * @group dateTime */ - public function testToStorageFieldDefinitionWithAdjustment() + public function testToStorageFieldDefinitionWithAdjustment(): void { $storageFieldDef = new StorageFieldDefinition(); $dateInterval = DateInterval::createFromDateString('+10 years, -1 month, +3 days, -13 hours'); @@ -129,7 +129,7 @@ public function testToStorageFieldDefinitionWithAdjustment() * @group fieldType * @group dateTime */ - public function testToStorageFieldDefinitionNoDefault() + public function testToStorageFieldDefinitionNoDefault(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -162,7 +162,7 @@ public function testToStorageFieldDefinitionNoDefault() * @group fieldType * @group dateTime */ - public function testToStorageFieldDefinitionCurrentDate() + public function testToStorageFieldDefinitionCurrentDate(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -196,7 +196,7 @@ public function testToStorageFieldDefinitionCurrentDate() * * @return array Key is the XML node name, value is the DateInterval property */ - private function getXMLToDateIntervalMap() + private function getXMLToDateIntervalMap(): array { return [ 'year' => 'y', @@ -212,7 +212,7 @@ private function getXMLToDateIntervalMap() * @group fieldType * @group dateTime */ - public function testToFieldDefinitionNoDefault() + public function testToFieldDefinitionNoDefault(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( @@ -230,7 +230,7 @@ public function testToFieldDefinitionNoDefault() * @group fieldType * @group dateTime */ - public function testToFieldDefinitionCurrentDate() + public function testToFieldDefinitionCurrentDate(): void { $time = time(); $fieldDef = new PersistenceFieldDefinition(); @@ -255,7 +255,7 @@ public function testToFieldDefinitionCurrentDate() * @group fieldType * @group dateTime */ - public function testToFieldDefinitionWithAdjustmentAndSeconds() + public function testToFieldDefinitionWithAdjustmentAndSeconds(): void { $fieldDef = new PersistenceFieldDefinition(); $dateInterval = DateInterval::createFromDateString('2 years, 1 month, -4 days, 2 hours, 0 minute, 34 seconds'); @@ -286,7 +286,7 @@ public function testToFieldDefinitionWithAdjustmentAndSeconds() * @group fieldType * @group dateTime */ - public function testToFieldDefinitionWithAdjustmentNoSeconds() + public function testToFieldDefinitionWithAdjustmentNoSeconds(): void { $fieldDef = new PersistenceFieldDefinition(); $seconds = 34; @@ -343,7 +343,7 @@ private function getXMLStringFromDateInterval(DateInterval $dateInterval): strin * @group fieldType * @group dateTime */ - public function testGetDateIntervalFromXML() + public function testGetDateIntervalFromXML(): void { $dateIntervalReference = DateInterval::createFromDateString('2 years, 1 months, -4 days, 2 hours, 0 minutes, 34 seconds'); @@ -361,7 +361,7 @@ public function testGetDateIntervalFromXML() * @group fieldType * @group dateTime */ - public function testGenerateDateIntervalXML() + public function testGenerateDateIntervalXML(): void { $dateIntervalReference = DateInterval::createFromDateString('2 years, 1 month, -4 days, 2 hours, 0 minute, 34 seconds'); $dom = new DOMDocument(); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php index 59bb54c2f1..faa5458bb1 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php @@ -39,12 +39,12 @@ protected function setUp(): void $this->date = new DateTime('@1362614400'); } - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = [ 'timestamp' => $this->date->getTimestamp(), - 'rfc850' => $this->date->format(\DateTime::RFC850), + 'rfc850' => $this->date->format(DateTime::RFC850), ]; $value->sortKey = $this->date->getTimestamp(); $storageFieldValue = new StorageFieldValue(); @@ -55,7 +55,7 @@ public function testToStorageValue() self::assertSame('', $storageFieldValue->sortKeyString); } - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataInt = $this->date->getTimestamp(); @@ -74,7 +74,7 @@ public function testToFieldValue() self::assertSame($storageFieldValue->sortKeyInt, $fieldValue->sortKey); } - public function testToStorageFieldDefinitionDefaultEmpty() + public function testToStorageFieldDefinitionDefaultEmpty(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -96,7 +96,7 @@ public function testToStorageFieldDefinitionDefaultEmpty() ); } - public function testToStorageFieldDefinitionDefaultCurrentDate() + public function testToStorageFieldDefinitionDefaultCurrentDate(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -118,7 +118,7 @@ public function testToStorageFieldDefinitionDefaultCurrentDate() ); } - public function testToFieldDefinitionDefaultEmpty() + public function testToFieldDefinitionDefaultEmpty(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( @@ -131,7 +131,7 @@ public function testToFieldDefinitionDefaultEmpty() self::assertNull($fieldDef->defaultValue->data); } - public function testToFieldDefinitionDefaultCurrentDate() + public function testToFieldDefinitionDefaultCurrentDate(): void { $timestamp = time(); $fieldDef = new PersistenceFieldDefinition(); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php index a526c25ae2..1ce1ff4f20 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php @@ -28,7 +28,7 @@ protected function setUp(): void /** * @dataProvider providerForTestToFieldDefinition */ - public function testToFieldDefinition($dataInt, $excpectedIsbn13Value) + public function testToFieldDefinition(?int $dataInt, bool $excpectedIsbn13Value): void { $fieldDef = new PersistenceFieldDefinition(); $storageDefinition = new StorageFieldDefinition([ @@ -42,7 +42,7 @@ public function testToFieldDefinition($dataInt, $excpectedIsbn13Value) self::assertSame($excpectedIsbn13Value, $fieldSettings['isISBN13']); } - public function providerForTestToFieldDefinition() + public function providerForTestToFieldDefinition(): array { return [ [1, true], diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php index efd77df1df..c7009a8b57 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php @@ -32,7 +32,7 @@ protected function setUp(): void * @group fieldType * @group keyword */ - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = ['key1', 'key2']; @@ -51,7 +51,7 @@ public function testToStorageValue() * @group fieldType * @group keyword */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $fieldValue = new FieldValue(); @@ -65,7 +65,7 @@ public function testToFieldValue() * @group fieldType * @group keyword */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $this->converter->toStorageFieldDefinition(new PersistenceFieldDefinition(), new StorageFieldDefinition()); } @@ -74,7 +74,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group keyword */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $this->converter->toFieldDefinition(new StorageFieldDefinition(), new PersistenceFieldDefinition()); } diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php index 544b257158..a331af314a 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php @@ -31,7 +31,7 @@ protected function setUp(): void * @group fieldType * @group ezmedia */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $storageFieldDef = new StorageFieldDefinition(); @@ -69,7 +69,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group ezmedia */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php index 0370b60aea..ff50d4e8cd 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationListConverter; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -22,7 +23,7 @@ class RelationListTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationListConverter */ - protected $converter; + protected MockObject $converter; protected function setUp(): void { @@ -38,7 +39,7 @@ protected function setUp(): void * @group fieldType * @group relationlist */ - public function testToStorageValue() + public function testToStorageValue(): void { $destinationContentIds = [3, 2, 1]; $fieldValue = new FieldValue(); @@ -107,7 +108,7 @@ public function testToStorageValue() * @group fieldType * @group relationlist */ - public function testToStorageValueEmpty() + public function testToStorageValueEmpty(): void { $destinationContentIds = []; $fieldValue = new FieldValue(); @@ -141,7 +142,7 @@ public function testToStorageValueEmpty() * @group fieldType * @group relationlist */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->sortKeyString = ''; @@ -168,7 +169,7 @@ public function testToFieldValue() * @group fieldType * @group relationlist */ - public function testToFieldValueEmpty() + public function testToFieldValueEmpty(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->sortKeyString = ''; @@ -195,7 +196,7 @@ public function testToFieldValueEmpty() * @group fieldType * @group relationlist */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $fieldDefinition = new PersistenceFieldDefinition( [ @@ -238,7 +239,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group relationlist */ - public function testToFieldDefinitionMultiple() + public function testToFieldDefinitionMultiple(): void { $storageFieldDefinition = new StorageFieldDefinition(); $storageFieldDefinition->dataText5 = <<data = [1, 3]; @@ -59,7 +59,7 @@ public function testToStorageValue() * @group fieldType * @group selection */ - public function testToStorageValueEmpty() + public function testToStorageValueEmpty(): void { $fieldValue = new FieldValue(); $fieldValue->data = []; @@ -83,7 +83,7 @@ public function testToStorageValueEmpty() * @group fieldType * @group selection */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = '1-3'; @@ -107,7 +107,7 @@ public function testToFieldValue() * @group fieldType * @group selection */ - public function testToFieldValueEmpty() + public function testToFieldValueEmpty(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = ''; @@ -131,7 +131,7 @@ public function testToFieldValueEmpty() * @group fieldType * @group selection */ - public function testToStorageFieldDefinitionMultiple() + public function testToStorageFieldDefinitionMultiple(): void { $fieldDefinition = new PersistenceFieldDefinition( [ @@ -171,7 +171,7 @@ public function testToStorageFieldDefinitionMultiple() * @group fieldType * @group selection */ - public function testToStorageFieldDefinitionSingle() + public function testToStorageFieldDefinitionSingle(): void { $fieldDefinition = new PersistenceFieldDefinition( [ @@ -209,7 +209,7 @@ public function testToStorageFieldDefinitionSingle() * @group fieldType * @group selection */ - public function testToFieldDefinitionMultiple() + public function testToFieldDefinitionMultiple(): void { $storageFieldDefinition = new StorageFieldDefinition(); $storageFieldDefinition->dataInt1 = 1; @@ -278,7 +278,7 @@ public function testToFieldDefinitionMultiple() * @group fieldType * @group selection */ - public function testToFieldDefinitionSingleEmpty() + public function testToFieldDefinitionSingleEmpty(): void { $storageFieldDefinition = new StorageFieldDefinition(); $storageFieldDefinition->dataInt1 = 0; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php index b05cd2b2ae..cd3d026064 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php @@ -16,6 +16,7 @@ use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\SerializableConverter; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -31,10 +32,10 @@ class SerializableConverterTest extends TestCase private const EXAMPLE_JSON = '{"foo":"foo","bar":"bar"}'; /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $serializer; + private MockObject $serializer; /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\SerializableConverter */ - private $converter; + private SerializableConverter $converter; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php index 5fab303af7..8b73a08027 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php @@ -45,7 +45,7 @@ protected function setUp(): void * @group fieldType * @group textBlock */ - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = $this->longText; @@ -62,7 +62,7 @@ public function testToStorageValue() * @group fieldType * @group textBlock */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = $this->longText; @@ -78,7 +78,7 @@ public function testToFieldValue() * @group fieldType * @group textBlock */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -105,7 +105,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group textBlock */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php index 4c4c0c984c..8944a80b9e 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php @@ -34,7 +34,7 @@ protected function setUp(): void * @group fieldType * @group textLine */ - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = "He's holding a thermal detonator!"; @@ -51,7 +51,7 @@ public function testToStorageValue() * @group fieldType * @group textLine */ - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataText = 'When 900 years old, you reach... Look as good, you will not.'; @@ -68,7 +68,7 @@ public function testToFieldValue() * @group fieldType * @group textLine */ - public function testToStorageFieldDefinitionWithValidator() + public function testToStorageFieldDefinitionWithValidator(): void { $defaultText = 'This is a default text'; $storageFieldDef = new StorageFieldDefinition(); @@ -105,7 +105,7 @@ public function testToStorageFieldDefinitionWithValidator() * @group fieldType * @group textLine */ - public function testToStorageFieldDefinitionNoValidator() + public function testToStorageFieldDefinitionNoValidator(): void { $defaultText = 'This is a default text'; $storageFieldDef = new StorageFieldDefinition(); @@ -134,7 +134,7 @@ public function testToStorageFieldDefinitionNoValidator() * @group fieldType * @group textLine */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $defaultText = 'This is a default value'; $fieldDef = new PersistenceFieldDefinition(); diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php index 17259a0f4d..87b256d679 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php @@ -39,7 +39,7 @@ protected function setUp(): void $this->time = 3661; } - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $value->data = $this->time; @@ -52,7 +52,7 @@ public function testToStorageValue() self::assertSame('', $storageFieldValue->sortKeyString); } - public function testToFieldValue() + public function testToFieldValue(): void { $storageFieldValue = new StorageFieldValue(); $storageFieldValue->dataInt = $this->time; @@ -66,7 +66,7 @@ public function testToFieldValue() self::assertSame($storageFieldValue->sortKeyInt, $fieldValue->sortKey); } - public function testToStorageFieldDefinitionDefaultEmpty() + public function testToStorageFieldDefinitionDefaultEmpty(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -87,7 +87,7 @@ public function testToStorageFieldDefinitionDefaultEmpty() self::assertSame(1, $storageFieldDef->dataInt2); } - public function testToStorageFieldDefinitionDefaultCurrentTime() + public function testToStorageFieldDefinitionDefaultCurrentTime(): void { $storageFieldDef = new StorageFieldDefinition(); $fieldTypeConstraints = new FieldTypeConstraints(); @@ -108,7 +108,7 @@ public function testToStorageFieldDefinitionDefaultCurrentTime() self::assertSame(0, $storageFieldDef->dataInt2); } - public function testToFieldDefinitionDefaultEmpty() + public function testToFieldDefinitionDefaultEmpty(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( @@ -131,7 +131,7 @@ public function testToFieldDefinitionDefaultEmpty() ); } - public function testToFieldDefinitionDefaultCurrentTime() + public function testToFieldDefinitionDefaultCurrentTime(): void { $fieldDef = new PersistenceFieldDefinition(); $storageDef = new StorageFieldDefinition( diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php index 0f3a167f4b..5117c38137 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php @@ -32,7 +32,7 @@ protected function setUp(): void * @group fieldType * @group url */ - public function testToStorageValue() + public function testToStorageValue(): void { $value = new FieldValue(); $text = 'Ibexa'; @@ -49,7 +49,7 @@ public function testToStorageValue() * @group fieldType * @group url */ - public function testToFieldValue() + public function testToFieldValue(): void { $text = "A link's text"; $urlId = 842; @@ -71,7 +71,7 @@ public function testToFieldValue() * @group fieldType * @group url */ - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $this->converter->toStorageFieldDefinition(new PersistenceFieldDefinition(), new StorageFieldDefinition()); } @@ -80,7 +80,7 @@ public function testToStorageFieldDefinition() * @group fieldType * @group url */ - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $this->converter->toFieldDefinition(new StorageFieldDefinition(), new PersistenceFieldDefinition()); } diff --git a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php index fa711c96a2..30781f3afb 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php @@ -10,6 +10,7 @@ use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry as Registry; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry @@ -18,7 +19,7 @@ class FieldValueConverterRegistryTest extends TestCase { private const TYPE_NAME = 'some-type'; - public function testRegister() + public function testRegister(): void { $converter = $this->getFieldValueConverterMock(); $registry = new Registry([self::TYPE_NAME => $converter]); @@ -26,7 +27,7 @@ public function testRegister() self::assertSame($converter, $registry->getConverter(self::TYPE_NAME)); } - public function testGetStorage() + public function testGetStorage(): void { $converter = $this->getFieldValueConverterMock(); $registry = new Registry([self::TYPE_NAME => $converter]); @@ -39,7 +40,7 @@ public function testGetStorage() ); } - public function testGetNotFound() + public function testGetNotFound(): void { $this->expectException(Converter\Exception\NotFound::class); @@ -51,7 +52,7 @@ public function testGetNotFound() /** * @return \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter */ - protected function getFieldValueConverterMock() + protected function getFieldValueConverterMock(): MockObject { return $this->createMock(Converter::class); } diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index 4ded4b9096..9da5955cf3 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -37,7 +37,7 @@ class DoctrineDatabaseTest extends LanguageAwareTestCase /** * @todo Fix not available fields */ - public function testInsertContentObject() + public function testInsertContentObject(): void { $struct = $this->getCreateStructFixture(); @@ -85,7 +85,7 @@ public function testInsertContentObject() * * @return \Ibexa\Contracts\Core\Persistence\Content\CreateStruct */ - protected function getCreateStructFixture() + protected function getCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); @@ -112,7 +112,7 @@ protected function getCreateStructFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentFixture() + protected function getContentFixture(): Content { $content = new Content(); @@ -142,7 +142,7 @@ protected function getContentFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo */ - protected function getVersionFixture() + protected function getVersionFixture(): VersionInfo { $version = new VersionInfo(); @@ -163,7 +163,7 @@ protected function getVersionFixture() return $version; } - public function testInsertVersion() + public function testInsertVersion(): void { $version = $this->getVersionFixture(); @@ -204,7 +204,7 @@ public function testInsertVersion() ); } - public function testSetStatus() + public function testSetStatus(): void { $gateway = $this->getDatabaseGateway(); @@ -239,7 +239,7 @@ public function testSetStatus() ); } - public function testSetStatusPublished() + public function testSetStatusPublished(): void { $gateway = $this->getDatabaseGateway(); @@ -274,7 +274,7 @@ public function testSetStatusPublished() ); } - public function testSetStatusUnknownVersion() + public function testSetStatusUnknownVersion(): void { $gateway = $this->getDatabaseGateway(); @@ -283,7 +283,7 @@ public function testSetStatusUnknownVersion() ); } - public function testUpdateContent() + public function testUpdateContent(): void { $gateway = $this->getDatabaseGateway(); @@ -324,7 +324,7 @@ public function testUpdateContent() * * @return \Ibexa\Contracts\Core\Persistence\Content\UpdateStruct */ - protected function getUpdateStructFixture() + protected function getUpdateStructFixture(): UpdateStruct { $struct = new UpdateStruct(); $struct->creatorId = 23; @@ -340,7 +340,7 @@ protected function getUpdateStructFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\MetadataUpdateStruct */ - protected function getMetadataUpdateStructFixture() + protected function getMetadataUpdateStructFixture(): MetadataUpdateStruct { $struct = new MetadataUpdateStruct(); $struct->ownerId = 42; @@ -353,7 +353,7 @@ protected function getMetadataUpdateStructFixture() return $struct; } - public function testUpdateVersion() + public function testUpdateVersion(): void { $gateway = $this->getDatabaseGateway(); @@ -390,7 +390,7 @@ public function testUpdateVersion() ); } - public function testInsertNewField() + public function testInsertNewField(): void { $content = $this->getContentFixture(); $content->versionInfo->contentInfo->id = 2342; @@ -437,7 +437,7 @@ public function testInsertNewField() ); } - public function testInsertNewAlwaysAvailableField() + public function testInsertNewAlwaysAvailableField(): void { $content = $this->getContentFixture(); $content->versionInfo->contentInfo->id = 2342; @@ -486,7 +486,7 @@ public function testInsertNewAlwaysAvailableField() ); } - public function testUpdateField() + public function testUpdateField(): void { $content = $this->getContentFixture(); $content->versionInfo->contentInfo->id = 2342; @@ -533,7 +533,7 @@ public function testUpdateField() ); } - public function testUpdateNonTranslatableField() + public function testUpdateNonTranslatableField(): void { $content = $this->getContentFixture(); $content->versionInfo->contentInfo->id = 2342; @@ -546,7 +546,7 @@ public function testUpdateNonTranslatableField() $fieldGb->id = $gateway->insertNewField($content, $fieldGb, $value); $fieldUs->id = $gateway->insertNewField($content, $fieldUs, $value); - $updateStruct = new Content\UpdateStruct(); + $updateStruct = new UpdateStruct(); $newValue = new StorageFieldValue( [ @@ -623,7 +623,7 @@ public function testListVersions(): void ); } - public function testListVersionNumbers() + public function testListVersionNumbers(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -635,7 +635,7 @@ public function testListVersionNumbers() self::assertEquals([1, 2], $res); } - public function testListVersionsForUser() + public function testListVersionsForUser(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -674,7 +674,7 @@ public function testListVersionsForUser() ); } - public function testLoadWithAllTranslations() + public function testLoadWithAllTranslations(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -696,7 +696,7 @@ public function testLoadWithAllTranslations() ); } - public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions() + public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -719,7 +719,7 @@ public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); } - public function testCreateFixtureForMapperExtractContentFromRows() + public function testCreateFixtureForMapperExtractContentFromRows(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -739,7 +739,7 @@ public function testCreateFixtureForMapperExtractContentFromRows() self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows.php) and tests needs to be adapted.'); } - public function testLoadWithSingleTranslation() + public function testLoadWithSingleTranslation(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -764,7 +764,7 @@ public function testLoadWithSingleTranslation() ); } - public function testLoadNonExistentTranslation() + public function testLoadNonExistentTranslation(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -807,7 +807,7 @@ protected function assertValuesInRows($columnKey, array $expectedValues, array $ ); } - public function testGetAllLocationIds() + public function testGetAllLocationIds(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -821,7 +821,7 @@ public function testGetAllLocationIds() ); } - public function testGetFieldIdsByType() + public function testGetFieldIdsByType(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -839,7 +839,7 @@ public function testGetFieldIdsByType() ); } - public function testGetFieldIdsByTypeWithSecondArgument() + public function testGetFieldIdsByTypeWithSecondArgument(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -855,7 +855,7 @@ public function testGetFieldIdsByTypeWithSecondArgument() ); } - public function testDeleteRelationsTo() + public function testDeleteRelationsTo(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -885,7 +885,7 @@ public function testDeleteRelationsTo() ); } - public function testDeleteRelationsFrom() + public function testDeleteRelationsFrom(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -914,7 +914,7 @@ public function testDeleteRelationsFrom() ); } - public function testDeleteRelationsWithSecondArgument() + public function testDeleteRelationsWithSecondArgument(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -971,7 +971,7 @@ public function testDeleteField(): void ); } - public function testDeleteFields() + public function testDeleteFields(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -997,7 +997,7 @@ public function testDeleteFields() ); } - public function testDeleteFieldsWithSecondArgument() + public function testDeleteFieldsWithSecondArgument(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1023,7 +1023,7 @@ public function testDeleteFieldsWithSecondArgument() ); } - public function testDeleteVersions() + public function testDeleteVersions(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1049,7 +1049,7 @@ public function testDeleteVersions() ); } - public function testDeleteVersionsWithSecondArgument() + public function testDeleteVersionsWithSecondArgument(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1078,7 +1078,7 @@ public function testDeleteVersionsWithSecondArgument() /** * @throws \Exception */ - public function testSetName() + public function testSetName(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1112,7 +1112,7 @@ public function testSetName() ); } - public function testDeleteNames() + public function testDeleteNames(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1138,7 +1138,7 @@ public function testDeleteNames() ); } - public function testDeleteNamesWithSecondArgument() + public function testDeleteNamesWithSecondArgument(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1164,7 +1164,7 @@ public function testDeleteNamesWithSecondArgument() ); } - public function testDeleteContent() + public function testDeleteContent(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1244,7 +1244,7 @@ public function testLoadRelations(): void ); } - public function testLoadRelationsByType() + public function testLoadRelationsByType(): void { $this->insertRelationFixture(); @@ -1267,7 +1267,7 @@ public function testLoadRelationsByType() ); } - public function testLoadRelationsByVersion() + public function testLoadRelationsByVersion(): void { $this->insertRelationFixture(); @@ -1284,7 +1284,7 @@ public function testLoadRelationsByVersion() ); } - public function testLoadRelationsNoResult() + public function testLoadRelationsNoResult(): void { $this->insertRelationFixture(); @@ -1295,7 +1295,7 @@ public function testLoadRelationsNoResult() self::assertCount(0, $relations, 'Expecting no relation to be loaded'); } - public function testLoadReverseRelations() + public function testLoadReverseRelations(): void { $this->insertRelationFixture(); @@ -1312,7 +1312,7 @@ public function testLoadReverseRelations() ); } - public function testLoadReverseRelationsWithType() + public function testLoadReverseRelationsWithType(): void { $this->insertRelationFixture(); @@ -1345,7 +1345,7 @@ protected function insertRelationFixture() ); } - public function testGetLastVersionNumber() + public function testGetLastVersionNumber(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/contentobjects.php' @@ -1359,7 +1359,7 @@ public function testGetLastVersionNumber() ); } - public function testInsertRelation() + public function testInsertRelation(): void { $struct = $this->getRelationCreateStructFixture(); $gateway = $this->getDatabaseGateway(); @@ -1392,7 +1392,7 @@ public function testInsertRelation() ); } - public function testDeleteRelation() + public function testDeleteRelation(): void { $this->insertRelationFixture(); @@ -1874,7 +1874,7 @@ protected function storeFixture($file, $fixture) * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - protected function getFieldFixture() + protected function getFieldFixture(): Field { $field = new Field(); @@ -1904,7 +1904,7 @@ protected function getOtherLanguageFieldFixture() * * @return \Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue */ - protected function getStorageValueFixture() + protected function getStorageValueFixture(): StorageFieldValue { $value = new StorageFieldValue(); @@ -1943,7 +1943,7 @@ protected function getDatabaseGateway(): DoctrineDatabase * * @return \Ibexa\Contracts\Core\Persistence\Content\Relation\CreateStruct */ - protected function getRelationCreateStructFixture() + protected function getRelationCreateStructFixture(): RelationCreateStruct { $struct = new RelationCreateStruct(); diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php index 7381cfecc8..610bc0ccb5 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php @@ -25,7 +25,7 @@ class RandomSortClauseHandlerFactoryTest extends TestCase * @throws \Doctrine\DBAL\DBALException * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - public function testGetGateway(array $gateways) + public function testGetGateway(array $gateways): void { $platform = $this->createMock(AbstractPlatform::class); @@ -54,7 +54,7 @@ public function testGetGateway(array $gateways) * @throws \Doctrine\DBAL\DBALException * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ - public function testGetGatewayNotImplemented(array $gateways) + public function testGetGatewayNotImplemented(array $gateways): void { $platform = $this->createMock(AbstractPlatform::class); diff --git a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php index 5a743d93b4..03dfa8cb77 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; +use Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct as SPILanguageCreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as SPILanguageHandler; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; @@ -16,6 +17,7 @@ use Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache; use Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler @@ -34,19 +36,19 @@ class CachingLanguageHandlerTest extends TestCase * * @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler */ - protected $innerHandlerMock; + protected ?MockObject $innerHandlerMock = null; /** * Language cache mock. * * @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache */ - protected $languageCacheMock; + protected ?MockObject $languageCacheMock = null; /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface */ - protected $cacheIdentifierGeneratorMock; + protected ?MockObject $cacheIdentifierGeneratorMock = null; - public function testCreate() + public function testCreate(): void { $handler = $this->getLanguageHandler(); $innerHandlerMock = $this->getInnerLanguageHandlerMock(); @@ -81,9 +83,9 @@ public function testCreate() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct */ - protected function getCreateStructFixture() + protected function getCreateStructFixture(): CreateStruct { - return new Language\CreateStruct(); + return new CreateStruct(); } /** @@ -91,7 +93,7 @@ protected function getCreateStructFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - protected function getLanguageFixture() + protected function getLanguageFixture(): Language { $language = new Language(); $language->id = 8; @@ -100,7 +102,7 @@ protected function getLanguageFixture() return $language; } - public function testUpdate() + public function testUpdate(): void { $handler = $this->getLanguageHandler(); @@ -119,7 +121,7 @@ public function testUpdate() $handler->update($languageFixture); } - public function testLoad() + public function testLoad(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -143,7 +145,7 @@ public function testLoad() ); } - public function testLoadFailure() + public function testLoadFailure(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -173,7 +175,7 @@ public function testLoadFailure() $handler->load(2); } - public function testLoadByLanguageCode() + public function testLoadByLanguageCode(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -197,7 +199,7 @@ public function testLoadByLanguageCode() ); } - public function testLoadByLanguageCodeFailure() + public function testLoadByLanguageCodeFailure(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -227,7 +229,7 @@ public function testLoadByLanguageCodeFailure() $handler->loadByLanguageCode('eng-US'); } - public function testLoadAll() + public function testLoadAll(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -248,7 +250,7 @@ public function testLoadAll() self::assertIsArray($result); } - public function testDelete() + public function testDelete(): void { $handler = $this->getLanguageHandler(); $cacheMock = $this->getLanguageCacheMock(); @@ -340,7 +342,7 @@ protected function getCacheIdentifierGeneratorMock() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language[] */ - protected function getLanguagesFixture() + protected function getLanguagesFixture(): array { $langUs = new Language(); $langUs->id = 2; diff --git a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php index f0d60fc94a..472ed9541e 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php @@ -35,7 +35,7 @@ protected function setUp(): void ); } - public function testInsertLanguage() + public function testInsertLanguage(): void { $gateway = $this->getDatabaseGateway(); @@ -62,7 +62,7 @@ public function testInsertLanguage() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - protected function getLanguageFixture() + protected function getLanguageFixture(): Language { $language = new Language(); @@ -73,7 +73,7 @@ protected function getLanguageFixture() return $language; } - public function testUpdateLanguage() + public function testUpdateLanguage(): void { $gateway = $this->getDatabaseGateway(); @@ -98,7 +98,7 @@ public function testUpdateLanguage() ); } - public function testLoadLanguageListData() + public function testLoadLanguageListData(): void { $gateway = $this->getDatabaseGateway(); @@ -117,7 +117,7 @@ public function testLoadLanguageListData() ); } - public function testLoadAllLanguagesData() + public function testLoadAllLanguagesData(): void { $gateway = $this->getDatabaseGateway(); @@ -142,7 +142,7 @@ public function testLoadAllLanguagesData() ); } - public function testDeleteLanguage() + public function testDeleteLanguage(): void { $gateway = $this->getDatabaseGateway(); diff --git a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php index 7cbde56b28..9d2ce66613 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php @@ -8,12 +8,14 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Language; use Ibexa\Contracts\Core\Persistence\Content\Language; +use Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct as SPILanguageCreateStruct; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Core\Persistence\Legacy\Content\Language\Gateway as LanguageGateway; use Ibexa\Core\Persistence\Legacy\Content\Language\Handler; use Ibexa\Core\Persistence\Legacy\Content\Language\Mapper as LanguageMapper; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Language\Handler @@ -32,16 +34,16 @@ class LanguageHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * Language mapper mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Mapper */ - protected $mapperMock; + protected ?MockObject $mapperMock = null; - public function testCreate() + public function testCreate(): void { $handler = $this->getLanguageHandler(); @@ -82,12 +84,12 @@ public function testCreate() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct */ - protected function getCreateStructFixture() + protected function getCreateStructFixture(): CreateStruct { - return new Language\CreateStruct(); + return new CreateStruct(); } - public function testUpdate() + public function testUpdate(): void { $handler = $this->getLanguageHandler(); @@ -104,12 +106,12 @@ public function testUpdate() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - protected function getLanguageFixture() + protected function getLanguageFixture(): Language { return new Language(); } - public function testLoad() + public function testLoad(): void { $handler = $this->getLanguageHandler(); $mapperMock = $this->getMapperMock(); @@ -133,7 +135,7 @@ public function testLoad() ); } - public function testLoadFailure() + public function testLoadFailure(): void { $this->expectException(NotFoundException::class); @@ -155,7 +157,7 @@ public function testLoadFailure() $result = $handler->load(2); } - public function testLoadByLanguageCode() + public function testLoadByLanguageCode(): void { $handler = $this->getLanguageHandler(); $mapperMock = $this->getMapperMock(); @@ -179,7 +181,7 @@ public function testLoadByLanguageCode() ); } - public function testLoadByLanguageCodeFailure() + public function testLoadByLanguageCodeFailure(): void { $this->expectException(NotFoundException::class); @@ -201,7 +203,7 @@ public function testLoadByLanguageCodeFailure() $result = $handler->loadByLanguageCode('eng-US'); } - public function testLoadAll() + public function testLoadAll(): void { $handler = $this->getLanguageHandler(); $mapperMock = $this->getMapperMock(); @@ -223,7 +225,7 @@ public function testLoadAll() ); } - public function testDeleteSuccess() + public function testDeleteSuccess(): void { $handler = $this->getLanguageHandler(); $gatewayMock = $this->getGatewayMock(); @@ -239,7 +241,7 @@ public function testDeleteSuccess() $result = $handler->delete(2); } - public function testDeleteFail() + public function testDeleteFail(): void { $this->expectException(\LogicException::class); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php index 55e19d5dfe..2be44bb489 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MapperTest.php @@ -17,7 +17,7 @@ */ class MapperTest extends TestCase { - public function testCreateLanguageFromCreateStruct() + public function testCreateLanguageFromCreateStruct(): void { $mapper = new Mapper(); @@ -32,7 +32,7 @@ public function testCreateLanguageFromCreateStruct() ); } - public function testExtractLanguagesFromRows() + public function testExtractLanguagesFromRows(): void { $mapper = new Mapper(); @@ -51,7 +51,7 @@ public function testExtractLanguagesFromRows() * * @return string[][] */ - protected function getRowsFixture() + protected function getRowsFixture(): array { return [ ['disabled' => '0', 'id' => '2', 'locale' => 'eng-US', 'name' => 'English (American)'], @@ -64,7 +64,7 @@ protected function getRowsFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language[] */ - protected function getExtractReference() + protected function getExtractReference(): array { $langUs = new Language(); $langUs->id = 2; @@ -86,7 +86,7 @@ protected function getExtractReference() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language\CreateStruct */ - protected function getCreateStructFixture() + protected function getCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); @@ -102,7 +102,7 @@ protected function getCreateStructFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - protected function getLanguageFixture() + protected function getLanguageFixture(): Language { $struct = new Language(); diff --git a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php index 14c39c2035..6dc31b6259 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php @@ -73,10 +73,10 @@ public static function getLanguageMaskData(): array * @dataProvider getLanguageIndicatorData */ public function testGenerateLanguageIndicator( - $languageCode, - $alwaysAvailable, - $expectedIndicator - ) { + string $languageCode, + bool $alwaysAvailable, + int $expectedIndicator + ): void { $generator = $this->getMaskGenerator(); self::assertSame( @@ -90,7 +90,7 @@ public function testGenerateLanguageIndicator( * * @return array */ - public static function getLanguageIndicatorData() + public static function getLanguageIndicatorData(): array { return [ 'not_available' => [ @@ -106,7 +106,7 @@ public static function getLanguageIndicatorData() ]; } - public function testIsLanguageAlwaysAvailable() + public function testIsLanguageAlwaysAvailable(): void { $generator = $this->getMaskGenerator(); @@ -121,7 +121,7 @@ public function testIsLanguageAlwaysAvailable() ); } - public function testIsLanguageAlwaysAvailableOtherLanguage() + public function testIsLanguageAlwaysAvailableOtherLanguage(): void { $generator = $this->getMaskGenerator(); @@ -136,7 +136,7 @@ public function testIsLanguageAlwaysAvailableOtherLanguage() ); } - public function testIsLanguageAlwaysAvailableNoDefault() + public function testIsLanguageAlwaysAvailableNoDefault(): void { $generator = $this->getMaskGenerator(); @@ -156,7 +156,7 @@ public function testIsLanguageAlwaysAvailableNoDefault() * * @dataProvider isAlwaysAvailableProvider */ - public function testIsAlwaysAvailable($langMask, $expectedResult) + public function testIsAlwaysAvailable(int $langMask, bool $expectedResult): void { $generator = $this->getMaskGenerator(); self::assertSame($expectedResult, $generator->isAlwaysAvailable($langMask)); @@ -167,7 +167,7 @@ public function testIsAlwaysAvailable($langMask, $expectedResult) * * @return array */ - public function isAlwaysAvailableProvider() + public function isAlwaysAvailableProvider(): array { return [ [2, false], @@ -181,7 +181,7 @@ public function isAlwaysAvailableProvider() /** * @dataProvider removeAlwaysAvailableFlagProvider */ - public function testRemoveAlwaysAvailableFlag($langMask, $expectedResult) + public function testRemoveAlwaysAvailableFlag(int $langMask, int $expectedResult): void { $generator = $this->getMaskGenerator(); self::assertSame($expectedResult, $generator->removeAlwaysAvailableFlag($langMask)); @@ -192,7 +192,7 @@ public function testRemoveAlwaysAvailableFlag($langMask, $expectedResult) * * @return array */ - public function removeAlwaysAvailableFlagProvider() + public function removeAlwaysAvailableFlagProvider(): array { return [ [3, 2], @@ -208,7 +208,7 @@ public function removeAlwaysAvailableFlagProvider() * * @dataProvider languageIdsFromMaskProvider */ - public function testExtractLanguageIdsFromMask($langMask, array $expectedResult) + public function testExtractLanguageIdsFromMask(int $langMask, array $expectedResult): void { $generator = $this->getMaskGenerator(); self::assertSame($expectedResult, $generator->extractLanguageIdsFromMask($langMask)); @@ -219,7 +219,7 @@ public function testExtractLanguageIdsFromMask($langMask, array $expectedResult) * * @return array */ - public function languageIdsFromMaskProvider() + public function languageIdsFromMaskProvider(): array { return [ [ @@ -242,7 +242,7 @@ public function languageIdsFromMaskProvider() * * @return \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - protected function getMaskGenerator() + protected function getMaskGenerator(): MaskGenerator { return new MaskGenerator($this->getLanguageHandler()); } @@ -260,7 +260,7 @@ protected function getLanguageHandler() ->method(self::anything())// loadByLanguageCode && loadListByLanguageCodes ->will( self::returnCallback( - static function ($languageCodes) { + static function ($languageCodes): Language|array { if (is_string($languageCodes)) { $language = $languageCodes; $languageCodes = [$language]; diff --git a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php index 95d26329b8..e8f60789d4 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php @@ -13,6 +13,7 @@ use Ibexa\Core\Search\Common\FieldRegistry; use Ibexa\Core\Search\Legacy\Content\Mapper\FullTextMapper; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * Test case for Language aware classes. @@ -82,7 +83,7 @@ protected function getDefinitionBasedTransformationProcessor() } /** @var \Ibexa\Core\Search\Common\FieldNameGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $fieldNameGeneratorMock; + protected ?MockObject $fieldNameGeneratorMock = null; /** * @return \Ibexa\Core\Search\Common\FieldNameGenerator|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php index 642c5cf161..3e8364ea07 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php @@ -50,7 +50,7 @@ public function __construct() * * @return \Ibexa\Contracts\Core\Persistence\Content\Language */ - public function create(CreateStruct $struct) + public function create(CreateStruct $struct): never { throw new \RuntimeException('Not implemented yet.'); } @@ -60,7 +60,7 @@ public function create(CreateStruct $struct) * * @param \Ibexa\Contracts\Core\Persistence\Content\Language $struct */ - public function update(Language $struct) + public function update(Language $struct): never { throw new \RuntimeException('Not implemented yet.'); } @@ -122,7 +122,7 @@ public function loadAll() * * @param mixed $id */ - public function delete($id) + public function delete($id): never { throw new \RuntimeException('Not implemented yet.'); } diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index df23d9998f..edbbd12c5e 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -23,7 +23,7 @@ */ class DoctrineDatabaseTest extends LanguageAwareTestCase { - protected function getLocationGateway() + protected function getLocationGateway(): DoctrineDatabase { return new DoctrineDatabase( $this->getDatabaseConnection(), @@ -64,7 +64,7 @@ private function assertLoadLocationProperties(array $locationData): void } } - public function testLoadLocationByRemoteId() + public function testLoadLocationByRemoteId(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -73,7 +73,7 @@ public function testLoadLocationByRemoteId() self::assertLoadLocationProperties($data); } - public function testLoadLocation() + public function testLoadLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -82,7 +82,7 @@ public function testLoadLocation() self::assertLoadLocationProperties($data); } - public function testLoadLocationList() + public function testLoadLocationList(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -95,7 +95,7 @@ public function testLoadLocationList() self::assertLoadLocationProperties($locationRow); } - public function testLoadInvalidLocation() + public function testLoadInvalidLocation(): void { $this->expectException(NotFoundException::class); @@ -104,7 +104,7 @@ public function testLoadInvalidLocation() $gateway->getBasicNodeData(1337); } - public function testLoadLocationDataByContent() + public function testLoadLocationDataByContent(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -119,7 +119,7 @@ public function testLoadLocationDataByContent() self::assertLoadLocationProperties($locationRow); } - public function testLoadParentLocationDataForDraftContentAll() + public function testLoadParentLocationDataForDraftContentAll(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -134,7 +134,7 @@ public function testLoadParentLocationDataForDraftContentAll() self::assertLoadLocationProperties($locationRow); } - public function testLoadLocationDataByContentLimitSubtree() + public function testLoadLocationDataByContentLimitSubtree(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -145,7 +145,7 @@ public function testLoadLocationDataByContentLimitSubtree() self::assertCount(0, $locationsData); } - public function testMoveSubtreePathUpdate() + public function testMoveSubtreePathUpdate(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -190,7 +190,7 @@ public function testMoveSubtreePathUpdate() ); } - public function testMoveHiddenDestinationUpdate() + public function testMoveHiddenDestinationUpdate(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -236,7 +236,7 @@ public function testMoveHiddenDestinationUpdate() ); } - public function testMoveHiddenSourceUpdate() + public function testMoveHiddenSourceUpdate(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -282,7 +282,7 @@ public function testMoveHiddenSourceUpdate() ); } - public function testMoveHiddenSourceChildUpdate() + public function testMoveHiddenSourceChildUpdate(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -333,7 +333,7 @@ public function testMoveHiddenSourceChildUpdate() /** * @throws \Exception */ - public function testMoveSubtreeAssignmentUpdate() + public function testMoveSubtreeAssignmentUpdate(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -367,7 +367,7 @@ public function testMoveSubtreeAssignmentUpdate() ); } - public function testHideUpdateHidden() + public function testHideUpdateHidden(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -392,7 +392,7 @@ public function testHideUpdateHidden() /** * @depends testHideUpdateHidden */ - public function testHideUnhideUpdateHidden() + public function testHideUnhideUpdateHidden(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -418,7 +418,7 @@ public function testHideUnhideUpdateHidden() /** * @depends testHideUpdateHidden */ - public function testHideUnhideParentTree() + public function testHideUnhideParentTree(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -447,7 +447,7 @@ public function testHideUnhideParentTree() /** * @depends testHideUpdateHidden */ - public function testHideUnhidePartialSubtree() + public function testHideUnhidePartialSubtree(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -473,7 +473,7 @@ public function testHideUnhidePartialSubtree() ); } - public function testSwapLocations() + public function testSwapLocations(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -493,7 +493,7 @@ public function testSwapLocations() ); } - public function testCreateLocation() + public function testCreateLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -529,7 +529,7 @@ public function testCreateLocation() /** * @depends testCreateLocation */ - public function testGetMainNodeId() + public function testGetMainNodeId(): void { $gateway = $this->getLocationGateway(); @@ -571,7 +571,7 @@ public function testGetMainNodeId() self::assertEquals($mainLocation->id, $res = $methodReflection->invoke($gateway, 68)); } - public static function getCreateLocationValues() + public static function getCreateLocationValues(): array { return [ ['contentobject_id', 68], @@ -595,7 +595,7 @@ public static function getCreateLocationValues() * * @dataProvider getCreateLocationValues */ - public function testCreateLocationValues($field, $value) + public function testCreateLocationValues(string $field, int|string $value): void { if ($value === null) { self::markTestIncomplete('Proper value setting yet unknown.'); @@ -632,7 +632,7 @@ public function testCreateLocationValues($field, $value) ); } - public static function getCreateLocationReturnValues() + public static function getCreateLocationReturnValues(): array { return [ ['id', 228], @@ -654,7 +654,7 @@ public static function getCreateLocationReturnValues() * * @dataProvider getCreateLocationReturnValues */ - public function testCreateLocationReturnValues($field, $value) + public function testCreateLocationReturnValues(string $field, int|bool|string $value): void { if ($value === null) { self::markTestIncomplete('Proper value setting yet unknown.'); @@ -685,7 +685,7 @@ public function testCreateLocationReturnValues($field, $value) self::assertEquals($value, $location->$field); } - public static function getUpdateLocationData() + public static function getUpdateLocationData(): array { return [ ['priority', 23], @@ -698,7 +698,7 @@ public static function getUpdateLocationData() /** * @dataProvider getUpdateLocationData */ - public function testUpdateLocation($field, $value) + public function testUpdateLocation(string $field, int|string $value): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -724,7 +724,7 @@ public function testUpdateLocation($field, $value) ); } - public static function getNodeAssignmentValues() + public static function getNodeAssignmentValues(): array { return [ ['contentobject_version', [1]], @@ -807,7 +807,7 @@ private function buildContentTreeSelectContentWithParentQuery( * @param string $field * @param array $expectedResult */ - public function testCreateLocationNodeAssignmentCreation(string $field, array $expectedResult) + public function testCreateLocationNodeAssignmentCreation(string $field, array $expectedResult): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -837,7 +837,7 @@ public function testCreateLocationNodeAssignmentCreation(string $field, array $e /** * @depends testCreateLocation */ - public function testCreateLocationNodeAssignmentCreationMainLocation() + public function testCreateLocationNodeAssignmentCreationMainLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -863,7 +863,7 @@ public function testCreateLocationNodeAssignmentCreationMainLocation() ); } - public function testUpdateLocationsContentVersionNo() + public function testUpdateLocationsContentVersionNo(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -903,7 +903,7 @@ public function testUpdateLocationsContentVersionNo() ); } - public function testDeleteNodeAssignment() + public function testDeleteNodeAssignment(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -922,7 +922,7 @@ public function testDeleteNodeAssignment() ); } - public function testDeleteNodeAssignmentWithSecondArgument() + public function testDeleteNodeAssignmentWithSecondArgument(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); @@ -951,7 +951,7 @@ public function testDeleteNodeAssignmentWithSecondArgument() ); } - public static function getConvertNodeAssignmentsLocationValues() + public static function getConvertNodeAssignmentsLocationValues(): array { return [ ['contentobject_id', '68'], @@ -977,7 +977,7 @@ public static function getConvertNodeAssignmentsLocationValues() * * @dataProvider getConvertNodeAssignmentsLocationValues */ - public function testConvertNodeAssignments($field, $value) + public function testConvertNodeAssignments(string $field, string|int $value): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1037,7 +1037,7 @@ public function testConvertNodeAssignments($field, $value) /** * @depends testCreateLocationNodeAssignmentCreation */ - public function testConvertNodeAssignmentsMainLocation() + public function testConvertNodeAssignmentsMainLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1073,7 +1073,7 @@ public function testConvertNodeAssignmentsMainLocation() /** * @depends testCreateLocationNodeAssignmentCreation */ - public function testConvertNodeAssignmentsParentHidden() + public function testConvertNodeAssignmentsParentHidden(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1113,7 +1113,7 @@ public function testConvertNodeAssignmentsParentHidden() /** * @depends testCreateLocationNodeAssignmentCreation */ - public function testConvertNodeAssignmentsParentInvisible() + public function testConvertNodeAssignmentsParentInvisible(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1153,7 +1153,7 @@ public function testConvertNodeAssignmentsParentInvisible() /** * @depends testCreateLocationNodeAssignmentCreation */ - public function testConvertNodeAssignmentsUpdateAssignment() + public function testConvertNodeAssignmentsUpdateAssignment(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1185,7 +1185,7 @@ public function testConvertNodeAssignmentsUpdateAssignment() /** * Test for the setSectionForSubtree() method. */ - public function testSetSectionForSubtree() + public function testSetSectionForSubtree(): void { $this->insertDatabaseFixture(__DIR__ . '/../../_fixtures/contentobjects.php'); $gateway = $this->getLocationGateway(); @@ -1208,7 +1208,7 @@ public function testSetSectionForSubtree() * * @throws \Doctrine\DBAL\DBALException */ - public function testChangeMainLocation() + public function testChangeMainLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); // Create additional location and assignment for test purpose @@ -1343,7 +1343,7 @@ public function testChangeMainLocation() /** * Test for the getChildren() method. */ - public function testGetChildren() + public function testGetChildren(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1407,7 +1407,7 @@ public function testGetFallbackMainNodeData(): void /** * Test for the removeLocation() method. */ - public function testRemoveLocation() + public function testRemoveLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); @@ -1422,7 +1422,7 @@ public function testRemoveLocation() } } - public function providerForTestUpdatePathIdentificationString() + public function providerForTestUpdatePathIdentificationString(): array { return [ [77, 2, 'new_solutions', 'new_solutions'], @@ -1437,11 +1437,11 @@ public function providerForTestUpdatePathIdentificationString() * @dataProvider providerForTestUpdatePathIdentificationString */ public function testUpdatePathIdentificationString( - $locationId, - $parentLocationId, - $text, - $expected - ) { + int $locationId, + int $parentLocationId, + string $text, + string $expected + ): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $gateway = $this->getLocationGateway(); diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php index f8f6c4b221..b0ab11a0f4 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php @@ -19,7 +19,7 @@ */ class DoctrineDatabaseTrashTest extends LanguageAwareTestCase { - protected function getLocationGateway() + protected function getLocationGateway(): DoctrineDatabase { return new DoctrineDatabase( $this->getDatabaseConnection(), @@ -32,7 +32,7 @@ protected function getLocationGateway() /** * @todo test updated content status */ - public function testTrashLocation() + public function testTrashLocation(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -53,7 +53,7 @@ public function testTrashLocation() ); } - public function testTrashLocationUpdateTrashTable() + public function testTrashLocationUpdateTrashTable(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -70,7 +70,7 @@ public function testTrashLocationUpdateTrashTable() ); } - public static function getUntrashedLocationValues() + public static function getUntrashedLocationValues(): array { return [ ['contentobject_is_published', 1], @@ -93,7 +93,7 @@ public static function getUntrashedLocationValues() /** * @dataProvider getUntrashedLocationValues */ - public function testUntrashLocationDefault($property, $value) + public function testUntrashLocationDefault(string $property, int|string $value): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -111,7 +111,7 @@ public function testUntrashLocationDefault($property, $value) ); } - public function testUntrashLocationNewParent() + public function testUntrashLocationNewParent(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -129,7 +129,7 @@ public function testUntrashLocationNewParent() ); } - public function testUntrashInvalidLocation() + public function testUntrashInvalidLocation(): void { $this->expectException(NotFoundException::class); @@ -139,7 +139,7 @@ public function testUntrashInvalidLocation() $handler->untrashLocation(23); } - public function testUntrashLocationInvalidParent() + public function testUntrashLocationInvalidParent(): void { $this->expectException(NotFoundException::class); @@ -150,7 +150,7 @@ public function testUntrashLocationInvalidParent() $handler->untrashLocation(71, 1337); } - public function testUntrashLocationInvalidOldParent() + public function testUntrashLocationInvalidOldParent(): void { $this->expectException(NotFoundException::class); @@ -163,7 +163,7 @@ public function testUntrashLocationInvalidOldParent() $handler->untrashLocation(71); } - public static function getLoadTrashValues() + public static function getLoadTrashValues(): array { return [ ['node_id', 71], @@ -186,7 +186,7 @@ public static function getLoadTrashValues() /** * @dataProvider getLoadTrashValues */ - public function testLoadTrashByLocationId($field, $value) + public function testLoadTrashByLocationId(string $field, int|string $value): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -201,7 +201,7 @@ public function testLoadTrashByLocationId($field, $value) ); } - public function testCountTrashed() + public function testCountTrashed(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -219,7 +219,7 @@ public function testCountTrashed() ); } - public function testListEmptyTrash() + public function testListEmptyTrash(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -243,7 +243,7 @@ protected function trashSubtree() $handler->trashLocation(76); } - public function testListFullTrash() + public function testListFullTrash(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -255,7 +255,7 @@ public function testListFullTrash() ); } - public function testListTrashLimited() + public function testListTrashLimited(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -267,7 +267,7 @@ public function testListTrashLimited() ); } - public static function getTrashValues() + public static function getTrashValues(): array { return [ ['contentobject_id', 67], @@ -291,7 +291,7 @@ public static function getTrashValues() /** * @dataProvider getTrashValues */ - public function testListTrashItem($key, $value) + public function testListTrashItem(string $key, int|string $value): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -301,7 +301,7 @@ public function testListTrashItem($key, $value) self::assertEquals($value, $trashList[0][$key]); } - public function testListTrashSortedPathStringDesc() + public function testListTrashSortedPathStringDesc(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -319,7 +319,7 @@ public function testListTrashSortedPathStringDesc() '/1/2/69/', ], array_map( - static function ($trashItem) { + static function (array $trashItem) { return $trashItem['path_string']; }, $trashList = $handler->listTrashed( @@ -333,7 +333,7 @@ static function ($trashItem) { ); } - public function testListTrashSortedDepth() + public function testListTrashSortedDepth(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -351,7 +351,7 @@ public function testListTrashSortedDepth() '/1/2/69/70/71/', ], array_map( - static function ($trashItem) { + static function (array $trashItem) { return $trashItem['path_string']; }, $trashList = $handler->listTrashed( @@ -366,7 +366,7 @@ static function ($trashItem) { ); } - public function testCleanupTrash() + public function testCleanupTrash(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -382,7 +382,7 @@ public function testCleanupTrash() ); } - public function testRemoveElementFromTrash() + public function testRemoveElementFromTrash(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); @@ -399,7 +399,7 @@ public function testRemoveElementFromTrash() ); } - public function testCountLocationsByContentId() + public function testCountLocationsByContentId(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); $handler = $this->getLocationGateway(); diff --git a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php index b4b66a462c..4f63d5e999 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php @@ -75,7 +75,7 @@ class MapperTest extends TestCase 'sortOrder' => 1, ]; - public function testCreateLocationFromRow() + public function testCreateLocationFromRow(): void { $mapper = new Mapper(); @@ -89,7 +89,7 @@ public function testCreateLocationFromRow() ); } - public function testCreateLocationsFromRows() + public function testCreateLocationsFromRows(): void { $inputRows = []; for ($i = 0; $i < 3; ++$i) { @@ -111,7 +111,7 @@ public function testCreateLocationsFromRows() } } - public function testCreateTrashedFromRow() + public function testCreateTrashedFromRow(): void { $mapper = new Mapper(); @@ -128,7 +128,7 @@ public function testCreateTrashedFromRow() ); } - public function testCreateLocationFromRowWithPrefix() + public function testCreateLocationFromRowWithPrefix(): void { $prefix = 'some_prefix_'; @@ -147,7 +147,7 @@ public function testCreateLocationFromRowWithPrefix() ); } - public function testGetLocationCreateStruct() + public function testGetLocationCreateStruct(): void { $mapper = new Mapper(); diff --git a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php index 3a4beafc3f..44a7f427aa 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\Persistence\Legacy\Content as CoreContent; use Ibexa\Core\Persistence\Legacy\Content\Location\Trash\Handler; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Location\Trash\Handler @@ -25,30 +26,30 @@ class TrashHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Handler */ - protected $locationHandler; + protected ?MockObject $locationHandler = null; /** * Mocked location gateway instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected ?MockObject $locationGateway = null; /** * Mocked location mapper instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected ?MockObject $locationMapper = null; /** * Mocked content handler instance. * * @var \PHPUnit\Framework\MockObject\MockObject */ - protected $contentHandler; + protected ?MockObject $contentHandler = null; - protected function getTrashHandler() + protected function getTrashHandler(): Handler { return new Handler( $this->locationHandler = $this->createMock(CoreContent\Location\Handler::class), @@ -58,7 +59,7 @@ protected function getTrashHandler() ); } - public function testTrashSubtree() + public function testTrashSubtree(): void { $handler = $this->getTrashHandler(); @@ -124,7 +125,7 @@ public function testTrashSubtree() self::assertSame(20, $trashedObject->id); } - public function testTrashSubtreeReturnsNull() + public function testTrashSubtreeReturnsNull(): void { $handler = $this->getTrashHandler(); @@ -177,7 +178,7 @@ public function testTrashSubtreeReturnsNull() self::assertNull($returnValue); } - public function testTrashSubtreeUpdatesMainLocation() + public function testTrashSubtreeUpdatesMainLocation(): void { $handler = $this->getTrashHandler(); @@ -262,7 +263,7 @@ public function testTrashSubtreeUpdatesMainLocation() self::assertSame(20, $trashedObject->id); } - public function testRecover() + public function testRecover(): void { $handler = $this->getTrashHandler(); @@ -279,7 +280,7 @@ public function testRecover() self::assertSame(70, $handler->recover(69, 23)); } - public function testLoadTrashItem() + public function testLoadTrashItem(): void { $handler = $this->getTrashHandler(); @@ -446,7 +447,7 @@ public function testDeleteTrashItemNoMoreLocations(): void self::assertTrue($trashItemDeleteResult->contentRemoved); } - public function testDeleteTrashItemStillHaveLocations() + public function testDeleteTrashItemStillHaveLocations(): void { $handler = $this->getTrashHandler(); @@ -504,7 +505,7 @@ public function testDeleteTrashItemStillHaveLocations() self::assertFalse($trashItemDeleteResult->contentRemoved); } - public function testFindTrashItemsWhenEmpty() + public function testFindTrashItemsWhenEmpty(): void { $handler = $this->getTrashHandler(); @@ -531,7 +532,7 @@ public function testFindTrashItemsWhenEmpty() self::assertCount(0, $trashResult);// Can't assert as empty, however we can count it. } - public function testFindTrashItemsWithLimits() + public function testFindTrashItemsWithLimits(): void { $handler = $this->getTrashHandler(); diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index 36a4d82d89..6a1d48892b 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -23,6 +23,7 @@ use Ibexa\Core\Persistence\Legacy\Content\ObjectState\Handler as ObjectStateHandler; use Ibexa\Core\Persistence\Legacy\Content\TreeHandler; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Location\Handler @@ -34,35 +35,35 @@ class LocationHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGateway; + protected MockObject $locationGateway; /** * Mocked location mapper instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapper; + protected MockObject $locationMapper; /** * Mocked content handler instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\Handler */ - protected $contentHandler; + protected MockObject $contentHandler; /** * Mocked object state handler instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $objectStateHandler; + protected ?MockObject $objectStateHandler = null; /** * Mocked Tree handler instance. * * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler|\PHPUnit\Framework\MockObject\MockObject */ - protected $treeHandler; + protected MockObject $treeHandler; protected function setUp(): void { @@ -74,7 +75,7 @@ protected function setUp(): void $this->contentHandler = $this->createMock(ContentHandler::class); } - protected function getLocationHandler() + protected function getLocationHandler(): LocationHandler { return new Handler( $this->locationGateway, @@ -85,7 +86,7 @@ protected function getLocationHandler() ); } - public function testLoadLocation() + public function testLoadLocation(): void { $handler = $this->getLocationHandler(); @@ -100,7 +101,7 @@ public function testLoadLocation() self::assertInstanceOf(Location::class, $location); } - public function testLoadLocationSubtree() + public function testLoadLocationSubtree(): void { $this->locationGateway ->expects(self::once()) @@ -118,7 +119,7 @@ public function testLoadLocationSubtree() self::assertCount(2, $this->getLocationHandler()->loadSubtreeIds(77)); } - public function testLoadLocationByRemoteId() + public function testLoadLocationByRemoteId(): void { $handler = $this->getLocationHandler(); @@ -143,7 +144,7 @@ public function testLoadLocationByRemoteId() self::assertInstanceOf(Location::class, $location); } - public function testLoadLocationsByContent() + public function testLoadLocationsByContent(): void { $handler = $this->getLocationHandler(); @@ -168,7 +169,7 @@ public function testLoadLocationsByContent() self::assertIsArray($locations); } - public function loadParentLocationsForDraftContent() + public function loadParentLocationsForDraftContent(): void { $handler = $this->getLocationHandler(); @@ -193,7 +194,7 @@ public function loadParentLocationsForDraftContent() self::assertIsArray($locations); } - public function testMoveSubtree() + public function testMoveSubtree(): void { $handler = $this->getLocationHandler(); @@ -269,7 +270,7 @@ public function testMoveSubtree() $handler->move(69, 77); } - public function testHideUpdateHidden() + public function testHideUpdateHidden(): void { $handler = $this->getLocationHandler(); @@ -298,7 +299,7 @@ public function testHideUpdateHidden() /** * @depends testHideUpdateHidden */ - public function testHideUnhideUpdateHidden() + public function testHideUnhideUpdateHidden(): void { $handler = $this->getLocationHandler(); @@ -324,7 +325,7 @@ public function testHideUnhideUpdateHidden() $handler->unhide(69); } - public function testSwapLocations() + public function testSwapLocations(): void { $handler = $this->getLocationHandler(); @@ -336,7 +337,7 @@ public function testSwapLocations() $handler->swap(70, 78); } - public function testCreateLocation() + public function testCreateLocation(): void { $handler = $this->getLocationHandler(); @@ -374,7 +375,7 @@ public function testCreateLocation() $handler->create($createStruct); } - public function testUpdateLocation() + public function testUpdateLocation(): void { $handler = $this->getLocationHandler(); @@ -389,7 +390,7 @@ public function testUpdateLocation() $handler->update($updateStruct, 23); } - public function testSetSectionForSubtree() + public function testSetSectionForSubtree(): void { $handler = $this->getLocationHandler(); @@ -401,7 +402,7 @@ public function testSetSectionForSubtree() $handler->setSectionForSubtree(69, 3); } - public function testChangeMainLocation() + public function testChangeMainLocation(): void { $handler = $this->getLocationHandler(); @@ -416,7 +417,7 @@ public function testChangeMainLocation() /** * Test for the removeSubtree() method. */ - public function testRemoveSubtree() + public function testRemoveSubtree(): void { $handler = $this->getLocationHandler(); @@ -443,7 +444,7 @@ public function testDeleteChildrenDrafts(): void /** * Test for the copySubtree() method. */ - public function testCopySubtree() + public function testCopySubtree(): void { $handler = $this->getPartlyMockedHandler( [ @@ -675,7 +676,7 @@ public function testCountLocationsByContent(): void * * @return \Ibexa\Core\Persistence\Legacy\Content\Location\Handler */ - protected function getPartlyMockedHandler(array $methods) + protected function getPartlyMockedHandler(array $methods): MockObject { return $this->getMockBuilder(LocationHandler::class) ->setMethods($methods) diff --git a/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php b/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php index 90d22e8f3d..150bbca166 100644 --- a/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php +++ b/tests/lib/Persistence/Legacy/Content/Mapper/ResolveVirtualFieldSubscriberTest.php @@ -18,9 +18,11 @@ use Ibexa\Core\FieldType\NullStorage; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry; +use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Ibexa\Core\Persistence\Legacy\Content\Mapper\ResolveVirtualFieldSubscriber; use Ibexa\Core\Persistence\Legacy\Content\StorageRegistry; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; use Symfony\Component\EventDispatcher\EventDispatcher; @@ -53,7 +55,7 @@ public function testResolveVirtualField(): void ]) ); - $expected = new Content\Field([ + $expected = new Field([ 'id' => null, 'fieldDefinitionId' => 123, 'type' => 'some_type', @@ -114,7 +116,7 @@ static function (VersionInfo $versionInfo, Field $field): void { ]) ); - $expected = new Content\Field([ + $expected = new Field([ 'id' => null, 'fieldDefinitionId' => 678, 'type' => 'external_type_virtual', @@ -148,7 +150,7 @@ public function testPersistEmptyExternalStorageField(): void $storage->expects(self::once()) ->method('getFieldData') - ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) { + ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field): void { $field->value->externalData = [ 'some_default' => 'external_data', ]; @@ -176,7 +178,7 @@ public function testPersistEmptyExternalStorageField(): void ]) ); - $expected = new Content\Field([ + $expected = new Field([ 'id' => 567, 'fieldDefinitionId' => 123, 'type' => 'external_type', @@ -212,7 +214,7 @@ public function testPersistExternalStorageField(): void $storage = $this->createMock(FieldStorage::class); $storage->expects(self::once()) ->method('storeFieldData') - ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) { + ->willReturnCallback(static function (VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $field->value->data; }); @@ -242,7 +244,7 @@ public function testPersistExternalStorageField(): void ]) ); - $expected = new Content\Field([ + $expected = new Field([ 'id' => 456, 'fieldDefinitionId' => 123, 'type' => 'external_type', @@ -296,7 +298,7 @@ private function getVersionInfo(): VersionInfo private function getEventDispatcher( ConverterRegistry $converterRegistry, StorageRegistry $storageRegistry, - ContentGateway $contentGateway + Gateway&MockObject $contentGateway ): TraceableEventDispatcher { $eventDispatcher = new EventDispatcher(); $eventDispatcher->addSubscriber( diff --git a/tests/lib/Persistence/Legacy/Content/MapperTest.php b/tests/lib/Persistence/Legacy/Content/MapperTest.php index b1227ed65a..a0e80a34cd 100644 --- a/tests/lib/Persistence/Legacy/Content/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/MapperTest.php @@ -26,6 +26,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Mapper\ResolveVirtualFieldSubscriber; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Core\Persistence\Legacy\Content\StorageRegistry; +use PHPUnit\Framework\MockObject\MockObject; use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; @@ -39,12 +40,12 @@ class MapperTest extends LanguageAwareTestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $valueConverterRegistryMock; + protected ?MockObject $valueConverterRegistryMock = null; /** * @return \Ibexa\Contracts\Core\Persistence\Content\CreateStruct */ - protected function getCreateStructFixture() + protected function getCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); @@ -69,7 +70,7 @@ protected function getCreateStructFixture() return $struct; } - public function testCreateVersionInfoForContent() + public function testCreateVersionInfoForContent(): void { $content = $this->getFullContentFixture(); $time = time(); @@ -102,7 +103,7 @@ public function testCreateVersionInfoForContent() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getFullContentFixture() + protected function getFullContentFixture(): Content { $content = new Content(); @@ -126,7 +127,7 @@ protected function getFullContentFixture() return $content; } - public function testConvertToStorageValue() + public function testConvertToStorageValue(): void { $convMock = $this->createMock(Converter::class); $convMock->expects(self::once()) @@ -160,7 +161,7 @@ public function testConvertToStorageValue() ); } - public function testExtractContentFromRows() + public function testExtractContentFromRows(): void { $rowsFixture = $this->getContentExtractFixture(); $nameRowsFixture = $this->getNamesExtractFixture(); @@ -290,7 +291,7 @@ static function (Content\Type\FieldDefinition $fieldDefinition): bool { ); } - public function testExtractContentFromRowsMultipleVersions() + public function testExtractContentFromRowsMultipleVersions(): void { $convMock = $this->createMock(Converter::class); $convMock->expects(self::any()) @@ -368,7 +369,7 @@ private function getFieldRegistry( return new Registry($converters); } - public function testCreateCreateStructFromContent() + public function testCreateCreateStructFromContent(): array { $time = time(); $mapper = $this->getMapper(); @@ -392,7 +393,7 @@ public function testCreateCreateStructFromContent() /** * @depends testCreateCreateStructFromContent */ - public function testCreateCreateStructFromContentBasicProperties($data) + public function testCreateCreateStructFromContentBasicProperties(array $data): void { $content = $data['original']; $struct = $data['result']; @@ -412,7 +413,7 @@ public function testCreateCreateStructFromContentBasicProperties($data) /** * @depends testCreateCreateStructFromContent */ - public function testCreateCreateStructFromContentParentLocationsEmpty($data) + public function testCreateCreateStructFromContentParentLocationsEmpty(array $data): void { self::assertEquals( [], @@ -423,7 +424,7 @@ public function testCreateCreateStructFromContentParentLocationsEmpty($data) /** * @depends testCreateCreateStructFromContent */ - public function testCreateCreateStructFromContentFieldCount($data) + public function testCreateCreateStructFromContentFieldCount(array $data): void { self::assertEquals( count($data['original']->fields), @@ -434,14 +435,14 @@ public function testCreateCreateStructFromContentFieldCount($data) /** * @depends testCreateCreateStructFromContent */ - public function testCreateCreateStructFromContentFieldsNoId($data) + public function testCreateCreateStructFromContentFieldsNoId(array $data): void { foreach ($data['result']->fields as $field) { self::assertNull($field->id); } } - public function testExtractRelationsFromRows() + public function testExtractRelationsFromRows(): void { $mapper = $this->getMapper(); @@ -455,7 +456,7 @@ public function testExtractRelationsFromRows() ); } - public function testCreateCreateStructFromContentWithPreserveOriginalLanguage() + public function testCreateCreateStructFromContentWithPreserveOriginalLanguage(): void { $time = time(); $mapper = $this->getMapper(); @@ -481,7 +482,7 @@ public function testCreateCreateStructFromContentWithPreserveOriginalLanguage() * @param array $fixtures * @param string $prefix */ - public function testExtractContentInfoFromRow(array $fixtures, $prefix) + public function testExtractContentInfoFromRow(array $fixtures, $prefix): void { $contentInfoReference = $this->getContentExtractReference()->versionInfo->contentInfo; $mapper = new Mapper( @@ -498,7 +499,7 @@ public function testExtractContentInfoFromRow(array $fixtures, $prefix) * * @return array */ - public function extractContentInfoFromRowProvider() + public function extractContentInfoFromRowProvider(): array { $fixtures = $this->getContentExtractFixture(); $fixturesNoPrefix = []; @@ -515,7 +516,7 @@ public function extractContentInfoFromRowProvider() ]; } - public function testCreateRelationFromCreateStruct() + public function testCreateRelationFromCreateStruct(): void { $struct = $this->getRelationCreateStructFixture(); @@ -533,7 +534,7 @@ public function testCreateRelationFromCreateStruct() * * @return array */ - public function extractVersionInfoFromRowProvider() + public function extractVersionInfoFromRowProvider(): array { $fixturesAll = $this->getContentExtractFixture(); $fixtures = $fixturesAll[0]; @@ -641,7 +642,7 @@ protected function getRelationExtractReference() * * @return \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected function getMapper($valueConverter = null) + protected function getMapper($valueConverter = null): Mapper { return new Mapper( $this->getValueConverterRegistryMock(), @@ -731,7 +732,7 @@ protected function getLanguageHandler(): Language\Handler ->method('load') ->will( self::returnCallback( - static function ($id) use ($languages) { + static function ($id) use ($languages): ?\Ibexa\Contracts\Core\Persistence\Content\Language { foreach ($languages as $language) { if ($language->id == $id) { return $language; @@ -746,7 +747,7 @@ static function ($id) use ($languages) { ->method('loadByLanguageCode') ->will( self::returnCallback( - static function ($languageCode) use ($languages) { + static function ($languageCode) use ($languages): ?\Ibexa\Contracts\Core\Persistence\Content\Language { foreach ($languages as $language) { if ($language->languageCode == $languageCode) { return $language; diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php index 743d885dd9..dd48f79f93 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php @@ -47,7 +47,7 @@ protected function setUp(): void ); } - public function testLoadObjectStateData() + public function testLoadObjectStateData(): void { $gateway = $this->getDatabaseGateway(); @@ -71,7 +71,7 @@ public function testLoadObjectStateData() ); } - public function testLoadObjectStateDataByIdentifier() + public function testLoadObjectStateDataByIdentifier(): void { $gateway = $this->getDatabaseGateway(); @@ -95,7 +95,7 @@ public function testLoadObjectStateDataByIdentifier() ); } - public function testLoadObjectStateListData() + public function testLoadObjectStateListData(): void { $gateway = $this->getDatabaseGateway(); @@ -134,7 +134,7 @@ public function testLoadObjectStateListData() ); } - public function testLoadObjectStateGroupData() + public function testLoadObjectStateGroupData(): void { $gateway = $this->getDatabaseGateway(); @@ -157,7 +157,7 @@ public function testLoadObjectStateGroupData() ); } - public function testLoadObjectStateGroupDataByIdentifier() + public function testLoadObjectStateGroupDataByIdentifier(): void { $gateway = $this->getDatabaseGateway(); @@ -180,7 +180,7 @@ public function testLoadObjectStateGroupDataByIdentifier() ); } - public function testLoadObjectStateGroupListData() + public function testLoadObjectStateGroupListData(): void { $gateway = $this->getDatabaseGateway(); @@ -205,7 +205,7 @@ public function testLoadObjectStateGroupListData() ); } - public function testInsertObjectState() + public function testInsertObjectState(): void { $gateway = $this->getDatabaseGateway(); @@ -232,7 +232,7 @@ public function testInsertObjectState() ); } - public function testInsertObjectStateInEmptyGroup() + public function testInsertObjectStateInEmptyGroup(): void { $gateway = $this->getDatabaseGateway(); @@ -267,7 +267,7 @@ public function testInsertObjectStateInEmptyGroup() ); } - public function testUpdateObjectState() + public function testUpdateObjectState(): void { $gateway = $this->getDatabaseGateway(); @@ -294,7 +294,7 @@ public function testUpdateObjectState() ); } - public function testDeleteObjectState() + public function testDeleteObjectState(): void { $gateway = $this->getDatabaseGateway(); @@ -306,7 +306,7 @@ public function testDeleteObjectState() ); } - public function testUpdateObjectStateLinks() + public function testUpdateObjectStateLinks(): void { $gateway = $this->getDatabaseGateway(); @@ -316,7 +316,7 @@ public function testUpdateObjectStateLinks() self::assertSame(185, $gateway->getContentCount(2)); } - public function testDeleteObjectStateLinks() + public function testDeleteObjectStateLinks(): void { $gateway = $this->getDatabaseGateway(); @@ -325,7 +325,7 @@ public function testDeleteObjectStateLinks() self::assertSame(0, $gateway->getContentCount(1)); } - public function testInsertObjectStateGroup() + public function testInsertObjectStateGroup(): void { $gateway = $this->getDatabaseGateway(); @@ -350,7 +350,7 @@ public function testInsertObjectStateGroup() ); } - public function testUpdateObjectStateGroup() + public function testUpdateObjectStateGroup(): void { $gateway = $this->getDatabaseGateway(); @@ -376,7 +376,7 @@ public function testUpdateObjectStateGroup() ); } - public function testDeleteObjectStateGroup() + public function testDeleteObjectStateGroup(): void { $gateway = $this->getDatabaseGateway(); @@ -388,7 +388,7 @@ public function testDeleteObjectStateGroup() ); } - public function testSetContentState() + public function testSetContentState(): void { $gateway = $this->getDatabaseGateway(); @@ -408,7 +408,7 @@ public function testSetContentState() ); } - public function testLoadObjectStateDataForContent() + public function testLoadObjectStateDataForContent(): void { $gateway = $this->getDatabaseGateway(); @@ -432,7 +432,7 @@ public function testLoadObjectStateDataForContent() ); } - public function testGetContentCount() + public function testGetContentCount(): void { $gateway = $this->getDatabaseGateway(); @@ -442,7 +442,7 @@ public function testGetContentCount() self::assertEquals(185, $result); } - public function testUpdateObjectStatePriority() + public function testUpdateObjectStatePriority(): void { $gateway = $this->getDatabaseGateway(); @@ -473,7 +473,7 @@ public function testUpdateObjectStatePriority() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState */ - protected function getObjectStateFixture() + protected function getObjectStateFixture(): ObjectState { $objectState = new ObjectState(); $objectState->identifier = 'test_state'; @@ -490,7 +490,7 @@ protected function getObjectStateFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group */ - protected function getObjectStateGroupFixture() + protected function getObjectStateGroupFixture(): Group { $group = new Group(); $group->identifier = 'test_group'; diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php index 8c72159c9a..e2a18d08b5 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php @@ -18,7 +18,7 @@ */ class MapperTest extends LanguageAwareTestCase { - public function testCreateObjectStateFromData() + public function testCreateObjectStateFromData(): void { $mapper = $this->getMapper(); @@ -33,7 +33,7 @@ public function testCreateObjectStateFromData() ); } - public function testCreateObjectStateListFromData() + public function testCreateObjectStateListFromData(): void { $mapper = $this->getMapper(); @@ -48,7 +48,7 @@ public function testCreateObjectStateListFromData() ); } - public function testCreateObjectStateGroupFromData() + public function testCreateObjectStateGroupFromData(): void { $mapper = $this->getMapper(); @@ -63,7 +63,7 @@ public function testCreateObjectStateGroupFromData() ); } - public function testCreateObjectStateGroupListFromData() + public function testCreateObjectStateGroupListFromData(): void { $mapper = $this->getMapper(); @@ -78,7 +78,7 @@ public function testCreateObjectStateGroupListFromData() ); } - public function testCreateObjectStateFromInputStruct() + public function testCreateObjectStateFromInputStruct(): void { $mapper = $this->getMapper(); @@ -93,7 +93,7 @@ public function testCreateObjectStateFromInputStruct() ); } - public function testCreateObjectStateGroupFromInputStruct() + public function testCreateObjectStateGroupFromInputStruct(): void { $mapper = $this->getMapper(); @@ -113,7 +113,7 @@ public function testCreateObjectStateGroupFromInputStruct() * * @return \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Mapper */ - protected function getMapper() + protected function getMapper(): Mapper { return new Mapper( $this->getLanguageHandler() @@ -125,7 +125,7 @@ protected function getMapper() * * @return array[][] */ - protected function getObjectStateRowsFixture() + protected function getObjectStateRowsFixture(): array { return [ [ @@ -147,7 +147,7 @@ protected function getObjectStateRowsFixture() * * @return array[][] */ - protected function getObjectStateGroupRowsFixture() + protected function getObjectStateGroupRowsFixture(): array { return [ [ @@ -168,7 +168,7 @@ protected function getObjectStateGroupRowsFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState */ - protected function getObjectStateFixture() + protected function getObjectStateFixture(): ObjectState { $objectState = new ObjectState(); $objectState->identifier = 'not_locked'; @@ -185,7 +185,7 @@ protected function getObjectStateFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group */ - protected function getObjectStateGroupFixture() + protected function getObjectStateGroupFixture(): Group { $group = new Group(); $group->identifier = 'ez_lock'; @@ -202,7 +202,7 @@ protected function getObjectStateGroupFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\InputStruct */ - protected function getObjectStateInputStructFixture() + protected function getObjectStateInputStructFixture(): InputStruct { $inputStruct = new InputStruct(); @@ -219,7 +219,7 @@ protected function getObjectStateInputStructFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\InputStruct */ - protected function getObjectStateGroupInputStructFixture() + protected function getObjectStateGroupInputStructFixture(): InputStruct { $inputStruct = new InputStruct(); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php index 2eccd484af..e389922586 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php @@ -16,6 +16,7 @@ use Ibexa\Core\Persistence\Legacy\Content\ObjectState\Mapper; use Ibexa\Tests\Core\Persistence\Legacy\Content\LanguageAwareTestCase; use Ibexa\Tests\Integration\Core\Repository\BaseTest as APIBaseTest; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Handler @@ -34,16 +35,16 @@ class ObjectStateHandlerTest extends LanguageAwareTestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * Object state mapper mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Mapper */ - protected $mapperMock; + protected ?MockObject $mapperMock = null; - public function testCreateGroup() + public function testCreateGroup(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -67,7 +68,7 @@ public function testCreateGroup() ); } - public function testLoadGroup() + public function testLoadGroup(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -91,7 +92,7 @@ public function testLoadGroup() ); } - public function testLoadGroupThrowsNotFoundException() + public function testLoadGroupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -106,7 +107,7 @@ public function testLoadGroupThrowsNotFoundException() $handler->loadGroup(APIBaseTest::DB_INT_MAX); } - public function testLoadGroupByIdentifier() + public function testLoadGroupByIdentifier(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -130,7 +131,7 @@ public function testLoadGroupByIdentifier() ); } - public function testLoadGroupByIdentifierThrowsNotFoundException() + public function testLoadGroupByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -145,7 +146,7 @@ public function testLoadGroupByIdentifierThrowsNotFoundException() $handler->loadGroupByIdentifier('unknown'); } - public function testLoadAllGroups() + public function testLoadAllGroups(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -171,7 +172,7 @@ public function testLoadAllGroups() } } - public function testLoadObjectStates() + public function testLoadObjectStates(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -197,7 +198,7 @@ public function testLoadObjectStates() } } - public function testUpdateGroup() + public function testUpdateGroup(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -230,7 +231,7 @@ public function testUpdateGroup() ); } - public function testDeleteGroup() + public function testDeleteGroup(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -282,7 +283,7 @@ public function testDeleteGroup() $handler->deleteGroup(2); } - public function testCreate() + public function testCreate(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -306,7 +307,7 @@ public function testCreate() ); } - public function testLoad() + public function testLoad(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -330,7 +331,7 @@ public function testLoad() ); } - public function testLoadThrowsNotFoundException() + public function testLoadThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -345,7 +346,7 @@ public function testLoadThrowsNotFoundException() $handler->load(APIBaseTest::DB_INT_MAX); } - public function testLoadByIdentifier() + public function testLoadByIdentifier(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -369,7 +370,7 @@ public function testLoadByIdentifier() ); } - public function testLoadByIdentifierThrowsNotFoundException() + public function testLoadByIdentifierThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -384,7 +385,7 @@ public function testLoadByIdentifierThrowsNotFoundException() $handler->loadByIdentifier('unknown', 2); } - public function testUpdate() + public function testUpdate(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -417,7 +418,7 @@ public function testUpdate() ); } - public function testSetPriority() + public function testSetPriority(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -469,7 +470,7 @@ public function testSetPriority() $handler->setPriority(2, 0); } - public function testDelete() + public function testDelete(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -510,7 +511,7 @@ public function testDelete() $handler->delete(1); } - public function testDeleteThrowsNotFoundException() + public function testDeleteThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -525,7 +526,7 @@ public function testDeleteThrowsNotFoundException() $handler->delete(APIBaseTest::DB_INT_MAX); } - public function testSetContentState() + public function testSetContentState(): void { $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); @@ -539,7 +540,7 @@ public function testSetContentState() self::assertTrue($result); } - public function testGetContentState() + public function testGetContentState(): void { $handler = $this->getObjectStateHandler(); $mapperMock = $this->getMapperMock(); @@ -563,7 +564,7 @@ public function testGetContentState() ); } - public function testGetContentCount() + public function testGetContentCount(): void { $handler = $this->getObjectStateHandler(); $gatewayMock = $this->getGatewayMock(); @@ -583,7 +584,7 @@ public function testGetContentCount() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState */ - protected function getObjectStateFixture() + protected function getObjectStateFixture(): ObjectState { return new ObjectState(); } @@ -593,7 +594,7 @@ protected function getObjectStateFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group */ - protected function getObjectStateGroupFixture() + protected function getObjectStateGroupFixture(): Group { return new Group(); } @@ -603,7 +604,7 @@ protected function getObjectStateGroupFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\ObjectState\InputStruct */ - protected function getInputStructFixture() + protected function getInputStructFixture(): InputStruct { return new InputStruct(); } diff --git a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php index ec9cf92c25..11a651531b 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php @@ -35,7 +35,7 @@ protected function setUp(): void ); } - public function testInsertSection() + public function testInsertSection(): void { $gateway = $this->getDatabaseGateway(); @@ -63,7 +63,7 @@ public function testInsertSection() ); } - public function testUpdateSection() + public function testUpdateSection(): void { $gateway = $this->getDatabaseGateway(); @@ -85,7 +85,7 @@ public function testUpdateSection() ); } - public function testLoadSectionData() + public function testLoadSectionData(): void { $gateway = $this->getDatabaseGateway(); @@ -103,7 +103,7 @@ public function testLoadSectionData() ); } - public function testLoadAllSectionData() + public function testLoadAllSectionData(): void { $gateway = $this->getDatabaseGateway(); @@ -152,7 +152,7 @@ public function testLoadAllSectionData() ); } - public function testLoadSectionDataByIdentifier() + public function testLoadSectionDataByIdentifier(): void { $gateway = $this->getDatabaseGateway(); @@ -170,7 +170,7 @@ public function testLoadSectionDataByIdentifier() ); } - public function testCountContentObjectsInSection() + public function testCountContentObjectsInSection(): void { $this->insertDatabaseFixture( __DIR__ . '/../../_fixtures/contentobjects.php' @@ -186,7 +186,7 @@ public function testCountContentObjectsInSection() ); } - public function testCountRoleAssignmentsUsingSection() + public function testCountRoleAssignmentsUsingSection(): void { $this->insertDatabaseFixture( __DIR__ . '/../../../User/_fixtures/roles.php' @@ -202,7 +202,7 @@ public function testCountRoleAssignmentsUsingSection() ); } - public function testDeleteSection() + public function testDeleteSection(): void { $gateway = $this->getDatabaseGateway(); @@ -235,7 +235,7 @@ public function testDeleteSection() /** * @depends testCountContentObjectsInSection */ - public function testAssignSectionToContent() + public function testAssignSectionToContent(): void { $this->insertDatabaseFixture( __DIR__ . '/../../_fixtures/contentobjects.php' diff --git a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php index 21b5808771..35e9171dfe 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php @@ -11,6 +11,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Section\Handler; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Section\Handler @@ -29,9 +30,9 @@ class SectionHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; - public function testCreate() + public function testCreate(): void { $handler = $this->getSectionHandler(); @@ -57,7 +58,7 @@ public function testCreate() ); } - public function testUpdate() + public function testUpdate(): void { $handler = $this->getSectionHandler(); @@ -84,7 +85,7 @@ public function testUpdate() ); } - public function testLoad() + public function testLoad(): void { $handler = $this->getSectionHandler(); @@ -119,7 +120,7 @@ public function testLoad() ); } - public function testLoadAll() + public function testLoadAll(): void { $handler = $this->getSectionHandler(); @@ -162,7 +163,7 @@ public function testLoadAll() ); } - public function testLoadByIdentifier() + public function testLoadByIdentifier(): void { $handler = $this->getSectionHandler(); @@ -197,7 +198,7 @@ public function testLoadByIdentifier() ); } - public function testDelete() + public function testDelete(): void { $handler = $this->getSectionHandler(); @@ -217,7 +218,7 @@ public function testDelete() $result = $handler->delete(23); } - public function testDeleteFailure() + public function testDeleteFailure(): void { $this->expectException(\RuntimeException::class); @@ -236,7 +237,7 @@ public function testDeleteFailure() $result = $handler->delete(23); } - public function testAssign() + public function testAssign(): void { $handler = $this->getSectionHandler(); @@ -252,7 +253,7 @@ public function testAssign() $result = $handler->assign(23, 42); } - public function testPoliciesCount() + public function testPoliciesCount(): void { $handler = $this->getSectionHandler(); @@ -270,7 +271,7 @@ public function testPoliciesCount() $result = $handler->policiesCount(1); } - public function testCountRoleAssignmentsUsingSection() + public function testCountRoleAssignmentsUsingSection(): void { $handler = $this->getSectionHandler(); diff --git a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php index 1b3b31a113..e3fd03aad4 100644 --- a/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php +++ b/tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php @@ -11,6 +11,7 @@ use Ibexa\Core\FieldType\NullStorage; use Ibexa\Core\Persistence\Legacy\Content\StorageRegistry; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\StorageRegistry @@ -27,7 +28,7 @@ public function testRegister(): void self::assertSame($storage, $registry->getStorage(self::TYPE_NAME)); } - public function testGetStorage() + public function testGetStorage(): void { $storage = $this->getStorageMock(); $registry = new StorageRegistry([self::TYPE_NAME => $storage]); @@ -40,7 +41,7 @@ public function testGetStorage() ); } - public function testGetNotFound() + public function testGetNotFound(): void { $registry = new StorageRegistry([]); self::assertInstanceOf( @@ -54,7 +55,7 @@ public function testGetNotFound() * * @return \Ibexa\Contracts\Core\FieldType\FieldStorage */ - protected function getStorageMock() + protected function getStorageMock(): MockObject { return $this->createMock(FieldStorage::class); } diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index f1d185bf1a..62281085c6 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -17,13 +17,14 @@ use Ibexa\Core\Persistence\Legacy\Content\Mapper; use Ibexa\Core\Persistence\Legacy\Content\TreeHandler; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * Test case for Tree Handler. */ class TreeHandlerTest extends TestCase { - public function testLoadContentInfoByRemoteId() + public function testLoadContentInfoByRemoteId(): void { $contentInfoData = [new ContentInfo()]; @@ -45,7 +46,7 @@ public function testLoadContentInfoByRemoteId() ); } - public function testListVersions() + public function testListVersions(): void { $this->getContentGatewayMock() ->expects(self::once()) @@ -73,7 +74,7 @@ public function testListVersions() ); } - public function testRemoveRawContent() + public function testRemoveRawContent(): void { $treeHandler = $this->getPartlyMockedTreeHandler( [ @@ -125,7 +126,7 @@ public function testRemoveRawContent() $treeHandler->removeRawContent(23); } - public function testRemoveSubtree() + public function testRemoveSubtree(): void { $treeHandler = $this->getPartlyMockedTreeHandler( [ @@ -259,7 +260,7 @@ public function testRemoveSubtree() $treeHandler->removeSubtree(42); } - public function testSetSectionForSubtree() + public function testSetSectionForSubtree(): void { $treeHandler = $this->getTreeHandler(); @@ -285,7 +286,7 @@ public function testSetSectionForSubtree() $treeHandler->setSectionForSubtree(69, 3); } - public function testChangeMainLocation() + public function testChangeMainLocation(): void { $treeHandler = $this->getPartlyMockedTreeHandler( [ @@ -332,7 +333,7 @@ public function testChangeMainLocation() $treeHandler->changeMainLocation(12, 34); } - public function testChangeMainLocationToLocationWithoutContentInfo() + public function testChangeMainLocationToLocationWithoutContentInfo(): void { $treeHandler = $this->getPartlyMockedTreeHandler( [ @@ -374,7 +375,7 @@ public function testChangeMainLocationToLocationWithoutContentInfo() $treeHandler->changeMainLocation(12, 34); } - public function testLoadLocation() + public function testLoadLocation(): void { $treeHandler = $this->getTreeHandler(); @@ -457,7 +458,7 @@ public function testDeleteChildrenDraftsRecursive(): void } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected $locationGatewayMock; + protected ?MockObject $locationGatewayMock = null; /** * Returns Location Gateway mock. @@ -474,7 +475,7 @@ protected function getLocationGatewayMock() } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected $locationMapperMock; + protected ?MockObject $locationMapperMock = null; /** * Returns a Location Mapper mock. @@ -491,7 +492,7 @@ protected function getLocationMapperMock() } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGatewayMock; + protected ?MockObject $contentGatewayMock = null; /** * Returns Content Gateway mock. @@ -508,7 +509,7 @@ protected function getContentGatewayMock() } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapper; + protected ?MockObject $contentMapper = null; /** * Returns a Content Mapper mock. @@ -525,7 +526,7 @@ protected function getContentMapperMock() } /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected $fieldHandlerMock; + protected ?MockObject $fieldHandlerMock = null; /** * Returns a FieldHandler mock. @@ -546,7 +547,7 @@ protected function getFieldHandlerMock() * * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\TreeHandler */ - protected function getPartlyMockedTreeHandler(array $methods) + protected function getPartlyMockedTreeHandler(array $methods): MockObject { return $this->getMockBuilder(TreeHandler::class) ->setMethods($methods) @@ -565,7 +566,7 @@ protected function getPartlyMockedTreeHandler(array $methods) /** * @return \Ibexa\Core\Persistence\Legacy\Content\TreeHandler */ - protected function getTreeHandler() + protected function getTreeHandler(): TreeHandler { return new TreeHandler( $this->getLocationGatewayMock(), diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php index 12032a9057..021ddcc056 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php @@ -22,6 +22,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\StorageDispatcherInterface; use Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler as UpdateHandler; use Ibexa\Core\Persistence\Legacy\Exception; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -34,26 +35,26 @@ class ContentTypeHandlerTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * Mapper mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Mapper */ - protected $mapperMock; + protected ?MockObject $mapperMock = null; /** * Update\Handler mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler */ - protected $updateHandlerMock; + protected ?MockObject $updateHandlerMock = null; /** @var \Ibexa\Core\Persistence\Legacy\Content\Type\StorageDispatcherInterface&\PHPUnit\Framework\MockObject\MockObject */ - protected $storageDispatcherMock; + protected ?MockObject $storageDispatcherMock = null; - public function testCreateGroup() + public function testCreateGroup(): void { $createStruct = new GroupCreateStruct(); @@ -94,7 +95,7 @@ public function testCreateGroup() ); } - public function testUpdateGroup() + public function testUpdateGroup(): void { $updateStruct = new GroupUpdateStruct(); $updateStruct->id = 23; @@ -138,7 +139,7 @@ public function testUpdateGroup() ); } - public function testDeleteGroupSuccess() + public function testDeleteGroupSuccess(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -153,7 +154,7 @@ public function testDeleteGroupSuccess() $handler->deleteGroup(23); } - public function testDeleteGroupFailure() + public function testDeleteGroupFailure(): void { $this->expectException(Exception\GroupNotEmpty::class); $this->expectExceptionMessage('Group with ID "23" is not empty.'); @@ -170,7 +171,7 @@ public function testDeleteGroupFailure() $handler->deleteGroup(23); } - public function testLoadGroup() + public function testLoadGroup(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -193,7 +194,7 @@ public function testLoadGroup() ); } - public function testLoadGroupByIdentifier() + public function testLoadGroupByIdentifier(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -216,7 +217,7 @@ public function testLoadGroupByIdentifier() ); } - public function testLoadAllGroups() + public function testLoadAllGroups(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -238,7 +239,7 @@ public function testLoadAllGroups() ); } - public function testLoadContentTypes() + public function testLoadContentTypes(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -309,7 +310,7 @@ public function testLoadContentTypesByFieldDefinitionIdentifier(): void ); } - public function testLoad() + public function testLoad(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -340,7 +341,7 @@ public function testLoad() ); } - public function testLoadNotFound() + public function testLoadNotFound(): void { $this->expectException(Exception\TypeNotFound::class); @@ -367,7 +368,7 @@ public function testLoadNotFound() $type = $handler->load(23, 1); } - public function testLoadDefaultVersion() + public function testLoadDefaultVersion(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -397,7 +398,7 @@ public function testLoadDefaultVersion() ); } - public function testLoadByIdentifier() + public function testLoadByIdentifier(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -427,7 +428,7 @@ public function testLoadByIdentifier() ); } - public function testLoadByRemoteId() + public function testLoadByRemoteId(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -457,7 +458,7 @@ public function testLoadByRemoteId() ); } - public function testCreate() + public function testCreate(): void { $createStructFix = $this->getContentTypeCreateStructFixture(); $createStructClone = clone $createStructFix; @@ -534,7 +535,7 @@ public function testCreate() ); } - public function testUpdate() + public function testUpdate(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -573,7 +574,7 @@ public function testUpdate() ); } - public function testDeleteSuccess() + public function testDeleteSuccess(): void { $gatewayMock = $this->getGatewayMock(); @@ -607,7 +608,7 @@ public function testDeleteSuccess() self::assertTrue($res); } - public function testDeleteThrowsBadStateException() + public function testDeleteThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -629,7 +630,7 @@ public function testDeleteThrowsBadStateException() $res = $handler->delete(23, 0); } - public function testCreateVersion() + public function testCreateVersion(): void { $userId = 42; $contentTypeId = 23; @@ -685,7 +686,7 @@ public function testCreateVersion() ); } - public function testCopy() + public function testCopy(): void { $gatewayMock = $this->getGatewayMock(); $mapperMock = $this->getMapperMock(['createCreateStructFromType']); @@ -756,7 +757,7 @@ public function testCopy() ); } - public function testLink() + public function testLink(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -775,7 +776,7 @@ public function testLink() self::assertTrue($res); } - public function testUnlinkSuccess() + public function testUnlinkSuccess(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -801,7 +802,7 @@ public function testUnlinkSuccess() self::assertTrue($res); } - public function testUnlinkFailure() + public function testUnlinkFailure(): void { $this->expectException(Exception\RemoveLastGroupFromType::class); $this->expectExceptionMessage('Type with ID "23" in status "1" cannot be unlinked from its last group.'); @@ -822,7 +823,7 @@ public function testUnlinkFailure() $res = $handler->unlink(3, 23, 1); } - public function testGetFieldDefinition() + public function testGetFieldDefinition(): void { $mapperMock = $this->getMapperMock( [ @@ -869,7 +870,7 @@ public function testGetFieldDefinition() ); } - public function testAddFieldDefinition() + public function testAddFieldDefinition(): void { $mapperMock = $this->getMapperMock( ['toStorageFieldDefinition'] @@ -918,7 +919,7 @@ public function testAddFieldDefinition() ); } - public function testGetContentCount() + public function testGetContentCount(): void { $gatewayMock = $this->getGatewayMock(); $gatewayMock->expects(self::once()) @@ -937,7 +938,7 @@ public function testGetContentCount() ); } - public function testRemoveFieldDefinition() + public function testRemoveFieldDefinition(): void { $storageDispatcherMock = $this->getStorageDispatcherMock(); $storageDispatcherMock @@ -958,7 +959,7 @@ public function testRemoveFieldDefinition() $handler->removeFieldDefinition(23, 1, new FieldDefinition(['id' => 42, 'fieldType' => 'ezstring'])); } - public function testUpdateFieldDefinition() + public function testUpdateFieldDefinition(): void { $fieldDef = new FieldDefinition(); @@ -991,7 +992,7 @@ public function testUpdateFieldDefinition() $handler->updateFieldDefinition(23, 1, $fieldDef); } - public function testPublish() + public function testPublish(): void { $handler = $this->getPartlyMockedHandler(['load']); $updateHandlerMock = $this->getUpdateHandlerMock(); @@ -1025,7 +1026,7 @@ public function testPublish() $handler->publish(23); } - public function testPublishNoOldType() + public function testPublishNoOldType(): void { $handler = $this->getPartlyMockedHandler(['load']); $updateHandlerMock = $this->getUpdateHandlerMock(); @@ -1067,7 +1068,7 @@ public function testPublishNoOldType() * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Handler */ - protected function getHandler() + protected function getHandler(): Handler { return new Handler( $this->getGatewayMock(), @@ -1084,7 +1085,7 @@ protected function getHandler() * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Handler */ - protected function getPartlyMockedHandler(array $methods) + protected function getPartlyMockedHandler(array $methods): MockObject { return $this->getMockBuilder(Handler::class) ->setMethods($methods) @@ -1122,7 +1123,7 @@ protected function getGatewayMock() * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Mapper */ - protected function getMapperMock($methods = []) + protected function getMapperMock(?array $methods = []) { if (!isset($this->mapperMock)) { $this->mapperMock = $this->getMockBuilder(Mapper::class) @@ -1168,7 +1169,7 @@ public function getStorageDispatcherMock(): StorageDispatcherInterface * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\CreateStruct */ - protected function getContentTypeCreateStructFixture() + protected function getContentTypeCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); $struct->status = 1; @@ -1190,7 +1191,7 @@ protected function getContentTypeCreateStructFixture() return $struct; } - public function testRemoveContentTypeTranslation() + public function testRemoveContentTypeTranslation(): void { $mapperMock = $this->getMapperMock(); $mapperMock->expects(self::once()) diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php index 291d81c397..52c25f3b8c 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php @@ -9,12 +9,14 @@ use Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\Content\Field; +use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionObject; @@ -28,24 +30,24 @@ class AddFieldTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGatewayMock; + protected ?MockObject $contentGatewayMock = null; /** * Content gateway mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $contentStorageHandlerMock; + protected ?MockObject $contentStorageHandlerMock = null; /** * FieldValue converter mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter */ - protected $fieldValueConverterMock; + protected ?MockObject $fieldValueConverterMock = null; /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapperMock; + protected ?MockObject $contentMapperMock = null; /** * AddField action to test. @@ -57,7 +59,7 @@ class AddFieldTest extends TestCase /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater::__construct */ - public function testConstructor() + public function testConstructor(): void { $action = new AddField( $this->getContentGatewayMock(), @@ -70,7 +72,7 @@ public function testConstructor() self::assertInstanceOf(AddField::class, $action); } - public function testApplySingleVersionSingleTranslation() + public function testApplySingleVersionSingleTranslation(): void { $contentId = 42; $versionNumbers = [1]; @@ -110,7 +112,7 @@ public function testApplySingleVersionSingleTranslation() $action->apply($contentId); } - public function testApplySingleVersionMultipleTranslations() + public function testApplySingleVersionMultipleTranslations(): void { $contentId = 42; $versionNumbers = [1]; @@ -156,7 +158,7 @@ public function testApplySingleVersionMultipleTranslations() $action->apply($contentId); } - public function testApplyMultipleVersionsSingleTranslation() + public function testApplyMultipleVersionsSingleTranslation(): void { $contentId = 42; $versionNumbers = [1, 2]; @@ -215,7 +217,7 @@ public function testApplyMultipleVersionsSingleTranslation() $action->apply($contentId); } - public function testApplyMultipleVersionsMultipleTranslations() + public function testApplyMultipleVersionsMultipleTranslations(): void { $contentId = 42; $versionNumbers = [1, 2]; @@ -286,7 +288,7 @@ public function testApplyMultipleVersionsMultipleTranslations() $action->apply($contentId); } - public function testInsertNewField() + public function testInsertNewField(): void { $versionInfo = new Content\VersionInfo(); $content = new Content(); @@ -335,7 +337,7 @@ public function testInsertNewField() self::assertEquals(23, $field->id); } - public function testInsertNewFieldUpdating() + public function testInsertNewFieldUpdating(): void { $versionInfo = new Content\VersionInfo(); $content = new Content(); @@ -390,7 +392,7 @@ public function testInsertNewFieldUpdating() self::assertEquals(23, $field->id); } - public function testInsertExistingField() + public function testInsertExistingField(): void { $versionInfo = new Content\VersionInfo(); $content = new Content(); @@ -438,7 +440,7 @@ public function testInsertExistingField() self::assertEquals(32, $field->id); } - public function testInsertExistingFieldUpdating() + public function testInsertExistingFieldUpdating(): void { $versionInfo = new Content\VersionInfo(); $content = new Content(); @@ -500,7 +502,7 @@ public function testInsertExistingFieldUpdating() * * @return \Ibexa\Contracts\Core\Persistence\Content */ - protected function getContentFixture($versionNo, array $languageCodes) + protected function getContentFixture($versionNo, array $languageCodes): Content { $contentInfo = new Content\ContentInfo(); $contentInfo->id = 'contentId'; @@ -582,9 +584,9 @@ protected function getContentMapperMock() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - protected function getFieldDefinitionFixture() + protected function getFieldDefinitionFixture(): FieldDefinition { - $fieldDef = new Content\Type\FieldDefinition(); + $fieldDef = new FieldDefinition(); $fieldDef->id = 42; $fieldDef->isTranslatable = true; $fieldDef->fieldType = 'ezstring'; @@ -602,7 +604,7 @@ protected function getFieldDefinitionFixture() * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - public function getFieldReference($id, $versionNo, $languageCode) + public function getFieldReference($id, $versionNo, $languageCode): Field { $field = new Field(); @@ -621,7 +623,7 @@ public function getFieldReference($id, $versionNo, $languageCode) * * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\AddField */ - protected function getMockedAction($methods = []) + protected function getMockedAction($methods = []): MockObject { return $this ->getMockBuilder(AddField::class) diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php index b15af30134..c6c8218cc4 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php @@ -8,10 +8,12 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; use Ibexa\Contracts\Core\Persistence\Content; +use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action\RemoveField; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -24,17 +26,17 @@ class RemoveFieldTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGatewayMock; + protected ?MockObject $contentGatewayMock = null; /** * Content gateway mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $contentStorageHandlerMock; + protected ?MockObject $contentStorageHandlerMock = null; /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapperMock; + protected ?MockObject $contentMapperMock = null; /** * RemoveField action to test. @@ -43,7 +45,7 @@ class RemoveFieldTest extends TestCase */ protected $removeFieldAction; - public function testApplySingleVersionSingleTranslation() + public function testApplySingleVersionSingleTranslation(): void { $contentId = 42; $versionNumbers = [1]; @@ -91,7 +93,7 @@ public function testApplySingleVersionSingleTranslation() $action->apply($contentId); } - public function testApplyMultipleVersionsSingleTranslation() + public function testApplyMultipleVersionsSingleTranslation(): void { $contentId = 42; $versionNumbers = [1, 2]; @@ -162,7 +164,7 @@ public function testApplyMultipleVersionsSingleTranslation() $action->apply($contentId); } - public function testApplyMultipleVersionsMultipleTranslations() + public function testApplyMultipleVersionsMultipleTranslations(): void { $contentId = 42; $versionNumbers = [1, 2]; @@ -323,9 +325,9 @@ protected function getContentMapperMock() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - protected function getFieldDefinitionFixture() + protected function getFieldDefinitionFixture(): FieldDefinition { - $fieldDef = new Content\Type\FieldDefinition(); + $fieldDef = new FieldDefinition(); $fieldDef->id = 42; $fieldDef->fieldType = 'ezstring'; $fieldDef->defaultValue = new Content\FieldValue(); diff --git a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php index 8fad3490ab..cfb471af18 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php @@ -15,6 +15,7 @@ use Ibexa\Core\Persistence\Legacy\Content\StorageHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater; use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater\Action; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -27,14 +28,14 @@ class ContentUpdaterTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway */ - protected $contentGatewayMock; + protected ?MockObject $contentGatewayMock = null; /** * FieldValue converter registry mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $converterRegistryMock; + protected ?MockObject $converterRegistryMock = null; /** * Search handler mock. @@ -48,7 +49,7 @@ class ContentUpdaterTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\StorageHandler */ - protected $contentStorageHandlerMock; + protected ?MockObject $contentStorageHandlerMock = null; /** * Content Updater to test. @@ -58,9 +59,9 @@ class ContentUpdaterTest extends TestCase protected $contentUpdater; /** @var \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected $contentMapperMock; + protected ?MockObject $contentMapperMock = null; - public function testDetermineActions() + public function testDetermineActions(): void { $fromType = $this->getFromTypeFixture(); $toType = $this->getToTypeFixture(); @@ -81,13 +82,13 @@ public function testDetermineActions() self::assertEquals( [ - new ContentUpdater\Action\RemoveField( + new Action\RemoveField( $this->getContentGatewayMock(), $fromType->fieldDefinitions[0], $this->getContentStorageHandlerMock(), $this->getContentMapperMock() ), - new ContentUpdater\Action\AddField( + new Action\AddField( $this->getContentGatewayMock(), $toType->fieldDefinitions[2], $converterMock, @@ -99,7 +100,7 @@ public function testDetermineActions() ); } - public function testApplyUpdates() + public function testApplyUpdates(): void { $updater = $this->getContentUpdater(); @@ -146,7 +147,7 @@ public function testApplyUpdates() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function getFromTypeFixture() + protected function getFromTypeFixture(): Type { $type = new Type(); diff --git a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php index a505662e16..27564a6e5f 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php @@ -12,6 +12,7 @@ // For SORT_ORDER_* constants use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Contracts\Core\Persistence\Content\Type\Group; +use Ibexa\Contracts\Core\Persistence\Content\Type\Group\UpdateStruct; use Ibexa\Contracts\Core\Persistence\Content\Type\Group\UpdateStruct as GroupUpdateStruct; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase; @@ -36,7 +37,7 @@ protected function setUp(): void $this->insertDatabaseFixture(__DIR__ . '/_fixtures/languages.php'); } - public function testInsertGroup() + public function testInsertGroup(): void { $gateway = $this->getGateway(); @@ -73,7 +74,7 @@ public function testInsertGroup() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\Group */ - protected function getGroupFixture() + protected function getGroupFixture(): Group { $group = new Group(); @@ -94,7 +95,7 @@ protected function getGroupFixture() return $group; } - public function testUpdateGroup() + public function testUpdateGroup(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -171,7 +172,7 @@ public function testUpdateGroup() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\Group\UpdateStruct */ - protected function getGroupUpdateStructFixture() + protected function getGroupUpdateStructFixture(): UpdateStruct { $struct = new GroupUpdateStruct(); @@ -191,7 +192,7 @@ protected function getGroupUpdateStructFixture() return $struct; } - public function testCountTypesInGroup() + public function testCountTypesInGroup(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -209,7 +210,7 @@ public function testCountTypesInGroup() ); } - public function testCountGroupsForType() + public function testCountGroupsForType(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -227,7 +228,7 @@ public function testCountGroupsForType() ); } - public function testDeleteGroup() + public function testDeleteGroup(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -249,7 +250,7 @@ public function testDeleteGroup() ); } - public function testLoadGroupData() + public function testLoadGroupData(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -274,7 +275,7 @@ public function testLoadGroupData() ); } - public function testLoadGroupDataByIdentifier() + public function testLoadGroupDataByIdentifier(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -299,7 +300,7 @@ public function testLoadGroupDataByIdentifier() ); } - public function testLoadAllGroupsData() + public function testLoadAllGroupsData(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -327,7 +328,7 @@ public function testLoadAllGroupsData() ); } - public function testLoadTypesDataForGroup() + public function testLoadTypesDataForGroup(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -342,7 +343,7 @@ public function testLoadTypesDataForGroup() ); } - public function testLoadTypeData() + public function testLoadTypeData(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -370,7 +371,7 @@ public function testLoadTypeData() */ } - public function testLoadTypeDataByIdentifier() + public function testLoadTypeDataByIdentifier(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -389,7 +390,7 @@ public function testLoadTypeDataByIdentifier() ); } - public function testLoadTypeDataByRemoteId() + public function testLoadTypeDataByRemoteId(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -413,7 +414,7 @@ public function testLoadTypeDataByRemoteId() * * @return string[][] */ - public static function getTypeCreationExpectations() + public static function getTypeCreationExpectations(): array { return [ ['always_available', 0], @@ -439,7 +440,7 @@ public static function getTypeCreationExpectations() /** * @dataProvider getTypeCreationExpectations */ - public function testInsertType($column, $expectation) + public function testInsertType(string $column, int|string $expectation): void { $gateway = $this->getGateway(); $type = $this->getTypeFixture(); @@ -460,7 +461,7 @@ public function testInsertType($column, $expectation) * * @return string[][] */ - public static function getTypeCreationContentClassNameExpectations() + public static function getTypeCreationContentClassNameExpectations(): array { return [ ['contentclass_version', [0, 0]], @@ -473,7 +474,7 @@ public static function getTypeCreationContentClassNameExpectations() /** * @dataProvider getTypeCreationContentClassNameExpectations */ - public function testInsertTypeContentClassName($column, $expectation) + public function testInsertTypeContentClassName(string $column, array $expectation): void { $gateway = $this->getGateway(); $type = $this->getTypeFixture(); @@ -482,7 +483,7 @@ public function testInsertTypeContentClassName($column, $expectation) $this->assertQueryResult( array_map( - static function ($value) { + static function ($value): array { return [$value]; }, $expectation @@ -499,7 +500,7 @@ static function ($value) { * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function getTypeFixture() + protected function getTypeFixture(): Type { $type = new Type(); @@ -533,7 +534,7 @@ protected function getTypeFixture() return $type; } - public function testInsertFieldDefinition() + public function testInsertFieldDefinition(): void { $gateway = $this->getGateway(); @@ -611,7 +612,7 @@ public function testInsertFieldDefinition() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition */ - protected function getFieldDefinitionFixture() + protected function getFieldDefinitionFixture(): FieldDefinition { $field = new FieldDefinition(); @@ -644,7 +645,7 @@ protected function getFieldDefinitionFixture() * * @return \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition */ - protected function getStorageFieldDefinitionFixture() + protected function getStorageFieldDefinitionFixture(): StorageFieldDefinition { $fieldDef = new StorageFieldDefinition(); @@ -671,7 +672,7 @@ protected function getStorageFieldDefinitionFixture() return $fieldDef; } - public function testDeleteFieldDefinition() + public function testDeleteFieldDefinition(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -689,7 +690,7 @@ public function testDeleteFieldDefinition() ); } - public function testUpdateFieldDefinition() + public function testUpdateFieldDefinition(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -761,7 +762,7 @@ public function testUpdateFieldDefinition() ); } - public function testInsertGroupAssignment() + public function testInsertGroupAssignment(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_groups.php' @@ -790,7 +791,7 @@ public function testInsertGroupAssignment() ); } - public function testDeleteGroupAssignment() + public function testDeleteGroupAssignment(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -813,7 +814,7 @@ public function testDeleteGroupAssignment() /** * @dataProvider getTypeUpdateExpectations */ - public function testUpdateType($fieldName, $expectedValue) + public function testUpdateType(string $fieldName, string $expectedValue): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -840,7 +841,7 @@ public function testUpdateType($fieldName, $expectedValue) ); } - public function testUpdateTypeName() + public function testUpdateTypeName(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -883,7 +884,7 @@ public function testUpdateTypeName() * * @return string[][] */ - public static function getTypeUpdateExpectations() + public static function getTypeUpdateExpectations(): array { return [ ['serialized_name_list', 'a:3:{s:16:"always-available";s:6:"eng-US";s:6:"eng-US";s:10:"New Folder";s:6:"eng-GB";s:18:"New Folder for you";}'], @@ -933,7 +934,7 @@ protected function getUpdateTypeFixture(): Type return $type; } - public function testCountInstancesOfTypeExist() + public function testCountInstancesOfTypeExist(): void { $this->insertDatabaseFixture( // Fixture for content objects @@ -949,7 +950,7 @@ public function testCountInstancesOfTypeExist() ); } - public function testCountInstancesOfTypeNotExist() + public function testCountInstancesOfTypeNotExist(): void { $this->insertDatabaseFixture( // Fixture for content objects @@ -965,7 +966,7 @@ public function testCountInstancesOfTypeNotExist() ); } - public function testDeleteFieldDefinitionsForTypeExisting() + public function testDeleteFieldDefinitionsForTypeExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1001,7 +1002,7 @@ public function testDeleteFieldDefinitionsForTypeExisting() ); } - public function testDeleteFieldDefinitionsForTypeNotExisting() + public function testDeleteFieldDefinitionsForTypeNotExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1021,7 +1022,7 @@ public function testDeleteFieldDefinitionsForTypeNotExisting() ); } - public function testDeleteGroupAssignmentsForTypeExisting() + public function testDeleteGroupAssignmentsForTypeExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1041,7 +1042,7 @@ public function testDeleteGroupAssignmentsForTypeExisting() ); } - public function testDeleteGroupAssignmentsForTypeNotExisting() + public function testDeleteGroupAssignmentsForTypeNotExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1061,7 +1062,7 @@ public function testDeleteGroupAssignmentsForTypeNotExisting() ); } - public function testDeleteTypeExisting() + public function testDeleteTypeExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1081,7 +1082,7 @@ public function testDeleteTypeExisting() ); } - public function testDeleteTypeNotExisting() + public function testDeleteTypeNotExisting(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/existing_types.php' @@ -1101,7 +1102,7 @@ public function testDeleteTypeNotExisting() ); } - public function testPublishTypeAndFields() + public function testPublishTypeAndFields(): void { $this->insertDatabaseFixture( __DIR__ . '/_fixtures/type_to_publish.php' diff --git a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php index 6615a94aee..d9b44f519d 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/MapperTest.php @@ -22,13 +22,14 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\Mapper; use Ibexa\Core\Persistence\Legacy\Content\Type\StorageDispatcherInterface; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Type\Mapper */ class MapperTest extends TestCase { - public function testCreateGroupFromCreateStruct() + public function testCreateGroupFromCreateStruct(): void { $createStruct = $this->getGroupCreateStructFixture(); @@ -66,7 +67,7 @@ public function testCreateGroupFromCreateStruct() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\Group\CreateStruct */ - protected function getGroupCreateStructFixture() + protected function getGroupCreateStructFixture(): GroupCreateStruct { $struct = new GroupCreateStruct(); @@ -83,7 +84,7 @@ protected function getGroupCreateStructFixture() return $struct; } - public function testTypeFromCreateStruct() + public function testTypeFromCreateStruct(): void { $struct = $this->getContentTypeCreateStructFixture(); @@ -103,7 +104,7 @@ public function testTypeFromCreateStruct() } } - public function testTypeFromUpdateStruct() + public function testTypeFromUpdateStruct(): void { $struct = $this->getContentTypeUpdateStructFixture(); @@ -125,7 +126,7 @@ public function testTypeFromUpdateStruct() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type\CreateStruct */ - protected function getContentTypeCreateStructFixture() + protected function getContentTypeCreateStructFixture(): CreateStruct { // Taken from example DB $struct = new CreateStruct(); @@ -192,7 +193,7 @@ protected function getContentTypeUpdateStructFixture(): UpdateStruct return $struct; } - public function testCreateStructFromType() + public function testCreateStructFromType(): void { $type = $this->getContentTypeFixture(); @@ -218,7 +219,7 @@ public function testCreateStructFromType() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type */ - protected function getContentTypeFixture() + protected function getContentTypeFixture(): Type { // Taken from example DB $type = new Type(); @@ -259,7 +260,7 @@ protected function getContentTypeFixture() return $type; } - public function testExtractGroupsFromRows() + public function testExtractGroupsFromRows(): void { $rows = $this->getLoadGroupFixture(); @@ -294,7 +295,7 @@ public function testExtractGroupsFromRows() ); } - public function testExtractTypesFromRowsSingle() + public function testExtractTypesFromRowsSingle(): void { $rows = $this->getLoadTypeFixture(); @@ -375,7 +376,7 @@ public function testExtractTypesFromRowsSingle() ); } - public function testToStorageFieldDefinition() + public function testToStorageFieldDefinition(): void { $converterMock = $this->createMock(Converter::class); $converterMock->expects(self::once()) @@ -408,7 +409,7 @@ public function testToStorageFieldDefinition() $mapper->toStorageFieldDefinition($fieldDef, $storageFieldDef); } - public function testToFieldDefinition() + public function testToFieldDefinition(): void { $storageFieldDef = new StorageFieldDefinition(); @@ -441,7 +442,7 @@ public function testToFieldDefinition() * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Mapper */ - protected function getNonConvertingMapper() + protected function getNonConvertingMapper(): MockObject { $mapper = $this->getMockBuilder(Mapper::class) ->setMethods(['toFieldDefinition']) @@ -461,7 +462,7 @@ protected function getNonConvertingMapper() ) )->will( self::returnCallback( - static function () { + static function (): FieldDefinition { return new FieldDefinition(); } ) @@ -475,7 +476,7 @@ static function () { * * @return \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected function getConverterRegistryMock() + protected function getConverterRegistryMock(): MockObject { return $this->createMock(ConverterRegistry::class); } @@ -500,7 +501,7 @@ protected function getLoadGroupFixture() return require __DIR__ . '/_fixtures/map_load_group.php'; } - protected function getMaskGeneratorMock() + protected function getMaskGeneratorMock(): MockObject { return $this->createMock(MaskGenerator::class); } diff --git a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php index 32485ecfe9..5dde3b6cc8 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php @@ -11,6 +11,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater; use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler\DoctrineDatabase; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -23,16 +24,16 @@ class DoctrineDatabaseTest extends TestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway */ - protected $gatewayMock; + protected ?MockObject $gatewayMock = null; /** * Content Updater mock. * * @var \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater */ - protected $contentUpdaterMock; + protected ?MockObject $contentUpdaterMock = null; - public function testUpdateContentObjects() + public function testUpdateContentObjects(): void { $handler = $this->getUpdateHandler(); @@ -49,7 +50,7 @@ public function testUpdateContentObjects() $handler->updateContentObjects($types['from'], $types['to']); } - public function testDeleteOldType() + public function testDeleteOldType(): void { $handler = $this->getUpdateHandler(); @@ -67,7 +68,7 @@ public function testDeleteOldType() $handler->deleteOldType($types['from'], $types['to']); } - public function testPublishNewType() + public function testPublishNewType(): void { $handler = $this->getUpdateHandler(); @@ -88,7 +89,7 @@ public function testPublishNewType() * * @return \Ibexa\Contracts\Core\Persistence\Content\Type[] */ - protected function getTypeFixtures() + protected function getTypeFixtures(): array { $types = []; @@ -108,7 +109,7 @@ protected function getTypeFixtures() * * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler\DoctrineDatabase */ - protected function getUpdateHandler() + protected function getUpdateHandler(): DoctrineDatabase { return new DoctrineDatabase($this->getGatewayMock()); } diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php index 33f2f7c0d0..ffa338c01e 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php @@ -31,7 +31,7 @@ class DoctrineDatabaseTest extends TestCase /** * Test for the loadUrlAliasData() method. */ - public function testLoadUrlaliasDataNonExistent() + public function testLoadUrlaliasDataNonExistent(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_simple.php'); $gateway = $this->getGateway(); @@ -44,7 +44,7 @@ public function testLoadUrlaliasDataNonExistent() /** * Test for the loadUrlAliasData() method. */ - public function testLoadUrlaliasData() + public function testLoadUrlaliasData(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_simple.php'); $gateway = $this->getGateway(); @@ -85,7 +85,7 @@ public function testLoadUrlaliasData() * * Test with fixture containing language mask with multiple languages. */ - public function testLoadUrlaliasDataMultipleLanguages() + public function testLoadUrlaliasDataMultipleLanguages(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_multilang.php'); $gateway = $this->getGateway(); @@ -124,7 +124,7 @@ public function testLoadUrlaliasDataMultipleLanguages() /** * @return array */ - public function providerForTestLoadPathData() + public function providerForTestLoadPathData(): array { return [ [ @@ -173,7 +173,7 @@ public function providerForTestLoadPathData() * * @dataProvider providerForTestLoadPathData */ - public function testLoadPathData($id, $pathData) + public function testLoadPathData(int $id, array $pathData): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_fallback.php'); $gateway = $this->getGateway(); @@ -189,7 +189,7 @@ public function testLoadPathData($id, $pathData) /** * @return array */ - public function providerForTestLoadPathDataMultipleLanguages() + public function providerForTestLoadPathDataMultipleLanguages(): array { return [ [ @@ -235,7 +235,7 @@ public function providerForTestLoadPathDataMultipleLanguages() * * @dataProvider providerForTestLoadPathDataMultipleLanguages */ - public function testLoadPathDataMultipleLanguages($id, $pathData) + public function testLoadPathDataMultipleLanguages(int $id, array $pathData): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_multilang.php'); $gateway = $this->getGateway(); @@ -251,7 +251,7 @@ public function testLoadPathDataMultipleLanguages($id, $pathData) /** * @return array */ - public function providerForTestCleanupAfterPublishHistorize() + public function providerForTestCleanupAfterPublishHistorize(): array { return [ [ @@ -276,7 +276,7 @@ public function providerForTestCleanupAfterPublishHistorize() * * @return array */ - public function providerForTestArchiveUrlAliasesForDeletedTranslations() + public function providerForTestArchiveUrlAliasesForDeletedTranslations(): array { return [ [314, [2]], @@ -294,7 +294,7 @@ public function providerForTestArchiveUrlAliasesForDeletedTranslations() * * @dataProvider providerForTestCleanupAfterPublishHistorize */ - public function testCleanupAfterPublishHistorize($action, $languageId, $parentId, $textMD5) + public function testCleanupAfterPublishHistorize(string $action, int $languageId, int $parentId, string $textMD5): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_downgrade.php'); $gateway = $this->getGateway(); @@ -314,7 +314,7 @@ public function testCleanupAfterPublishHistorize($action, $languageId, $parentId /** * @return array */ - public function providerForTestCleanupAfterPublishRemovesLanguage() + public function providerForTestCleanupAfterPublishRemovesLanguage(): array { return [ [ @@ -339,7 +339,7 @@ public function providerForTestCleanupAfterPublishRemovesLanguage() * * @dataProvider providerForTestCleanupAfterPublishRemovesLanguage */ - public function testCleanupAfterPublishRemovesLanguage($action, $languageId, $parentId, $textMD5) + public function testCleanupAfterPublishRemovesLanguage(string $action, int $languageId, int $parentId, string $textMD5): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_downgrade.php'); $gateway = $this->getGateway(); @@ -359,7 +359,7 @@ public function testCleanupAfterPublishRemovesLanguage($action, $languageId, $pa * * @todo document */ - public function testReparent() + public function testReparent(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_simple.php'); $gateway = $this->getGateway(); @@ -387,7 +387,7 @@ public function testReparent() /** * Test for the remove() method. */ - public function testRemove() + public function testRemove(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_remove.php'); $gateway = $this->getGateway(); @@ -405,7 +405,7 @@ public function testRemove() /** * Test for the remove() method. */ - public function testRemoveWithId() + public function testRemoveWithId(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_remove.php'); $gateway = $this->getGateway(); @@ -423,7 +423,7 @@ public function testRemoveWithId() /** * Test for the removeCustomAlias() method. */ - public function testRemoveCustomAlias() + public function testRemoveCustomAlias(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_remove.php'); $gateway = $this->getGateway(); @@ -439,7 +439,7 @@ public function testRemoveCustomAlias() /** * Test for the removeByAction() method. */ - public function testRemoveCustomAliasFails() + public function testRemoveCustomAliasFails(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_remove.php'); $gateway = $this->getGateway(); @@ -453,7 +453,7 @@ public function testRemoveCustomAliasFails() /** * Test for the getNextId() method. */ - public function testGetNextId() + public function testGetNextId(): void { $gateway = $this->getGateway(); @@ -467,7 +467,7 @@ public function testGetNextId() * @param int $locationId * @param int[] $removedLanguageIds */ - public function testArchiveUrlAliasesForDeletedTranslations($locationId, array $removedLanguageIds) + public function testArchiveUrlAliasesForDeletedTranslations(int $locationId, array $removedLanguageIds): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_multilang.php'); $gateway = $this->getGateway(); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php index 2056c6a360..5d0f0a59a7 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php @@ -13,6 +13,7 @@ use Ibexa\Core\Persistence\TransformationProcessor\PreprocessedBased; use Ibexa\Core\Persistence\Utf8Converter; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestSuite; /** @@ -23,7 +24,7 @@ class SlugConverterTest extends TestCase /** * Test for the convert() method. */ - public function testConvert() + public function testConvert(): void { $slugConverter = $this->getSlugConverterMock(['cleanupText']); $transformationProcessor = $this->getTransformationProcessorMock(); @@ -51,7 +52,7 @@ public function testConvert() /** * Test for the convert() method. */ - public function testConvertWithDefaultTextFallback() + public function testConvertWithDefaultTextFallback(): void { $slugConverter = $this->getSlugConverterMock(['cleanupText']); $transformationProcessor = $this->getTransformationProcessorMock(); @@ -79,7 +80,7 @@ public function testConvertWithDefaultTextFallback() /** * Test for the convert() method. */ - public function testConvertWithGivenTransformation() + public function testConvertWithGivenTransformation(): void { $slugConverter = $this->getSlugConverterMock(['cleanupText']); $transformationProcessor = $this->getTransformationProcessorMock(); @@ -104,7 +105,7 @@ public function testConvertWithGivenTransformation() ); } - public function providerForTestGetUniqueCounterValue() + public function providerForTestGetUniqueCounterValue(): array { return [ ['reserved', true, 2], @@ -119,7 +120,7 @@ public function providerForTestGetUniqueCounterValue() * * @dataProvider providerForTestGetUniqueCounterValue */ - public function testGetUniqueCounterValue($text, $isRootLevel, $returnValue) + public function testGetUniqueCounterValue(string $text, bool $isRootLevel, int $returnValue): void { $slugConverter = $this->getMockedSlugConverter(); @@ -129,7 +130,7 @@ public function testGetUniqueCounterValue($text, $isRootLevel, $returnValue) ); } - public function cleanupTextData() + public function cleanupTextData(): array { return [ [ @@ -155,7 +156,7 @@ public function cleanupTextData() * * @dataProvider cleanupTextData */ - public function testCleanupText($text, $method, $expected) + public function testCleanupText(string $text, string $method, string $expected): void { $testMethod = new \ReflectionMethod( SlugConverter::class, @@ -171,7 +172,7 @@ public function testCleanupText($text, $method, $expected) ); } - public function convertData() + public function convertData(): array { return [ [ @@ -202,7 +203,7 @@ public function convertData() * * @depends testCleanupText */ - public function testConvertNoMocking($text, $defaultText, $transformation, $expected) + public function testConvertNoMocking(string $text, string $defaultText, string $transformation, string $expected): void { $transformationProcessor = new PreprocessedBased( new PcreCompiler( @@ -249,10 +250,10 @@ public function testConvertNoMocking($text, $defaultText, $transformation, $expe protected $slugConverter; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $slugConverterMock; + protected ?MockObject $slugConverterMock = null; /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $transformationProcessorMock; + protected ?MockObject $transformationProcessorMock = null; /** * @return \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter @@ -316,7 +317,7 @@ protected function getTransformationProcessorMock() * * @return \PHPUnit\Framework\TestSuite */ - public static function suite() + public static function suite(): TestSuite { return new TestSuite(__CLASS__); } diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php index 0455d10b2f..21d4aac118 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php @@ -30,6 +30,7 @@ use Ibexa\Core\Persistence\Utf8Converter; use Ibexa\Core\Search\Legacy\Content; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Handler @@ -49,7 +50,7 @@ class UrlAliasHandlerTest extends TestCase * @group case-correction * @group multiple-languages */ - public function testLookup() + public function testLookup(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -68,7 +69,7 @@ public function testLookup() * @group virtual * @group resource */ - public function testLookupThrowsNotFoundException() + public function testLookupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -84,7 +85,7 @@ public function testLookupThrowsNotFoundException() * @group location * @group case-correction */ - public function testLookupThrowsInvalidArgumentException() + public function testLookupThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -92,7 +93,7 @@ public function testLookupThrowsInvalidArgumentException() $handler->lookup(str_repeat('/1', 99)); } - public function providerForTestLookupLocationUrlAlias() + public function providerForTestLookupLocationUrlAlias(): array { return [ [ @@ -349,13 +350,13 @@ public function providerForTestLookupLocationUrlAlias() * @group location */ public function testLookupLocationUrlAlias( - $url, + string $url, array $pathData, array $languageCodes, - $alwaysAvailable, - $locationId, - $id - ) { + bool $alwaysAvailable, + int $locationId, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -402,13 +403,13 @@ public function testLookupLocationUrlAlias( * @todo refactor, only forward pertinent */ public function testLookupLocationCaseCorrection( - $url, + string $url, array $pathData, array $languageCodes, - $alwaysAvailable, - $locationId, - $id - ) { + bool $alwaysAvailable, + int $locationId, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -433,7 +434,7 @@ public function testLookupLocationCaseCorrection( ); } - public function providerForTestLookupLocationMultipleLanguages() + public function providerForTestLookupLocationMultipleLanguages(): array { return [ [ @@ -530,13 +531,13 @@ public function providerForTestLookupLocationMultipleLanguages() * @group location */ public function testLookupLocationMultipleLanguages( - $url, + string $url, array $pathData, array $languageCodes, - $alwaysAvailable, - $locationId, - $id - ) { + bool $alwaysAvailable, + int $locationId, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_multilang.php'); @@ -571,7 +572,7 @@ public function testLookupLocationMultipleLanguages( * @group history * @group location */ - public function testLookupLocationHistoryUrlAlias() + public function testLookupLocationHistoryUrlAlias(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -584,7 +585,7 @@ public function testLookupLocationHistoryUrlAlias() ); } - public function providerForTestLookupCustomLocationUrlAlias() + public function providerForTestLookupCustomLocationUrlAlias(): array { return [ [ @@ -713,14 +714,14 @@ public function providerForTestLookupCustomLocationUrlAlias() * @group custom */ public function testLookupCustomLocationUrlAlias( - $url, + string $url, array $pathData, array $languageCodes, - $forward, - $alwaysAvailable, - $destination, - $id - ) { + bool $forward, + bool $alwaysAvailable, + int $destination, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_custom.php'); @@ -757,14 +758,14 @@ public function testLookupCustomLocationUrlAlias( * @group custom */ public function testLookupCustomLocationUrlAliasCaseCorrection( - $url, + string $url, array $pathData, array $languageCodes, - $forward, - $alwaysAvailable, - $destination, - $id - ) { + bool $forward, + bool $alwaysAvailable, + int $destination, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_custom.php'); @@ -789,7 +790,7 @@ public function testLookupCustomLocationUrlAliasCaseCorrection( ); } - public function providerForTestLookupVirtualUrlAlias() + public function providerForTestLookupVirtualUrlAlias(): array { return [ [ @@ -814,7 +815,7 @@ public function providerForTestLookupVirtualUrlAlias() * * @group virtual */ - public function testLookupVirtualUrlAlias($url, $id) + public function testLookupVirtualUrlAlias(string $url, string $id): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_custom.php'); @@ -824,7 +825,7 @@ public function testLookupVirtualUrlAlias($url, $id) $this->assertVirtualUrlAliasValid($urlAlias, $id); } - public function providerForTestLookupResourceUrlAlias() + public function providerForTestLookupResourceUrlAlias(): array { return [ [ @@ -886,14 +887,14 @@ public function providerForTestLookupResourceUrlAlias() * @group resource */ public function testLookupResourceUrlAlias( - $url, - $pathData, + string $url, + array $pathData, array $languageCodes, - $forward, - $alwaysAvailable, - $destination, - $id - ) { + bool $forward, + bool $alwaysAvailable, + string $destination, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -930,14 +931,14 @@ public function testLookupResourceUrlAlias( * @group resource */ public function testLookupResourceUrlAliasCaseInsensitive( - $url, - $pathData, + string $url, + array $pathData, array $languageCodes, - $forward, - $alwaysAvailable, - $destination, - $id - ) { + bool $forward, + bool $alwaysAvailable, + string $destination, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -968,7 +969,7 @@ public function testLookupResourceUrlAliasCaseInsensitive( * * @depends testLookup */ - public function testLookupUppercaseIri() + public function testLookupUppercaseIri(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_iri.php'); @@ -987,7 +988,7 @@ protected function assertVirtualUrlAliasValid(UrlAlias $urlAlias, $id) /** * Test for the listURLAliasesForLocation() method. */ - public function testListURLAliasesForLocation() + public function testListURLAliasesForLocation(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -1060,7 +1061,7 @@ public function testListURLAliasesForLocation() * * @group publish */ - public function testPublishUrlAliasForLocation() + public function testPublishUrlAliasForLocation(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1104,7 +1105,7 @@ public function testPublishUrlAliasForLocation() * * @group publish */ - public function testPublishUrlAliasForLocationRepublish() + public function testPublishUrlAliasForLocationRepublish(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1130,7 +1131,7 @@ public function testPublishUrlAliasForLocationRepublish() * * @group publish */ - public function testPublishUrlAliasCreatesUniqueAlias() + public function testPublishUrlAliasCreatesUniqueAlias(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1191,7 +1192,7 @@ public function testPublishUrlAliasForLocationComplex( $alwaysAvailable, $locationId, $id - ) { + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1232,7 +1233,7 @@ public function testPublishUrlAliasForLocationComplex( * * @group publish */ - public function testPublishUrlAliasForLocationSameAliasForMultipleLanguages() + public function testPublishUrlAliasForLocationSameAliasForMultipleLanguages(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1281,7 +1282,7 @@ public function testPublishUrlAliasForLocationSameAliasForMultipleLanguages() * * @group publish */ - public function testPublishUrlAliasForLocationDowngradesOldEntryToHistory() + public function testPublishUrlAliasForLocationDowngradesOldEntryToHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1355,7 +1356,7 @@ public function testPublishUrlAliasForLocationDowngradesOldEntryToHistory() * @group publish * @group downgrade */ - public function testPublishUrlAliasForLocationDowngradesOldEntryRemovesLanguage() + public function testPublishUrlAliasForLocationDowngradesOldEntryRemovesLanguage(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1429,7 +1430,7 @@ public function testPublishUrlAliasForLocationDowngradesOldEntryRemovesLanguage( * * @group publish */ - public function testPublishUrlAliasForLocationReusesHistory() + public function testPublishUrlAliasForLocationReusesHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1462,7 +1463,7 @@ public function testPublishUrlAliasForLocationReusesHistory() * * @group publish */ - public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage() + public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -1514,7 +1515,7 @@ public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage() * * @group publish */ - public function testPublishUrlAliasForLocationReusesCustomAlias() + public function testPublishUrlAliasForLocationReusesCustomAlias(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -1537,7 +1538,7 @@ public function testPublishUrlAliasForLocationReusesCustomAlias() * * @depends testPublishUrlAliasForLocation */ - public function testPublishUrlAliasForLocationReusingNopElement() + public function testPublishUrlAliasForLocationReusingNopElement(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -1608,7 +1609,7 @@ public function testPublishUrlAliasForLocationReusingNopElement() * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationReusingNopElement */ - public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPath() + public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPath(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -1656,7 +1657,7 @@ public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPath * @depends testPublishUrlAliasForLocation * @depends testPublishUrlAliasForLocationReusingNopElementChangesCustomPath */ - public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPathAndCreatesHistory() + public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPathAndCreatesHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -1678,7 +1679,7 @@ public function testPublishUrlAliasForLocationReusingNopElementChangesCustomPath /** * Test for the publishUrlAliasForLocation() method. */ - public function testPublishUrlAliasForLocationUpdatesLocationPathIdentificationString() + public function testPublishUrlAliasForLocationUpdatesLocationPathIdentificationString(): void { $handler = $this->getHandler(); $locationGateway = $this->getLocationGateway(); @@ -1697,7 +1698,7 @@ public function testPublishUrlAliasForLocationUpdatesLocationPathIdentificationS * * @group cleanup */ - public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed() + public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_cleanup_nop.php'); @@ -1771,7 +1772,7 @@ public function testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed() * * @group cleanup */ - public function testPublishUrlAliasReuseHistoryCleanup() + public function testPublishUrlAliasReuseHistoryCleanup(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_cleanup_history.php'); @@ -1835,7 +1836,7 @@ public function testPublishUrlAliasReuseHistoryCleanup() * * @group cleanup */ - public function testPublishUrlAliasReuseAutogeneratedCleanup() + public function testPublishUrlAliasReuseAutogeneratedCleanup(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_cleanup_reusing.php'); @@ -1902,7 +1903,7 @@ public function testPublishUrlAliasReuseAutogeneratedCleanup() * @group create * @group custom */ - public function testCreateCustomUrlAliasBehaviour() + public function testCreateCustomUrlAliasBehaviour(): void { $handlerMock = $this->getPartlyMockedHandler(['createUrlAlias']); @@ -1935,7 +1936,7 @@ public function testCreateCustomUrlAliasBehaviour() * @group create * @group global */ - public function testCreateGlobalUrlAliasBehaviour() + public function testCreateGlobalUrlAliasBehaviour(): void { $handlerMock = $this->getPartlyMockedHandler(['createUrlAlias']); @@ -1968,7 +1969,7 @@ public function testCreateGlobalUrlAliasBehaviour() * @group create * @group custom */ - public function testCreateCustomUrlAlias() + public function testCreateCustomUrlAlias(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -2015,7 +2016,7 @@ public function testCreateCustomUrlAlias() * @group create * @group custom */ - public function testCreateCustomUrlAliasWithNonameParts() + public function testCreateCustomUrlAliasWithNonameParts(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -2089,7 +2090,7 @@ public function testCreateCustomUrlAliasWithNonameParts() * * @todo pathData */ - public function testCreatedCustomUrlAliasIsLoadable() + public function testCreatedCustomUrlAliasIsLoadable(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -2195,7 +2196,7 @@ public function testCreateCustomUrlAliasWithNopElement(): void * @group create * @group custom */ - public function testCreateCustomUrlAliasReusesHistory() + public function testCreateCustomUrlAliasReusesHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -2294,7 +2295,7 @@ public function testCreateCustomUrlAliasAddLanguage(): void * @group create * @group custom */ - public function testCreateCustomUrlAliasReusesHistoryOfDifferentLanguage() + public function testCreateCustomUrlAliasReusesHistoryOfDifferentLanguage(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -2342,7 +2343,7 @@ public function testCreateCustomUrlAliasReusesHistoryOfDifferentLanguage() * @group create * @group custom */ - public function testCreateCustomUrlAliasReusesNopElement() + public function testCreateCustomUrlAliasReusesNopElement(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -2396,7 +2397,7 @@ public function testCreateCustomUrlAliasReusesNopElement() * @group create * @group custom */ - public function testCreateCustomUrlAliasReusesLocationElement() + public function testCreateCustomUrlAliasReusesLocationElement(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_reusing.php'); @@ -2429,7 +2430,7 @@ public function testCreateCustomUrlAliasReusesLocationElement() * * @depends testLookupResourceUrlAlias */ - public function testListGlobalURLAliases() + public function testListGlobalURLAliases(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -2452,7 +2453,7 @@ public function testListGlobalURLAliases() * * @depends testLookupResourceUrlAlias */ - public function testListGlobalURLAliasesWithLanguageCode() + public function testListGlobalURLAliasesWithLanguageCode(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -2474,7 +2475,7 @@ public function testListGlobalURLAliasesWithLanguageCode() * * @depends testLookupResourceUrlAlias */ - public function testListGlobalURLAliasesWithOffset() + public function testListGlobalURLAliasesWithOffset(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -2495,7 +2496,7 @@ public function testListGlobalURLAliasesWithOffset() * * @depends testLookupResourceUrlAlias */ - public function testListGlobalURLAliasesWithOffsetAndLimit() + public function testListGlobalURLAliasesWithOffsetAndLimit(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -2513,7 +2514,7 @@ public function testListGlobalURLAliasesWithOffsetAndLimit() /** * Test for the locationDeleted() method. */ - public function testLocationDeleted() + public function testLocationDeleted(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_delete.php'); @@ -2566,7 +2567,7 @@ public function testLocationDeleted() /** * Test for the locationMoved() method. */ - public function testLocationMovedHistorize() + public function testLocationMovedHistorize(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2601,7 +2602,7 @@ public function testLocationMovedHistorize() /** * Test for the locationMoved() method. */ - public function testLocationMovedHistory() + public function testLocationMovedHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2636,7 +2637,7 @@ public function testLocationMovedHistory() /** * Test for the locationMoved() method. */ - public function testLocationMovedHistorySubtree() + public function testLocationMovedHistorySubtree(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2679,7 +2680,7 @@ public function testLocationMovedHistorySubtree() /** * Test for the locationMoved() method. */ - public function testLocationMovedReparent() + public function testLocationMovedReparent(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2722,7 +2723,7 @@ public function testLocationMovedReparent() /** * Test for the locationMoved() method. */ - public function testLocationMovedReparentHistory() + public function testLocationMovedReparentHistory(): void { $this->expectException(NotFoundException::class); @@ -2738,7 +2739,7 @@ public function testLocationMovedReparentHistory() /** * Test for the locationMoved() method. */ - public function testLocationMovedReparentSubtree() + public function testLocationMovedReparentSubtree(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2785,7 +2786,7 @@ public function testLocationMovedReparentSubtree() /** * Test for the locationMoved() method. */ - public function testLocationMovedReparentSubtreeHistory() + public function testLocationMovedReparentSubtreeHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_move.php'); @@ -2899,7 +2900,7 @@ public function testLocationMovedReparentWithCustomAlias(): void /** * Test for the locationCopied() method. */ - public function testLocationCopiedCopiedLocationAliasIsValid() + public function testLocationCopiedCopiedLocationAliasIsValid(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php'); @@ -2917,7 +2918,7 @@ public function testLocationCopiedCopiedLocationAliasIsValid() /** * Test for the locationCopied() method. */ - public function testLocationCopiedCopiedSubtreeIsValid() + public function testLocationCopiedCopiedSubtreeIsValid(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php'); @@ -2935,7 +2936,7 @@ public function testLocationCopiedCopiedSubtreeIsValid() /** * Test for the locationCopied() method. */ - public function testLocationCopiedHistoryNotCopied() + public function testLocationCopiedHistoryNotCopied(): void { $this->expectException(NotFoundException::class); @@ -2950,7 +2951,7 @@ public function testLocationCopiedHistoryNotCopied() /** * Test for the locationCopied() method. */ - public function testLocationCopiedSubtreeHistoryNotCopied() + public function testLocationCopiedSubtreeHistoryNotCopied(): void { $this->expectException(NotFoundException::class); @@ -2965,7 +2966,7 @@ public function testLocationCopiedSubtreeHistoryNotCopied() /** * Test for the locationCopied() method. */ - public function testLocationCopiedSubtree() + public function testLocationCopiedSubtree(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_copy.php'); @@ -3022,13 +3023,13 @@ public function testLocationCopiedSubtree() * @dataProvider providerForTestLookupLocationMultipleLanguages */ public function testLoadAutogeneratedUrlAlias( - $url, + string $url, array $pathData, array $languageCodes, - $alwaysAvailable, - $locationId, - $id - ) { + bool $alwaysAvailable, + int $locationId, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_multilang.php'); @@ -3060,14 +3061,14 @@ public function testLoadAutogeneratedUrlAlias( * @dataProvider providerForTestLookupResourceUrlAlias */ public function testLoadResourceUrlAlias( - $url, - $pathData, + string $url, + array $pathData, array $languageCodes, - $forward, - $alwaysAvailable, - $destination, - $id - ) { + bool $forward, + bool $alwaysAvailable, + string $destination, + string $id + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_resource.php'); @@ -3098,7 +3099,7 @@ public function testLoadResourceUrlAlias( * * @dataProvider providerForTestLookupVirtualUrlAlias */ - public function testLoadVirtualUrlAlias($url, $id) + public function testLoadVirtualUrlAlias(string $url, string $id): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location_custom.php'); @@ -3108,7 +3109,7 @@ public function testLoadVirtualUrlAlias($url, $id) $this->assertVirtualUrlAliasValid($urlAlias, $id); } - protected function getHistoryAlias() + protected function getHistoryAlias(): UrlAlias { return new UrlAlias( [ @@ -3146,7 +3147,7 @@ protected function getHistoryAlias() /** * Test for the loadUrlAlias() method. */ - public function testLoadHistoryUrlAlias() + public function testLoadHistoryUrlAlias(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_location.php'); @@ -3163,7 +3164,7 @@ public function testLoadHistoryUrlAlias() /** * Test for the loadUrlAlias() method. */ - public function testLoadUrlAliasThrowsNotFoundException() + public function testLoadUrlAliasThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -3172,7 +3173,7 @@ public function testLoadUrlAliasThrowsNotFoundException() $handler->loadUrlAlias('non-existent'); } - public function providerForTestPublishUrlAliasForLocationSkipsReservedWord() + public function providerForTestPublishUrlAliasForLocationSkipsReservedWord(): array { return [ [ @@ -3195,7 +3196,7 @@ public function providerForTestPublishUrlAliasForLocationSkipsReservedWord() * * @group publish */ - public function testPublishUrlAliasForLocationSkipsReservedWord($text, $alias) + public function testPublishUrlAliasForLocationSkipsReservedWord(string $text, string $alias): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -3213,7 +3214,7 @@ public function testPublishUrlAliasForLocationSkipsReservedWord($text, $alias) * * @group swap */ - public function testLocationSwappedSimple() + public function testLocationSwappedSimple(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_simple.php'); @@ -3299,7 +3300,7 @@ public function testLocationSwappedSimple() * * @group swap */ - public function testLocationSwappedSimpleWithHistory() + public function testLocationSwappedSimpleWithHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_simple_history.php'); @@ -3451,7 +3452,7 @@ public function testLocationSwappedSimpleWithHistory() * * @group swap */ - public function testLocationSwappedSimpleWithConflict() + public function testLocationSwappedSimpleWithConflict(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_simple_conflict.php'); @@ -3557,7 +3558,7 @@ public function testLocationSwappedSimpleWithConflict() * * @group swap */ - public function testLocationSwappedSiblingsSimple() + public function testLocationSwappedSiblingsSimple(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple.php'); @@ -3631,7 +3632,7 @@ public function testLocationSwappedSiblingsSimple() * * @group swap */ - public function testLocationSwappedSiblingsSimpleReverse() + public function testLocationSwappedSiblingsSimpleReverse(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple.php'); @@ -3705,7 +3706,7 @@ public function testLocationSwappedSiblingsSimpleReverse() * * @group swap */ - public function testLocationSwappedSiblingsSimpleWithHistory() + public function testLocationSwappedSiblingsSimpleWithHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple_history.php'); @@ -3833,7 +3834,7 @@ public function testLocationSwappedSiblingsSimpleWithHistory() * * @group swap */ - public function testLocationSwappedSiblingsSimpleWithHistoryReverse() + public function testLocationSwappedSiblingsSimpleWithHistoryReverse(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple_history.php'); @@ -3961,7 +3962,7 @@ public function testLocationSwappedSiblingsSimpleWithHistoryReverse() * * @group swap */ - public function testLocationSwappedSiblingsSameName() + public function testLocationSwappedSiblingsSameName(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_same_name.php'); @@ -4035,7 +4036,7 @@ public function testLocationSwappedSiblingsSameName() * * @group swap */ - public function testLocationSwappedSiblingsSameNameReverse() + public function testLocationSwappedSiblingsSameNameReverse(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_same_name.php'); @@ -4109,7 +4110,7 @@ public function testLocationSwappedSiblingsSameNameReverse() * * @group swap */ - public function testLocationSwappedSiblingsSameNameMultipleLanguages() + public function testLocationSwappedSiblingsSameNameMultipleLanguages(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_same_name_multilang.php'); @@ -4241,7 +4242,7 @@ public function testLocationSwappedSiblingsSameNameMultipleLanguages() * * @group swap */ - public function testLocationSwappedMultipleLanguagesSimple() + public function testLocationSwappedMultipleLanguagesSimple(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_simple.php'); @@ -4276,7 +4277,7 @@ public function testLocationSwappedMultipleLanguagesSimple() * * @group swap */ - public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() + public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_diff_simple.php'); @@ -4498,7 +4499,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguagesSimple() * * @group swap */ - public function testLocationSwappedMultipleLanguagesDifferentLanguages() + public function testLocationSwappedMultipleLanguagesDifferentLanguages(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_diff.php'); @@ -4656,7 +4657,7 @@ public function testLocationSwappedMultipleLanguagesDifferentLanguages() * * @group swap */ - public function testLocationSwappedMultipleLanguagesWithCompositeHistory() + public function testLocationSwappedMultipleLanguagesWithCompositeHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_multilang_cleanup_composite.php'); @@ -4949,7 +4950,7 @@ public function testLocationSwappedMultipleLanguagesWithCompositeHistory() * * @group swap */ - public function testLocationSwappedWithReusingExternalHistory() + public function testLocationSwappedWithReusingExternalHistory(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_reusing_external_history.php'); @@ -5101,7 +5102,7 @@ public function testLocationSwappedWithReusingExternalHistory() * * @group swap */ - public function testLocationSwappedWithReusingNopEntry() + public function testLocationSwappedWithReusingNopEntry(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_reusing_nop.php'); @@ -5255,7 +5256,7 @@ public function testLocationSwappedWithReusingNopEntry() * * @group swap */ - public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed() + public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed(): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_reusing_nop.php'); @@ -5278,7 +5279,7 @@ public function testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed() * * @group swap */ - public function testLocationSwappedUpdatesLocationPathIdentificationString() + public function testLocationSwappedUpdatesLocationPathIdentificationString(): void { $handler = $this->getHandler(); $locationGateway = $this->getLocationGateway(); @@ -5305,7 +5306,7 @@ public function testLocationSwappedUpdatesLocationPathIdentificationString() * * @group swap */ - public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString() + public function testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString(): void { $handler = $this->getHandler(); $locationGateway = $this->getLocationGateway(); @@ -5354,7 +5355,7 @@ protected function countRows(): int * * @return \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected function getPartlyMockedHandler(array $methods) + protected function getPartlyMockedHandler(array $methods): MockObject { return $this->getMockBuilder(Handler::class) ->setConstructorArgs( @@ -5460,7 +5461,7 @@ protected function getLocationGateway() /** * @return \Ibexa\Core\Persistence\TransformationProcessor */ - public function getProcessor() + public function getProcessor(): DefinitionBased { return new DefinitionBased( new Parser(), @@ -5476,7 +5477,7 @@ public function getProcessor() * * @return array */ - public function providerForArchiveUrlAliasesForDeletedTranslations() + public function providerForArchiveUrlAliasesForDeletedTranslations(): array { return [ [2, ['eng-GB', 'pol-PL'], 'pol-PL'], @@ -5492,10 +5493,10 @@ public function providerForArchiveUrlAliasesForDeletedTranslations() * @param string $removeLanguage language code to be deleted */ public function testArchiveUrlAliasesForDeletedTranslations( - $locationId, + int $locationId, array $expectedLanguages, - $removeLanguage - ) { + string $removeLanguage + ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_multilingual.php'); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php index 1831d801aa..1b16280e76 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php @@ -115,7 +115,7 @@ class UrlAliasMapperTest extends LanguageAwareTestCase ], ]; - protected function getExpectation() + protected function getExpectation(): array { return [ 0 => new UrlAlias( @@ -229,7 +229,7 @@ protected function getExpectation() ]; } - public function providerForTestExtractUrlAliasFromData() + public function providerForTestExtractUrlAliasFromData(): array { return [[0], [1], [2], [3]]; } @@ -239,7 +239,7 @@ public function providerForTestExtractUrlAliasFromData() * * @dataProvider providerForTestExtractUrlAliasFromData */ - public function testExtractUrlAliasFromData($index) + public function testExtractUrlAliasFromData(int $index): void { $mapper = $this->getMapper(); @@ -257,7 +257,7 @@ public function testExtractUrlAliasFromData($index) * * @depends testExtractUrlAliasFromData */ - public function testExtractUrlAliasListFromData() + public function testExtractUrlAliasListFromData(): void { $mapper = $this->getMapper(); @@ -270,7 +270,7 @@ public function testExtractUrlAliasListFromData() /** * Test for the extractLanguageCodesFromData method. */ - public function testExtractLanguageCodesFromData() + public function testExtractLanguageCodesFromData(): void { $mapper = $this->getMapper(); @@ -283,7 +283,7 @@ public function testExtractLanguageCodesFromData() /** * @return \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Mapper */ - protected function getMapper() + protected function getMapper(): Mapper { $languageHandler = $this->getLanguageHandler(); $languageMaskGenerator = new LanguageMaskGenerator($languageHandler); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php index 6484c31584..5ec43d3f70 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php @@ -50,7 +50,7 @@ class DoctrineDatabaseTest extends TestCase /** * Test for the loadUrlWildcardData() method. */ - public function testLoadUrlWildcardData() + public function testLoadUrlWildcardData(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); @@ -66,7 +66,7 @@ public function testLoadUrlWildcardData() /** * Test for the loadUrlWildcardsData() method. */ - public function testLoadUrlWildcardsData() + public function testLoadUrlWildcardsData(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); @@ -82,7 +82,7 @@ public function testLoadUrlWildcardsData() /** * Test for the loadUrlWildcardsData() method. */ - public function testLoadUrlWildcardsDataWithOffset() + public function testLoadUrlWildcardsDataWithOffset(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); @@ -101,7 +101,7 @@ public function testLoadUrlWildcardsDataWithOffset() /** * Test for the loadUrlWildcardsData() method. */ - public function testLoadUrlWildcardsDataWithOffsetAndLimit() + public function testLoadUrlWildcardsDataWithOffsetAndLimit(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); @@ -121,7 +121,7 @@ public function testLoadUrlWildcardsDataWithOffsetAndLimit() * * @depends testLoadUrlWildcardData */ - public function testInsertUrlWildcard() + public function testInsertUrlWildcard(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); @@ -152,7 +152,7 @@ public function testInsertUrlWildcard() * * @depends testLoadUrlWildcardData */ - public function testDeleteUrlWildcard() + public function testDeleteUrlWildcard(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlwildcards.php'); $gateway = $this->getGateway(); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php index 790c4aceee..a551c69bb8 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php @@ -22,7 +22,7 @@ */ class UrlWildcardHandlerTest extends TestCase { - public function testLoad() + public function testLoad(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); $handler = $this->getHandler(); @@ -45,7 +45,7 @@ public function testLoad() /** * Test for the load() method. */ - public function testLoadThrowsNotFoundException() + public function testLoadThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -61,7 +61,7 @@ public function testLoadThrowsNotFoundException() * * @depends testLoad */ - public function testCreate() + public function testCreate(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); $handler = $this->getHandler(); @@ -130,7 +130,7 @@ public function testUpdate(): void * * @depends testLoad */ - public function testRemove() + public function testRemove(): void { $this->expectException(NotFoundException::class); @@ -144,7 +144,7 @@ public function testRemove() /** * Test for the loadAll() method. */ - public function testLoadAll() + public function testLoadAll(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); $handler = $this->getHandler(); @@ -164,7 +164,7 @@ public function testLoadAll() /** * Test for the loadAll() method. */ - public function testLoadAllWithOffset() + public function testLoadAllWithOffset(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); $handler = $this->getHandler(); @@ -182,7 +182,7 @@ public function testLoadAllWithOffset() /** * Test for the loadAll() method. */ - public function testLoadAllWithOffsetAndLimit() + public function testLoadAllWithOffsetAndLimit(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); $handler = $this->getHandler(); diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php index 3f334bed5b..353b71621f 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php @@ -19,7 +19,7 @@ class UrlWildcardMapperTest extends TestCase /** * Test for the createUrlWildcard() method. */ - public function testCreateUrlWildcard() + public function testCreateUrlWildcard(): void { $mapper = $this->getMapper(); @@ -45,7 +45,7 @@ public function testCreateUrlWildcard() /** * Test for the extractUrlWildcardFromRow() method. */ - public function testExtractUrlWildcardFromRow() + public function testExtractUrlWildcardFromRow(): void { $mapper = $this->getMapper(); $row = [ @@ -73,7 +73,7 @@ public function testExtractUrlWildcardFromRow() /** * Test for the extractUrlWildcardFromRow() method. */ - public function testExtractUrlWildcardsFromRows() + public function testExtractUrlWildcardsFromRows(): void { $mapper = $this->getMapper(); $rows = [ @@ -119,7 +119,7 @@ public function testExtractUrlWildcardsFromRows() /** * @return \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Mapper */ - protected function getMapper() + protected function getMapper(): Mapper { return new Mapper(); } diff --git a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php index 7d25304b03..58c5105a9b 100644 --- a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php @@ -14,19 +14,20 @@ use Ibexa\Core\IO\Values\BinaryFile; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Bridge\PhpUnit\ClockMock; final class ImageConverterTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter */ - private $imageConverter; + private ImageConverter $imageConverter; /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $urlRedecorator; + private MockObject $urlRedecorator; /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $ioService; + private MockObject $ioService; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php b/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php index 0372364174..3d357a9db0 100644 --- a/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php +++ b/tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php @@ -19,7 +19,7 @@ abstract class BaseCriterionVisitorQueryBuilderTestCase extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\Filter\CriterionVisitor */ - private $criterionVisitor; + private CriterionVisitor $criterionVisitor; /** * @return \Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder[] diff --git a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php index da80077eea..943d96a454 100644 --- a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php @@ -38,7 +38,7 @@ protected function setUp(): void ); } - public function testInsert() + public function testInsert(): void { $id = $this->getGateway()->insert(new CreateStruct([ 'ownerId' => 14, @@ -60,7 +60,7 @@ public function testInsert() ], $data); } - public function testGetNotificationById() + public function testGetNotificationById(): void { $data = $this->getGateway()->getNotificationById(self::EXISTING_NOTIFICATION_ID); @@ -69,7 +69,7 @@ public function testGetNotificationById() ], $data); } - public function testUpdateNotification() + public function testUpdateNotification(): void { $notification = new Notification([ 'id' => self::EXISTING_NOTIFICATION_ID, @@ -92,14 +92,14 @@ public function testUpdateNotification() ], $this->loadNotification(self::EXISTING_NOTIFICATION_ID)); } - public function testCountUserNotifications() + public function testCountUserNotifications(): void { self::assertEquals(5, $this->getGateway()->countUserNotifications( self::EXISTING_NOTIFICATION_DATA['owner_id'] )); } - public function testCountUserPendingNotifications() + public function testCountUserPendingNotifications(): void { self::assertEquals( 3, @@ -109,7 +109,7 @@ public function testCountUserPendingNotifications() ); } - public function testLoadUserNotifications() + public function testLoadUserNotifications(): void { $userId = 14; $offset = 1; @@ -145,7 +145,7 @@ public function testLoadUserNotifications() ], $results); } - public function testDelete() + public function testDelete(): void { $this->getGateway()->delete(self::EXISTING_NOTIFICATION_ID); diff --git a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php index 2fa49af860..b6a2ebc55a 100644 --- a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php @@ -15,6 +15,7 @@ use Ibexa\Core\Persistence\Legacy\Notification\Gateway; use Ibexa\Core\Persistence\Legacy\Notification\Handler; use Ibexa\Core\Persistence\Legacy\Notification\Mapper; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -25,13 +26,13 @@ class HandlerTest extends TestCase public const NOTIFICATION_ID = 1; /** @var \Ibexa\Core\Persistence\Legacy\Notification\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private $gateway; + private MockObject $gateway; /** @var \Ibexa\Core\Persistence\Legacy\Notification\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private $mapper; + private MockObject $mapper; /** @var \Ibexa\Core\Persistence\Legacy\Notification\Handler */ - private $handler; + private Handler $handler; protected function setUp(): void { @@ -40,7 +41,7 @@ protected function setUp(): void $this->handler = new Handler($this->gateway, $this->mapper); } - public function testCreateNotification() + public function testCreateNotification(): void { $createStruct = new CreateStruct([ 'ownerId' => 5, @@ -68,7 +69,7 @@ public function testCreateNotification() self::assertEquals($notification->id, self::NOTIFICATION_ID); } - public function testCountPendingNotifications() + public function testCountPendingNotifications(): void { $ownerId = 10; $expectedCount = 12; @@ -82,7 +83,7 @@ public function testCountPendingNotifications() self::assertEquals($expectedCount, $this->handler->countPendingNotifications($ownerId)); } - public function testGetNotificationById() + public function testGetNotificationById(): void { $rows = [ [ @@ -109,7 +110,7 @@ public function testGetNotificationById() self::assertEquals($object, $this->handler->getNotificationById(self::NOTIFICATION_ID)); } - public function testUpdateNotification() + public function testUpdateNotification(): void { $updateStruct = new UpdateStruct([ 'isPending' => false, @@ -148,7 +149,7 @@ public function testUpdateNotification() $this->handler->updateNotification($apiNotification, $updateStruct); } - public function testCountNotifications() + public function testCountNotifications(): void { $ownerId = 10; $expectedCount = 12; @@ -162,7 +163,7 @@ public function testCountNotifications() self::assertEquals($expectedCount, $this->handler->countNotifications($ownerId)); } - public function testLoadUserNotifications() + public function testLoadUserNotifications(): void { $ownerId = 9; $limit = 5; @@ -195,7 +196,7 @@ public function testLoadUserNotifications() self::assertEquals($objects, $this->handler->loadUserNotifications($ownerId, $offset, $limit)); } - public function testDelete() + public function testDelete(): void { $notification = new APINotification([ 'id' => self::NOTIFICATION_ID, /* ... */ diff --git a/tests/lib/Persistence/Legacy/Notification/MapperTest.php b/tests/lib/Persistence/Legacy/Notification/MapperTest.php index 9925250d1b..6f3ace8093 100644 --- a/tests/lib/Persistence/Legacy/Notification/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Notification/MapperTest.php @@ -19,14 +19,14 @@ class MapperTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\Notification\Mapper */ - private $mapper; + private Mapper $mapper; protected function setUp(): void { $this->mapper = new Mapper(); } - public function testExtractNotificationsFromRows() + public function testExtractNotificationsFromRows(): void { $rows = [ [ @@ -77,7 +77,7 @@ public function testExtractNotificationsFromRows() self::assertEquals($objects, $this->mapper->extractNotificationsFromRows($rows)); } - public function testExtractNotificationsFromRowsThrowsRuntimeException() + public function testExtractNotificationsFromRowsThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -95,7 +95,7 @@ public function testExtractNotificationsFromRowsThrowsRuntimeException() $this->mapper->extractNotificationsFromRows($rows); } - public function testCreateNotificationFromUpdateStruct() + public function testCreateNotificationFromUpdateStruct(): void { $updateStruct = new UpdateStruct([ 'isPending' => false, diff --git a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php index 32feb226b5..a4206809e4 100644 --- a/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php @@ -19,11 +19,10 @@ */ final class SettingHandlerTest extends TestCase { - /** @var \Ibexa\Core\Persistence\Legacy\Setting\Handler */ - private $settingHandler; + private ?Handler $settingHandler = null; /** @var \Ibexa\Core\Persistence\Legacy\Setting\Gateway */ - private $gatewayMock; + private ?MockObject $gatewayMock = null; public function testCreate(): void { diff --git a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php index eaa58621ac..dce138ecea 100644 --- a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php +++ b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php @@ -22,7 +22,7 @@ final class GatewayFactoryTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\GatewayFactory */ - private $factory; + private GatewayFactory $factory; /** * @throws \Doctrine\DBAL\DBALException diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index d087e5ba7e..1ba1246df5 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -18,6 +18,7 @@ use Ibexa\Contracts\Core\Test\Persistence\Fixture\YamlFixture; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy; use Ibexa\Core\Persistence\Legacy\SharedGateway; +use Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway; use Ibexa\Core\Search\Legacy\Content; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; @@ -59,8 +60,7 @@ abstract class TestCase extends BaseTestCase */ protected $connection; - /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\Gateway */ - private $sharedGateway; + private ?Gateway $sharedGateway = null; /** * Get data source name. @@ -108,7 +108,7 @@ final public function getDatabaseConnection(): Connection /** * @throws \Doctrine\DBAL\DBALException */ - final public function getSharedGateway(): SharedGateway\Gateway + final public function getSharedGateway(): Gateway { if (!$this->sharedGateway) { $connection = $this->getDatabaseConnection(); diff --git a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php index 98ae8e3372..685f15d142 100644 --- a/tests/lib/Persistence/Legacy/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/TransactionHandlerTest.php @@ -12,6 +12,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\MemoryCachingHandler; use Ibexa\Core\Persistence\Legacy\TransactionHandler; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -27,15 +28,15 @@ class TransactionHandlerTest extends TestCase protected $transactionHandler; /** @var \Doctrine\DBAL\Connection|\PHPUnit\Framework\MockObject\MockObject */ - protected $connectionMock; + protected ?MockObject $connectionMock = null; /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $contentTypeHandlerMock; + protected ?MockObject $contentTypeHandlerMock = null; /** @var \Ibexa\Contracts\Core\Persistence\Content\Language\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $languageHandlerMock; + protected ?MockObject $languageHandlerMock = null; - public function testBeginTransaction() + public function testBeginTransaction(): void { $handler = $this->getTransactionHandler(); $this->getConnectionMock() @@ -51,7 +52,7 @@ public function testBeginTransaction() $handler->beginTransaction(); } - public function testCommit() + public function testCommit(): void { $handler = $this->getTransactionHandler(); $this->getConnectionMock() @@ -67,7 +68,7 @@ public function testCommit() $handler->commit(); } - public function testCommitException() + public function testCommitException(): void { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('test'); @@ -87,7 +88,7 @@ public function testCommitException() $handler->commit(); } - public function testRollback() + public function testRollback(): void { $handler = $this->getTransactionHandler(); $this->getConnectionMock() @@ -103,7 +104,7 @@ public function testRollback() $handler->rollback(); } - public function testRollbackException() + public function testRollbackException(): void { $this->expectException(\RuntimeException::class); $this->expectExceptionMessage('test'); diff --git a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php index 39a8a89e67..4989906794 100644 --- a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php @@ -21,10 +21,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\URL\Gateway\DoctrineDatabase */ - private $gateway; + private ?DoctrineDatabase $gateway = null; /** @var array[] */ private $fixtureData; diff --git a/tests/lib/Persistence/Legacy/URL/HandlerTest.php b/tests/lib/Persistence/Legacy/URL/HandlerTest.php index bcf3201ffc..57d3fc78ec 100644 --- a/tests/lib/Persistence/Legacy/URL/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/HandlerTest.php @@ -16,18 +16,19 @@ use Ibexa\Core\Persistence\Legacy\URL\Gateway; use Ibexa\Core\Persistence\Legacy\URL\Handler; use Ibexa\Core\Persistence\Legacy\URL\Mapper; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class HandlerTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\URL\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private $gateway; + private MockObject $gateway; /** @var \Ibexa\Core\Persistence\Legacy\URL\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private $mapper; + private MockObject $mapper; /** @var \Ibexa\Core\Persistence\Legacy\URL\Handler */ - private $handler; + private Handler $handler; protected function setUp(): void { @@ -37,7 +38,7 @@ protected function setUp(): void $this->handler = new Handler($this->gateway, $this->mapper); } - public function testUpdateUrl() + public function testUpdateUrl(): void { $urlUpdateStruct = new URLUpdateStruct(); $url = $this->getUrl(1, 'http://ibexa.co'); @@ -56,7 +57,7 @@ public function testUpdateUrl() self::assertEquals($url, $this->handler->updateUrl($url->id, $urlUpdateStruct)); } - public function testFind() + public function testFind(): void { $query = new URLQuery(); $query->filter = new Criterion\Validity(true); @@ -98,7 +99,7 @@ public function testFind() self::assertEquals($expected, $this->handler->find($query)); } - public function testLoadByIdWithoutUrlData() + public function testLoadByIdWithoutUrlData(): void { $this->expectException(NotFoundException::class); @@ -119,7 +120,7 @@ public function testLoadByIdWithoutUrlData() $this->handler->loadById($id); } - public function testLoadByIdWithUrlData() + public function testLoadByIdWithUrlData(): void { $url = $this->getUrl(1, 'http://ibexa.co'); @@ -138,7 +139,7 @@ public function testLoadByIdWithUrlData() self::assertEquals($url, $this->handler->loadById($url->id)); } - public function testLoadByUrlWithoutUrlData() + public function testLoadByUrlWithoutUrlData(): void { $this->expectException(NotFoundException::class); @@ -159,7 +160,7 @@ public function testLoadByUrlWithoutUrlData() $this->handler->loadByUrl($url); } - public function testLoadByUrlWithUrlData() + public function testLoadByUrlWithUrlData(): void { $url = $this->getUrl(1, 'http://ibexa.co'); @@ -178,7 +179,7 @@ public function testLoadByUrlWithUrlData() self::assertEquals($url, $this->handler->loadByUrl($url->url)); } - public function testFindUsages() + public function testFindUsages(): void { $url = $this->getUrl(); $ids = [1, 2, 3]; @@ -192,7 +193,7 @@ public function testFindUsages() self::assertEquals($ids, $this->handler->findUsages($url->id)); } - private function getUrl($id = 1, $urlAddr = 'http://ibexa.co') + private function getUrl(int $id = 1, string $urlAddr = 'http://ibexa.co'): URL { $url = new URL(); $url->id = $id; diff --git a/tests/lib/Persistence/Legacy/URL/MapperTest.php b/tests/lib/Persistence/Legacy/URL/MapperTest.php index c60cd23725..5690df7fae 100644 --- a/tests/lib/Persistence/Legacy/URL/MapperTest.php +++ b/tests/lib/Persistence/Legacy/URL/MapperTest.php @@ -15,7 +15,7 @@ class MapperTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\URL\Mapper */ - private $mapper; + private Mapper $mapper; protected function setUp(): void { @@ -23,7 +23,7 @@ protected function setUp(): void $this->mapper = new Mapper(); } - public function testCreateURLFromUpdateStruct() + public function testCreateURLFromUpdateStruct(): void { $urlUpdateStruct = new URLUpdateStruct(); $urlUpdateStruct->url = 'https://ibexa.co'; @@ -42,7 +42,7 @@ public function testCreateURLFromUpdateStruct() self::assertEquals($expected, $this->mapper->createURLFromUpdateStruct($urlUpdateStruct)); } - public function testExtractURLsFromRows() + public function testExtractURLsFromRows(): void { $rows = [ [ diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php index 790ac83442..191ae2eb1a 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php @@ -27,7 +27,7 @@ abstract public function testHandle(); * @param \Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler $handler * @param string $criterionClass */ - protected function assertHandlerAcceptsCriterion(CriterionHandler $handler, $criterionClass) + protected function assertHandlerAcceptsCriterion(CriterionHandler $handler, string $criterionClass) { self::assertTrue($handler->accept($this->createMock($criterionClass))); } @@ -38,7 +38,7 @@ protected function assertHandlerAcceptsCriterion(CriterionHandler $handler, $cri * @param \Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler $handler * @param string $criterionClass */ - protected function assertHandlerRejectsCriterion(CriterionHandler $handler, $criterionClass) + protected function assertHandlerRejectsCriterion(CriterionHandler $handler, string $criterionClass) { self::assertFalse($handler->accept($this->createMock($criterionClass))); } diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php index 618d5c98ae..a54c888f9a 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php @@ -18,7 +18,7 @@ class LogicalAndTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new LogicalAndHandler(); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php index 526cf4194e..18503ab417 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php @@ -18,7 +18,7 @@ class LogicalNotTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new LogicalNotHandler(); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php index dfcfec0b65..23bb74b4cc 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php @@ -18,7 +18,7 @@ class LogicalOrTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new LogicalOrHandler(); diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php index c6f19e1e45..4d9aa2e015 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php @@ -18,7 +18,7 @@ class MatchAllTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new MatchAllHandler(); @@ -29,7 +29,7 @@ public function testAccept() /** * {@inheritdoc} */ - public function testHandle() + public function testHandle(): void { $criterion = new MatchAll(); $expected = '1 = 1'; diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php index a770d82cbd..01643dcdc3 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php @@ -18,7 +18,7 @@ class MatchNoneTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new MatchNoneHandler(); @@ -29,7 +29,7 @@ public function testAccept() /** * {@inheritdoc} */ - public function testHandle() + public function testHandle(): void { $criterion = new MatchNone(); $expected = '1 = 0'; diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php index 9d561f2cc1..a63555872d 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php @@ -20,7 +20,7 @@ class PatternTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new PatternHandler(); @@ -31,7 +31,7 @@ public function testAccept() /** * {@inheritdoc} */ - public function testHandle() + public function testHandle(): void { $criterion = new Pattern('google.com'); $expected = 'url LIKE :pattern'; diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php index ef925377df..8f7d995896 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php @@ -20,7 +20,7 @@ class ValidityTest extends CriterionHandlerTest /** * {@inheritdoc} */ - public function testAccept() + public function testAccept(): void { $handler = new ValidityHandler(); @@ -31,7 +31,7 @@ public function testAccept() /** * {@inheritdoc} */ - public function testHandle() + public function testHandle(): void { $criterion = new Validity(true); $expected = 'is_valid = :is_valid'; diff --git a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php index bfae2fa626..f984cca20d 100644 --- a/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php @@ -18,7 +18,7 @@ */ class LimitationConverterTest extends TestCase { - protected function getLimitationConverter() + protected function getLimitationConverter(): LimitationConverter { $connection = $this->getDatabaseConnection(); @@ -28,7 +28,7 @@ protected function getLimitationConverter() /** * Test Object State from SPI value (supported by API) to legacy value (database). */ - public function testObjectStateToLegacy() + public function testObjectStateToLegacy(): void { $this->insertSharedDatabaseFixture(); @@ -81,7 +81,7 @@ public function testObjectStateToLegacy() /** * Test Object State from legacy value (database) to SPI value (supported by API). */ - public function testObjectStateToSPI() + public function testObjectStateToSPI(): void { $this->insertSharedDatabaseFixture(); diff --git a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php index 4aba1f9964..4e1fe6f1b3 100644 --- a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php +++ b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Persistence; use Ibexa\Contracts\Core\Persistence\User\Handler; use Ibexa\Contracts\Core\Persistence\User\Role; +use Ibexa\Contracts\Core\Persistence\User\UserTokenUpdateStruct; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Values\User\Role as APIRole; @@ -43,7 +44,7 @@ protected function getUserHandler(User\Gateway $userGateway = null): Handler ); } - protected function getValidUser() + protected function getValidUser(): Persistence\User { $user = new Persistence\User(); $user->id = self::TEST_USER_ID; @@ -58,9 +59,9 @@ protected function getValidUser() return $user; } - protected function getValidUserToken($time = null) + protected function getValidUserToken($time = null): UserTokenUpdateStruct { - $userToken = new Persistence\User\UserTokenUpdateStruct(); + $userToken = new UserTokenUpdateStruct(); $userToken->userId = self::TEST_USER_ID; $userToken->hashKey = md5('hash'); $userToken->time = $time ?? (new DateTime())->add(new DateInterval('P1D'))->getTimestamp(); @@ -68,7 +69,7 @@ protected function getValidUserToken($time = null) return $userToken; } - public function testCreateUser() + public function testCreateUser(): void { $handler = $this->getUserHandler(); @@ -104,7 +105,7 @@ protected function getDummyUser( ]; } - public function testLoadUser() + public function testLoadUser(): void { $gatewayMock = $this ->createMock(User\Gateway::class); @@ -124,7 +125,7 @@ public function testLoadUser() ); } - public function testLoadUnknownUser() + public function testLoadUnknownUser(): void { $this->expectException(NotFoundException::class); $gatewayMock = $this @@ -140,7 +141,7 @@ public function testLoadUnknownUser() $handler->load(1337); } - public function testLoadUserByLogin() + public function testLoadUserByLogin(): void { $gatewayMock = $this ->createMock(User\Gateway::class); @@ -160,7 +161,7 @@ public function testLoadUserByLogin() ); } - public function testLoadMultipleUsersByLogin() + public function testLoadMultipleUsersByLogin(): void { $this->expectException(LogicException::class); @@ -181,7 +182,7 @@ public function testLoadMultipleUsersByLogin() $handler->loadByLogin($user->login); } - public function testLoadMultipleUsersByEmail() + public function testLoadMultipleUsersByEmail(): void { $this->expectException(LogicException::class); @@ -202,7 +203,7 @@ public function testLoadMultipleUsersByEmail() $handler->loadByEmail($user->email); } - public function testLoadUserByEmailNotFound() + public function testLoadUserByEmailNotFound(): void { $this->expectException(NotFoundException::class); @@ -212,7 +213,7 @@ public function testLoadUserByEmailNotFound() $handler->loadByLogin($user->email); } - public function testLoadUserByEmail() + public function testLoadUserByEmail(): void { $gatewayMock = $this ->createMock(User\Gateway::class); @@ -232,7 +233,7 @@ public function testLoadUserByEmail() ); } - public function testLoadUsersByEmail() + public function testLoadUsersByEmail(): void { $gatewayMock = $this ->createMock(User\Gateway::class); @@ -252,7 +253,7 @@ public function testLoadUsersByEmail() ); } - public function testLoadUserByTokenNotFound() + public function testLoadUserByTokenNotFound(): void { $this->expectException(NotFoundException::class); @@ -262,7 +263,7 @@ public function testLoadUserByTokenNotFound() $handler->loadUserByToken('asd'); } - public function testLoadUserByToken() + public function testLoadUserByToken(): void { $gatewayMock = $this ->createMock(User\Gateway::class); @@ -284,7 +285,7 @@ public function testLoadUserByToken() ); } - public function testUpdateUserToken() + public function testUpdateUserToken(): void { $handler = $this->getUserHandler(); @@ -309,7 +310,7 @@ public function testUpdateUserToken() ); } - public function testExpireUserToken() + public function testExpireUserToken(): void { $handler = $this->getUserHandler(); @@ -334,7 +335,7 @@ public function testExpireUserToken() ); } - public function testDeleteNonExistingUser() + public function testDeleteNonExistingUser(): void { $handler = $this->getUserHandler(); @@ -342,7 +343,7 @@ public function testDeleteNonExistingUser() $handler->delete(1337); } - public function testUpdateUser() + public function testUpdateUser(): void { $handler = $this->getUserHandler(); $user = $this->getValidUser(); @@ -352,7 +353,7 @@ public function testUpdateUser() $handler->update($user); } - public function testUpdateUserSettings() + public function testUpdateUserSettings(): void { $handler = $this->getUserHandler(); $user = $this->getValidUser(); @@ -362,7 +363,7 @@ public function testUpdateUserSettings() $handler->update($user); } - public function testCreateNewRoleWithoutPolicies() + public function testCreateNewRoleWithoutPolicies(): void { $handler = $this->getUserHandler(); @@ -378,7 +379,7 @@ public function testCreateNewRoleWithoutPolicies() ); } - public function testCreateRoleDraftWithoutPolicies() + public function testCreateRoleDraftWithoutPolicies(): void { $handler = $this->getUserHandler(); @@ -401,7 +402,7 @@ public function testCreateRoleDraftWithoutPolicies() ); } - public function testCreateNewRoleRoleId() + public function testCreateNewRoleRoleId(): void { $handler = $this->getUserHandler(); @@ -413,7 +414,7 @@ public function testCreateNewRoleRoleId() self::assertSame(1, $roleDraft->id); } - public function testLoadRole() + public function testLoadRole(): void { $handler = $this->getUserHandler(); @@ -430,7 +431,7 @@ public function testLoadRole() ); } - public function testLoadRoleWithPolicies() + public function testLoadRoleWithPolicies(): void { $handler = $this->getUserHandler(); @@ -464,7 +465,7 @@ public function testLoadRoleWithPolicies() ); } - public function testLoadRoleWithPoliciesAndGroups() + public function testLoadRoleWithPoliciesAndGroups(): void { $handler = $this->getUserHandler(); @@ -502,7 +503,7 @@ public function testLoadRoleWithPoliciesAndGroups() ); } - public function testLoadRoleWithPolicyLimitations() + public function testLoadRoleWithPolicyLimitations(): void { $handler = $this->getUserHandler(); @@ -543,7 +544,7 @@ public function testLoadRoleWithPolicyLimitations() ); } - public function testLoadRoles() + public function testLoadRoles(): void { $handler = $this->getUserHandler(); @@ -560,7 +561,7 @@ public function testLoadRoles() ); } - public function testUpdateRole() + public function testUpdateRole(): void { $handler = $this->getUserHandler(); @@ -579,7 +580,7 @@ public function testUpdateRole() ); } - public function testDeleteRole() + public function testDeleteRole(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -606,7 +607,7 @@ public function testDeleteRole() ); } - public function testDeleteRoleDraft() + public function testDeleteRoleDraft(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -634,7 +635,7 @@ public function testDeleteRoleDraft() ); } - public function testAddPolicyToRoleLimitations() + public function testAddPolicyToRoleLimitations(): void { $handler = $this->getUserHandler(); @@ -653,7 +654,7 @@ public function testAddPolicyToRoleLimitations() ); } - public function testAddPolicyPolicyId() + public function testAddPolicyPolicyId(): void { $handler = $this->getUserHandler(); @@ -668,7 +669,7 @@ public function testAddPolicyPolicyId() self::assertEquals(1, $policy->id); } - public function testAddPolicyLimitations() + public function testAddPolicyLimitations(): void { $this->createTestRoleWithTestPolicy(); @@ -682,7 +683,7 @@ public function testAddPolicyLimitations() ); } - public function testAddPolicyLimitationValues() + public function testAddPolicyLimitationValues(): void { $this->createTestRoleWithTestPolicy(); @@ -723,7 +724,7 @@ protected function createRole() return $handler->createRole($createStruct); } - public function testImplicitlyCreatePolicies() + public function testImplicitlyCreatePolicies(): void { $this->createRole(); @@ -737,7 +738,7 @@ public function testImplicitlyCreatePolicies() ); } - public function testDeletePolicy() + public function testDeletePolicy(): void { $handler = $this->getUserHandler(); @@ -754,7 +755,7 @@ public function testDeletePolicy() ); } - public function testDeletePolicyLimitations() + public function testDeletePolicyLimitations(): void { $handler = $this->getUserHandler(); @@ -767,7 +768,7 @@ public function testDeletePolicyLimitations() ); } - public function testDeletePolicyLimitationValues() + public function testDeletePolicyLimitationValues(): void { $handler = $this->getUserHandler(); @@ -780,7 +781,7 @@ public function testDeletePolicyLimitationValues() ); } - public function testUpdatePolicies() + public function testUpdatePolicies(): void { $handler = $this->getUserHandler(); @@ -810,7 +811,7 @@ public function testUpdatePolicies() ); } - public function testAddRoleToUser() + public function testAddRoleToUser(): void { $handler = $this->getUserHandler(); @@ -830,7 +831,7 @@ public function testAddRoleToUser() ); } - public function testAddRoleToUserWithLimitation() + public function testAddRoleToUserWithLimitation(): void { $handler = $this->getUserHandler(); @@ -856,7 +857,7 @@ public function testAddRoleToUserWithLimitation() ); } - public function testAddRoleToUserWithComplexLimitation() + public function testAddRoleToUserWithComplexLimitation(): void { $handler = $this->getUserHandler(); @@ -885,7 +886,7 @@ public function testAddRoleToUserWithComplexLimitation() ); } - public function testRemoveUserRoleAssociation() + public function testRemoveUserRoleAssociation(): void { $handler = $this->getUserHandler(); @@ -912,7 +913,7 @@ public function testRemoveUserRoleAssociation() ); } - public function testLoadRoleAssignmentsByGroupId() + public function testLoadRoleAssignmentsByGroupId(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -956,7 +957,7 @@ public function testLoadRoleAssignmentsByGroupId() ); } - public function testLoadRoleAssignmentsByGroupIdInherited() + public function testLoadRoleAssignmentsByGroupIdInherited(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -975,7 +976,7 @@ public function testLoadRoleAssignmentsByGroupIdInherited() ); } - public function testLoadComplexRoleAssignments() + public function testLoadComplexRoleAssignments(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -1102,7 +1103,7 @@ public function testLoadRoleAssignmentsByRoleIdWithOffsetAndLimit(): void ); } - public function testLoadRoleDraftByRoleId() + public function testLoadRoleDraftByRoleId(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); @@ -1115,7 +1116,7 @@ public function testLoadRoleDraftByRoleId() self::assertEquals($draft, $loadedDraft); } - public function testRoleDraftOnlyHavePolicyDraft() + public function testRoleDraftOnlyHavePolicyDraft(): void { $this->insertSharedDatabaseFixture(); $handler = $this->getUserHandler(); diff --git a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php index 29ebce5b2d..54c3dd60b5 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php @@ -37,7 +37,7 @@ protected function setUp(): void ); } - public function testInsert() + public function testInsert(): void { $id = $this->getGateway()->setUserPreference(new UserPreferenceSetStruct([ 'userId' => 14, @@ -55,7 +55,7 @@ public function testInsert() ], $data); } - public function testUpdateUserPreference() + public function testUpdateUserPreference(): void { $userPreference = new UserPreferenceSetStruct([ 'userId' => 14, @@ -73,14 +73,14 @@ public function testUpdateUserPreference() ], $this->loadUserPreference(self::EXISTING_USER_PREFERENCE_ID)); } - public function testCountUserPreferences() + public function testCountUserPreferences(): void { self::assertEquals(3, $this->getGateway()->countUserPreferences( self::EXISTING_USER_PREFERENCE_DATA['user_id'] )); } - public function testLoadUserPreferences() + public function testLoadUserPreferences(): void { $userId = 14; $offset = 1; diff --git a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php index 5a4f89fb28..b87e53d465 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php @@ -13,6 +13,7 @@ use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; use Ibexa\Core\Persistence\Legacy\UserPreference\Handler; use Ibexa\Core\Persistence\Legacy\UserPreference\Mapper; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -23,13 +24,13 @@ class HandlerTest extends TestCase public const USER_PREFERENCE_ID = 1; /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private $gateway; + private MockObject $gateway; /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private $mapper; + private MockObject $mapper; /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Handler */ - private $handler; + private Handler $handler; protected function setUp(): void { @@ -38,7 +39,7 @@ protected function setUp(): void $this->handler = new Handler($this->gateway, $this->mapper); } - public function testSetUserPreference() + public function testSetUserPreference(): void { $setStruct = new UserPreferenceSetStruct([ 'userId' => 5, @@ -64,7 +65,7 @@ public function testSetUserPreference() self::assertEquals($userPreference->id, self::USER_PREFERENCE_ID); } - public function testCountUserPreferences() + public function testCountUserPreferences(): void { $ownerId = 10; $expectedCount = 12; @@ -78,7 +79,7 @@ public function testCountUserPreferences() self::assertEquals($expectedCount, $this->handler->countUserPreferences($ownerId)); } - public function testLoadUserPreferences() + public function testLoadUserPreferences(): void { $ownerId = 9; $limit = 5; diff --git a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php index d0a6c322e1..1eea2a0439 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/MapperTest.php @@ -18,14 +18,14 @@ class MapperTest extends TestCase { /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Mapper */ - private $mapper; + private Mapper $mapper; protected function setUp(): void { $this->mapper = new Mapper(); } - public function testExtractUserPreferencesFromRows() + public function testExtractUserPreferencesFromRows(): void { $rows = [ [ diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php index 4ad3164640..2be1d14060 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php @@ -24,7 +24,7 @@ public static function getTestFiles(): array return false !== $glob ? array_map( - static function (string $file) { + static function (string $file): array { return [realpath($file)]; }, $glob @@ -35,7 +35,7 @@ static function (string $file) { /** * @dataProvider getTestFiles */ - public function testParse($file) + public function testParse(string $file): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php index 35aff7f339..6cf956acbf 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php @@ -16,16 +16,16 @@ */ class TransformationProcessorDefinitionBasedTest extends TestCase { - public function getProcessor() + public function getProcessor(): DefinitionBased { return new DefinitionBased( - new Persistence\TransformationProcessor\DefinitionBased\Parser(), + new DefinitionBased\Parser(), new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()), glob(__DIR__ . '/_fixtures/transformations/*.tr') ); } - public function testSimpleNormalizationLowercase() + public function testSimpleNormalizationLowercase(): void { $processor = $this->getProcessor(); @@ -35,7 +35,7 @@ public function testSimpleNormalizationLowercase() ); } - public function testSimpleNormalizationUppercase() + public function testSimpleNormalizationUppercase(): void { $processor = $this->getProcessor(); @@ -45,7 +45,7 @@ public function testSimpleNormalizationUppercase() ); } - public function testApplyAllLowercaseNormalizations() + public function testApplyAllLowercaseNormalizations(): void { $processor = $this->getProcessor(); @@ -60,7 +60,7 @@ public function testApplyAllLowercaseNormalizations() * available can be compiled without errors. The actual expectation is not * important. */ - public function testAllNormalizations() + public function testAllNormalizations(): void { $processor = $this->getProcessor(); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php index bda7c272a3..03dcf91940 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php @@ -34,7 +34,7 @@ protected function applyTransformations(array $transformations, $string) return $string; } - public function testCompileMap() + public function testCompileMap(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -52,7 +52,7 @@ public function testCompileMap() ); } - public function testCompileMapRemove() + public function testCompileMapRemove(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -70,7 +70,7 @@ public function testCompileMapRemove() ); } - public function testCompileMapKeep() + public function testCompileMapKeep(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -88,7 +88,7 @@ public function testCompileMapKeep() ); } - public function testCompileMapAscii() + public function testCompileMapAscii(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -106,7 +106,7 @@ public function testCompileMapAscii() ); } - public function testCompileMapUnicode() + public function testCompileMapUnicode(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -124,7 +124,7 @@ public function testCompileMapUnicode() ); } - public function testCompileReplace() + public function testCompileReplace(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -142,7 +142,7 @@ public function testCompileReplace() ); } - public function testCompileTranspose() + public function testCompileTranspose(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -160,7 +160,7 @@ public function testCompileTranspose() ); } - public function testCompileTransposeAsciiLowercase() + public function testCompileTransposeAsciiLowercase(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -178,7 +178,7 @@ public function testCompileTransposeAsciiLowercase() ); } - public function testCompileTransposePlus() + public function testCompileTransposePlus(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); @@ -196,7 +196,7 @@ public function testCompileTransposePlus() ); } - public function testCompileModuloTranspose() + public function testCompileModuloTranspose(): void { $parser = new Persistence\TransformationProcessor\DefinitionBased\Parser(self::getInstallationDir()); $compiler = new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()); diff --git a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php index 64402965da..60a185a7e1 100644 --- a/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php +++ b/tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php @@ -16,7 +16,7 @@ */ class TransformationProcessorPreprocessedBasedTest extends TestCase { - public function getProcessor() + public function getProcessor(): PreprocessedBased { return new PreprocessedBased( new Persistence\TransformationProcessor\PcreCompiler(new Persistence\Utf8Converter()), @@ -24,7 +24,7 @@ public function getProcessor() ); } - public function testSimpleNormalizationLowercase() + public function testSimpleNormalizationLowercase(): void { $processor = $this->getProcessor(); @@ -34,7 +34,7 @@ public function testSimpleNormalizationLowercase() ); } - public function testSimpleNormalizationUppercase() + public function testSimpleNormalizationUppercase(): void { $processor = $this->getProcessor(); @@ -49,7 +49,7 @@ public function testSimpleNormalizationUppercase() * available can be compiled without errors. The actual expectation is not * important. */ - public function testAllNormalizations() + public function testAllNormalizations(): void { $processor = $this->getProcessor(); diff --git a/tests/lib/Query/QueryFactoryTest.php b/tests/lib/Query/QueryFactoryTest.php index bd5b015cd2..d80e85b38c 100644 --- a/tests/lib/Query/QueryFactoryTest.php +++ b/tests/lib/Query/QueryFactoryTest.php @@ -13,6 +13,7 @@ use Ibexa\Core\QueryType\QueryType; use Ibexa\Core\QueryType\QueryTypeRegistry; use Ibexa\Tests\Core\Search\TestCase; +use PHPUnit\Framework\MockObject\MockObject; final class QueryFactoryTest extends TestCase { @@ -24,10 +25,10 @@ final class QueryFactoryTest extends TestCase ]; /** @var \Ibexa\Core\QueryType\QueryTypeRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private $queryTypeRegistry; + private MockObject $queryTypeRegistry; /** @var \Ibexa\Core\Query\QueryFactory */ - private $queryFactory; + private QueryFactory $queryFactory; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php index cfd3a21155..e06d458768 100644 --- a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php @@ -15,6 +15,7 @@ use Ibexa\Core\QueryType\BuiltIn\SortClausesFactoryInterface; use Ibexa\Core\QueryType\QueryType; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class AbstractQueryTypeTest extends TestCase @@ -23,16 +24,16 @@ abstract class AbstractQueryTypeTest extends TestCase protected const ROOT_LOCATION_PATH_STRING = '/1/2/'; /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private $repository; + private MockObject $repository; /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $configResolver; + private MockObject $configResolver; /** @var \Ibexa\Core\QueryType\BuiltIn\SortClausesFactoryInterface|\PHPUnit\Framework\MockObject\MockObject */ - private $sortClausesFactory; + private MockObject $sortClausesFactory; /** @var \Ibexa\Core\QueryType\QueryType */ - private $queryType; + private QueryType $queryType; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php index 05d1ba39da..888293578b 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/CustomFieldSortClauseParserTest.php @@ -20,7 +20,7 @@ final class CustomFieldSortClauseParserTest extends TestCase private const EXAMPLE_SEARCH_INDEX_FIELD = 'custom_field_s'; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\CustomFieldSortClauseParser */ - private $parser; + private CustomFieldSortClauseParser $parser; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php index a59ee3c171..dc60e1610b 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParserTest.php @@ -19,7 +19,7 @@ final class DefaultSortClauseParserTest extends TestCase { /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\DefaultSortClauseParser */ - private $defaultSortClauseParser; + private DefaultSortClauseParser $defaultSortClauseParser; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php index 82be846943..3477ecf50c 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/FieldSortClauseParserTest.php @@ -21,7 +21,7 @@ final class FieldSortClauseParserTest extends TestCase private const EXAMPLE_FIELD_ID = 'title'; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\FieldSortClauseParser */ - private $fieldSortClauseParser; + private FieldSortClauseParser $fieldSortClauseParser; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php index d7bcdc903e..518c8e5579 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/MapDistanceSortClauseParserTest.php @@ -23,7 +23,7 @@ final class MapDistanceSortClauseParserTest extends TestCase private const EXAMPLE_LON = 19.9450; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\MapDistanceSortClauseParser */ - private $mapDistanceSortClauseParser; + private MapDistanceSortClauseParser $mapDistanceSortClauseParser; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php index 80bb57f29a..c540d045e5 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/RandomSortClauseParserTest.php @@ -20,7 +20,7 @@ final class RandomSortClauseParserTest extends TestCase private const EXAMPLE_SEED = 1; /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\SortClauseParser\RandomSortClauseParser */ - private $randomSortClauseParser; + private RandomSortClauseParser $randomSortClauseParser; protected function setUp(): void { diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php index 373bfe0954..3b12c477f5 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php @@ -17,13 +17,11 @@ final class SortSpecLexerStub implements SortSpecLexerInterface { /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\Token[] */ - private $tokens; + private array $tokens; - /** @var string|null */ - private $input; + private ?string $input = null; - /** @var int */ - private $position; + private int $position; public function __construct(array $tokens = []) { diff --git a/tests/lib/Repository/ContentServiceTest.php b/tests/lib/Repository/ContentServiceTest.php index 861ed4f1df..777dd59c44 100644 --- a/tests/lib/Repository/ContentServiceTest.php +++ b/tests/lib/Repository/ContentServiceTest.php @@ -29,7 +29,7 @@ final class ContentServiceTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\ContentService */ - private $contentService; + private ContentService $contentService; protected function setUp(): void { diff --git a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php index 01477368eb..6bc97eb4fd 100644 --- a/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php @@ -22,8 +22,7 @@ class ContentFieldStrategyTest extends TestCase private function getFieldTypeBasedThumbnailStrategy(string $fieldTypeIdentifier): FieldTypeBasedThumbnailStrategy { return new class($fieldTypeIdentifier) implements FieldTypeBasedThumbnailStrategy { - /** @var string */ - private $fieldTypeIdentifier; + private string $fieldTypeIdentifier; public function __construct(string $fieldTypeIdentifier) { diff --git a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php index 8466f7b65e..83449fed90 100644 --- a/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php +++ b/tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php @@ -16,7 +16,7 @@ class StaticStrategyTest extends TestCase { - public function testStaticStrategy() + public function testStaticStrategy(): void { $resource = 'static-test-resource'; diff --git a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php index 72b6225415..cbc700a3c1 100644 --- a/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php +++ b/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php @@ -86,11 +86,9 @@ public function testMergeValidationErrors(): void private function buildContentValidator(string $classSupport, array $validationReturn): ContentValidator { return new class($classSupport, $validationReturn) implements ContentValidator { - /** @var string */ - private $classSupport; + private string $classSupport; - /** @var array */ - private $validationReturn; + private array $validationReturn; public function __construct( string $classSupport, diff --git a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php index f261461ddf..9a7fa128c5 100644 --- a/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php @@ -27,7 +27,7 @@ protected function createServiceMock(): MockObject return $this->createMock(BookmarkService::class); } - public function testCreateBookmarkDecorator() + public function testCreateBookmarkDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -39,7 +39,7 @@ public function testCreateBookmarkDecorator() $decoratedService->createBookmark(...$parameters); } - public function testDeleteBookmarkDecorator() + public function testDeleteBookmarkDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -51,7 +51,7 @@ public function testDeleteBookmarkDecorator() $decoratedService->deleteBookmark(...$parameters); } - public function testLoadBookmarksDecorator() + public function testLoadBookmarksDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -66,7 +66,7 @@ public function testLoadBookmarksDecorator() $decoratedService->loadBookmarks(...$parameters); } - public function testIsBookmarkedDecorator() + public function testIsBookmarkedDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php index 60d41317d4..8c5d9e2a2b 100644 --- a/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php @@ -43,7 +43,7 @@ protected function createServiceMock(): ContentService&MockObject return $this->createMock(ContentService::class); } - public function testLoadContentInfoDecorator() + public function testLoadContentInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -55,7 +55,7 @@ public function testLoadContentInfoDecorator() $decoratedService->loadContentInfo(...$parameters); } - public function testLoadContentInfoListDecorator() + public function testLoadContentInfoListDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -67,7 +67,7 @@ public function testLoadContentInfoListDecorator() $decoratedService->loadContentInfoList(...$parameters); } - public function testLoadContentInfoByRemoteIdDecorator() + public function testLoadContentInfoByRemoteIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -79,7 +79,7 @@ public function testLoadContentInfoByRemoteIdDecorator() $decoratedService->loadContentInfoByRemoteId(...$parameters); } - public function testLoadVersionInfoDecorator() + public function testLoadVersionInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -94,7 +94,7 @@ public function testLoadVersionInfoDecorator() $decoratedService->loadVersionInfo(...$parameters); } - public function testLoadVersionInfoByIdDecorator() + public function testLoadVersionInfoByIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -109,7 +109,7 @@ public function testLoadVersionInfoByIdDecorator() $decoratedService->loadVersionInfoById(...$parameters); } - public function testLoadContentByContentInfoDecorator() + public function testLoadContentByContentInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -126,7 +126,7 @@ public function testLoadContentByContentInfoDecorator() $decoratedService->loadContentByContentInfo(...$parameters); } - public function testLoadContentByVersionInfoDecorator() + public function testLoadContentByVersionInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -142,7 +142,7 @@ public function testLoadContentByVersionInfoDecorator() $decoratedService->loadContentByVersionInfo(...$parameters); } - public function testLoadContentDecorator() + public function testLoadContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -159,7 +159,7 @@ public function testLoadContentDecorator() $decoratedService->loadContent(...$parameters); } - public function testLoadContentByRemoteIdDecorator() + public function testLoadContentByRemoteIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -176,7 +176,7 @@ public function testLoadContentByRemoteIdDecorator() $decoratedService->loadContentByRemoteId(...$parameters); } - public function testLoadContentListByContentInfoDecorator() + public function testLoadContentListByContentInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -192,7 +192,7 @@ public function testLoadContentListByContentInfoDecorator() $decoratedService->loadContentListByContentInfo(...$parameters); } - public function testCreateContentDecorator() + public function testCreateContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -207,7 +207,7 @@ public function testCreateContentDecorator() $decoratedService->createContent(...$parameters); } - public function testUpdateContentMetadataDecorator() + public function testUpdateContentMetadataDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -222,7 +222,7 @@ public function testUpdateContentMetadataDecorator() $decoratedService->updateContentMetadata(...$parameters); } - public function testDeleteContentDecorator() + public function testDeleteContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -234,7 +234,7 @@ public function testDeleteContentDecorator() $decoratedService->deleteContent(...$parameters); } - public function testCreateContentDraftDecorator() + public function testCreateContentDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -262,7 +262,7 @@ public function testLoadContentDraftListDecorator(): void $decoratedService->loadContentDraftList(...$parameters); } - public function testUpdateContentDecorator() + public function testUpdateContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -277,7 +277,7 @@ public function testUpdateContentDecorator() $decoratedService->updateContent(...$parameters); } - public function testPublishVersionDecorator() + public function testPublishVersionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -289,7 +289,7 @@ public function testPublishVersionDecorator() $decoratedService->publishVersion(...$parameters); } - public function testDeleteVersionDecorator() + public function testDeleteVersionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -301,7 +301,7 @@ public function testDeleteVersionDecorator() $decoratedService->deleteVersion(...$parameters); } - public function testLoadVersionsDecorator() + public function testLoadVersionsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -313,7 +313,7 @@ public function testLoadVersionsDecorator() $decoratedService->loadVersions(...$parameters); } - public function testCopyContentDecorator() + public function testCopyContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -341,7 +341,7 @@ public function testLoadRelationListDecorator(): void $decoratedService->loadRelationList(...$parameters); } - public function testLoadReverseRelationsDecorator() + public function testLoadReverseRelationsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -353,7 +353,7 @@ public function testLoadReverseRelationsDecorator() $decoratedService->loadReverseRelations(...$parameters); } - public function testAddRelationDecorator() + public function testAddRelationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -368,7 +368,7 @@ public function testAddRelationDecorator() $decoratedService->addRelation(...$parameters); } - public function testDeleteRelationDecorator() + public function testDeleteRelationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -383,7 +383,7 @@ public function testDeleteRelationDecorator() $decoratedService->deleteRelation(...$parameters); } - public function testDeleteTranslationDecorator() + public function testDeleteTranslationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -398,7 +398,7 @@ public function testDeleteTranslationDecorator() $decoratedService->deleteTranslation(...$parameters); } - public function testDeleteTranslationFromDraftDecorator() + public function testDeleteTranslationFromDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -413,7 +413,7 @@ public function testDeleteTranslationFromDraftDecorator() $decoratedService->deleteTranslationFromDraft(...$parameters); } - public function testHideContentDecorator() + public function testHideContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -425,7 +425,7 @@ public function testHideContentDecorator() $decoratedService->hideContent(...$parameters); } - public function testRevealContentDecorator() + public function testRevealContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -437,7 +437,7 @@ public function testRevealContentDecorator() $decoratedService->revealContent(...$parameters); } - public function testNewContentCreateStructDecorator() + public function testNewContentCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -452,7 +452,7 @@ public function testNewContentCreateStructDecorator() $decoratedService->newContentCreateStruct(...$parameters); } - public function testNewContentMetadataUpdateStructDecorator() + public function testNewContentMetadataUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -464,7 +464,7 @@ public function testNewContentMetadataUpdateStructDecorator() $decoratedService->newContentMetadataUpdateStruct(...$parameters); } - public function testNewContentUpdateStructDecorator() + public function testNewContentUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php index 7a7b4c175b..3d96f82c6d 100644 --- a/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php @@ -37,7 +37,7 @@ protected function createServiceMock(): MockObject return $this->createMock(ContentTypeService::class); } - public function testCreateContentTypeGroupDecorator() + public function testCreateContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -49,7 +49,7 @@ public function testCreateContentTypeGroupDecorator() $decoratedService->createContentTypeGroup(...$parameters); } - public function testLoadContentTypeGroupDecorator() + public function testLoadContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -64,7 +64,7 @@ public function testLoadContentTypeGroupDecorator() $decoratedService->loadContentTypeGroup(...$parameters); } - public function testLoadContentTypeGroupByIdentifierDecorator() + public function testLoadContentTypeGroupByIdentifierDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -79,7 +79,7 @@ public function testLoadContentTypeGroupByIdentifierDecorator() $decoratedService->loadContentTypeGroupByIdentifier(...$parameters); } - public function testLoadContentTypeGroupsDecorator() + public function testLoadContentTypeGroupsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -91,7 +91,7 @@ public function testLoadContentTypeGroupsDecorator() $decoratedService->loadContentTypeGroups(...$parameters); } - public function testUpdateContentTypeGroupDecorator() + public function testUpdateContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -106,7 +106,7 @@ public function testUpdateContentTypeGroupDecorator() $decoratedService->updateContentTypeGroup(...$parameters); } - public function testDeleteContentTypeGroupDecorator() + public function testDeleteContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -118,7 +118,7 @@ public function testDeleteContentTypeGroupDecorator() $decoratedService->deleteContentTypeGroup(...$parameters); } - public function testCreateContentTypeDecorator() + public function testCreateContentTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -133,7 +133,7 @@ public function testCreateContentTypeDecorator() $decoratedService->createContentType(...$parameters); } - public function testLoadContentTypeDecorator() + public function testLoadContentTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -148,7 +148,7 @@ public function testLoadContentTypeDecorator() $decoratedService->loadContentType(...$parameters); } - public function testLoadContentTypeByIdentifierDecorator() + public function testLoadContentTypeByIdentifierDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -163,7 +163,7 @@ public function testLoadContentTypeByIdentifierDecorator() $decoratedService->loadContentTypeByIdentifier(...$parameters); } - public function testLoadContentTypeByRemoteIdDecorator() + public function testLoadContentTypeByRemoteIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -178,7 +178,7 @@ public function testLoadContentTypeByRemoteIdDecorator() $decoratedService->loadContentTypeByRemoteId(...$parameters); } - public function testLoadContentTypeDraftDecorator() + public function testLoadContentTypeDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -190,7 +190,7 @@ public function testLoadContentTypeDraftDecorator() $decoratedService->loadContentTypeDraft(...$parameters); } - public function testLoadContentTypeListDecorator() + public function testLoadContentTypeListDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -205,7 +205,7 @@ public function testLoadContentTypeListDecorator() $decoratedService->loadContentTypeList(...$parameters); } - public function testLoadContentTypesDecorator() + public function testLoadContentTypesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -220,7 +220,7 @@ public function testLoadContentTypesDecorator() $decoratedService->loadContentTypes(...$parameters); } - public function testCreateContentTypeDraftDecorator() + public function testCreateContentTypeDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -232,7 +232,7 @@ public function testCreateContentTypeDraftDecorator() $decoratedService->createContentTypeDraft(...$parameters); } - public function testUpdateContentTypeDraftDecorator() + public function testUpdateContentTypeDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -247,7 +247,7 @@ public function testUpdateContentTypeDraftDecorator() $decoratedService->updateContentTypeDraft(...$parameters); } - public function testDeleteContentTypeDecorator() + public function testDeleteContentTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -259,7 +259,7 @@ public function testDeleteContentTypeDecorator() $decoratedService->deleteContentType(...$parameters); } - public function testCopyContentTypeDecorator() + public function testCopyContentTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -274,7 +274,7 @@ public function testCopyContentTypeDecorator() $decoratedService->copyContentType(...$parameters); } - public function testAssignContentTypeGroupDecorator() + public function testAssignContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -289,7 +289,7 @@ public function testAssignContentTypeGroupDecorator() $decoratedService->assignContentTypeGroup(...$parameters); } - public function testUnassignContentTypeGroupDecorator() + public function testUnassignContentTypeGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -304,7 +304,7 @@ public function testUnassignContentTypeGroupDecorator() $decoratedService->unassignContentTypeGroup(...$parameters); } - public function testAddFieldDefinitionDecorator() + public function testAddFieldDefinitionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -319,7 +319,7 @@ public function testAddFieldDefinitionDecorator() $decoratedService->addFieldDefinition(...$parameters); } - public function testRemoveFieldDefinitionDecorator() + public function testRemoveFieldDefinitionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -334,7 +334,7 @@ public function testRemoveFieldDefinitionDecorator() $decoratedService->removeFieldDefinition(...$parameters); } - public function testUpdateFieldDefinitionDecorator() + public function testUpdateFieldDefinitionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -350,7 +350,7 @@ public function testUpdateFieldDefinitionDecorator() $decoratedService->updateFieldDefinition(...$parameters); } - public function testPublishContentTypeDraftDecorator() + public function testPublishContentTypeDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -362,7 +362,7 @@ public function testPublishContentTypeDraftDecorator() $decoratedService->publishContentTypeDraft(...$parameters); } - public function testNewContentTypeGroupCreateStructDecorator() + public function testNewContentTypeGroupCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -374,7 +374,7 @@ public function testNewContentTypeGroupCreateStructDecorator() $decoratedService->newContentTypeGroupCreateStruct(...$parameters); } - public function testNewContentTypeCreateStructDecorator() + public function testNewContentTypeCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -386,7 +386,7 @@ public function testNewContentTypeCreateStructDecorator() $decoratedService->newContentTypeCreateStruct(...$parameters); } - public function testNewContentTypeUpdateStructDecorator() + public function testNewContentTypeUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -398,7 +398,7 @@ public function testNewContentTypeUpdateStructDecorator() $decoratedService->newContentTypeUpdateStruct(...$parameters); } - public function testNewContentTypeGroupUpdateStructDecorator() + public function testNewContentTypeGroupUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -410,7 +410,7 @@ public function testNewContentTypeGroupUpdateStructDecorator() $decoratedService->newContentTypeGroupUpdateStruct(...$parameters); } - public function testNewFieldDefinitionCreateStructDecorator() + public function testNewFieldDefinitionCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -425,7 +425,7 @@ public function testNewFieldDefinitionCreateStructDecorator() $decoratedService->newFieldDefinitionCreateStruct(...$parameters); } - public function testNewFieldDefinitionUpdateStructDecorator() + public function testNewFieldDefinitionUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -437,7 +437,7 @@ public function testNewFieldDefinitionUpdateStructDecorator() $decoratedService->newFieldDefinitionUpdateStruct(...$parameters); } - public function testIsContentTypeUsedDecorator() + public function testIsContentTypeUsedDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -449,7 +449,7 @@ public function testIsContentTypeUsedDecorator() $decoratedService->isContentTypeUsed(...$parameters); } - public function testRemoveContentTypeTranslationDecorator() + public function testRemoveContentTypeTranslationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php index d26802b682..cf28c52084 100644 --- a/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php @@ -26,7 +26,7 @@ protected function createServiceMock(): MockObject return $this->createMock(FieldTypeService::class); } - public function testGetFieldTypesDecorator() + public function testGetFieldTypesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -38,7 +38,7 @@ public function testGetFieldTypesDecorator() $decoratedService->getFieldTypes(...$parameters); } - public function testGetFieldTypeDecorator() + public function testGetFieldTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -50,7 +50,7 @@ public function testGetFieldTypeDecorator() $decoratedService->getFieldType(...$parameters); } - public function testHasFieldTypeDecorator() + public function testHasFieldTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php index 5b7ccda1c5..86e21d9cf3 100644 --- a/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php @@ -28,7 +28,7 @@ protected function createServiceMock(): MockObject return $this->createMock(LanguageService::class); } - public function testCreateLanguageDecorator() + public function testCreateLanguageDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -40,7 +40,7 @@ public function testCreateLanguageDecorator() $decoratedService->createLanguage(...$parameters); } - public function testUpdateLanguageNameDecorator() + public function testUpdateLanguageNameDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -55,7 +55,7 @@ public function testUpdateLanguageNameDecorator() $decoratedService->updateLanguageName(...$parameters); } - public function testEnableLanguageDecorator() + public function testEnableLanguageDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -67,7 +67,7 @@ public function testEnableLanguageDecorator() $decoratedService->enableLanguage(...$parameters); } - public function testDisableLanguageDecorator() + public function testDisableLanguageDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -79,7 +79,7 @@ public function testDisableLanguageDecorator() $decoratedService->disableLanguage(...$parameters); } - public function testLoadLanguageDecorator() + public function testLoadLanguageDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -91,7 +91,7 @@ public function testLoadLanguageDecorator() $decoratedService->loadLanguage(...$parameters); } - public function testLoadLanguagesDecorator() + public function testLoadLanguagesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -103,7 +103,7 @@ public function testLoadLanguagesDecorator() $decoratedService->loadLanguages(...$parameters); } - public function testLoadLanguageByIdDecorator() + public function testLoadLanguageByIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -115,7 +115,7 @@ public function testLoadLanguageByIdDecorator() $decoratedService->loadLanguageById(...$parameters); } - public function testLoadLanguageListByCodeDecorator() + public function testLoadLanguageListByCodeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -127,7 +127,7 @@ public function testLoadLanguageListByCodeDecorator() $decoratedService->loadLanguageListByCode(...$parameters); } - public function testLoadLanguageListByIdDecorator() + public function testLoadLanguageListByIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -139,7 +139,7 @@ public function testLoadLanguageListByIdDecorator() $decoratedService->loadLanguageListById(...$parameters); } - public function testDeleteLanguageDecorator() + public function testDeleteLanguageDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -151,7 +151,7 @@ public function testDeleteLanguageDecorator() $decoratedService->deleteLanguage(...$parameters); } - public function testGetDefaultLanguageCodeDecorator() + public function testGetDefaultLanguageCodeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -163,7 +163,7 @@ public function testGetDefaultLanguageCodeDecorator() $decoratedService->getDefaultLanguageCode(...$parameters); } - public function testNewLanguageCreateStructDecorator() + public function testNewLanguageCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php index 906c9575ac..3d47905826 100644 --- a/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php @@ -35,7 +35,7 @@ protected function createServiceMock(): MockObject return $this->createMock(LocationService::class); } - public function testCopySubtreeDecorator() + public function testCopySubtreeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -50,7 +50,7 @@ public function testCopySubtreeDecorator() $decoratedService->copySubtree(...$parameters); } - public function testLoadLocationDecorator() + public function testLoadLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -66,7 +66,7 @@ public function testLoadLocationDecorator() $decoratedService->loadLocation(...$parameters); } - public function testLoadLocationListDecorator() + public function testLoadLocationListDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -82,7 +82,7 @@ public function testLoadLocationListDecorator() $decoratedService->loadLocationList(...$parameters); } - public function testLoadLocationByRemoteIdDecorator() + public function testLoadLocationByRemoteIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -98,7 +98,7 @@ public function testLoadLocationByRemoteIdDecorator() $decoratedService->loadLocationByRemoteId(...$parameters); } - public function testLoadLocationsDecorator() + public function testLoadLocationsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -114,7 +114,7 @@ public function testLoadLocationsDecorator() $decoratedService->loadLocations(...$parameters); } - public function testLoadLocationChildrenDecorator() + public function testLoadLocationChildrenDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -131,7 +131,7 @@ public function testLoadLocationChildrenDecorator() $decoratedService->loadLocationChildren(...$parameters); } - public function testLoadParentLocationsForDraftContentDecorator() + public function testLoadParentLocationsForDraftContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -146,7 +146,7 @@ public function testLoadParentLocationsForDraftContentDecorator() $decoratedService->loadParentLocationsForDraftContent(...$parameters); } - public function testGetLocationChildCountDecorator() + public function testGetLocationChildCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -158,7 +158,7 @@ public function testGetLocationChildCountDecorator() $decoratedService->getLocationChildCount(...$parameters); } - public function testCreateLocationDecorator() + public function testCreateLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -173,7 +173,7 @@ public function testCreateLocationDecorator() $decoratedService->createLocation(...$parameters); } - public function testUpdateLocationDecorator() + public function testUpdateLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -188,7 +188,7 @@ public function testUpdateLocationDecorator() $decoratedService->updateLocation(...$parameters); } - public function testSwapLocationDecorator() + public function testSwapLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -203,7 +203,7 @@ public function testSwapLocationDecorator() $decoratedService->swapLocation(...$parameters); } - public function testHideLocationDecorator() + public function testHideLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -215,7 +215,7 @@ public function testHideLocationDecorator() $decoratedService->hideLocation(...$parameters); } - public function testUnhideLocationDecorator() + public function testUnhideLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -227,7 +227,7 @@ public function testUnhideLocationDecorator() $decoratedService->unhideLocation(...$parameters); } - public function testMoveSubtreeDecorator() + public function testMoveSubtreeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -242,7 +242,7 @@ public function testMoveSubtreeDecorator() $decoratedService->moveSubtree(...$parameters); } - public function testDeleteLocationDecorator() + public function testDeleteLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -254,7 +254,7 @@ public function testDeleteLocationDecorator() $decoratedService->deleteLocation(...$parameters); } - public function testNewLocationCreateStructDecorator() + public function testNewLocationCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -266,7 +266,7 @@ public function testNewLocationCreateStructDecorator() $decoratedService->newLocationCreateStruct(...$parameters); } - public function testNewLocationUpdateStructDecorator() + public function testNewLocationUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -278,7 +278,7 @@ public function testNewLocationUpdateStructDecorator() $decoratedService->newLocationUpdateStruct(...$parameters); } - public function testGetAllLocationsCountDecorator() + public function testGetAllLocationsCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -290,7 +290,7 @@ public function testGetAllLocationsCountDecorator() $decoratedService->getAllLocationsCount(...$parameters); } - public function testLoadAllLocationsDecorator() + public function testLoadAllLocationsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php index 1b5361420e..e064bacc1b 100644 --- a/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php @@ -28,7 +28,7 @@ protected function createServiceMock(): MockObject return $this->createMock(NotificationService::class); } - public function testLoadNotificationsDecorator() + public function testLoadNotificationsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -43,7 +43,7 @@ public function testLoadNotificationsDecorator() $decoratedService->loadNotifications(...$parameters); } - public function testGetNotificationDecorator() + public function testGetNotificationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -55,7 +55,7 @@ public function testGetNotificationDecorator() $decoratedService->getNotification(...$parameters); } - public function testMarkNotificationAsReadDecorator() + public function testMarkNotificationAsReadDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -79,7 +79,7 @@ public function testMarkNotificationAsUnreadDecorator(): void $decoratedService->markNotificationAsUnread(...$parameters); } - public function testGetPendingNotificationCountDecorator() + public function testGetPendingNotificationCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -91,7 +91,7 @@ public function testGetPendingNotificationCountDecorator() $decoratedService->getPendingNotificationCount(...$parameters); } - public function testGetNotificationCountDecorator() + public function testGetNotificationCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -103,7 +103,7 @@ public function testGetNotificationCountDecorator() $decoratedService->getNotificationCount(...$parameters); } - public function testCreateNotificationDecorator() + public function testCreateNotificationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -115,7 +115,7 @@ public function testCreateNotificationDecorator() $decoratedService->createNotification(...$parameters); } - public function testDeleteNotificationDecorator() + public function testDeleteNotificationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php index 86a3f9abb0..13c057d710 100644 --- a/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php @@ -33,7 +33,7 @@ protected function createServiceMock(): MockObject return $this->createMock(ObjectStateService::class); } - public function testCreateObjectStateGroupDecorator() + public function testCreateObjectStateGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -45,7 +45,7 @@ public function testCreateObjectStateGroupDecorator() $decoratedService->createObjectStateGroup(...$parameters); } - public function testLoadObjectStateGroupDecorator() + public function testLoadObjectStateGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -85,7 +85,7 @@ public function testLoadObjectStateGroupByIdentifierDecorator(): void ); } - public function testLoadObjectStateGroupsDecorator() + public function testLoadObjectStateGroupsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -101,7 +101,7 @@ public function testLoadObjectStateGroupsDecorator() $decoratedService->loadObjectStateGroups(...$parameters); } - public function testLoadObjectStatesDecorator() + public function testLoadObjectStatesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -116,7 +116,7 @@ public function testLoadObjectStatesDecorator() $decoratedService->loadObjectStates(...$parameters); } - public function testUpdateObjectStateGroupDecorator() + public function testUpdateObjectStateGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -131,7 +131,7 @@ public function testUpdateObjectStateGroupDecorator() $decoratedService->updateObjectStateGroup(...$parameters); } - public function testDeleteObjectStateGroupDecorator() + public function testDeleteObjectStateGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -143,7 +143,7 @@ public function testDeleteObjectStateGroupDecorator() $decoratedService->deleteObjectStateGroup(...$parameters); } - public function testCreateObjectStateDecorator() + public function testCreateObjectStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -158,7 +158,7 @@ public function testCreateObjectStateDecorator() $decoratedService->createObjectState(...$parameters); } - public function testLoadObjectStateDecorator() + public function testLoadObjectStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -199,7 +199,7 @@ public function testLoadObjectStateDecoratorByIdentifier(): void ); } - public function testUpdateObjectStateDecorator() + public function testUpdateObjectStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -214,7 +214,7 @@ public function testUpdateObjectStateDecorator() $decoratedService->updateObjectState(...$parameters); } - public function testSetPriorityOfObjectStateDecorator() + public function testSetPriorityOfObjectStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -229,7 +229,7 @@ public function testSetPriorityOfObjectStateDecorator() $decoratedService->setPriorityOfObjectState(...$parameters); } - public function testDeleteObjectStateDecorator() + public function testDeleteObjectStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -241,7 +241,7 @@ public function testDeleteObjectStateDecorator() $decoratedService->deleteObjectState(...$parameters); } - public function testSetContentStateDecorator() + public function testSetContentStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -257,7 +257,7 @@ public function testSetContentStateDecorator() $decoratedService->setContentState(...$parameters); } - public function testGetContentStateDecorator() + public function testGetContentStateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -272,7 +272,7 @@ public function testGetContentStateDecorator() $decoratedService->getContentState(...$parameters); } - public function testGetContentCountDecorator() + public function testGetContentCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -284,7 +284,7 @@ public function testGetContentCountDecorator() $decoratedService->getContentCount(...$parameters); } - public function testNewObjectStateGroupCreateStructDecorator() + public function testNewObjectStateGroupCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -296,7 +296,7 @@ public function testNewObjectStateGroupCreateStructDecorator() $decoratedService->newObjectStateGroupCreateStruct(...$parameters); } - public function testNewObjectStateGroupUpdateStructDecorator() + public function testNewObjectStateGroupUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -308,7 +308,7 @@ public function testNewObjectStateGroupUpdateStructDecorator() $decoratedService->newObjectStateGroupUpdateStruct(...$parameters); } - public function testNewObjectStateCreateStructDecorator() + public function testNewObjectStateCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -320,7 +320,7 @@ public function testNewObjectStateCreateStructDecorator() $decoratedService->newObjectStateCreateStruct(...$parameters); } - public function testNewObjectStateUpdateStructDecorator() + public function testNewObjectStateUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php index d25283d6ab..0abceabf7f 100644 --- a/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php @@ -40,7 +40,7 @@ protected function createServiceMock(): MockObject return $this->createMock(RoleService::class); } - public function testCreateRoleDecorator() + public function testCreateRoleDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -52,7 +52,7 @@ public function testCreateRoleDecorator() $decoratedService->createRole(...$parameters); } - public function testCreateRoleDraftDecorator() + public function testCreateRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -64,7 +64,7 @@ public function testCreateRoleDraftDecorator() $decoratedService->createRoleDraft(...$parameters); } - public function testLoadRoleDraftDecorator() + public function testLoadRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -76,7 +76,7 @@ public function testLoadRoleDraftDecorator() $decoratedService->loadRoleDraft(...$parameters); } - public function testLoadRoleDraftByRoleIdDecorator() + public function testLoadRoleDraftByRoleIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -88,7 +88,7 @@ public function testLoadRoleDraftByRoleIdDecorator() $decoratedService->loadRoleDraftByRoleId(...$parameters); } - public function testUpdateRoleDraftDecorator() + public function testUpdateRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -103,7 +103,7 @@ public function testUpdateRoleDraftDecorator() $decoratedService->updateRoleDraft(...$parameters); } - public function testAddPolicyByRoleDraftDecorator() + public function testAddPolicyByRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -118,7 +118,7 @@ public function testAddPolicyByRoleDraftDecorator() $decoratedService->addPolicyByRoleDraft(...$parameters); } - public function testRemovePolicyByRoleDraftDecorator() + public function testRemovePolicyByRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -133,7 +133,7 @@ public function testRemovePolicyByRoleDraftDecorator() $decoratedService->removePolicyByRoleDraft(...$parameters); } - public function testUpdatePolicyByRoleDraftDecorator() + public function testUpdatePolicyByRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -149,7 +149,7 @@ public function testUpdatePolicyByRoleDraftDecorator() $decoratedService->updatePolicyByRoleDraft(...$parameters); } - public function testDeleteRoleDraftDecorator() + public function testDeleteRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -161,7 +161,7 @@ public function testDeleteRoleDraftDecorator() $decoratedService->deleteRoleDraft(...$parameters); } - public function testPublishRoleDraftDecorator() + public function testPublishRoleDraftDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -173,7 +173,7 @@ public function testPublishRoleDraftDecorator() $decoratedService->publishRoleDraft(...$parameters); } - public function testLoadRoleDecorator() + public function testLoadRoleDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -185,7 +185,7 @@ public function testLoadRoleDecorator() $decoratedService->loadRole(...$parameters); } - public function testLoadRoleByIdentifierDecorator() + public function testLoadRoleByIdentifierDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -197,7 +197,7 @@ public function testLoadRoleByIdentifierDecorator() $decoratedService->loadRoleByIdentifier(...$parameters); } - public function testLoadRolesDecorator() + public function testLoadRolesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -209,7 +209,7 @@ public function testLoadRolesDecorator() $decoratedService->loadRoles(...$parameters); } - public function testDeleteRoleDecorator() + public function testDeleteRoleDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -221,7 +221,7 @@ public function testDeleteRoleDecorator() $decoratedService->deleteRole(...$parameters); } - public function testAssignRoleToUserGroupDecorator() + public function testAssignRoleToUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -237,7 +237,7 @@ public function testAssignRoleToUserGroupDecorator() $decoratedService->assignRoleToUserGroup(...$parameters); } - public function testAssignRoleToUserDecorator() + public function testAssignRoleToUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -253,7 +253,7 @@ public function testAssignRoleToUserDecorator() $decoratedService->assignRoleToUser(...$parameters); } - public function testLoadRoleAssignmentDecorator() + public function testLoadRoleAssignmentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -265,7 +265,7 @@ public function testLoadRoleAssignmentDecorator() $decoratedService->loadRoleAssignment(...$parameters); } - public function testGetRoleAssignmentsDecorator() + public function testGetRoleAssignmentsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -277,7 +277,7 @@ public function testGetRoleAssignmentsDecorator() $decoratedService->getRoleAssignments(...$parameters); } - public function testGetRoleAssignmentsForUserDecorator() + public function testGetRoleAssignmentsForUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -292,7 +292,7 @@ public function testGetRoleAssignmentsForUserDecorator() $decoratedService->getRoleAssignmentsForUser(...$parameters); } - public function testGetRoleAssignmentsForUserGroupDecorator() + public function testGetRoleAssignmentsForUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -304,7 +304,7 @@ public function testGetRoleAssignmentsForUserGroupDecorator() $decoratedService->getRoleAssignmentsForUserGroup(...$parameters); } - public function testRemoveRoleAssignmentDecorator() + public function testRemoveRoleAssignmentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -316,7 +316,7 @@ public function testRemoveRoleAssignmentDecorator() $decoratedService->removeRoleAssignment(...$parameters); } - public function testNewRoleCreateStructDecorator() + public function testNewRoleCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -328,7 +328,7 @@ public function testNewRoleCreateStructDecorator() $decoratedService->newRoleCreateStruct(...$parameters); } - public function testNewPolicyCreateStructDecorator() + public function testNewPolicyCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -343,7 +343,7 @@ public function testNewPolicyCreateStructDecorator() $decoratedService->newPolicyCreateStruct(...$parameters); } - public function testNewPolicyUpdateStructDecorator() + public function testNewPolicyUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -355,7 +355,7 @@ public function testNewPolicyUpdateStructDecorator() $decoratedService->newPolicyUpdateStruct(...$parameters); } - public function testNewRoleUpdateStructDecorator() + public function testNewRoleUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -367,7 +367,7 @@ public function testNewRoleUpdateStructDecorator() $decoratedService->newRoleUpdateStruct(...$parameters); } - public function testGetLimitationTypeDecorator() + public function testGetLimitationTypeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -379,7 +379,7 @@ public function testGetLimitationTypeDecorator() $decoratedService->getLimitationType(...$parameters); } - public function testGetLimitationTypesByModuleFunctionDecorator() + public function testGetLimitationTypesByModuleFunctionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php index b761c104ce..86f0a06928 100644 --- a/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php @@ -29,7 +29,7 @@ protected function createServiceMock(): MockObject return $this->createMock(SearchService::class); } - public function testFindContentDecorator() + public function testFindContentDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -45,7 +45,7 @@ public function testFindContentDecorator() $decoratedService->findContent(...$parameters); } - public function testFindContentInfoDecorator() + public function testFindContentInfoDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -61,7 +61,7 @@ public function testFindContentInfoDecorator() $decoratedService->findContentInfo(...$parameters); } - public function testFindSingleDecorator() + public function testFindSingleDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -77,7 +77,7 @@ public function testFindSingleDecorator() $decoratedService->findSingle(...$parameters); } - public function testSuggestDecorator() + public function testSuggestDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -94,7 +94,7 @@ public function testSuggestDecorator() $decoratedService->suggest(...$parameters); } - public function testFindLocationsDecorator() + public function testFindLocationsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php index 39b9df17ff..d2bf7e188f 100644 --- a/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php @@ -33,7 +33,7 @@ protected function createServiceMock(): MockObject return $this->createMock(SectionService::class); } - public function testCreateSectionDecorator() + public function testCreateSectionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -45,7 +45,7 @@ public function testCreateSectionDecorator() $decoratedService->createSection(...$parameters); } - public function testUpdateSectionDecorator() + public function testUpdateSectionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -60,7 +60,7 @@ public function testUpdateSectionDecorator() $decoratedService->updateSection(...$parameters); } - public function testLoadSectionDecorator() + public function testLoadSectionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -72,7 +72,7 @@ public function testLoadSectionDecorator() $decoratedService->loadSection(...$parameters); } - public function testLoadSectionsDecorator() + public function testLoadSectionsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -84,7 +84,7 @@ public function testLoadSectionsDecorator() $decoratedService->loadSections(...$parameters); } - public function testLoadSectionByIdentifierDecorator() + public function testLoadSectionByIdentifierDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -96,7 +96,7 @@ public function testLoadSectionByIdentifierDecorator() $decoratedService->loadSectionByIdentifier(...$parameters); } - public function testCountAssignedContentsDecorator() + public function testCountAssignedContentsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -108,7 +108,7 @@ public function testCountAssignedContentsDecorator() $decoratedService->countAssignedContents(...$parameters); } - public function testIsSectionUsedDecorator() + public function testIsSectionUsedDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -120,7 +120,7 @@ public function testIsSectionUsedDecorator() $decoratedService->isSectionUsed(...$parameters); } - public function testAssignSectionDecorator() + public function testAssignSectionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -135,7 +135,7 @@ public function testAssignSectionDecorator() $decoratedService->assignSection(...$parameters); } - public function testAssignSectionToSubtreeDecorator() + public function testAssignSectionToSubtreeDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -150,7 +150,7 @@ public function testAssignSectionToSubtreeDecorator() $decoratedService->assignSectionToSubtree(...$parameters); } - public function testDeleteSectionDecorator() + public function testDeleteSectionDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -162,7 +162,7 @@ public function testDeleteSectionDecorator() $decoratedService->deleteSection(...$parameters); } - public function testNewSectionCreateStructDecorator() + public function testNewSectionCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -174,7 +174,7 @@ public function testNewSectionCreateStructDecorator() $decoratedService->newSectionCreateStruct(...$parameters); } - public function testNewSectionUpdateStructDecorator() + public function testNewSectionUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php index 3da5a68674..195ca65109 100644 --- a/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php @@ -32,7 +32,7 @@ protected function createServiceMock(): MockObject return $this->createMock(SettingService::class); } - public function testCreateSettingDecorator() + public function testCreateSettingDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -44,7 +44,7 @@ public function testCreateSettingDecorator() $decoratedService->createSetting(...$parameters); } - public function testUpdateSettingDecorator() + public function testUpdateSettingDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -59,7 +59,7 @@ public function testUpdateSettingDecorator() $decoratedService->updateSetting(...$parameters); } - public function testLoadSettingDecorator() + public function testLoadSettingDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -74,7 +74,7 @@ public function testLoadSettingDecorator() $decoratedService->loadSetting(...$parameters); } - public function testDeleteSettingDecorator() + public function testDeleteSettingDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -86,7 +86,7 @@ public function testDeleteSettingDecorator() $decoratedService->deleteSetting(...$parameters); } - public function testNewSettingCreateStructDecorator() + public function testNewSettingCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -98,7 +98,7 @@ public function testNewSettingCreateStructDecorator() $decoratedService->newSettingCreateStruct(...$parameters); } - public function testNewSettingUpdateStructDecorator() + public function testNewSettingUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php index 3be4c7cc25..9db0b0ed6d 100644 --- a/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php @@ -27,7 +27,7 @@ protected function createServiceMock(): MockObject return $this->createMock(TranslationService::class); } - public function testTranslateDecorator() + public function testTranslateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -42,7 +42,7 @@ public function testTranslateDecorator() $decoratedService->translate(...$parameters); } - public function testTranslateStringDecorator() + public function testTranslateStringDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php index 65babf43c3..2c9456ac81 100644 --- a/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php @@ -29,7 +29,7 @@ protected function createServiceMock(): MockObject return $this->createMock(TrashService::class); } - public function testLoadTrashItemDecorator() + public function testLoadTrashItemDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -41,7 +41,7 @@ public function testLoadTrashItemDecorator() $decoratedService->loadTrashItem(...$parameters); } - public function testTrashDecorator() + public function testTrashDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -53,7 +53,7 @@ public function testTrashDecorator() $decoratedService->trash(...$parameters); } - public function testRecoverDecorator() + public function testRecoverDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -68,7 +68,7 @@ public function testRecoverDecorator() $decoratedService->recover(...$parameters); } - public function testEmptyTrashDecorator() + public function testEmptyTrashDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -80,7 +80,7 @@ public function testEmptyTrashDecorator() $decoratedService->emptyTrash(...$parameters); } - public function testDeleteTrashItemDecorator() + public function testDeleteTrashItemDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -92,7 +92,7 @@ public function testDeleteTrashItemDecorator() $decoratedService->deleteTrashItem(...$parameters); } - public function testFindTrashItemsDecorator() + public function testFindTrashItemsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php index de9b5e2e69..24084e99d7 100644 --- a/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php @@ -30,7 +30,7 @@ protected function createServiceMock(): MockObject return $this->createMock(URLAliasService::class); } - public function testCreateUrlAliasDecorator() + public function testCreateUrlAliasDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -48,7 +48,7 @@ public function testCreateUrlAliasDecorator() $decoratedService->createUrlAlias(...$parameters); } - public function testCreateGlobalUrlAliasDecorator() + public function testCreateGlobalUrlAliasDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -66,7 +66,7 @@ public function testCreateGlobalUrlAliasDecorator() $decoratedService->createGlobalUrlAlias(...$parameters); } - public function testListLocationAliasesDecorator() + public function testListLocationAliasesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -82,7 +82,7 @@ public function testListLocationAliasesDecorator() $decoratedService->listLocationAliases(...$parameters); } - public function testListGlobalAliasesDecorator() + public function testListGlobalAliasesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -98,7 +98,7 @@ public function testListGlobalAliasesDecorator() $decoratedService->listGlobalAliases(...$parameters); } - public function testRemoveAliasesDecorator() + public function testRemoveAliasesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -110,7 +110,7 @@ public function testRemoveAliasesDecorator() $decoratedService->removeAliases(...$parameters); } - public function testLookupDecorator() + public function testLookupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -125,7 +125,7 @@ public function testLookupDecorator() $decoratedService->lookup(...$parameters); } - public function testReverseLookupDecorator() + public function testReverseLookupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -140,7 +140,7 @@ public function testReverseLookupDecorator() $decoratedService->reverseLookup(...$parameters); } - public function testLoadDecorator() + public function testLoadDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -152,7 +152,7 @@ public function testLoadDecorator() $decoratedService->load(...$parameters); } - public function testRefreshSystemUrlAliasesForLocationDecorator() + public function testRefreshSystemUrlAliasesForLocationDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -164,7 +164,7 @@ public function testRefreshSystemUrlAliasesForLocationDecorator() $decoratedService->refreshSystemUrlAliasesForLocation(...$parameters); } - public function testDeleteCorruptedUrlAliasesDecorator() + public function testDeleteCorruptedUrlAliasesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php index 0214072cba..a4d2458945 100644 --- a/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLServiceDecoratorTest.php @@ -29,7 +29,7 @@ protected function createServiceMock(): MockObject return $this->createMock(URLService::class); } - public function testCreateUpdateStructDecorator() + public function testCreateUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -41,7 +41,7 @@ public function testCreateUpdateStructDecorator() $decoratedService->createUpdateStruct(...$parameters); } - public function testFindUrlsDecorator() + public function testFindUrlsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -53,7 +53,7 @@ public function testFindUrlsDecorator() $decoratedService->findUrls(...$parameters); } - public function testFindUsagesDecorator() + public function testFindUsagesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -69,7 +69,7 @@ public function testFindUsagesDecorator() $decoratedService->findUsages(...$parameters); } - public function testLoadByIdDecorator() + public function testLoadByIdDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -81,7 +81,7 @@ public function testLoadByIdDecorator() $decoratedService->loadById(...$parameters); } - public function testLoadByUrlDecorator() + public function testLoadByUrlDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -93,7 +93,7 @@ public function testLoadByUrlDecorator() $decoratedService->loadByUrl(...$parameters); } - public function testUpdateUrlDecorator() + public function testUpdateUrlDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php index b0c7e05c7b..0cb812d720 100644 --- a/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php @@ -27,7 +27,7 @@ protected function createServiceMock(): MockObject return $this->createMock(URLWildcardService::class); } - public function testCreateDecorator() + public function testCreateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -43,7 +43,7 @@ public function testCreateDecorator() $decoratedService->create(...$parameters); } - public function testRemoveDecorator() + public function testRemoveDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -55,7 +55,7 @@ public function testRemoveDecorator() $decoratedService->remove(...$parameters); } - public function testLoadDecorator() + public function testLoadDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -67,7 +67,7 @@ public function testLoadDecorator() $decoratedService->load(...$parameters); } - public function testLoadAllDecorator() + public function testLoadAllDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -82,7 +82,7 @@ public function testLoadAllDecorator() $decoratedService->loadAll(...$parameters); } - public function testTranslateDecorator() + public function testTranslateDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php index 52943f41a9..f2282564cb 100644 --- a/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php @@ -26,7 +26,7 @@ protected function createServiceMock(): MockObject return $this->createMock(UserPreferenceService::class); } - public function testSetUserPreferenceDecorator() + public function testSetUserPreferenceDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -38,7 +38,7 @@ public function testSetUserPreferenceDecorator() $decoratedService->setUserPreference(...$parameters); } - public function testGetUserPreferenceDecorator() + public function testGetUserPreferenceDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -50,7 +50,7 @@ public function testGetUserPreferenceDecorator() $decoratedService->getUserPreference(...$parameters); } - public function testLoadUserPreferencesDecorator() + public function testLoadUserPreferencesDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -65,7 +65,7 @@ public function testLoadUserPreferencesDecorator() $decoratedService->loadUserPreferences(...$parameters); } - public function testGetUserPreferenceCountDecorator() + public function testGetUserPreferenceCountDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php index ba068a783e..668464c737 100644 --- a/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php +++ b/tests/lib/Repository/Decorator/UserServiceDecoratorTest.php @@ -43,7 +43,7 @@ protected function createServiceMock(): MockObject return $this->createMock(UserService::class); } - public function testCreateUserGroupDecorator() + public function testCreateUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -58,7 +58,7 @@ public function testCreateUserGroupDecorator() $decoratedService->createUserGroup(...$parameters); } - public function testLoadUserGroupDecorator() + public function testLoadUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -88,7 +88,7 @@ public function testLoadUserGroupByRemoteIdDecorator(): void $decoratedService->loadUserGroupByRemoteId(...$parameters); } - public function testLoadSubUserGroupsDecorator() + public function testLoadSubUserGroupsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -105,7 +105,7 @@ public function testLoadSubUserGroupsDecorator() $decoratedService->loadSubUserGroups(...$parameters); } - public function testDeleteUserGroupDecorator() + public function testDeleteUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -117,7 +117,7 @@ public function testDeleteUserGroupDecorator() $decoratedService->deleteUserGroup(...$parameters); } - public function testMoveUserGroupDecorator() + public function testMoveUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -132,7 +132,7 @@ public function testMoveUserGroupDecorator() $decoratedService->moveUserGroup(...$parameters); } - public function testUpdateUserGroupDecorator() + public function testUpdateUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -147,7 +147,7 @@ public function testUpdateUserGroupDecorator() $decoratedService->updateUserGroup(...$parameters); } - public function testCreateUserDecorator() + public function testCreateUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -162,7 +162,7 @@ public function testCreateUserDecorator() $decoratedService->createUser(...$parameters); } - public function testLoadUserDecorator() + public function testLoadUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -177,7 +177,7 @@ public function testLoadUserDecorator() $decoratedService->loadUser(...$parameters); } - public function testCheckUserCredentialsDecorator() + public function testCheckUserCredentialsDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -192,7 +192,7 @@ public function testCheckUserCredentialsDecorator() $decoratedService->checkUserCredentials(...$parameters); } - public function testLoadUserByLoginDecorator() + public function testLoadUserByLoginDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -207,7 +207,7 @@ public function testLoadUserByLoginDecorator() $decoratedService->loadUserByLogin(...$parameters); } - public function testLoadUsersByEmailDecorator() + public function testLoadUsersByEmailDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -222,7 +222,7 @@ public function testLoadUsersByEmailDecorator() $decoratedService->loadUsersByEmail(...$parameters); } - public function testLoadUserByTokenDecorator() + public function testLoadUserByTokenDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -237,7 +237,7 @@ public function testLoadUserByTokenDecorator() $decoratedService->loadUserByToken(...$parameters); } - public function testDeleteUserDecorator() + public function testDeleteUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -249,7 +249,7 @@ public function testDeleteUserDecorator() $decoratedService->deleteUser(...$parameters); } - public function testUpdateUserDecorator() + public function testUpdateUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -279,7 +279,7 @@ public function testUpdateUserPasswordDecorator(): void $decoratedService->updateUserPassword(...$parameters); } - public function testUpdateUserTokenDecorator() + public function testUpdateUserTokenDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -294,7 +294,7 @@ public function testUpdateUserTokenDecorator() $decoratedService->updateUserToken(...$parameters); } - public function testExpireUserTokenDecorator() + public function testExpireUserTokenDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -306,7 +306,7 @@ public function testExpireUserTokenDecorator() $decoratedService->expireUserToken(...$parameters); } - public function testAssignUserToUserGroupDecorator() + public function testAssignUserToUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -321,7 +321,7 @@ public function testAssignUserToUserGroupDecorator() $decoratedService->assignUserToUserGroup(...$parameters); } - public function testUnAssignUserFromUserGroupDecorator() + public function testUnAssignUserFromUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -336,7 +336,7 @@ public function testUnAssignUserFromUserGroupDecorator() $decoratedService->unAssignUserFromUserGroup(...$parameters); } - public function testLoadUserGroupsOfUserDecorator() + public function testLoadUserGroupsOfUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -353,7 +353,7 @@ public function testLoadUserGroupsOfUserDecorator() $decoratedService->loadUserGroupsOfUser(...$parameters); } - public function testLoadUsersOfUserGroupDecorator() + public function testLoadUsersOfUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -370,7 +370,7 @@ public function testLoadUsersOfUserGroupDecorator() $decoratedService->loadUsersOfUserGroup(...$parameters); } - public function testIsUserDecorator() + public function testIsUserDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -382,7 +382,7 @@ public function testIsUserDecorator() $decoratedService->isUser(...$parameters); } - public function testIsUserGroupDecorator() + public function testIsUserGroupDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -394,7 +394,7 @@ public function testIsUserGroupDecorator() $decoratedService->isUserGroup(...$parameters); } - public function testNewUserCreateStructDecorator() + public function testNewUserCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -412,7 +412,7 @@ public function testNewUserCreateStructDecorator() $decoratedService->newUserCreateStruct(...$parameters); } - public function testNewUserGroupCreateStructDecorator() + public function testNewUserGroupCreateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -427,7 +427,7 @@ public function testNewUserGroupCreateStructDecorator() $decoratedService->newUserGroupCreateStruct(...$parameters); } - public function testNewUserUpdateStructDecorator() + public function testNewUserUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -439,7 +439,7 @@ public function testNewUserUpdateStructDecorator() $decoratedService->newUserUpdateStruct(...$parameters); } - public function testNewUserGroupUpdateStructDecorator() + public function testNewUserGroupUpdateStructDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); @@ -451,7 +451,7 @@ public function testNewUserGroupUpdateStructDecorator() $decoratedService->newUserGroupUpdateStruct(...$parameters); } - public function testValidatePasswordDecorator() + public function testValidatePasswordDecorator(): void { $serviceMock = $this->createServiceMock(); $decoratedService = $this->createDecorator($serviceMock); diff --git a/tests/lib/Repository/Filtering/TestContentProvider.php b/tests/lib/Repository/Filtering/TestContentProvider.php index 703f272d97..443ebf3b4a 100644 --- a/tests/lib/Repository/Filtering/TestContentProvider.php +++ b/tests/lib/Repository/Filtering/TestContentProvider.php @@ -28,11 +28,9 @@ class TestContentProvider 'article3' => 'remote-id-article-3', ]; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; - /** @var \Ibexa\Tests\Integration\Core\Repository\BaseTest */ - private $testInstance; + private BaseTest $testInstance; public function __construct(Repository $repository, BaseTest $testInstance) { diff --git a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php index e28e538d0d..5048aa9e2f 100644 --- a/tests/lib/Repository/Helper/FieldTypeRegistryTest.php +++ b/tests/lib/Repository/Helper/FieldTypeRegistryTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\FieldType\FieldType; use Ibexa\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException; use Ibexa\Core\FieldType\FieldTypeRegistry; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -19,7 +20,7 @@ class FieldTypeRegistryTest extends TestCase { private const FIELD_TYPE_ID = 'one'; - public function testConstructor() + public function testConstructor(): void { $fieldType = $this->getFieldTypeMock(); $fieldTypes = [self::FIELD_TYPE_ID => $fieldType]; @@ -28,12 +29,12 @@ public function testConstructor() self::assertTrue($registry->hasFieldType(self::FIELD_TYPE_ID)); } - protected function getFieldTypeMock() + protected function getFieldTypeMock(): MockObject { return $this->createMock(FieldType::class); } - public function testGetFieldType() + public function testGetFieldType(): void { $fieldTypes = [ self::FIELD_TYPE_ID => $this->getFieldTypeMock(), @@ -49,7 +50,7 @@ public function testGetFieldType() ); } - public function testGetFieldTypeThrowsNotFoundException() + public function testGetFieldTypeThrowsNotFoundException(): void { $this->expectException(FieldTypeNotFoundException::class); @@ -58,7 +59,7 @@ public function testGetFieldTypeThrowsNotFoundException() $registry->getFieldType('none'); } - public function testGetFieldTypeThrowsRuntimeExceptionIncorrectType() + public function testGetFieldTypeThrowsRuntimeExceptionIncorrectType(): void { $this->expectException(\TypeError::class); @@ -71,7 +72,7 @@ public function testGetFieldTypeThrowsRuntimeExceptionIncorrectType() $registry->getFieldType('none'); } - public function testGetFieldTypes() + public function testGetFieldTypes(): void { $fieldTypes = [ self::FIELD_TYPE_ID => $this->getFieldTypeMock(), diff --git a/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php b/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php index ecaa88840f..52e9d0d343 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php +++ b/tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php @@ -14,11 +14,9 @@ final class BatchIteratorTestAdapter implements BatchIteratorAdapter { - /** @var array */ - private $data; + private array $data; - /** @var int */ - private $fetchCounter; + private int $fetchCounter; public function __construct(array $data) { diff --git a/tests/lib/Repository/LegacySchemaImporter.php b/tests/lib/Repository/LegacySchemaImporter.php index 9f298bd0dc..0480bb30cb 100644 --- a/tests/lib/Repository/LegacySchemaImporter.php +++ b/tests/lib/Repository/LegacySchemaImporter.php @@ -24,8 +24,7 @@ */ final class LegacySchemaImporter { - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; public function __construct(Connection $connection) { diff --git a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php index 1a100ef2f8..9701e31b4a 100644 --- a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php +++ b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php @@ -15,6 +15,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Core\Repository\LocationResolver\PermissionAwareLocationResolver; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -23,10 +24,10 @@ final class PermissionAwareLocationResolverTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private MockObject $locationService; /** @var \Ibexa\Core\Repository\LocationResolver\LocationResolver */ - private $locationResolver; + private PermissionAwareLocationResolver $locationResolver; public function setUp(): void { diff --git a/tests/lib/Repository/LocationServiceTest.php b/tests/lib/Repository/LocationServiceTest.php index 443e4020ab..d42fac48bb 100644 --- a/tests/lib/Repository/LocationServiceTest.php +++ b/tests/lib/Repository/LocationServiceTest.php @@ -23,7 +23,7 @@ final class LocationServiceTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $locationService; + private LocationService $locationService; protected function setUp(): void { diff --git a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php index 7904333c0c..db40899cd3 100644 --- a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php +++ b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php @@ -14,18 +14,19 @@ use Ibexa\Core\Repository\Mapper\ContentLocationMapper\ContentLocationMapper; use Ibexa\Core\Repository\Mapper\ContentLocationMapper\DecoratedLocationService; use Ibexa\Core\Repository\Values\Content\Location; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class DecoratedLocationServiceTest extends TestCase { /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\DecoratedLocationService */ - private $locationService; + private DecoratedLocationService $locationService; /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private $innerLocationService; + private MockObject $innerLocationService; /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\ContentLocationMapper */ - private $mapper; + private MockObject $mapper; protected function setUp(): void { diff --git a/tests/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapperTest.php b/tests/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapperTest.php index 516b201ed4..1b0fe6fbf3 100644 --- a/tests/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapperTest.php +++ b/tests/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapperTest.php @@ -14,7 +14,7 @@ class InMemoryContentLocationMapperTest extends TestCase { /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\ContentLocationMapper */ - private $mapper; + private InMemoryContentLocationMapper $mapper; protected function setUp(): void { diff --git a/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php b/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php index d0099d92dd..9786635e93 100644 --- a/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php +++ b/tests/lib/Repository/NameSchema/NameSchemaServiceTest.php @@ -327,7 +327,7 @@ protected function getFieldDefinitions(): APIFieldDefinitionCollection * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - protected function buildTestContentObject() + protected function buildTestContentObject(): Content { return new Content( [ diff --git a/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php b/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php index 96866bb90b..96d147e9a4 100644 --- a/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php +++ b/tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php @@ -24,12 +24,12 @@ class AllValidationErrorsOccur extends AbstractPHPUnitConstraint { /** @var string[] */ - private $expectedValidationErrorMessages; + private array $expectedValidationErrorMessages; /** * @var string[] */ - private $missingValidationErrorMessages = []; + private array $missingValidationErrorMessages = []; /** * @param string[] $expectedValidationErrorMessages diff --git a/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php b/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php index 3a76c7c053..14b46eac65 100644 --- a/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php +++ b/tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php @@ -19,8 +19,7 @@ class ContentItemEquals extends AbstractPHPUnitConstraint { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private $expectedContent; + private Content $expectedContent; public function __construct(Content $expectedContent) { diff --git a/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php b/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php index d27a1983a7..29a967687d 100644 --- a/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php +++ b/tests/lib/Repository/PHPUnitConstraint/ValidationErrorOccurs.php @@ -16,8 +16,7 @@ */ class ValidationErrorOccurs extends AllValidationErrorsOccur { - /** @var string */ - private $expectedValidationErrorMessage; + private string $expectedValidationErrorMessage; /** * @param string $expectedValidationErrorMessage diff --git a/tests/lib/Repository/Parallel/ParallelProcessList.php b/tests/lib/Repository/Parallel/ParallelProcessList.php index 60293d22a0..de1585d918 100644 --- a/tests/lib/Repository/Parallel/ParallelProcessList.php +++ b/tests/lib/Repository/Parallel/ParallelProcessList.php @@ -13,7 +13,7 @@ final class ParallelProcessList implements \IteratorAggregate { /** @var \Jenner\SimpleFork\Process[] */ - private $pool = []; + private array $pool = []; public function addProcess(Process $process): void { diff --git a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php index 81e50df53e..2df8be4afa 100644 --- a/tests/lib/Repository/Permission/CachedPermissionServiceTest.php +++ b/tests/lib/Repository/Permission/CachedPermissionServiceTest.php @@ -13,7 +13,7 @@ * * @return int */ -function time() +function time(): int|float { static $time = 1417624981; @@ -29,6 +29,7 @@ function time() use Ibexa\Contracts\Core\Repository\Values\User\UserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Core\Repository\Permission\CachedPermissionService; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -36,7 +37,7 @@ function time() */ class CachedPermissionServiceTest extends TestCase { - public function providerForTestPermissionResolverPassTrough() + public function providerForTestPermissionResolverPassTrough(): array { $valueObject = $this ->getMockBuilder(ValueObject::class) @@ -58,7 +59,7 @@ public function providerForTestPermissionResolverPassTrough() ['setCurrentUserReference', [$userRef], null], ['hasAccess', ['content', 'remove', $userRef], false], ['canUser', ['content', 'remove', $valueObject, [new \stdClass()]], true], - ['sudo', [static function () {}, $repository], null], + ['sudo', [static function (): void {}, $repository], null], ]; } @@ -71,7 +72,7 @@ public function providerForTestPermissionResolverPassTrough() * @param array $arguments * @param $expectedReturn */ - public function testPermissionResolverPassTrough($method, array $arguments, $expectedReturn) + public function testPermissionResolverPassTrough(string $method, array $arguments, (UserReference&MockObject)|bool|null $expectedReturn): void { if ($expectedReturn !== null) { $this->getPermissionResolverMock([$method]) @@ -92,7 +93,7 @@ public function testPermissionResolverPassTrough($method, array $arguments, $exp self::assertSame($expectedReturn, $actualReturn); } - public function testGetPermissionsCriterionPassTrough() + public function testGetPermissionsCriterionPassTrough(): void { $criterionMock = $this ->getMockBuilder(Criterion::class) @@ -111,7 +112,7 @@ public function testGetPermissionsCriterionPassTrough() self::assertSame($criterionMock, $actualReturn); } - public function testGetPermissionsCriterionCaching() + public function testGetPermissionsCriterionCaching(): void { $criterionMock = $this ->getMockBuilder(Criterion::class) @@ -169,7 +170,7 @@ public function testSetCurrentUserReferenceCacheClear(): void * * @return \Ibexa\Core\Repository\Permission\CachedPermissionService */ - protected function getCachedPermissionService($ttl = 5) + protected function getCachedPermissionService($ttl = 5): CachedPermissionService { return new CachedPermissionService( $this->getPermissionResolverMock(), @@ -178,9 +179,9 @@ protected function getCachedPermissionService($ttl = 5) ); } - protected $permissionResolverMock; + protected ?MockObject $permissionResolverMock = null; - protected function getPermissionResolverMock($methods = []) + protected function getPermissionResolverMock(?array $methods = []) { // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. if ($this->permissionResolverMock !== null) { @@ -194,9 +195,9 @@ protected function getPermissionResolverMock($methods = []) ->getMockForAbstractClass(); } - protected $permissionCriterionResolverMock; + protected ?MockObject $permissionCriterionResolverMock = null; - protected function getPermissionCriterionResolverMock($methods = []) + protected function getPermissionCriterionResolverMock(?array $methods = []) { // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. if ($this->permissionCriterionResolverMock !== null) { diff --git a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php index 693d62c45a..d40af91736 100644 --- a/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php +++ b/tests/lib/Repository/Permission/PermissionCriterionResolverTest.php @@ -10,12 +10,15 @@ use Ibexa\Contracts\Core\Limitation\Type; use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalOr; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Core\Limitation\TargetOnlyLimitationType; use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\Permission\PermissionCriterionResolver; use Ibexa\Core\Repository\Values\User\Policy; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; /** @@ -23,7 +26,7 @@ */ class PermissionCriterionResolverTest extends TestCase { - public function providerForTestGetPermissionsCriterion() + public function providerForTestGetPermissionsCriterion(): array { $criterionMock = $this ->getMockBuilder(Criterion::class) @@ -68,7 +71,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1, $policy1], ], ], - new Criterion\LogicalOr([$criterionMock, $criterionMock]), + new LogicalOr([$criterionMock, $criterionMock]), ], [ $criterionMock, @@ -90,7 +93,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy2], ], ], - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), ], [ $criterionMock, @@ -101,10 +104,10 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1, $policy2], ], ], - new Criterion\LogicalOr( + new LogicalOr( [ $criterionMock, - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), ] ), ], @@ -121,7 +124,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1], ], ], - new Criterion\LogicalOr([$criterionMock, $criterionMock]), + new LogicalOr([$criterionMock, $criterionMock]), ], [ $criterionMock, @@ -136,7 +139,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1, $policy1], ], ], - new Criterion\LogicalOr([$criterionMock, $criterionMock, $criterionMock]), + new LogicalOr([$criterionMock, $criterionMock, $criterionMock]), ], [ $criterionMock, @@ -151,9 +154,9 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1], ], ], - new Criterion\LogicalOr( + new LogicalOr( [ - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), $criterionMock, ] ), @@ -167,7 +170,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1], ], ], - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), ], [ $criterionMock, @@ -182,10 +185,10 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy1], ], ], - new Criterion\LogicalOr( + new LogicalOr( [ - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), ] ), ], @@ -213,7 +216,7 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [new Policy(['limitations' => []])], ], ], - new Criterion\LogicalOr([$criterionMock, $criterionMock]), + new LogicalOr([$criterionMock, $criterionMock]), ], [ $criterionMock, @@ -224,12 +227,12 @@ public function providerForTestGetPermissionsCriterion() 'policies' => [$policy3], ], ], - new Criterion\LogicalAnd([$criterionMock, $criterionMock]), + new LogicalAnd([$criterionMock, $criterionMock]), ], ]; } - protected function mockServices($criterionMock, $limitationCount, $permissionSets) + protected function mockServices($criterionMock, int $limitationCount, $permissionSets) { $userMock = $this->getMockBuilder(User::class)->getMockForAbstractClass(); $limitationServiceMock = $this->getLimitationServiceMock(['getLimitationType']); @@ -291,11 +294,11 @@ protected function mockServices($criterionMock, $limitationCount, $permissionSet * @dataProvider providerForTestGetPermissionsCriterion */ public function testGetPermissionsCriterion( - $criterionMock, - $limitationCount, - $permissionSets, - $expectedCriterion - ) { + MockObject&Criterion $criterionMock, + int $limitationCount, + array $permissionSets, + (Criterion&MockObject)|LogicalOr|bool|LogicalAnd $expectedCriterion + ): void { $this->mockServices($criterionMock, $limitationCount, $permissionSets); $criterionResolver = $this->getPermissionCriterionResolverMock(null); @@ -304,7 +307,7 @@ public function testGetPermissionsCriterion( self::assertEquals($expectedCriterion, $permissionsCriterion); } - public function providerForTestGetPermissionsCriterionBooleanPermissionSets() + public function providerForTestGetPermissionsCriterionBooleanPermissionSets(): array { return [ [true], @@ -317,7 +320,7 @@ public function providerForTestGetPermissionsCriterionBooleanPermissionSets() * * @dataProvider providerForTestGetPermissionsCriterionBooleanPermissionSets */ - public function testGetPermissionsCriterionBooleanPermissionSets($permissionSets) + public function testGetPermissionsCriterionBooleanPermissionSets(bool $permissionSets): void { $permissionResolverMock = $this->getPermissionResolverMock(['hasAccess']); $permissionResolverMock @@ -340,7 +343,7 @@ public function testGetPermissionsCriterionBooleanPermissionSets($permissionSets * * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Permission\PermissionCriterionResolver */ - protected function getPermissionCriterionResolverMock($methods = []) + protected function getPermissionCriterionResolverMock(?array $methods = []): MockObject { return $this ->getMockBuilder(PermissionCriterionResolver::class) @@ -354,9 +357,9 @@ protected function getPermissionCriterionResolverMock($methods = []) ->getMock(); } - protected $permissionResolverMock; + protected ?MockObject $permissionResolverMock = null; - protected function getPermissionResolverMock($methods = []) + protected function getPermissionResolverMock(?array $methods = []) { // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. if ($this->permissionResolverMock !== null) { @@ -370,9 +373,9 @@ protected function getPermissionResolverMock($methods = []) ->getMockForAbstractClass(); } - protected $limitationServiceMock; + protected ?MockObject $limitationServiceMock = null; - protected function getLimitationServiceMock($methods = []) + protected function getLimitationServiceMock(?array $methods = []) { // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. if ($this->limitationServiceMock !== null) { diff --git a/tests/lib/Repository/Service/Mock/Base.php b/tests/lib/Repository/Service/Mock/Base.php index cf37026ee1..9dbfea1349 100644 --- a/tests/lib/Repository/Service/Mock/Base.php +++ b/tests/lib/Repository/Service/Mock/Base.php @@ -49,20 +49,19 @@ */ abstract class Base extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private ?Repository $repository = null; /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private $repositoryMock; + private ?MockObject $repositoryMock = null; /** @var \Ibexa\Contracts\Core\Repository\PermissionService|\PHPUnit\Framework\MockObject\MockObject */ - private $permissionServiceMock; + private ?MockObject $permissionServiceMock = null; /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $persistenceMock; + private ?MockObject $persistenceMock = null; /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy|\PHPUnit\Framework\MockObject\MockObject */ - private $thumbnailStrategyMock; + private ?MockObject $thumbnailStrategyMock = null; /** * The Content / Location / Search ... handlers for the persistence / Search / .. handler mocks. @@ -71,22 +70,22 @@ abstract class Base extends TestCase * * @see getPersistenceMockHandler() */ - private $spiMockHandlers = []; + private array $spiMockHandlers = []; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper */ - private $contentTypeDomainMapperMock; + private ?MockObject $contentTypeDomainMapperMock = null; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - private $contentDomainMapperMock; + private ?MockObject $contentDomainMapperMock = null; /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Permission\LimitationService */ - private $limitationServiceMock; + private ?MockObject $limitationServiceMock = null; /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver|\PHPUnit\Framework\MockObject\MockObject */ - private $languageResolverMock; + private ?MockObject $languageResolverMock = null; /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper|\PHPUnit\Framework\MockObject\MockObject */ - protected $roleDomainMapperMock; + protected ?MockObject $roleDomainMapperMock = null; /** @var \Ibexa\Core\Repository\Mapper\ContentMapper|\PHPUnit\Framework\MockObject\MockObject */ protected $contentMapperMock; @@ -95,10 +94,10 @@ abstract class Base extends TestCase protected $contentValidatorStrategyMock; /** @var \Ibexa\Contracts\Core\Persistence\Filter\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $contentFilteringHandlerMock; + private ?MockObject $contentFilteringHandlerMock = null; /** @var \Ibexa\Contracts\Core\Persistence\Filter\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $locationFilteringHandlerMock; + private ?MockObject $locationFilteringHandlerMock = null; private TransactionHandler&MockObject $transactionHandlerMock; @@ -148,7 +147,7 @@ protected function getRepository(array $serviceSettings = []) return $this->repository; } - protected $fieldTypeServiceMock; + protected ?MockObject $fieldTypeServiceMock = null; /** * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\FieldTypeService @@ -162,7 +161,7 @@ protected function getFieldTypeServiceMock() return $this->fieldTypeServiceMock; } - protected $fieldTypeRegistryMock; + protected ?MockObject $fieldTypeRegistryMock = null; /** * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\FieldType\FieldTypeRegistry diff --git a/tests/lib/Repository/Service/Mock/BookmarkTest.php b/tests/lib/Repository/Service/Mock/BookmarkTest.php index ec5e1c4937..531699c447 100644 --- a/tests/lib/Repository/Service/Mock/BookmarkTest.php +++ b/tests/lib/Repository/Service/Mock/BookmarkTest.php @@ -52,7 +52,7 @@ protected function setUp(): void /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::createBookmark */ - public function testCreateBookmark() + public function testCreateBookmark(): void { $location = $this->createLocation(self::LOCATION_ID); @@ -64,11 +64,11 @@ public function testCreateBookmark() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); - $this->assertTransactionIsCommitted(function () { + $this->assertTransactionIsCommitted(function (): void { $this->bookmarkHandler ->expects($this->once()) ->method('create') - ->willReturnCallback(function (CreateStruct $createStruct) { + ->willReturnCallback(function (CreateStruct $createStruct): Bookmark { $this->assertEquals(self::LOCATION_ID, $createStruct->locationId); $this->assertEquals(self::CURRENT_USER_ID, $createStruct->userId); @@ -82,7 +82,7 @@ public function testCreateBookmark() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::createBookmark */ - public function testCreateBookmarkThrowsInvalidArgumentException() + public function testCreateBookmarkThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -96,7 +96,7 @@ public function testCreateBookmarkThrowsInvalidArgumentException() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => new Bookmark()]); - $this->assertTransactionIsNotStarted(function () { + $this->assertTransactionIsNotStarted(function (): void { $this->bookmarkHandler->expects($this->never())->method('create'); }); @@ -106,9 +106,9 @@ public function testCreateBookmarkThrowsInvalidArgumentException() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::createBookmark */ - public function testCreateBookmarkWithRollback() + public function testCreateBookmarkWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $location = $this->createLocation(self::LOCATION_ID); @@ -120,7 +120,7 @@ public function testCreateBookmarkWithRollback() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); - $this->assertTransactionIsRollback(function () { + $this->assertTransactionIsRollback(function (): void { $this->bookmarkHandler ->expects($this->once()) ->method('create') @@ -133,7 +133,7 @@ public function testCreateBookmarkWithRollback() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::deleteBookmark */ - public function testDeleteBookmarkExisting() + public function testDeleteBookmarkExisting(): void { $location = $this->createLocation(self::LOCATION_ID); @@ -147,7 +147,7 @@ public function testDeleteBookmarkExisting() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => $bookmark]); - $this->assertTransactionIsCommitted(function () use ($bookmark) { + $this->assertTransactionIsCommitted(function () use ($bookmark): void { $this->bookmarkHandler ->expects($this->once()) ->method('delete') @@ -160,9 +160,9 @@ public function testDeleteBookmarkExisting() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::deleteBookmark */ - public function testDeleteBookmarkWithRollback() + public function testDeleteBookmarkWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $location = $this->createLocation(self::LOCATION_ID); @@ -174,7 +174,7 @@ public function testDeleteBookmarkWithRollback() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([self::LOCATION_ID => new Bookmark(['id' => self::BOOKMARK_ID])]); - $this->assertTransactionIsRollback(function () { + $this->assertTransactionIsRollback(function (): void { $this->bookmarkHandler ->expects($this->once()) ->method('delete') @@ -187,7 +187,7 @@ public function testDeleteBookmarkWithRollback() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::deleteBookmark */ - public function testDeleteBookmarkNonExisting() + public function testDeleteBookmarkNonExisting(): void { $this->expectException(InvalidArgumentException::class); @@ -201,7 +201,7 @@ public function testDeleteBookmarkNonExisting() ->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) ->willReturn([]); - $this->assertTransactionIsNotStarted(function () { + $this->assertTransactionIsNotStarted(function (): void { $this->bookmarkHandler->expects($this->never())->method('delete'); }); @@ -211,13 +211,13 @@ public function testDeleteBookmarkNonExisting() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::loadBookmarks */ - public function testLoadBookmarks() + public function testLoadBookmarks(): void { $offset = 0; $limit = 25; $expectedTotalCount = 10; - $expectedItems = array_map(function ($locationId) { + $expectedItems = array_map(function ($locationId): Location { return $this->createLocation($locationId); }, range(1, $expectedTotalCount)); @@ -231,7 +231,7 @@ public function testLoadBookmarks() ->expects(self::once()) ->method('loadUserBookmarks') ->with(self::CURRENT_USER_ID, $offset, $limit) - ->willReturn(array_map(static function ($locationId) { + ->willReturn(array_map(static function ($locationId): Bookmark { return new Bookmark(['locationId' => $locationId]); }, range(1, $expectedTotalCount))); @@ -239,7 +239,7 @@ public function testLoadBookmarks() $locationServiceMock ->expects(self::exactly($expectedTotalCount)) ->method('loadLocation') - ->willReturnCallback(function ($locationId) { + ->willReturnCallback(function ($locationId): Location { return $this->createLocation($locationId); }); @@ -258,7 +258,7 @@ public function testLoadBookmarks() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::loadBookmarks */ - public function testLoadBookmarksEmptyList() + public function testLoadBookmarksEmptyList(): void { $this->bookmarkHandler ->expects(self::once()) @@ -279,7 +279,7 @@ public function testLoadBookmarksEmptyList() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::isBookmarked */ - public function testLocationShouldNotBeBookmarked() + public function testLocationShouldNotBeBookmarked(): void { $this->bookmarkHandler ->expects(self::once()) @@ -293,7 +293,7 @@ public function testLocationShouldNotBeBookmarked() /** * @covers \Ibexa\Contracts\Core\Repository\BookmarkService::isBookmarked */ - public function testLocationShouldBeBookmarked() + public function testLocationShouldBeBookmarked(): void { $this->bookmarkHandler ->expects(self::once()) @@ -361,7 +361,7 @@ private function createLocation(int $id = self::CURRENT_USER_ID, string $name = /** * @return \Ibexa\Contracts\Core\Repository\BookmarkService|\PHPUnit\Framework\MockObject\MockObject */ - private function createBookmarkService(array $methods = null) + private function createBookmarkService(array $methods = null): MockObject { return $this ->getMockBuilder(BookmarkService::class) diff --git a/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php b/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php index 7eba82e583..2d5fb51e45 100644 --- a/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php +++ b/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php @@ -47,7 +47,7 @@ final class ContentDomainMapperTest extends BaseServiceMockTest /** * @dataProvider providerForBuildVersionInfo */ - public function testBuildVersionInfo(SPIVersionInfo $spiVersionInfo) + public function testBuildVersionInfo(SPIVersionInfo $spiVersionInfo): void { $languageHandlerMock = $this->getLanguageHandlerMock(); $languageHandlerMock->expects(self::never())->method('load'); @@ -57,7 +57,7 @@ public function testBuildVersionInfo(SPIVersionInfo $spiVersionInfo) self::assertInstanceOf(APIVersionInfo::class, $versionInfo); } - public function testBuildLocationWithContentForRootLocation() + public function testBuildLocationWithContentForRootLocation(): void { $spiRootLocation = new Location(['id' => 1, 'parentId' => 1]); $apiRootLocation = $this->getContentDomainMapper()->buildLocationWithContent($spiRootLocation, null); @@ -100,7 +100,7 @@ public function testBuildLocationWithContentForRootLocation() self::assertEquals($expectedContent, $apiRootLocation->getContent()); } - public function testBuildLocationWithContentThrowsInvalidArgumentException() + public function testBuildLocationWithContentThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$content\' is invalid: Location 2 has missing Content'); @@ -110,7 +110,7 @@ public function testBuildLocationWithContentThrowsInvalidArgumentException() $this->getContentDomainMapper()->buildLocationWithContent($nonRootLocation, null); } - public function testBuildLocationWithContentIsAlignedWithBuildLocation() + public function testBuildLocationWithContentIsAlignedWithBuildLocation(): void { $spiRootLocation = new Location(['id' => 1, 'parentId' => 1]); @@ -148,7 +148,7 @@ public function testBuildDomainFieldsDeprecatedBehavior(): void $this->getContentDomainMapper()->buildDomainFields($persistenceFields, $persistenceContentType); } - public function providerForBuildVersionInfo() + public function providerForBuildVersionInfo(): array { $properties = [ 'contentInfo' => new SPIContentInfo([ @@ -202,7 +202,7 @@ public function providerForBuildVersionInfo() ]; } - public function providerForBuildLocationDomainObjectsOnSearchResult() + public function providerForBuildLocationDomainObjectsOnSearchResult(): array { $properties = [ 'contentTypeId' => self::EXAMPLE_CONTENT_TYPE_ID, @@ -262,7 +262,7 @@ public function testBuildLocationDomainObjectsOnSearchResult( array $languageFilter, array $contentInfoList, int $missing - ) { + ): void { $contentHandlerMock = $this->getContentHandlerMock(); $contentHandlerMock ->expects(self::once()) diff --git a/tests/lib/Repository/Service/Mock/ContentTest.php b/tests/lib/Repository/Service/Mock/ContentTest.php index 6fbb5bb9f2..5afd13c66f 100644 --- a/tests/lib/Repository/Service/Mock/ContentTest.php +++ b/tests/lib/Repository/Service/Mock/ContentTest.php @@ -59,6 +59,7 @@ use Ibexa\Core\Repository\Values\ContentType\FieldDefinitionCollection; use Ibexa\Core\Repository\Values\User\UserReference; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * Mock test case for Content service. @@ -111,7 +112,7 @@ public function testConstructor(): void * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoById() + public function testLoadVersionInfoById(): void { $contentServiceMock = $this->getPartlyMockedContentService(['loadContentInfo']); /** @var \PHPUnit\Framework\MockObject\MockObject $contentHandler */ @@ -161,7 +162,7 @@ public function testLoadVersionInfoById() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoByIdAndVersionNumber() + public function testLoadVersionInfoByIdAndVersionNumber(): void { $permissionResolver = $this->getPermissionResolverMock(); $contentServiceMock = $this->getPartlyMockedContentService(['loadContentInfo']); @@ -208,7 +209,7 @@ public function testLoadVersionInfoByIdAndVersionNumber() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoByIdThrowsNotFoundException() + public function testLoadVersionInfoByIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -241,7 +242,7 @@ public function testLoadVersionInfoByIdThrowsNotFoundException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion() + public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion(): void { $this->expectException(UnauthorizedException::class); @@ -286,7 +287,7 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVe * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoByIdPublishedVersion() + public function testLoadVersionInfoByIdPublishedVersion(): void { $contentServiceMock = $this->getPartlyMockedContentService(); /** @var \PHPUnit\Framework\MockObject\MockObject $contentHandler */ @@ -331,7 +332,7 @@ public function testLoadVersionInfoByIdPublishedVersion() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ - public function testLoadVersionInfoByIdNonPublishedVersion() + public function testLoadVersionInfoByIdNonPublishedVersion(): void { $contentServiceMock = $this->getPartlyMockedContentService(); /** @var \PHPUnit\Framework\MockObject\MockObject $contentHandler */ @@ -382,7 +383,7 @@ public function testLoadVersionInfoByIdNonPublishedVersion() * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdPublishedVersion * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdNonPublishedVersion */ - public function testLoadVersionInfo() + public function testLoadVersionInfo(): void { $expectedResult = $this->createMock(VersionInfo::class); @@ -408,7 +409,7 @@ public function testLoadVersionInfo() self::assertEquals($expectedResult, $result); } - public function testLoadContent() + public function testLoadContent(): void { $contentService = $this->getPartlyMockedContentService(['internalLoadContentById']); $content = $this->createMock(APIContent::class); @@ -439,7 +440,7 @@ public function testLoadContent() self::assertSame($content, $contentService->loadContent($contentId)); } - public function testLoadContentNonPublished() + public function testLoadContentNonPublished(): void { $contentService = $this->getPartlyMockedContentService(['internalLoadContentById']); $content = $this->createMock(APIContent::class); @@ -472,7 +473,7 @@ public function testLoadContentNonPublished() self::assertSame($content, $contentService->loadContent($contentId)); } - public function testLoadContentUnauthorized() + public function testLoadContentUnauthorized(): void { $this->expectException(UnauthorizedException::class); @@ -496,7 +497,7 @@ public function testLoadContentUnauthorized() $contentService->loadContent($contentId); } - public function testLoadContentNotPublishedStatusUnauthorized() + public function testLoadContentNotPublishedStatusUnauthorized(): void { $permissionResolver = $this->getPermissionResolverMock(); $contentService = $this->getPartlyMockedContentService(['internalLoadContentById']); @@ -576,7 +577,7 @@ public function testInternalLoadContentById(int $id, ?array $languages, ?int $ve /** * @dataProvider internalLoadContentProviderByRemoteId */ - public function testInternalLoadContentByRemoteId(string $remoteId, ?array $languages, ?int $versionNo, bool $useAlwaysAvailable) + public function testInternalLoadContentByRemoteId(string $remoteId, ?array $languages, ?int $versionNo, bool $useAlwaysAvailable): void { $realId = 123; @@ -658,7 +659,7 @@ public function testInternalLoadContentByIdNotFound(): void ->expects(self::once()) ->method('loadContentInfo') ->with($id) - ->willReturn(new SPIContent\ContentInfo(['id' => $id])); + ->willReturn(new SPIContentInfo(['id' => $id])); $contentHandler ->expects(self::once()) @@ -689,7 +690,7 @@ public function testInternalLoadContentByRemoteIdNotFound(): void ->expects(self::once()) ->method('loadContentInfoByRemoteId') ->with($remoteId) - ->willReturn(new SPIContent\ContentInfo(['id' => $id])); + ->willReturn(new SPIContentInfo(['id' => $id])); $contentHandler ->expects(self::once()) @@ -708,7 +709,7 @@ public function testInternalLoadContentByRemoteIdNotFound(): void * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo */ - public function testLoadContentByContentInfo() + public function testLoadContentByContentInfo(): void { $versionInfo = $this->createMock(APIVersionInfo::class); $content = $this->createMock(APIContent::class); @@ -750,7 +751,7 @@ public function testLoadContentByContentInfo() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo */ - public function testLoadContentByVersionInfo() + public function testLoadContentByVersionInfo(): void { $expectedResult = $this->createMock(Content::class); @@ -788,7 +789,7 @@ public function testLoadContentByVersionInfo() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent */ - public function testDeleteContentThrowsUnauthorizedException() + public function testDeleteContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -837,7 +838,7 @@ public function testDeleteContentThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent */ - public function testDeleteContent() + public function testDeleteContent(): void { $repository = $this->getRepositoryMock(); $permissionResolver = $this->getPermissionResolverMock(); @@ -913,9 +914,9 @@ public function testDeleteContent() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent */ - public function testDeleteContentWithRollback() + public function testDeleteContentWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $repository = $this->getRepositoryMock(); $permissionResolver = $this->getPermissionResolverMock(); @@ -963,7 +964,7 @@ public function testDeleteContentWithRollback() $locationHandler->expects(self::once()) ->method('loadLocationsByContent') ->with(42) - ->will(self::throwException(new \Exception())); + ->will(self::throwException(new Exception())); $repository->expects(self::once())->method('rollback'); @@ -976,7 +977,7 @@ public function testDeleteContentWithRollback() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion */ - public function testDeleteVersionThrowsBadStateExceptionLastVersion() + public function testDeleteVersionThrowsBadStateExceptionLastVersion(): void { $this->expectException(BadStateException::class); @@ -1035,7 +1036,7 @@ public function testDeleteVersionThrowsBadStateExceptionLastVersion() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet() + public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: the \'mainLanguageCode\' property must be set'); @@ -1049,7 +1050,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeN * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet() + public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: the \'contentType\' property must be set'); @@ -1066,7 +1067,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet * * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentThrowsUnauthorizedException() + public function testCreateContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -1130,7 +1131,7 @@ public function testCreateContentThrowsUnauthorizedException() * * @exceptionMessage Argument '$contentCreateStruct' is invalid: Another content with remoteId 'faraday' exists */ - public function testCreateContentThrowsInvalidArgumentExceptionDuplicateRemoteId() + public function testCreateContentThrowsInvalidArgumentExceptionDuplicateRemoteId(): void { $this->expectException(InvalidArgumentException::class); @@ -1201,7 +1202,7 @@ public function testCreateContentThrowsInvalidArgumentExceptionDuplicateRemoteId * * @return array */ - protected function mapStructFieldsForCreate($mainLanguageCode, $structFields, $fieldDefinitions) + protected function mapStructFieldsForCreate($mainLanguageCode, $structFields, $fieldDefinitions): array { $mappedFieldDefinitions = []; foreach ($fieldDefinitions as $fieldDefinition) { @@ -1447,9 +1448,9 @@ static function (ValueStub $value): string { $spiContent = new SPIContent( [ - 'versionInfo' => new SPIContent\VersionInfo( + 'versionInfo' => new SPIVersionInfo( [ - 'contentInfo' => new SPIContent\ContentInfo(['id' => 42]), + 'contentInfo' => new SPIContentInfo(['id' => 42]), 'versionNo' => 7, ] ), @@ -1476,7 +1477,7 @@ static function (ValueStub $value): string { return $contentCreateStruct; } - public function providerForTestCreateContentNonRedundantFieldSet1() + public function providerForTestCreateContentNonRedundantFieldSet1(): array { $spiFields = [ new SPIField( @@ -1534,7 +1535,7 @@ public function providerForTestCreateContentNonRedundantFieldSet1() * * @dataProvider providerForTestCreateContentNonRedundantFieldSet1 */ - public function testCreateContentNonRedundantFieldSet1($mainLanguageCode, $structFields, $spiFields) + public function testCreateContentNonRedundantFieldSet1(string $mainLanguageCode, array $structFields, array $spiFields): void { $fieldDefinitions = [ new FieldDefinition( @@ -1557,7 +1558,7 @@ public function testCreateContentNonRedundantFieldSet1($mainLanguageCode, $struc ); } - public function providerForTestCreateContentNonRedundantFieldSet2() + public function providerForTestCreateContentNonRedundantFieldSet2(): array { $spiFields = [ new SPIField( @@ -1637,7 +1638,7 @@ public function providerForTestCreateContentNonRedundantFieldSet2() * * @dataProvider providerForTestCreateContentNonRedundantFieldSet2 */ - public function testCreateContentNonRedundantFieldSet2($mainLanguageCode, $structFields, $spiFields) + public function testCreateContentNonRedundantFieldSet2(string $mainLanguageCode, array $structFields, array $spiFields): void { $fieldDefinitions = [ new FieldDefinition( @@ -1670,7 +1671,7 @@ public function testCreateContentNonRedundantFieldSet2($mainLanguageCode, $struc ); } - public function providerForTestCreateContentNonRedundantFieldSetComplex() + public function providerForTestCreateContentNonRedundantFieldSetComplex(): array { $spiFields0 = [ new SPIField( @@ -1791,7 +1792,7 @@ public function providerForTestCreateContentNonRedundantFieldSetComplex() ]; } - protected function fixturesForTestCreateContentNonRedundantFieldSetComplex() + protected function fixturesForTestCreateContentNonRedundantFieldSetComplex(): array { return [ new FieldDefinition( @@ -1850,7 +1851,7 @@ protected function fixturesForTestCreateContentNonRedundantFieldSetComplex() * * @dataProvider providerForTestCreateContentNonRedundantFieldSetComplex */ - public function testCreateContentNonRedundantFieldSetComplex($mainLanguageCode, $structFields, $spiFields) + public function testCreateContentNonRedundantFieldSetComplex(string $mainLanguageCode, array $structFields, array $spiFields): void { $fieldDefinitions = $this->fixturesForTestCreateContentNonRedundantFieldSetComplex(); @@ -1862,7 +1863,7 @@ public function testCreateContentNonRedundantFieldSetComplex($mainLanguageCode, ); } - public function providerForTestCreateContentWithInvalidLanguage() + public function providerForTestCreateContentWithInvalidLanguage(): array { return [ [ @@ -1900,7 +1901,7 @@ public function providerForTestCreateContentWithInvalidLanguage() * * @dataProvider providerForTestCreateContentWithInvalidLanguage */ - public function testCreateContentWithInvalidLanguage($mainLanguageCode, $structFields) + public function testCreateContentWithInvalidLanguage(string $mainLanguageCode, array $structFields): void { $this->expectException(APINotFoundException::class); $this->expectExceptionMessage('Could not find \'Language\' with identifier \'Klingon\''); @@ -1949,7 +1950,7 @@ public function testCreateContentWithInvalidLanguage($mainLanguageCode, $structF ->with(self::isType('string')) ->will( self::returnCallback( - static function ($languageCode) { + static function ($languageCode): Language { if ($languageCode === 'Klingon') { throw new NotFoundException('Language', 'Klingon'); } @@ -2017,7 +2018,7 @@ protected function assertForCreateContentContentValidationException( ->method('acceptValue') ->will( self::returnCallback( - static function ($valueString) { + static function ($valueString): ValueStub { return new ValueStub($valueString); } ) @@ -2071,7 +2072,7 @@ static function ($valueString) { $mockedService->createContent($contentCreateStruct, []); } - public function providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition() + public function providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition(): array { return [ [ @@ -2098,7 +2099,7 @@ public function providerForTestCreateContentThrowsContentValidationExceptionFiel * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition */ - public function testCreateContentThrowsContentValidationExceptionFieldDefinition($mainLanguageCode, $structFields) + public function testCreateContentThrowsContentValidationExceptionFieldDefinition(string $mainLanguageCode, array $structFields): void { $this->expectException(ContentValidationException::class); $this->expectExceptionMessage('Field definition \'identifier\' does not exist in the given content type'); @@ -2110,7 +2111,7 @@ public function testCreateContentThrowsContentValidationExceptionFieldDefinition ); } - public function providerForTestCreateContentThrowsContentValidationExceptionTranslation() + public function providerForTestCreateContentThrowsContentValidationExceptionTranslation(): array { return [ [ @@ -2137,7 +2138,7 @@ public function providerForTestCreateContentThrowsContentValidationExceptionTran * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionTranslation */ - public function testCreateContentThrowsContentValidationExceptionTranslation($mainLanguageCode, $structFields) + public function testCreateContentThrowsContentValidationExceptionTranslation(string $mainLanguageCode, array $structFields): void { $this->expectException(ContentValidationException::class); $this->expectExceptionMessage('You cannot set a value for the non-translatable Field definition \'identifier\' in language \'eng-US\''); @@ -2186,9 +2187,9 @@ private function provideCommonCreateContentObjects(array $fieldDefinitions, arra } private function commonContentCreateMocks( - \PHPUnit\Framework\MockObject\MockObject $languageHandlerMock, - \PHPUnit\Framework\MockObject\MockObject $contentTypeServiceMock, - \PHPUnit\Framework\MockObject\MockObject $repositoryMock, + MockObject $languageHandlerMock, + MockObject $contentTypeServiceMock, + Repository $repositoryMock, ContentType $contentType ): void { $this->loadByLanguageCodeMock($languageHandlerMock); @@ -2203,14 +2204,14 @@ private function commonContentCreateMocks( ->will(self::returnValue($contentTypeServiceMock)); } - private function loadByLanguageCodeMock(\PHPUnit\Framework\MockObject\MockObject $languageHandlerMock): void + private function loadByLanguageCodeMock(MockObject $languageHandlerMock): void { $languageHandlerMock->expects(self::any()) ->method('loadByLanguageCode') ->with(self::isType('string')) ->will( self::returnCallback( - static function () { + static function (): Language { return new Language(['id' => 4242]); } ) @@ -2289,7 +2290,7 @@ static function () use ($that, $contentCreateStruct): bool { return $contentCreateStruct; } - public function providerForTestCreateContentThrowsContentValidationExceptionRequiredField() + public function providerForTestCreateContentThrowsContentValidationExceptionRequiredField(): array { return [ [ @@ -2319,11 +2320,11 @@ public function providerForTestCreateContentThrowsContentValidationExceptionRequ * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionRequiredField */ public function testCreateContentRequiredField( - $mainLanguageCode, - $structFields, - $identifier, - $languageCode - ) { + string $mainLanguageCode, + array $structFields, + string $identifier, + string $languageCode + ): void { $this->expectException(ContentFieldValidationException::class); $fieldDefinitions = [ @@ -2454,7 +2455,7 @@ static function () use ($that, $contentCreateStruct): bool { ->method('acceptValue') ->will( self::returnCallback( - static function ($value) { + static function ($value): SPIValue { return $value instanceof SPIValue ? $value : new ValueStub($value); @@ -2506,7 +2507,7 @@ public function providerForTestCreateContentThrowsContentFieldValidationExceptio * * @dataProvider providerForTestCreateContentThrowsContentFieldValidationException */ - public function testCreateContentThrowsContentFieldValidationException($mainLanguageCode, $structFields): void + public function testCreateContentThrowsContentFieldValidationException($mainLanguageCode, array $structFields): void { $this->expectException(ContentFieldValidationException::class); $this->expectExceptionMessage('Content fields did not validate'); @@ -2529,36 +2530,36 @@ public function testCreateContentThrowsContentFieldValidationException($mainLang } } - private function acceptFieldTypeValueMock(\PHPUnit\Framework\MockObject\MockObject $fieldTypeMock): void + private function acceptFieldTypeValueMock(MockObject $fieldTypeMock): void { $fieldTypeMock->expects(self::any()) ->method('acceptValue') ->will( self::returnCallback( - static function ($valueString) { + static function ($valueString): ValueStub { return new ValueStub($valueString); } ) ); } - private function toHashFieldTypeMock(\PHPUnit\Framework\MockObject\MockObject $fieldTypeMock): void + private function toHashFieldTypeMock(MockObject $fieldTypeMock): void { $fieldTypeMock ->method('toHash') - ->willReturnCallback(static function (SPIValue $value) { + ->willReturnCallback(static function (SPIValue $value): array { return ['value' => $value->value]; }); } - private function getFieldTypeFieldTypeRegistryMock(\PHPUnit\Framework\MockObject\MockObject $fieldTypeMock): void + private function getFieldTypeFieldTypeRegistryMock(MockObject $fieldTypeMock): void { $this->getFieldTypeRegistryMock()->expects(self::any()) ->method('getFieldType') ->will(self::returnValue($fieldTypeMock)); } - private function isEmptyValueFieldTypeMock(\PHPUnit\Framework\MockObject\MockObject $fieldTypeMock): void + private function isEmptyValueFieldTypeMock(MockObject $fieldTypeMock): void { $emptyValue = new ValueStub(self::EMPTY_FIELD_VALUE); $fieldTypeMock->expects(self::any()) @@ -2573,7 +2574,7 @@ static function (ValueStub $value) use ($emptyValue): bool { } private function getUniqueHashDomainMapperMock( - \PHPUnit\Framework\MockObject\MockObject $domainMapperMock, + MockObject $domainMapperMock, self $that, ContentCreateStruct $contentCreateStruct ): void { @@ -2599,7 +2600,7 @@ static function ($object) use ($that, $contentCreateStruct): string { * @covers \Ibexa\Contracts\Core\Repository\ContentService::buildSPILocationCreateStructs * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentWithLocations() + public function testCreateContentWithLocations(): void { $spiFields = [ new SPIField( @@ -2702,9 +2703,9 @@ public function testCreateContentWithLocations() $spiContent = new SPIContent( [ - 'versionInfo' => new SPIContent\VersionInfo( + 'versionInfo' => new SPIVersionInfo( [ - 'contentInfo' => new SPIContent\ContentInfo(['id' => 42]), + 'contentInfo' => new SPIContentInfo(['id' => 42]), 'versionNo' => 7, ] ), @@ -2738,7 +2739,7 @@ public function testCreateContentWithLocations() * @covers \Ibexa\Contracts\Core\Repository\ContentService::buildSPILocationCreateStructs * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentWithLocationsDuplicateUnderParent() + public function testCreateContentWithLocationsDuplicateUnderParent(): void { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('You provided multiple LocationCreateStructs with the same parent Location \'321\''); @@ -2798,7 +2799,7 @@ public function testCreateContentWithLocationsDuplicateUnderParent() ->with(self::isType('string')) ->will( self::returnCallback( - static function () { + static function (): Language { return new Language(['id' => 4242]); } ) @@ -2809,7 +2810,7 @@ static function () { ->method('acceptValue') ->will( self::returnCallback( - static function ($valueString) { + static function ($valueString): ValueStub { return new ValueStub($valueString); } ) @@ -2883,7 +2884,7 @@ static function ($object) use ($that, $contentCreateStruct): string { ->method('acceptValue') ->will( self::returnCallback( - static function ($valueString) { + static function ($valueString): ValueStub { return new ValueStub($valueString); } ) @@ -2907,7 +2908,7 @@ static function ($valueString) { * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ - public function testCreateContentObjectStates() + public function testCreateContentObjectStates(): void { $spiFields = [ new SPIField( @@ -2977,9 +2978,9 @@ public function testCreateContentObjectStates() $spiContent = new SPIContent( [ - 'versionInfo' => new SPIContent\VersionInfo( + 'versionInfo' => new SPIVersionInfo( [ - 'contentInfo' => new SPIContent\ContentInfo(['id' => 42]), + 'contentInfo' => new SPIContentInfo(['id' => 42]), 'versionNo' => 7, ] ), @@ -3015,9 +3016,9 @@ public function testCreateContentObjectStates() * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionTranslation */ - public function testCreateContentWithRollback() + public function testCreateContentWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Store failed'); $fieldDefinitions = [ @@ -3054,13 +3055,13 @@ public function testCreateContentWithRollback() $contentHandlerMock->expects(self::once()) ->method('create') ->with(self::anything()) - ->will(self::throwException(new \Exception('Store failed'))); + ->will(self::throwException(new Exception('Store failed'))); // Execute $this->partlyMockedContentService->createContent($contentCreateStruct, []); } - public function providerForTestUpdateContentThrowsBadStateException() + public function providerForTestUpdateContentThrowsBadStateException(): array { return [ [VersionInfo::STATUS_PUBLISHED], @@ -3075,7 +3076,7 @@ public function providerForTestUpdateContentThrowsBadStateException() * * @dataProvider providerForTestUpdateContentThrowsBadStateException */ - public function testUpdateContentThrowsBadStateException($status) + public function testUpdateContentThrowsBadStateException(int $status): void { $this->expectException(BadStateException::class); @@ -3125,7 +3126,7 @@ public function testUpdateContentThrowsBadStateException($status) * * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent */ - public function testUpdateContentThrowsUnauthorizedException() + public function testUpdateContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -3202,7 +3203,7 @@ protected function determineLanguageCodesForUpdate($initialLanguageCode, array $ * * @return array */ - protected function mapStructFieldsForUpdate($initialLanguageCode, $structFields, $mainLanguageCode, $fieldDefinitions) + protected function mapStructFieldsForUpdate($initialLanguageCode, $structFields, $mainLanguageCode, $fieldDefinitions): array { $initialLanguageCode = $initialLanguageCode ?: $mainLanguageCode; @@ -3288,7 +3289,7 @@ protected function determineValuesForUpdate( return $this->stubValues($values); } - protected function stubValues(array $fieldValues) + protected function stubValues(array $fieldValues): array { foreach ($fieldValues as &$languageValues) { foreach ($languageValues as &$value) { @@ -3319,7 +3320,7 @@ protected function assertForTestUpdateContentNonRedundantFieldSet( array $existingFields, array $fieldDefinitions, $execute = true - ) { + ): array { $repositoryMock = $this->getRepositoryMock(); $permissionResolverMock = $this->getPermissionResolverMock(); $permissionResolverMock @@ -3379,7 +3380,7 @@ static function (Field $field) { ->with(self::isType('string')) ->will( self::returnCallback( - static function () { + static function (): Language { return new Language(['id' => 4242]); } ) @@ -3414,7 +3415,7 @@ static function () { ->method('acceptValue') ->will( self::returnCallback( - static function ($value) { + static function ($value): SPIValue { return $value instanceof SPIValue ? $value : new ValueStub($value); @@ -3518,9 +3519,9 @@ static function (SPIValue $value) use ($emptyValue): bool { $spiContent = new SPIContent( [ - 'versionInfo' => new SPIContent\VersionInfo( + 'versionInfo' => new SPIVersionInfo( [ - 'contentInfo' => new SPIContent\ContentInfo(['id' => 42]), + 'contentInfo' => new SPIContentInfo(['id' => 42]), 'versionNo' => 7, ] ), @@ -3551,7 +3552,7 @@ static function (SPIValue $value) use ($emptyValue): bool { return [$content->versionInfo, $contentUpdateStruct]; } - public function providerForTestUpdateContentNonRedundantFieldSet1() + public function providerForTestUpdateContentNonRedundantFieldSet1(): array { $spiFields = [ new SPIField( @@ -3615,7 +3616,7 @@ public function providerForTestUpdateContentNonRedundantFieldSet1() * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 */ - public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $structFields, $spiFields) + public function testUpdateContentNonRedundantFieldSet1(?string $initialLanguageCode, array $structFields, array $spiFields): void { $existingFields = [ new Field( @@ -3650,7 +3651,7 @@ public function testUpdateContentNonRedundantFieldSet1($initialLanguageCode, $st ); } - public function providerForTestUpdateContentNonRedundantFieldSet2() + public function providerForTestUpdateContentNonRedundantFieldSet2(): array { $spiFields0 = [ new SPIField( @@ -3829,7 +3830,7 @@ public function providerForTestUpdateContentNonRedundantFieldSet2() * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 */ - public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $structFields, $spiFields) + public function testUpdateContentNonRedundantFieldSet2(?string $initialLanguageCode, array $structFields, array $spiFields): void { $existingFields = [ new Field( @@ -3864,7 +3865,7 @@ public function testUpdateContentNonRedundantFieldSet2($initialLanguageCode, $st ); } - public function providerForTestUpdateContentNonRedundantFieldSet3() + public function providerForTestUpdateContentNonRedundantFieldSet3(): array { $spiFields0 = [ new SPIField( @@ -4092,7 +4093,7 @@ public function providerForTestUpdateContentNonRedundantFieldSet3() * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet3 */ - public function testUpdateContentNonRedundantFieldSet3($initialLanguageCode, $structFields, $spiFields) + public function testUpdateContentNonRedundantFieldSet3(string $initialLanguageCode, array $structFields, array $spiFields): void { $existingFields = [ new Field( @@ -4145,7 +4146,7 @@ public function testUpdateContentNonRedundantFieldSet3($initialLanguageCode, $st ); } - public function providerForTestUpdateContentNonRedundantFieldSet4() + public function providerForTestUpdateContentNonRedundantFieldSet4(): array { $spiFields0 = [ new SPIField( @@ -4398,7 +4399,7 @@ public function providerForTestUpdateContentNonRedundantFieldSet4() * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet4 */ - public function testUpdateContentNonRedundantFieldSet4($initialLanguageCode, $structFields, $spiFields) + public function testUpdateContentNonRedundantFieldSet4(string $initialLanguageCode, array $structFields, array $spiFields): void { $existingFields = [ new Field( @@ -4456,7 +4457,7 @@ public function testUpdateContentNonRedundantFieldSet4($initialLanguageCode, $st * * @todo add first field empty */ - public function providerForTestUpdateContentNonRedundantFieldSetComplex() + public function providerForTestUpdateContentNonRedundantFieldSetComplex(): array { $spiFields0 = [ new SPIField( @@ -4685,7 +4686,7 @@ public function providerForTestUpdateContentNonRedundantFieldSetComplex() ]; } - protected function fixturesForTestUpdateContentNonRedundantFieldSetComplex() + protected function fixturesForTestUpdateContentNonRedundantFieldSetComplex(): array { $existingFields = [ new Field( @@ -4779,7 +4780,7 @@ protected function fixturesForTestUpdateContentNonRedundantFieldSetComplex() * * @dataProvider providerForTestUpdateContentNonRedundantFieldSetComplex */ - public function testUpdateContentNonRedundantFieldSetComplex($initialLanguageCode, $structFields, $spiFields) + public function testUpdateContentNonRedundantFieldSetComplex(string $initialLanguageCode, array $structFields, array $spiFields): void { list($existingFields, $fieldDefinitions) = $this->fixturesForTestUpdateContentNonRedundantFieldSetComplex(); @@ -4792,7 +4793,7 @@ public function testUpdateContentNonRedundantFieldSetComplex($initialLanguageCod ); } - public function providerForTestUpdateContentWithInvalidLanguage() + public function providerForTestUpdateContentWithInvalidLanguage(): array { return [ [ @@ -4830,7 +4831,7 @@ public function providerForTestUpdateContentWithInvalidLanguage() * * @dataProvider providerForTestUpdateContentWithInvalidLanguage */ - public function testUpdateContentWithInvalidLanguage($initialLanguageCode, $structFields) + public function testUpdateContentWithInvalidLanguage(string $initialLanguageCode, array $structFields): void { $this->expectException(APINotFoundException::class); $this->expectExceptionMessage('Could not find \'Language\' with identifier \'Klingon\''); @@ -4889,7 +4890,7 @@ public function testUpdateContentWithInvalidLanguage($initialLanguageCode, $stru ->with(self::isType('string')) ->will( self::returnCallback( - static function ($languageCode) { + static function ($languageCode): Language { if ($languageCode === 'Klingon') { throw new NotFoundException('Language', 'Klingon'); } @@ -4974,7 +4975,7 @@ protected function assertForUpdateContentContentValidationException( ->method('acceptValue') ->will( self::returnCallback( - static function ($value) { + static function ($value): SPIValue { return $value instanceof SPIValue ? $value : new ValueStub($value); @@ -4992,7 +4993,7 @@ static function ($value) { ->with(self::isType('string')) ->will( self::returnCallback( - static function ($languageCode) { + static function ($languageCode): Language { if ($languageCode === 'Klingon') { throw new NotFoundException('Language', 'Klingon'); } @@ -5080,7 +5081,7 @@ private function prepareContentForTestCreateAndUpdateContent( ); } - public function providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition() + public function providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition(): array { return [ [ @@ -5107,7 +5108,7 @@ public function providerForTestUpdateContentThrowsContentValidationExceptionFiel * * @dataProvider providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition */ - public function testUpdateContentThrowsContentValidationExceptionFieldDefinition($initialLanguageCode, $structFields) + public function testUpdateContentThrowsContentValidationExceptionFieldDefinition(string $initialLanguageCode, array $structFields): void { $this->expectException(ContentValidationException::class); $this->expectExceptionMessage('Field definition \'identifier\' does not exist in given content type'); @@ -5119,7 +5120,7 @@ public function testUpdateContentThrowsContentValidationExceptionFieldDefinition ); } - public function providerForTestUpdateContentThrowsContentValidationExceptionTranslation() + public function providerForTestUpdateContentThrowsContentValidationExceptionTranslation(): array { return [ [ @@ -5146,7 +5147,7 @@ public function providerForTestUpdateContentThrowsContentValidationExceptionTran * * @dataProvider providerForTestUpdateContentThrowsContentValidationExceptionTranslation */ - public function testUpdateContentThrowsContentValidationExceptionTranslation($initialLanguageCode, $structFields) + public function testUpdateContentThrowsContentValidationExceptionTranslation(string $initialLanguageCode, array $structFields): void { $this->expectException(ContentValidationException::class); $this->expectExceptionMessage('You cannot set a value for the non-translatable Field definition \'identifier\' in language \'eng-US\''); @@ -5174,9 +5175,9 @@ public function testUpdateContentThrowsContentValidationExceptionTranslation($in public function assertForTestUpdateContentRequiredField( $initialLanguageCode, $structFields, - $existingFields, - $fieldDefinitions - ) { + array $existingFields, + array $fieldDefinitions + ): array { $permissionResolver = $this->getPermissionResolverMock(); $mockedService = $this->getPartlyMockedContentService(['internalLoadContentById', 'loadContent']); /** @var \PHPUnit\Framework\MockObject\MockObject $languageHandlerMock */ @@ -5247,7 +5248,7 @@ static function (Field $field) { return [$content->versionInfo, $contentUpdateStruct]; } - public function providerForTestUpdateContentRequiredField() + public function providerForTestUpdateContentRequiredField(): array { return [ [ @@ -5281,7 +5282,7 @@ public function testUpdateContentRequiredField( $structFields, $identifier, $languageCode - ) { + ): void { $this->expectException(ContentFieldValidationException::class); $existingFields = [ @@ -5329,8 +5330,8 @@ public function testUpdateContentRequiredField( public function assertForTestUpdateContentThrowsContentFieldValidationException( $initialLanguageCode, $structFields, - $existingFields, - $fieldDefinitions, + array $existingFields, + array $fieldDefinitions, array $allFieldErrors ): array { $permissionResolverMock = $this->getPermissionResolverMock(); @@ -5375,7 +5376,7 @@ static function (Field $field) { ->method('acceptValue') ->will( self::returnCallback( - static function ($value) { + static function ($value): SPIValue { return $value instanceof SPIValue ? $value : new ValueStub($value); @@ -5535,9 +5536,9 @@ public function testUpdateContentThrowsContentFieldValidationException( * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent */ - public function testUpdateContentTransactionRollback() + public function testUpdateContentTransactionRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Store failed'); $existingFields = [ @@ -5587,7 +5588,7 @@ public function testUpdateContentTransactionRollback() self::anything(), self::anything(), self::anything() - )->will(self::throwException(new \Exception('Store failed'))); + )->will(self::throwException(new Exception('Store failed'))); // Execute $this->partlyMockedContentService->updateContent($versionInfo, $contentUpdateStruct); @@ -5598,7 +5599,7 @@ public function testUpdateContentTransactionRollback() * * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent */ - public function testCopyContentThrowsUnauthorizedException() + public function testCopyContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -5649,7 +5650,7 @@ public function testCopyContentThrowsUnauthorizedException() * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion */ - public function testCopyContent() + public function testCopyContent(): void { $repositoryMock = $this->getRepositoryMock(); $contentService = $this->getPartlyMockedContentService([ @@ -5786,7 +5787,7 @@ public function testCopyContent() * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion */ - public function testCopyContentWithVersionInfo() + public function testCopyContentWithVersionInfo(): void { $repositoryMock = $this->getRepositoryMock(); $contentService = $this->getPartlyMockedContentService([ @@ -5914,9 +5915,9 @@ public function testCopyContentWithVersionInfo() * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion */ - public function testCopyContentWithRollback() + public function testCopyContentWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $repositoryMock = $this->getRepositoryMock(); @@ -5988,7 +5989,7 @@ public function testCopyContentWithRollback() * * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\Values\Content\Content */ - private function mockBuildContentDomainObject(SPIContent $spiContent, array $translations = null, bool $useAlwaysAvailable = null) + private function mockBuildContentDomainObject(SPIContent $spiContent, array $translations = null, bool $useAlwaysAvailable = null): MockObject { $contentTypeId = $spiContent->versionInfo->contentInfo->contentTypeId; $contentTypeServiceMock = $this->getContentTypeServiceMock(); @@ -6216,7 +6217,7 @@ protected function mockPublishUrlAliasesForContent(APIContent $content) ->with(123, 456, ['eng-GB']); } - protected $relationProcessorMock; + protected ?MockObject $relationProcessorMock = null; /** * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Helper\RelationProcessor @@ -6249,7 +6250,7 @@ protected function getNameSchemaServiceMock(): NameSchemaServiceInterface return $this->nameSchemaServiceMock; } - protected $contentTypeServiceMock; + protected ?MockObject $contentTypeServiceMock = null; /** * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\ContentTypeService @@ -6263,7 +6264,7 @@ protected function getContentTypeServiceMock() return $this->contentTypeServiceMock; } - protected $locationServiceMock; + protected ?MockObject $locationServiceMock = null; /** * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\LocationService @@ -6278,7 +6279,7 @@ protected function getLocationServiceMock() } /** @var \Ibexa\Core\Repository\ContentService */ - protected $partlyMockedContentService; + protected ?MockObject $partlyMockedContentService = null; /** * Returns the content service to test with $methods mocked. diff --git a/tests/lib/Repository/Service/Mock/PermissionTest.php b/tests/lib/Repository/Service/Mock/PermissionTest.php index 4f78cd918d..395d26d9e1 100644 --- a/tests/lib/Repository/Service/Mock/PermissionTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionTest.php @@ -21,6 +21,7 @@ use Ibexa\Core\Repository\Repository as CoreRepository; use Ibexa\Core\Repository\Values\User\UserReference; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * Mock test case for PermissionResolver. @@ -29,7 +30,7 @@ */ class PermissionTest extends BaseServiceMockTest { - public function providerForTestHasAccessReturnsTrue() + public function providerForTestHasAccessReturnsTrue(): array { return [ [ @@ -103,7 +104,7 @@ public function providerForTestHasAccessReturnsTrue() * * @dataProvider providerForTestHasAccessReturnsTrue */ - public function testHasAccessReturnsTrue(array $roles, array $roleAssignments) + public function testHasAccessReturnsTrue(array $roles, array $roleAssignments): void { /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); @@ -128,7 +129,7 @@ public function testHasAccessReturnsTrue(array $roles, array $roleAssignments) self::assertTrue($result); } - public function providerForTestHasAccessReturnsFalse() + public function providerForTestHasAccessReturnsFalse(): array { return [ [[], []], @@ -174,7 +175,7 @@ public function providerForTestHasAccessReturnsFalse() * * @dataProvider providerForTestHasAccessReturnsFalse */ - public function testHasAccessReturnsFalse(array $roles, array $roleAssignments) + public function testHasAccessReturnsFalse(array $roles, array $roleAssignments): void { /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); @@ -202,7 +203,7 @@ public function testHasAccessReturnsFalse(array $roles, array $roleAssignments) /** * Test for the sudo() & hasAccess() method. */ - public function testHasAccessReturnsFalseButSudoSoTrue() + public function testHasAccessReturnsFalseButSudoSoTrue(): void { /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); @@ -230,7 +231,7 @@ static function (Repository $repo) { /** * @return array */ - public function providerForTestHasAccessReturnsPermissionSets() + public function providerForTestHasAccessReturnsPermissionSets(): array { return [ [ @@ -286,7 +287,7 @@ public function providerForTestHasAccessReturnsPermissionSets() * * @dataProvider providerForTestHasAccessReturnsPermissionSets */ - public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssignments) + public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssignments): void { /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); @@ -344,7 +345,7 @@ public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssi /** * @return array */ - public function providerForTestHasAccessReturnsLimitationNotFoundException() + public function providerForTestHasAccessReturnsLimitationNotFoundException(): array { return [ [ @@ -400,7 +401,7 @@ public function providerForTestHasAccessReturnsLimitationNotFoundException() * * @dataProvider providerForTestHasAccessReturnsLimitationNotFoundException */ - public function testHasAccessReturnsLimitationNotFoundException(array $roles, array $roleAssignments) + public function testHasAccessReturnsLimitationNotFoundException(array $roles, array $roleAssignments): void { $this->expectException(LimitationNotFoundException::class); @@ -459,7 +460,7 @@ public function testHasAccessReturnsLimitationNotFoundException(array $roles, ar /** * @return array */ - public function providerForTestHasAccessReturnsInvalidArgumentValueException() + public function providerForTestHasAccessReturnsInvalidArgumentValueException(): array { return [ [ @@ -515,7 +516,7 @@ public function providerForTestHasAccessReturnsInvalidArgumentValueException() * * @dataProvider providerForTestHasAccessReturnsInvalidArgumentValueException */ - public function testHasAccessReturnsInvalidArgumentValueException(array $roles, array $roleAssignments) + public function testHasAccessReturnsInvalidArgumentValueException(array $roles, array $roleAssignments): void { $this->expectException(InvalidArgumentValue::class); @@ -530,7 +531,7 @@ public function testHasAccessReturnsInvalidArgumentValueException(array $roles, } } - public function providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation() + public function providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation(): array { return [ [ @@ -580,7 +581,7 @@ public function providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation( * * @dataProvider providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation */ - public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $roles, array $roleAssignments) + public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $roles, array $roleAssignments): void { /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); @@ -651,7 +652,7 @@ public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $role * * @return \Ibexa\Contracts\Core\Persistence\User\Role */ - private function createRole(array $policiesData, $roleId = null) + private function createRole(array $policiesData, $roleId = null): Role { $policies = []; foreach ($policiesData as $policyData) { @@ -672,7 +673,7 @@ private function createRole(array $policiesData, $roleId = null) ); } - public function providerForTestCanUserSimple() + public function providerForTestCanUserSimple(): array { return [ [true, true], @@ -688,7 +689,7 @@ public function providerForTestCanUserSimple() * * @dataProvider providerForTestCanUserSimple */ - public function testCanUserSimple($permissionSets, $result) + public function testCanUserSimple(bool|array $permissionSets, bool $result): void { $permissionResolverMock = $this->getPermissionResolverMock(['hasAccess']); @@ -712,7 +713,7 @@ public function testCanUserSimple($permissionSets, $result) * * Tests execution path with permission set defining no limitations. */ - public function testCanUserWithoutLimitations() + public function testCanUserWithoutLimitations(): void { $permissionResolverMock = $this->getPermissionResolverMock( [ @@ -764,7 +765,7 @@ public function testCanUserWithoutLimitations() /** * @return array */ - private function getPermissionSetsMock() + private function getPermissionSetsMock(): array { $roleLimitationMock = $this->createMock(Limitation::class); $roleLimitationMock @@ -803,7 +804,7 @@ private function getPermissionSetsMock() * * @return array */ - public function providerForTestCanUserComplex() + public function providerForTestCanUserComplex(): array { return [ [ @@ -886,7 +887,7 @@ public function providerForTestCanUserComplex() * * @dataProvider providerForTestCanUserComplex */ - public function testCanUserComplex(array $roleLimitationEvaluations, array $policyLimitationEvaluations, $userCan) + public function testCanUserComplex(array $roleLimitationEvaluations, array $policyLimitationEvaluations, bool $userCan): void { /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ $valueObject = $this->createMock(ValueObject::class); @@ -974,7 +975,7 @@ public function testCanUserComplex(array $roleLimitationEvaluations, array $poli /** * Test for the setCurrentUserReference() and getCurrentUserReference() methods. */ - public function testSetAndGetCurrentUserReference() + public function testSetAndGetCurrentUserReference(): void { $permissionResolverMock = $this->getPermissionResolverMock(null); $userReferenceMock = $this->getUserReferenceMock(); @@ -995,14 +996,14 @@ public function testSetAndGetCurrentUserReference() /** * Test for the getCurrentUserReference() method. */ - public function testGetCurrentUserReferenceReturnsAnonymousUser() + public function testGetCurrentUserReferenceReturnsAnonymousUser(): void { $permissionResolverMock = $this->getPermissionResolverMock(null); self::assertEquals(new UserReference(10), $permissionResolverMock->getCurrentUserReference()); } - protected $permissionResolverMock; + protected ?MockObject $permissionResolverMock = null; /** * @return \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject @@ -1051,7 +1052,7 @@ protected function getPermissionResolverMock($methods = []) return $this->permissionResolverMock; } - protected $userReferenceMock; + protected ?MockObject $userReferenceMock = null; protected function getUserReferenceMock() { @@ -1062,7 +1063,7 @@ protected function getUserReferenceMock() return $this->userReferenceMock; } - protected $repositoryMock; + protected ?MockObject $repositoryMock = null; /** * @return \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php index c5cfa2529b..ad0679aa6d 100644 --- a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php +++ b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php @@ -20,6 +20,7 @@ use Ibexa\Core\Repository\Values\Content\Relation as RelationValue; use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; /** @@ -27,7 +28,7 @@ */ class RelationProcessorTest extends BaseServiceMockTest { - public function providerForTestAppendRelations() + public function providerForTestAppendRelations(): array { return [ [ @@ -164,7 +165,7 @@ public function providerForTestAppendRelations() * * @dataProvider providerForTestAppendRelations */ - public function testAppendFieldRelations(array $fieldRelations, array $expected) + public function testAppendFieldRelations(array $fieldRelations, array $expected): void { $locationHandler = $this->getPersistenceMock()->locationHandler(); $relationProcessor = $this->getPartlyMockedRelationProcessor(); @@ -207,7 +208,7 @@ public function testAppendFieldRelations(array $fieldRelations, array $expected) /** * Assert loading Locations to find Content id in {@link RelationProcessor::appendFieldRelations()} method. */ - protected function assertLocationHandlerExpectation($locationHandlerMock, $fieldRelations, $type, &$callCounter) + protected function assertLocationHandlerExpectation($locationHandlerMock, array $fieldRelations, $type, int &$callCounter) { if (isset($fieldRelations[$type]['locationIds'])) { foreach ($fieldRelations[$type]['locationIds'] as $locationId) { @@ -230,7 +231,7 @@ protected function assertLocationHandlerExpectation($locationHandlerMock, $field /** * Test for the appendFieldRelations() method. */ - public function testAppendFieldRelationsLocationMappingWorks() + public function testAppendFieldRelationsLocationMappingWorks(): void { $locationHandler = $this->getPersistenceMock()->locationHandler(); $relationProcessor = $this->getPartlyMockedRelationProcessor(); @@ -290,7 +291,7 @@ public function testAppendFieldRelationsLocationMappingWorks() ); } - public function testAppendFieldRelationsLogsMissingLocations() + public function testAppendFieldRelationsLogsMissingLocations(): void { $fieldValueMock = $this->getMockForAbstractClass(Value::class); $fieldTypeMock = $this->createMock(FieldType::class); @@ -345,7 +346,7 @@ public function testAppendFieldRelationsLogsMissingLocations() /** * Test for the processFieldRelations() method. */ - public function testProcessFieldRelationsNoChanges() + public function testProcessFieldRelationsNoChanges(): void { $relationProcessor = $this->getPartlyMockedRelationProcessor(); $contentHandlerMock = $this->getPersistenceMockHandler('Content\\Handler'); @@ -415,7 +416,7 @@ public function testProcessFieldRelationsNoChanges() /** * Test for the processFieldRelations() method. */ - public function testProcessFieldRelationsAddsRelations() + public function testProcessFieldRelationsAddsRelations(): void { $relationProcessor = $this->getPartlyMockedRelationProcessor(); $contentHandlerMock = $this->getPersistenceMockHandler('Content\\Handler'); @@ -523,7 +524,7 @@ public function testProcessFieldRelationsAddsRelations() /** * Test for the processFieldRelations() method. */ - public function testProcessFieldRelationsRemovesRelations() + public function testProcessFieldRelationsRemovesRelations(): void { $relationProcessor = $this->getPartlyMockedRelationProcessor(); $contentHandlerMock = $this->getPersistenceMockHandler('Content\\Handler'); @@ -621,7 +622,7 @@ public function testProcessFieldRelationsRemovesRelations() /** * Test for the processFieldRelations() method. */ - public function testProcessFieldRelationsWhenRelationFieldNoLongerExists() + public function testProcessFieldRelationsWhenRelationFieldNoLongerExists(): void { $existingRelations = [ $this->getStubbedRelation(2, Relation::FIELD, 43, 17), @@ -645,7 +646,7 @@ public function testProcessFieldRelationsWhenRelationFieldNoLongerExists() $relationProcessor->processFieldRelations([], 24, 2, $contentTypeMock, $existingRelations); } - protected function getStubbedRelation($id, $type, $fieldDefinitionId, $contentId) + protected function getStubbedRelation($id, $type, ?string $fieldDefinitionId, $contentId): RelationValue { return new RelationValue( [ @@ -668,7 +669,7 @@ protected function getStubbedRelation($id, $type, $fieldDefinitionId, $contentId * * @return \Ibexa\Core\Repository\Helper\RelationProcessor|\PHPUnit\Framework\MockObject\MockObject */ - protected function getPartlyMockedRelationProcessor(array $methods = null) + protected function getPartlyMockedRelationProcessor(array $methods = null): MockObject { return $this->getMockBuilder(RelationProcessor::class) ->setMethods($methods) @@ -683,7 +684,7 @@ protected function getPartlyMockedRelationProcessor(array $methods = null) /** * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function getFieldTypeServiceMock() + protected function getFieldTypeServiceMock(): MockObject { return $this->createMock(FieldTypeService::class); } diff --git a/tests/lib/Repository/Service/Mock/RepositoryTest.php b/tests/lib/Repository/Service/Mock/RepositoryTest.php index f098ed8858..60aa80ffac 100644 --- a/tests/lib/Repository/Service/Mock/RepositoryTest.php +++ b/tests/lib/Repository/Service/Mock/RepositoryTest.php @@ -19,7 +19,7 @@ class RepositoryTest extends BaseServiceMockTest * * @covers \Ibexa\Contracts\Core\Repository\Repository::beginTransaction */ - public function testBeginTransaction() + public function testBeginTransaction(): void { $mockedRepository = $this->getRepository(); $transactionHandlerMock = $this->getTransactionHandlerMock(); @@ -38,7 +38,7 @@ public function testBeginTransaction() * * @covers \Ibexa\Contracts\Core\Repository\Repository::commit */ - public function testCommit() + public function testCommit(): void { $mockedRepository = $this->getRepository(); $transactionHandlerMock = $this->getTransactionHandlerMock(); @@ -57,7 +57,7 @@ public function testCommit() * * @covers \Ibexa\Contracts\Core\Repository\Repository::commit */ - public function testCommitThrowsRuntimeException() + public function testCommitThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -80,7 +80,7 @@ public function testCommitThrowsRuntimeException() * * @covers \Ibexa\Contracts\Core\Repository\Repository::rollback */ - public function testRollback() + public function testRollback(): void { $mockedRepository = $this->getRepository(); $transactionHandlerMock = $this->getTransactionHandlerMock(); @@ -99,7 +99,7 @@ public function testRollback() * * @covers \Ibexa\Contracts\Core\Repository\Repository::rollback */ - public function testRollbackThrowsRuntimeException() + public function testRollbackThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); diff --git a/tests/lib/Repository/Service/Mock/RoleTest.php b/tests/lib/Repository/Service/Mock/RoleTest.php index d44e615251..7786226631 100644 --- a/tests/lib/Repository/Service/Mock/RoleTest.php +++ b/tests/lib/Repository/Service/Mock/RoleTest.php @@ -30,6 +30,7 @@ use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\RoleService; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Contracts\Core\Repository\RoleService @@ -41,7 +42,7 @@ class RoleTest extends BaseServiceMockTest /** * Test for the createRole() method. */ - public function testCreateRoleThrowsLimitationValidationException() + public function testCreateRoleThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -106,7 +107,7 @@ public function testCreateRoleThrowsLimitationValidationException() /** * Test for the addPolicy() method. */ - public function testAddPolicyThrowsLimitationValidationException() + public function testAddPolicyThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -170,7 +171,7 @@ public function testAddPolicyThrowsLimitationValidationException() /** * Test for the updatePolicyByRoleDraft() method. */ - public function testUpdatePolicyThrowsLimitationValidationException() + public function testUpdatePolicyThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -243,7 +244,7 @@ static function ($propertyName): ?string { /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUserThrowsUnauthorizedException() + public function testAssignRoleToUserThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -269,7 +270,7 @@ public function testAssignRoleToUserThrowsUnauthorizedException() /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUserThrowsLimitationValidationException() + public function testAssignRoleToUserThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -316,7 +317,7 @@ public function testAssignRoleToUserThrowsLimitationValidationException() /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUserThrowsBadStateException() + public function testAssignRoleToUserThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -348,7 +349,7 @@ public function testAssignRoleToUserThrowsBadStateException() /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUser() + public function testAssignRoleToUser(): void { $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); @@ -431,7 +432,7 @@ public function testAssignRoleToUser() /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUserWithNullLimitation() + public function testAssignRoleToUserWithNullLimitation(): void { $repository = $this->getRepositoryMock(); $roleServiceMock = $this->getPartlyMockedRoleService(['checkAssignmentAndFilterLimitationValues']); @@ -493,7 +494,7 @@ public function testAssignRoleToUserWithNullLimitation() /** * Test for the assignRoleToUser() method. */ - public function testAssignRoleToUserWithRollback() + public function testAssignRoleToUserWithRollback(): void { $this->expectException(\Exception::class); @@ -557,7 +558,7 @@ public function testAssignRoleToUserWithRollback() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleToUserGroupThrowsUnauthorizedException() + public function testAssignRoleToUserGroupThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -584,7 +585,7 @@ public function testAssignRoleToUserGroupThrowsUnauthorizedException() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleToUserGroupThrowsLimitationValidationException() + public function testAssignRoleToUserGroupThrowsLimitationValidationException(): void { $this->expectException(LimitationValidationException::class); @@ -632,7 +633,7 @@ public function testAssignRoleToUserGroupThrowsLimitationValidationException() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleGroupToUserThrowsBadStateException() + public function testAssignRoleGroupToUserThrowsBadStateException(): void { $this->expectException(BadStateException::class); @@ -665,7 +666,7 @@ public function testAssignRoleGroupToUserThrowsBadStateException() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleToUserGroup() + public function testAssignRoleToUserGroup(): void { $limitationMock = $this->createMock(RoleLimitation::class); $limitationTypeMock = $this->createMock(SPIType::class); @@ -752,7 +753,7 @@ public function testAssignRoleToUserGroup() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleToUserGroupWithNullLimitation() + public function testAssignRoleToUserGroupWithNullLimitation(): void { $repository = $this->getRepositoryMock(); $roleServiceMock = $this->getPartlyMockedRoleService(['checkAssignmentAndFilterLimitationValues']); @@ -818,7 +819,7 @@ public function testAssignRoleToUserGroupWithNullLimitation() /** * Test for the assignRoleToUserGroup() method. */ - public function testAssignRoleToUserGroupWithRollback() + public function testAssignRoleToUserGroupWithRollback(): void { $this->expectException(\Exception::class); @@ -883,7 +884,7 @@ public function testAssignRoleToUserGroupWithRollback() $roleServiceMock->assignRoleToUserGroup($roleMock, $userGroupMock, null); } - public function testRemovePolicyByRoleDraftThrowsUnauthorizedException() + public function testRemovePolicyByRoleDraftThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -922,7 +923,7 @@ public function testRemovePolicyByRoleDraftThrowsUnauthorizedException() /** * Test for the removePolicyByRoleDraft() method. */ - public function testRemovePolicyByRoleDraftWithRollback() + public function testRemovePolicyByRoleDraftWithRollback(): void { $this->expectException(\Exception::class); $this->expectExceptionMessage('Handler threw an exception'); @@ -977,7 +978,7 @@ public function testRemovePolicyByRoleDraftWithRollback() $roleServiceMock->removePolicyByRoleDraft($roleDraftMock, $policyDraftMock); } - public function testRemovePolicyByRoleDraft() + public function testRemovePolicyByRoleDraft(): void { $repository = $this->getRepositoryMock(); $roleDraftMock = $this->createMock(RoleDraft::class); @@ -1037,7 +1038,7 @@ public function testRemovePolicyByRoleDraft() } /** @var \Ibexa\Core\Repository\RoleService */ - protected $partlyMockedRoleService; + protected ?MockObject $partlyMockedRoleService = null; /** * Returns the role service to test with $methods mocked. diff --git a/tests/lib/Repository/Service/Mock/SearchTest.php b/tests/lib/Repository/Service/Mock/SearchTest.php index fdd14abe7b..a7ec089a11 100644 --- a/tests/lib/Repository/Service/Mock/SearchTest.php +++ b/tests/lib/Repository/Service/Mock/SearchTest.php @@ -17,6 +17,8 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Location\Depth; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult; @@ -26,6 +28,7 @@ use Ibexa\Core\Search\Common\BackgroundIndexer; use Ibexa\Core\Search\Common\BackgroundIndexer\NullIndexer; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * Mock test case for Search service. @@ -36,14 +39,14 @@ class SearchTest extends BaseServiceMockTest protected $contentDomainMapperMock; - protected $permissionsCriterionResolverMock; + protected ?MockObject $permissionsCriterionResolverMock = null; /** * Test for the __construct() method. * * @covers \Ibexa\Contracts\Core\Repository\SearchService::__construct */ - public function testConstructor() + public function testConstructor(): void { $repositoryMock = $this->getRepositoryMock(); /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ @@ -62,23 +65,23 @@ public function testConstructor() ); } - public function providerForFindContentValidatesLocationCriteriaAndSortClauses() + public function providerForFindContentValidatesLocationCriteriaAndSortClauses(): array { return [ [ - new Query(['filter' => new Criterion\Location\Depth(Criterion\Operator::LT, 2)]), + new Query(['filter' => new Depth(Criterion\Operator::LT, 2)]), "Argument '\$query' is invalid: Location Criteria cannot be used in Content search", ], [ - new Query(['query' => new Criterion\Location\Depth(Criterion\Operator::LT, 2)]), + new Query(['query' => new Depth(Criterion\Operator::LT, 2)]), "Argument '\$query' is invalid: Location Criteria cannot be used in Content search", ], [ new Query( [ - 'query' => new Criterion\LogicalAnd( + 'query' => new LogicalAnd( [ - new Criterion\Location\Depth(Criterion\Operator::LT, 2), + new Depth(Criterion\Operator::LT, 2), ] ), ] @@ -95,7 +98,7 @@ public function providerForFindContentValidatesLocationCriteriaAndSortClauses() /** * @dataProvider providerForFindContentValidatesLocationCriteriaAndSortClauses */ - public function testFindContentValidatesLocationCriteriaAndSortClauses($query, $exceptionMessage) + public function testFindContentValidatesLocationCriteriaAndSortClauses(Query $query, string $exceptionMessage): void { $this->expectException(InvalidArgumentException::class); @@ -123,17 +126,17 @@ public function testFindContentValidatesLocationCriteriaAndSortClauses($query, $ self::fail('Expected exception was not thrown'); } - public function providerForFindSingleValidatesLocationCriteria() + public function providerForFindSingleValidatesLocationCriteria(): array { return [ [ - new Criterion\Location\Depth(Criterion\Operator::LT, 2), + new Depth(Criterion\Operator::LT, 2), "Argument '\$filter' is invalid: Location Criteria cannot be used in Content search", ], [ - new Criterion\LogicalAnd( + new LogicalAnd( [ - new Criterion\Location\Depth(Criterion\Operator::LT, 2), + new Depth(Criterion\Operator::LT, 2), ] ), "Argument '\$filter' is invalid: Location Criteria cannot be used in Content search", @@ -144,7 +147,7 @@ public function providerForFindSingleValidatesLocationCriteria() /** * @dataProvider providerForFindSingleValidatesLocationCriteria */ - public function testFindSingleValidatesLocationCriteria($criterion, $exceptionMessage) + public function testFindSingleValidatesLocationCriteria(Depth|LogicalAnd $criterion, string $exceptionMessage): void { $this->expectException(InvalidArgumentException::class); @@ -177,9 +180,9 @@ public function testFindSingleValidatesLocationCriteria($criterion, $exceptionMe * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentThrowsHandlerException() + public function testFindContentThrowsHandlerException(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $repositoryMock = $this->getRepositoryMock(); @@ -216,7 +219,7 @@ public function testFindContentThrowsHandlerException() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentWhenDomainMapperThrowsException() + public function testFindContentWhenDomainMapperThrowsException(): void { $indexer = $this->createMock(BackgroundIndexer::class); $indexer->expects(self::once()) @@ -243,7 +246,7 @@ public function testFindContentWhenDomainMapperThrowsException() $mapper->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') ->with(self::equalTo($result), self::equalTo([])) - ->willReturnCallback(static function (SearchResult $spiResult) use ($info) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($info): array { unset($spiResult->searchHits[0]); $spiResult->totalCount = $spiResult->totalCount > 0 ? --$spiResult->totalCount : 0; @@ -262,7 +265,7 @@ public function testFindContentWhenDomainMapperThrowsException() * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentNoPermissionsFilter() + public function testFindContentNoPermissionsFilter(): void { /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ $searchHandlerMock = $this->getSPIMockHandler('Search\\Handler'); @@ -302,7 +305,7 @@ public function testFindContentNoPermissionsFilter() $mapper->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) - ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock): array { $spiResult->searchHits[0]->valueObject = $contentMock; return []; @@ -327,7 +330,7 @@ public function testFindContentNoPermissionsFilter() * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentWithPermission() + public function testFindContentWithPermission(): void { /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ $searchHandlerMock = $this->getSPIMockHandler('Search\\Handler'); @@ -375,7 +378,7 @@ public function testFindContentWithPermission() ->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) - ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock): array { $spiResult->searchHits[0]->valueObject = $contentMock; return []; @@ -400,7 +403,7 @@ public function testFindContentWithPermission() * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findContent */ - public function testFindContentWithNoPermission() + public function testFindContentWithNoPermission(): void { /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ $searchHandlerMock = $this->getSPIMockHandler('Search\\Handler'); @@ -444,7 +447,7 @@ public function testFindContentWithNoPermission() /** * Test for the findContent() method. */ - public function testFindContentWithDefaultQueryValues() + public function testFindContentWithDefaultQueryValues(): void { /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ $searchHandlerMock = $this->getSPIMockHandler('Search\\Handler'); @@ -490,7 +493,7 @@ public function testFindContentWithDefaultQueryValues() ->expects(self::once()) ->method('buildContentDomainObjectsOnSearchResult') ->with(self::isInstanceOf(SearchResult::class), self::equalTo([])) - ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($contentMock): array { $spiResult->searchHits[0]->valueObject = $contentMock; return []; @@ -515,7 +518,7 @@ public function testFindContentWithDefaultQueryValues() * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findSingle */ - public function testFindSingleThrowsNotFoundException() + public function testFindSingleThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -551,9 +554,9 @@ public function testFindSingleThrowsNotFoundException() * @covers \Ibexa\Contracts\Core\Repository\SearchService::addPermissionsCriterion * @covers \Ibexa\Contracts\Core\Repository\SearchService::findSingle */ - public function testFindSingleThrowsHandlerException() + public function testFindSingleThrowsHandlerException(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $repositoryMock = $this->getRepositoryMock(); @@ -646,7 +649,7 @@ public function testFindSingle(): void /** * Test for the findLocations() method. */ - public function testFindLocationsWithPermission() + public function testFindLocationsWithPermission(): void { $repositoryMock = $this->getRepositoryMock(); /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ @@ -700,7 +703,7 @@ public function testFindLocationsWithPermission() $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') ->with(self::equalTo($spiResult)) - ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult): array { $spiResult->searchHits[0] = $endResult->searchHits[0]; return []; @@ -717,7 +720,7 @@ public function testFindLocationsWithPermission() /** * Test for the findLocations() method. */ - public function testFindLocationsWithNoPermissionsFilter() + public function testFindLocationsWithNoPermissionsFilter(): void { $repositoryMock = $this->getRepositoryMock(); /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ @@ -767,7 +770,7 @@ public function testFindLocationsWithNoPermissionsFilter() $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') ->with(self::equalTo($spiResult)) - ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult): array { $spiResult->searchHits[0] = $endResult->searchHits[0]; return []; @@ -786,7 +789,7 @@ public function testFindLocationsWithNoPermissionsFilter() * * @covers \Ibexa\Contracts\Core\Repository\SearchService::findLocations */ - public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsException() + public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsException(): void { $indexer = $this->createMock(BackgroundIndexer::class); $indexer->expects(self::once()) @@ -818,7 +821,7 @@ public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsExceptio $mapper->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') ->with(self::equalTo($result)) - ->willReturnCallback(static function (SearchResult $spiResult) use ($location) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($location): array { unset($spiResult->searchHits[0]); $spiResult->totalCount = $spiResult->totalCount > 0 ? --$spiResult->totalCount : 0; @@ -834,9 +837,9 @@ public function testFindLocationsBackgroundIndexerWhenDomainMapperThrowsExceptio /** * Test for the findLocations() method. */ - public function testFindLocationsThrowsHandlerException() + public function testFindLocationsThrowsHandlerException(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $repositoryMock = $this->getRepositoryMock(); @@ -871,7 +874,7 @@ public function testFindLocationsThrowsHandlerException() /** * Test for the findLocations() method. */ - public function testFindLocationsWithDefaultQueryValues() + public function testFindLocationsWithDefaultQueryValues(): void { $repositoryMock = $this->getRepositoryMock(); /** @var \Ibexa\Contracts\Core\Search\Handler $searchHandlerMock */ @@ -922,7 +925,7 @@ public function testFindLocationsWithDefaultQueryValues() $domainMapperMock->expects(self::once()) ->method('buildLocationDomainObjectsOnSearchResult') ->with(self::equalTo($spiResult)) - ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult) { + ->willReturnCallback(static function (SearchResult $spiResult) use ($endResult): array { $spiResult->searchHits[0] = $endResult->searchHits[0]; return []; diff --git a/tests/lib/Repository/Service/Mock/UrlAliasTest.php b/tests/lib/Repository/Service/Mock/UrlAliasTest.php index e8e67f5da9..a65b0d31fb 100644 --- a/tests/lib/Repository/Service/Mock/UrlAliasTest.php +++ b/tests/lib/Repository/Service/Mock/UrlAliasTest.php @@ -51,11 +51,11 @@ protected function setUp(): void /** * Test for the __construct() method. */ - public function testConstructor() + public function testConstructor(): void { $repositoryMock = $this->getRepositoryMock(); - new UrlALiasService( + new URLAliasService( $repositoryMock, $this->urlAliasHandler, $this->getNameSchemaServiceMock(), @@ -67,7 +67,7 @@ public function testConstructor() /** * Test for the load() method. */ - public function testLoad() + public function testLoad(): void { $mockedService = $this->getPartlyMockedURLAliasServiceService(['extractPath']); /** @var \PHPUnit\Framework\MockObject\MockObject $urlAliasHandlerMock */ @@ -93,7 +93,7 @@ public function testLoad() /** * Test for the load() method. */ - public function testLoadThrowsNotFoundException() + public function testLoadThrowsNotFoundException(): void { $mockedService = $this->getPartlyMockedURLAliasServiceService(['extractPath']); /** @var \PHPUnit\Framework\MockObject\MockObject $urlAliasHandlerMock */ @@ -109,7 +109,7 @@ public function testLoadThrowsNotFoundException() $mockedService->load(self::EXAMPLE_ID); } - protected function getSpiUrlAlias() + protected function getSpiUrlAlias(): SPIUrlAlias { $pathElement1 = [ 'always-available' => true, @@ -146,7 +146,7 @@ protected function getSpiUrlAlias() /** * Test for the load() method. */ - public function testLoadThrowsNotFoundExceptionPath() + public function testLoadThrowsNotFoundExceptionPath(): void { $spiUrlAlias = $this->getSpiUrlAlias(); $urlAliasService = $this->getPartlyMockedURLAliasServiceService( @@ -168,7 +168,7 @@ public function testLoadThrowsNotFoundExceptionPath() /** * Test for the removeAliases() method. */ - public function testRemoveAliasesThrowsInvalidArgumentException() + public function testRemoveAliasesThrowsInvalidArgumentException(): void { $aliasList = [new URLAlias(['isCustom' => false])]; $mockedService = $this->getPartlyMockedURLAliasServiceService(); @@ -188,7 +188,7 @@ public function testRemoveAliasesThrowsInvalidArgumentException() /** * Test for the removeAliases() method. */ - public function testRemoveAliases() + public function testRemoveAliases(): void { $aliasList = [new URLAlias(['isCustom' => true])]; $spiAliasList = [new SPIUrlAlias(['isCustom' => true])]; @@ -223,7 +223,7 @@ public function testRemoveAliases() /** * Test for the removeAliases() method. */ - public function testRemoveAliasesWithRollback() + public function testRemoveAliasesWithRollback(): void { $aliasList = [new URLAlias(['isCustom' => true])]; $spiAliasList = [new SPIUrlAlias(['isCustom' => true])]; @@ -259,7 +259,7 @@ public function testRemoveAliasesWithRollback() $mockedService->removeAliases($aliasList); } - public function providerForTestListAutogeneratedLocationAliasesPath() + public function providerForTestListAutogeneratedLocationAliasesPath(): array { $pathElement1 = [ 'always-available' => true, @@ -631,7 +631,7 @@ public function providerForTestListAutogeneratedLocationAliasesPath() * * @dataProvider providerForTestListAutogeneratedLocationAliasesPath */ - public function testListAutogeneratedLocationAliasesPath($spiUrlAliases, $prioritizedLanguageCodes, $paths) + public function testListAutogeneratedLocationAliasesPath(array $spiUrlAliases, array $prioritizedLanguageCodes, array $paths): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -667,10 +667,10 @@ public function testListAutogeneratedLocationAliasesPath($spiUrlAliases, $priori * @dataProvider providerForTestListAutogeneratedLocationAliasesPath */ public function testListAutogeneratedLocationAliasesPathCustomConfiguration( - $spiUrlAliases, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -707,7 +707,7 @@ public function testListAutogeneratedLocationAliasesPathCustomConfiguration( /** * Test for the load() method. */ - public function testListLocationAliasesWithShowAllTranslations() + public function testListLocationAliasesWithShowAllTranslations(): void { $pathElement1 = [ 'always-available' => true, @@ -764,7 +764,7 @@ public function testListLocationAliasesWithShowAllTranslations() /** * Test for the load() method. */ - public function testListLocationAliasesWithShowAllTranslationsCustomConfiguration() + public function testListLocationAliasesWithShowAllTranslationsCustomConfiguration(): void { $pathElement1 = [ 'always-available' => true, @@ -825,7 +825,7 @@ public function testListLocationAliasesWithShowAllTranslationsCustomConfiguratio self::assertEquals('/jedan/dva/tri', $urlAliases[0]->path); } - public function providerForTestListAutogeneratedLocationAliasesEmpty() + public function providerForTestListAutogeneratedLocationAliasesEmpty(): array { $pathElement1 = [ 'always-available' => true, @@ -907,7 +907,7 @@ public function providerForTestListAutogeneratedLocationAliasesEmpty() * * @dataProvider providerForTestListAutogeneratedLocationAliasesEmpty */ - public function testListAutogeneratedLocationAliasesEmpty($spiUrlAliases, $prioritizedLanguageCodes) + public function testListAutogeneratedLocationAliasesEmpty(array $spiUrlAliases, array $prioritizedLanguageCodes): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -928,9 +928,9 @@ public function testListAutogeneratedLocationAliasesEmpty($spiUrlAliases, $prior * @dataProvider providerForTestListAutogeneratedLocationAliasesEmpty */ public function testListAutogeneratedLocationAliasesEmptyCustomConfiguration( - $spiUrlAliases, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -950,7 +950,7 @@ public function testListAutogeneratedLocationAliasesEmptyCustomConfiguration( self::assertEmpty($urlAliases); } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath(): array { $pathElement1 = [ 'always-available' => true, @@ -1275,11 +1275,11 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeP * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath */ public function testListAutogeneratedLocationAliasesWithLanguageCodePath( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -1309,11 +1309,11 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodePath( * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath */ public function testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -1343,7 +1343,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodePathCustomCo } } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty(): array { $pathElement1 = [ 'always-available' => true, @@ -1538,10 +1538,10 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeE * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeEmpty( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -1561,10 +1561,10 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeEmpty( * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -1584,7 +1584,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomC self::assertEmpty($urlAliases); } - public function providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath() + public function providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -1648,7 +1648,7 @@ public function providerForTestListAutogeneratedLocationAliasesMultipleLanguages * * @dataProvider providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath */ - public function testListAutogeneratedLocationAliasesMultipleLanguagesPath($spiUrlAliases, $prioritizedLanguageCodes, $paths) + public function testListAutogeneratedLocationAliasesMultipleLanguagesPath(array $spiUrlAliases, array $prioritizedLanguageCodes, array $paths): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -1679,10 +1679,10 @@ public function testListAutogeneratedLocationAliasesMultipleLanguagesPath($spiUr * @dataProvider providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath */ public function testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration( - $spiUrlAliases, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -1712,7 +1712,7 @@ public function testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomC } } - public function providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty() + public function providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -1756,7 +1756,7 @@ public function providerForTestListAutogeneratedLocationAliasesMultipleLanguages * * @dataProvider providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty */ - public function testListAutogeneratedLocationAliasesMultipleLanguagesEmpty($spiUrlAliases, $prioritizedLanguageCodes) + public function testListAutogeneratedLocationAliasesMultipleLanguagesEmpty(array $spiUrlAliases, array $prioritizedLanguageCodes): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -1777,9 +1777,9 @@ public function testListAutogeneratedLocationAliasesMultipleLanguagesEmpty($spiU * @dataProvider providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty */ public function testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration( - $spiUrlAliases, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -1798,7 +1798,7 @@ public function testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustom self::assertEmpty($urlAliases); } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -1867,11 +1867,11 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeM * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath */ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -1900,11 +1900,11 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLang * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath */ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -1933,7 +1933,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLang } } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -1990,10 +1990,10 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeM * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -2012,10 +2012,10 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLang * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -2034,7 +2034,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLang self::assertEmpty($urlAliases); } - public function providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath() + public function providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -2105,10 +2105,10 @@ public function providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePa * @dataProvider providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath */ public function testListAutogeneratedLocationAliasesAlwaysAvailablePath( - $spiUrlAliases, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -2137,10 +2137,10 @@ public function testListAutogeneratedLocationAliasesAlwaysAvailablePath( * @dataProvider providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath */ public function testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration( - $spiUrlAliases, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -2169,7 +2169,7 @@ public function testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomCon } } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -2221,11 +2221,11 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeA * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath */ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -2254,11 +2254,11 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvaila * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath */ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes, - $paths - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes, + array $paths + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -2287,7 +2287,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvaila } } - public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty() + public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty(): array { $spiUrlAliases = [ new SPIUrlAlias( @@ -2338,10 +2338,10 @@ public function providerForTestListAutogeneratedLocationAliasesWithLanguageCodeA * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -2360,10 +2360,10 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvaila * @dataProvider providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty */ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration( - $spiUrlAliases, - $languageCode, - $prioritizedLanguageCodes - ) { + array $spiUrlAliases, + string $languageCode, + array $prioritizedLanguageCodes + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, [] @@ -2385,7 +2385,7 @@ public function testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvaila /** * Test for the listGlobalAliases() method. */ - public function testListGlobalAliases() + public function testListGlobalAliases(): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -2429,7 +2429,7 @@ public function testListGlobalAliases() /** * Test for the listGlobalAliases() method. */ - public function testListGlobalAliasesEmpty() + public function testListGlobalAliasesEmpty(): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService(); @@ -2468,7 +2468,7 @@ public function testListGlobalAliasesEmpty() /** * Test for the listGlobalAliases() method. */ - public function testListGlobalAliasesWithParameters() + public function testListGlobalAliasesWithParameters(): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService(); @@ -2496,7 +2496,7 @@ public function testListGlobalAliasesWithParameters() /** * Test for the lookup() method. */ - public function testLookupThrowsNotFoundException() + public function testLookupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -2515,7 +2515,7 @@ public function testLookupThrowsNotFoundException() $urlAliasService->lookup('url'); } - public function providerForTestLookupThrowsNotFoundExceptionPath() + public function providerForTestLookupThrowsNotFoundExceptionPath(): array { return [ // alias does not exist in requested language @@ -2534,7 +2534,7 @@ public function providerForTestLookupThrowsNotFoundExceptionPath() * * @dataProvider providerForTestLookupThrowsNotFoundExceptionPath */ - public function testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable($url, $prioritizedLanguageList, $languageCode) + public function testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable(string $url, array $prioritizedLanguageList, string $languageCode): void { $this->expectException(NotFoundException::class); @@ -2574,7 +2574,7 @@ public function testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable($ur $urlAliasService->lookup($url, $languageCode); } - public function providerForTestLookup() + public function providerForTestLookup(): array { return [ // showAllTranslations setting is true @@ -2591,7 +2591,7 @@ public function providerForTestLookup() * * @dataProvider providerForTestLookup */ - public function testLookup($prioritizedLanguageList, $showAllTranslations, $alwaysAvailable, $languageCode) + public function testLookup(array $prioritizedLanguageList, bool $showAllTranslations, bool $alwaysAvailable, ?string $languageCode): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -2635,7 +2635,7 @@ public function testLookup($prioritizedLanguageList, $showAllTranslations, $alwa ); } - public function providerForTestLookupWithSharedTranslation() + public function providerForTestLookupWithSharedTranslation(): array { return [ // showAllTranslations setting is true @@ -2662,11 +2662,11 @@ public function providerForTestLookupWithSharedTranslation() * @dataProvider providerForTestLookupWithSharedTranslation */ public function testLookupWithSharedTranslation( - $prioritizedLanguageList, - $showAllTranslations, - $alwaysAvailable, - $languageCode - ) { + array $prioritizedLanguageList, + bool $showAllTranslations, + bool $alwaysAvailable, + ?string $languageCode + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageList, @@ -2712,7 +2712,7 @@ public function testLookupWithSharedTranslation( /** * Test for the reverseLookup() method. */ - public function testReverseLookupCustomConfiguration() + public function testReverseLookupCustomConfiguration(): void { $this->expectException(NotFoundException::class); @@ -2738,7 +2738,7 @@ public function testReverseLookupCustomConfiguration() /** * Test for the reverseLookup() method. */ - public function testReverseLookupThrowsNotFoundException() + public function testReverseLookupThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -2760,7 +2760,7 @@ public function testReverseLookupThrowsNotFoundException() self::equalTo($languageCode) )->willReturn( [ - new UrlAlias( + new URLAlias( [ 'languageCodes' => ['eng-GB'], 'alwaysAvailable' => false, @@ -2782,7 +2782,7 @@ public function providerForTestReverseLookup() * * @dataProvider providerForTestReverseLookup */ - public function testReverseLookupPath($spiUrlAliases, $prioritizedLanguageCodes, $paths, $reverseLookupLanguageCode) + public function testReverseLookupPath(array $spiUrlAliases, array $prioritizedLanguageCodes, array $paths, $reverseLookupLanguageCode): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, @@ -2814,10 +2814,10 @@ public function providerForTestReverseLookupAlwaysAvailablePath() * @dataProvider providerForTestReverseLookupAlwaysAvailablePath */ public function testReverseLookupAlwaysAvailablePath( - $spiUrlAliases, - $prioritizedLanguageCodes, + array $spiUrlAliases, + array $prioritizedLanguageCodes, $paths - ) { + ): void { $urlAliasService = $this->getPartlyMockedURLAliasServiceService( null, $prioritizedLanguageCodes @@ -2836,7 +2836,7 @@ public function testReverseLookupAlwaysAvailablePath( /** * Test for the reverseLookup() method. */ - public function testReverseLookupWithShowAllTranslations() + public function testReverseLookupWithShowAllTranslations(): void { $spiUrlAlias = $this->getSpiUrlAlias(); $urlAliasService = $this->getPartlyMockedURLAliasServiceService( @@ -2855,7 +2855,7 @@ public function testReverseLookupWithShowAllTranslations() /** * Test for the createUrlAlias() method. */ - public function testCreateUrlAlias() + public function testCreateUrlAlias(): void { $location = $this->getLocationStub(); $this->permissionResolver @@ -2908,9 +2908,9 @@ public function testCreateUrlAlias() /** * Test for the createUrlAlias() method. */ - public function testCreateUrlAliasWithRollback() + public function testCreateUrlAliasWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $location = $this->getLocationStub(); @@ -2964,7 +2964,7 @@ public function testCreateUrlAliasWithRollback() /** * Test for the createUrlAlias() method. */ - public function testCreateUrlAliasThrowsInvalidArgumentException() + public function testCreateUrlAliasThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -3010,7 +3010,7 @@ public function testCreateUrlAliasThrowsInvalidArgumentException() /** * Test for the createGlobalUrlAlias() method. */ - public function testCreateGlobalUrlAlias() + public function testCreateGlobalUrlAlias(): void { $resource = 'module:content/search'; @@ -3064,9 +3064,9 @@ public function testCreateGlobalUrlAlias() /** * Test for the createGlobalUrlAlias() method. */ - public function testCreateGlobalUrlAliasWithRollback() + public function testCreateGlobalUrlAliasWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $this->expectExceptionMessage('Handler threw an exception'); $resource = 'module:content/search'; @@ -3119,7 +3119,7 @@ public function testCreateGlobalUrlAliasWithRollback() /** * Test for the createGlobalUrlAlias() method. */ - public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionResource() + public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionResource(): void { $this->expectException(InvalidArgumentException::class); @@ -3144,7 +3144,7 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionResource() /** * Test for the createGlobalUrlAlias() method. */ - public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath() + public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath(): void { $this->expectException(InvalidArgumentException::class); @@ -3190,7 +3190,7 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath() * @depends Ibexa\Tests\Core\Repository\Service\Mock\UrlAliasTest::testCreateUrlAliasWithRollback * @depends Ibexa\Tests\Core\Repository\Service\Mock\UrlAliasTest::testCreateUrlAliasThrowsInvalidArgumentException */ - public function testCreateGlobalUrlAliasForLocation() + public function testCreateGlobalUrlAliasForLocation(): void { $repositoryMock = $this->getRepositoryMock(); $mockedService = $this->getPartlyMockedURLAliasServiceService(['createUrlAlias']); @@ -3257,7 +3257,7 @@ public function testCreateGlobalUrlAliasForLocation() * * @return \Ibexa\Core\Repository\Values\Content\Location */ - protected function getLocationStub($id = 42) + protected function getLocationStub($id = 42): Location { return new Location(['id' => $id]); } @@ -3290,7 +3290,7 @@ protected function getPartlyMockedURLAliasServiceService( array $methods = null, array $prioritizedLanguages = ['eng-GB'], bool $showAllTranslations = false - ) { + ): MockObject { $languageResolverMock = $this->createMock(LanguageResolver::class); $languageResolverMock @@ -3320,7 +3320,7 @@ protected function getPartlyMockedURLAliasServiceService( * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias */ - public function testCreateUrlAliasThrowsUnauthorizedException() + public function testCreateUrlAliasThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -3348,7 +3348,7 @@ public function testCreateUrlAliasThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias */ - public function testCreateGlobalUrlAliasThrowsUnauthorizedException() + public function testCreateGlobalUrlAliasThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -3375,7 +3375,7 @@ public function testCreateGlobalUrlAliasThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::removeAliases */ - public function testRemoveAliasesThrowsUnauthorizedException() + public function testRemoveAliasesThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); diff --git a/tests/lib/Repository/Service/Mock/UrlTest.php b/tests/lib/Repository/Service/Mock/UrlTest.php index 65132a6346..eb0e4d8dc9 100644 --- a/tests/lib/Repository/Service/Mock/UrlTest.php +++ b/tests/lib/Repository/Service/Mock/UrlTest.php @@ -25,6 +25,7 @@ use Ibexa\Core\Base\Exceptions\UnauthorizedException; use Ibexa\Core\Repository\URLService; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; class UrlTest extends BaseServiceMockTest { @@ -45,7 +46,7 @@ protected function setUp(): void $this->permissionResolver = $this->getPermissionResolverMock(); } - public function testFindUrlsUnauthorized() + public function testFindUrlsUnauthorized(): void { $this->configureUrlViewPermissionForHasAccess(false); @@ -53,7 +54,7 @@ public function testFindUrlsUnauthorized() $this->createUrlService()->findUrls(new URLQuery()); } - public function testFindUrlsNonNumericOffset() + public function testFindUrlsNonNumericOffset(): void { $this->expectException(InvalidArgumentValue::class); @@ -63,7 +64,7 @@ public function testFindUrlsNonNumericOffset() $this->createUrlService()->findUrls($query); } - public function testFindUrlsNonNumericLimit() + public function testFindUrlsNonNumericLimit(): void { $this->expectException(InvalidArgumentValue::class); @@ -73,7 +74,7 @@ public function testFindUrlsNonNumericLimit() $this->createUrlService()->findUrls($query); } - public function testFindUrls() + public function testFindUrls(): void { $url = $this->getApiUrl(); @@ -102,7 +103,7 @@ public function testFindUrls() self::assertEquals($expected, $this->createUrlService()->findUrls($query)); } - public function testUpdateUrlUnauthorized() + public function testUpdateUrlUnauthorized(): void { $this->expectException(UnauthorizedException::class); @@ -113,7 +114,7 @@ public function testUpdateUrlUnauthorized() $this->createUrlService()->updateUrl($url, new URLUpdateStruct()); } - public function testUpdateUrlNonUnique() + public function testUpdateUrlNonUnique(): void { $this->expectException(InvalidArgumentException::class); @@ -135,7 +136,7 @@ public function testUpdateUrlNonUnique() $urlService->updateUrl($url, $struct); } - public function testUpdateUrl() + public function testUpdateUrl(): void { $apiUrl = $this->getApiUrl(self::URL_ID, self::URL_IBEXA_CO); $apiStruct = new URLUpdateStruct([ @@ -160,7 +161,7 @@ public function testUpdateUrl() $this->urlHandler ->expects(self::once()) ->method('updateUrl') - ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct) { + ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct): void { $this->assertEquals($apiUrl->id, $id); $this->assertEquals($apiStruct->url, $struct->url); @@ -194,7 +195,7 @@ public function testUpdateUrl() ]), $urlService->updateUrl($apiUrl, $apiStruct)); } - public function testUpdateUrlStatus() + public function testUpdateUrlStatus(): void { $apiUrl = $this->getApiUrl(self::URL_ID, self::URL_IBEXA_CO); $apiStruct = new URLUpdateStruct([ @@ -220,7 +221,7 @@ public function testUpdateUrlStatus() $this->urlHandler ->expects(self::once()) ->method('updateUrl') - ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct) { + ->willReturnCallback(function ($id, $struct) use ($apiUrl, $apiStruct): void { $this->assertEquals($apiUrl->id, $id); $this->assertEquals($apiUrl->url, $struct->url); @@ -254,7 +255,7 @@ public function testUpdateUrlStatus() ]), $urlService->updateUrl($apiUrl, $apiStruct)); } - public function testLoadByIdUnauthorized() + public function testLoadByIdUnauthorized(): void { $this->expectException(UnauthorizedException::class); @@ -276,7 +277,7 @@ public function testLoadByIdUnauthorized() $this->createUrlService()->loadById(self::URL_ID); } - public function testLoadById() + public function testLoadById(): void { $url = new URL([ 'id' => self::URL_ID, @@ -295,7 +296,7 @@ public function testLoadById() self::assertEquals($url, $this->createUrlService()->loadById(self::URL_ID)); } - public function testLoadByUrlUnauthorized() + public function testLoadByUrlUnauthorized(): void { $this->expectException(UnauthorizedException::class); @@ -319,7 +320,7 @@ public function testLoadByUrlUnauthorized() $this->createUrlService()->loadByUrl(self::URL_IBEXA_CO); } - public function testLoadByUrl() + public function testLoadByUrl(): void { $url = self::URL_IBEXA_CO; @@ -343,7 +344,7 @@ public function testLoadByUrl() /** * @dataProvider dateProviderForFindUsages */ - public function testFindUsages($offset, $limit, ContentQuery $expectedQuery, array $usages) + public function testFindUsages(int $offset, int $limit, ContentQuery $expectedQuery, array $usages): void { $url = $this->getApiUrl(self::URL_ID, self::URL_IBEXA_CO); @@ -352,11 +353,11 @@ public function testFindUsages($offset, $limit, ContentQuery $expectedQuery, arr $searchService ->expects(self::once()) ->method('findContentInfo') - ->willReturnCallback(function ($query) use ($expectedQuery, $usages) { + ->willReturnCallback(function ($query) use ($expectedQuery, $usages): \Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult { $this->assertEquals($expectedQuery, $query); return new ContentSearchResults([ - 'searchHits' => array_map(static function ($id) { + 'searchHits' => array_map(static function ($id): SearchHit { return new SearchHit([ 'valueObject' => new ContentInfo([ 'id' => $id, @@ -388,7 +389,7 @@ public function testFindUsages($offset, $limit, ContentQuery $expectedQuery, arr } } - public function dateProviderForFindUsages() + public function dateProviderForFindUsages(): array { return [ [ @@ -419,7 +420,7 @@ public function dateProviderForFindUsages() ]; } - public function testCreateUpdateStruct() + public function testCreateUpdateStruct(): void { self::assertEquals(new URLUpdateStruct(), $this->createUrlService()->createUpdateStruct()); } @@ -471,7 +472,7 @@ protected function configurePermissions(array $permissions) /** * @return \Ibexa\Contracts\Core\Repository\URLService|\PHPUnit\Framework\MockObject\MockObject */ - private function createUrlService(array $methods = null) + private function createUrlService(array $methods = null): MockObject { return $this ->getMockBuilder(URLService::class) @@ -480,7 +481,7 @@ private function createUrlService(array $methods = null) ->getMock(); } - private function getApiUrl($id = null, $url = null) + private function getApiUrl($id = null, $url = null): URL { return new URL(['id' => $id, 'url' => $url]); } diff --git a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php index 1a21ebd83b..9ef6323b43 100644 --- a/tests/lib/Repository/Service/Mock/UrlWildcardTest.php +++ b/tests/lib/Repository/Service/Mock/UrlWildcardTest.php @@ -19,6 +19,7 @@ use Ibexa\Core\Base\Exceptions\NotFoundException as APINotFoundException; use Ibexa\Core\Repository\URLWildcardService; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * Mock Test case for UrlWildcard Service. @@ -45,7 +46,7 @@ protected function setUp(): void * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create */ - public function testCreateThrowsUnauthorizedException() + public function testCreateThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -72,7 +73,7 @@ public function testCreateThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create */ - public function testCreateThrowsInvalidArgumentException() + public function testCreateThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -100,7 +101,7 @@ public function testCreateThrowsInvalidArgumentException() $mockedService->create('/lorem/ipsum', 'opossum', true); } - public function providerForTestCreateThrowsContentValidationException() + public function providerForTestCreateThrowsContentValidationException(): array { return [ ['fruit', 'food/{1}', true], @@ -116,7 +117,7 @@ public function providerForTestCreateThrowsContentValidationException() * * @dataProvider providerForTestCreateThrowsContentValidationException */ - public function testCreateThrowsContentValidationException($sourceUrl, $destinationUrl, $forward) + public function testCreateThrowsContentValidationException(string $sourceUrl, string $destinationUrl, bool $forward): void { $this->expectException(ContentValidationException::class); @@ -144,7 +145,7 @@ public function testCreateThrowsContentValidationException($sourceUrl, $destinat $mockedService->create($sourceUrl, $destinationUrl, $forward); } - public function providerForTestCreate() + public function providerForTestCreate(): array { return [ ['fruit', 'food', true], @@ -164,7 +165,7 @@ public function providerForTestCreate() * * @dataProvider providerForTestCreate */ - public function testCreate($sourceUrl, $destinationUrl, $forward) + public function testCreate(string $sourceUrl, string $destinationUrl, bool $forward): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -233,9 +234,9 @@ public function testCreate($sourceUrl, $destinationUrl, $forward) * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::create */ - public function testCreateWithRollback() + public function testCreateWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -286,7 +287,7 @@ public function testCreateWithRollback() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove */ - public function testRemoveThrowsUnauthorizedException() + public function testRemoveThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -319,7 +320,7 @@ public function testRemoveThrowsUnauthorizedException() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove */ - public function testRemove() + public function testRemove(): void { $wildcard = new URLWildcard(['id' => 'McBomb']); @@ -357,9 +358,9 @@ public function testRemove() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove */ - public function testRemoveWithRollback() + public function testRemoveWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $wildcard = new URLWildcard(['id' => 'McBoo']); @@ -401,9 +402,9 @@ public function testRemoveWithRollback() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove */ - public function testLoadThrowsException() + public function testLoadThrowsException(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -427,7 +428,7 @@ public function testLoadThrowsException() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::remove */ - public function testLoad() + public function testLoad(): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -470,7 +471,7 @@ public function testLoad() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll */ - public function testLoadAll() + public function testLoadAll(): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -493,7 +494,7 @@ public function testLoadAll() * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::loadAll */ - public function testLoadAllWithLimitAndOffset() + public function testLoadAllWithLimitAndOffset(): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -539,7 +540,7 @@ public function testLoadAllWithLimitAndOffset() /** * @return array */ - public function providerForTestTranslateThrowsNotFoundException() + public function providerForTestTranslateThrowsNotFoundException(): array { return [ [ @@ -584,7 +585,7 @@ public function providerForTestTranslateThrowsNotFoundException() * * @dataProvider providerForTestTranslateThrowsNotFoundException */ - public function testTranslateThrowsNotFoundException($createArray, $url) + public function testTranslateThrowsNotFoundException(array $createArray, string $url): void { $this->expectException(NotFoundException::class); @@ -606,7 +607,7 @@ public function testTranslateThrowsNotFoundException($createArray, $url) /** * @return array */ - public function providerForTestTranslate() + public function providerForTestTranslate(): array { return [ [ @@ -691,7 +692,7 @@ public function providerForTestTranslate() * * @dataProvider providerForTestTranslate */ - public function testTranslate($createArray, $url, $uri) + public function testTranslate(array $createArray, string $url, string $uri): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -726,7 +727,7 @@ public function testTranslate($createArray, $url, $uri) * * @covers \Ibexa\Contracts\Core\Repository\URLWildcardService::translate */ - public function testTranslateUsesLongestMatchingWildcard() + public function testTranslateUsesLongestMatchingWildcard(): void { $mockedService = $this->getPartlyMockedURLWildcardService(); @@ -764,7 +765,7 @@ public function testTranslateUsesLongestMatchingWildcard() * * @return \Ibexa\Core\Repository\URLWildcardService|\PHPUnit\Framework\MockObject\MockObject */ - protected function getPartlyMockedURLWildcardService(array $methods = null) + protected function getPartlyMockedURLWildcardService(array $methods = null): MockObject { return $this->getMockBuilder(URLWildcardService::class) ->setMethods($methods) diff --git a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php index ebee11608b..ca4ee6362a 100644 --- a/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php +++ b/tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php @@ -20,7 +20,7 @@ class UserPasswordValidatorTest extends TestCase /** * @dataProvider dateProviderForValidate */ - public function testValidate(array $constraints, string $password, array $expectedErrors) + public function testValidate(array $constraints, string $password, array $expectedErrors): void { $validator = new UserPasswordValidator($constraints); diff --git a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php index 9503fbbfe0..363c75a7f3 100644 --- a/tests/lib/Repository/Service/Mock/UserPreferenceTest.php +++ b/tests/lib/Repository/Service/Mock/UserPreferenceTest.php @@ -18,6 +18,7 @@ use Ibexa\Core\Repository\UserPreferenceService; use Ibexa\Core\Repository\Values\User\UserReference; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; class UserPreferenceTest extends BaseServiceMockTest { @@ -45,18 +46,18 @@ protected function setUp(): void /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference() */ - public function testSetUserPreference() + public function testSetUserPreference(): void { $apiUserPreferenceSetStruct = new APIUserPreferenceSetStruct([ 'name' => 'setting', 'value' => 'value', ]); - $this->assertTransactionIsCommitted(function () { + $this->assertTransactionIsCommitted(function (): void { $this->userSPIPreferenceHandler ->expects($this->once()) ->method('setUserPreference') - ->willReturnCallback(function (UserPreferenceSetStruct $setStruct) { + ->willReturnCallback(function (UserPreferenceSetStruct $setStruct): UserPreference { $this->assertEquals(self::USER_PREFERENCE_NAME, $setStruct->name); $this->assertEquals(self::USER_PREFERENCE_VALUE, $setStruct->value); $this->assertEquals(self::CURRENT_USER_ID, $setStruct->userId); @@ -71,7 +72,7 @@ public function testSetUserPreference() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference */ - public function testSetUserPreferenceThrowsInvalidArgumentException() + public function testSetUserPreferenceThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); @@ -79,7 +80,7 @@ public function testSetUserPreferenceThrowsInvalidArgumentException() 'value' => 'value', ]); - $this->assertTransactionIsNotStarted(function () { + $this->assertTransactionIsNotStarted(function (): void { $this->userSPIPreferenceHandler->expects($this->never())->method('setUserPreference'); }); @@ -89,16 +90,16 @@ public function testSetUserPreferenceThrowsInvalidArgumentException() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::setUserPreference */ - public function testSetUserPreferenceWithRollback() + public function testSetUserPreferenceWithRollback(): void { - $this->expectException(\Exception::class); + $this->expectException(Exception::class); $apiUserPreferenceSetStruct = new APIUserPreferenceSetStruct([ 'name' => 'setting', 'value' => 'value', ]); - $this->assertTransactionIsRollback(function () { + $this->assertTransactionIsRollback(function (): void { $this->userSPIPreferenceHandler ->expects($this->once()) ->method('setUserPreference') @@ -111,7 +112,7 @@ public function testSetUserPreferenceWithRollback() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::getUserPreference() */ - public function testGetUserPreference() + public function testGetUserPreference(): void { $userPreferenceName = 'setting'; $userPreferenceValue = 'value'; @@ -137,13 +138,13 @@ public function testGetUserPreference() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::loadUserPreferences */ - public function testLoadUserPreferences() + public function testLoadUserPreferences(): void { $offset = 0; $limit = 25; $expectedTotalCount = 10; - $expectedItems = array_map(function () { + $expectedItems = array_map(function (): APIUserPreference { return $this->createAPIUserPreference(); }, range(1, $expectedTotalCount)); @@ -157,7 +158,7 @@ public function testLoadUserPreferences() ->expects(self::once()) ->method('loadUserPreferences') ->with(self::CURRENT_USER_ID, $offset, $limit) - ->willReturn(array_map(static function ($locationId) { + ->willReturn(array_map(static function ($locationId): UserPreference { return new UserPreference([ 'name' => 'setting', 'value' => 'value', @@ -173,7 +174,7 @@ public function testLoadUserPreferences() /** * @covers \Ibexa\Contracts\Core\Repository\UserPreferenceService::getUserPreferenceCount() */ - public function testGetUserPreferenceCount() + public function testGetUserPreferenceCount(): void { $expectedTotalCount = 10; @@ -191,7 +192,7 @@ public function testGetUserPreferenceCount() /** * @return \Ibexa\Contracts\Core\Repository\UserPreferenceService|\PHPUnit\Framework\MockObject\MockObject */ - private function createAPIUserPreferenceService(array $methods = null) + private function createAPIUserPreferenceService(array $methods = null): MockObject { return $this ->getMockBuilder(UserPreferenceService::class) diff --git a/tests/lib/Repository/Service/Mock/UserTest.php b/tests/lib/Repository/Service/Mock/UserTest.php index 4788095a12..169108e537 100644 --- a/tests/lib/Repository/Service/Mock/UserTest.php +++ b/tests/lib/Repository/Service/Mock/UserTest.php @@ -10,10 +10,12 @@ use Exception; use Ibexa\Contracts\Core\Persistence\User\Handler as PersistenceUserHandler; use Ibexa\Contracts\Core\Persistence\User\RoleAssignment; +use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\ContentService as APIContentService; use Ibexa\Contracts\Core\Repository\PasswordHashService; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\UserService as APIUserService; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo as APIContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\User; @@ -22,6 +24,7 @@ use Ibexa\Core\Repository\User\PasswordValidatorInterface; use Ibexa\Core\Repository\UserService; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Repository\UserService @@ -116,10 +119,10 @@ protected function getPartlyMockedUserService(array $methods = null): APIUserSer */ private function mockDeleteUserFlow( Repository $repository, - APIUserService $userService, - APIContentService $contentService, + APIUserService&MockObject $userService, + ContentService&MockObject $contentService, User $user, - APIContentInfo $contentInfo, + ContentInfo&MockObject $contentInfo, PersistenceUserHandler $userHandler ): void { $loadedUser = $this->createMock(APIUser::class); diff --git a/tests/lib/Repository/Service/Mock/ValueStub.php b/tests/lib/Repository/Service/Mock/ValueStub.php index c889d0c2f5..da90fd28f0 100644 --- a/tests/lib/Repository/Service/Mock/ValueStub.php +++ b/tests/lib/Repository/Service/Mock/ValueStub.php @@ -27,7 +27,7 @@ public function __construct($value) $this->value = $value; } - public function __toString() + public function __toString(): string { return (string)$this->value; } diff --git a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php index 6a0f7160c8..38c2637299 100644 --- a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php @@ -9,6 +9,7 @@ use Closure; use Ibexa\Contracts\Core\Repository\LanguageResolver; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use ReflectionClass; use ReflectionMethod; @@ -32,13 +33,13 @@ abstract class AbstractServiceTest extends TestCase public const LANG_ARG = 0; /** @var \object|\PHPUnit\Framework\MockObject\MockObject */ - protected $innerApiServiceMock; + protected MockObject $innerApiServiceMock; /** @var object */ protected $service; /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver|\PHPUnit\Framework\MockObject\MockObject */ - protected $languageResolverMock; + protected MockObject $languageResolverMock; abstract public function getAPIServiceClassName(); @@ -83,7 +84,7 @@ abstract public function providerForPassTroughMethods(); * @param array $arguments * @param mixed $return */ - final public function testForPassTrough($method, array $arguments, $return = true) + final public function testForPassTrough($method, array $arguments, $return = true): void { if ($return) { $this->innerApiServiceMock @@ -152,7 +153,7 @@ protected function setLanguagesLookupArguments(array $arguments, $languageArgume * @param mixed|null $return * @param int $languageArgumentIndex From 0 and up, so the array index on $arguments. */ - final public function testForLanguagesLookup($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null) + final public function testForLanguagesLookup($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null): void { $languages = ['eng-GB', 'eng-US']; @@ -219,7 +220,7 @@ protected function setLanguagesPassTroughArguments(array $arguments, $languageAr * @param mixed|null $return * @param int $languageArgumentIndex From 0 and up, so the array index on $arguments. */ - final public function testForLanguagesPassTrough($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null) + final public function testForLanguagesPassTrough($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null): void { $languages = ['eng-GB', 'eng-US']; $arguments = $this->setLanguagesPassTroughArguments($arguments, $languageArgumentIndex, $languages); diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index 7327d4eee9..5ac43a0d11 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -33,7 +33,7 @@ public function getSiteAccessAwareServiceClassName(): string return ContentTypeService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $contentTypeGroupCreateStruct = new ContentTypeGroupCreateStruct(); $contentTypeGroupUpdateStruct = new ContentTypeGroupUpdateStruct(); @@ -103,7 +103,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { $contentType = new ContentType(); $contentTypeGroup = new ContentTypeGroup(); diff --git a/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php b/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php index 9832182548..b272f1f5b4 100644 --- a/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php +++ b/tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php @@ -32,7 +32,7 @@ public function testGetPrioritizedLanguages( bool $defaultShowAllTranslations, ?array $forcedLanguages, ?string $contextLanguage - ) { + ): void { // note: "use always available" does not affect this test $defaultUseAlwaysAvailable = true; diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index 666ee1d01e..5d8004047c 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -24,7 +24,7 @@ public function getSiteAccessAwareServiceClassName(): string return LanguageService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $languageCreateStruct = new LanguageCreateStruct(); $language = new Language(); @@ -55,7 +55,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { // string $method, array $arguments, bool $return, int $languageArgumentIndex return []; diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index 178367644b..925727a593 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -29,7 +29,7 @@ public function getSiteAccessAwareServiceClassName(): string return ObjectStateService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $objectStateGroupCreateStruct = new ObjectStateGroupCreateStruct(); $objectStateGroupUpdateStruct = new ObjectStateGroupUpdateStruct(); @@ -63,7 +63,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { $objectStateGroup = new ObjectStateGroup(); $objectState = new ObjectState(); diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index 9d7e85a428..45e391eba3 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -26,7 +26,7 @@ public function getSiteAccessAwareServiceClassName(): string return SearchService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { // string $method, array $arguments, bool $return = true return [ @@ -35,7 +35,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { $query = new Query(); $locationQuery = new LocationQuery(); @@ -43,7 +43,7 @@ public function providerForLanguagesLookupMethods() $content = new Content(); $searchResults = new SearchResult(); - $callback = function ($languageLookup) { + $callback = function ($languageLookup): void { $this->languageResolverMock ->expects($this->once()) ->method('getUseAlwaysAvailable') @@ -60,7 +60,7 @@ public function providerForLanguagesLookupMethods() ]; } - protected function setLanguagesLookupArguments(array $arguments, $languageArgumentIndex) + protected function setLanguagesLookupArguments(array $arguments, $languageArgumentIndex): array { $arguments[$languageArgumentIndex] = [ 'languages' => [], @@ -70,7 +70,7 @@ protected function setLanguagesLookupArguments(array $arguments, $languageArgume return $arguments; } - protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages) + protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages): array { $arguments[$languageArgumentIndex] = [ 'languages' => $languages, @@ -80,7 +80,7 @@ protected function setLanguagesLookupExpectedArguments(array $arguments, $langua return $arguments; } - protected function setLanguagesPassTroughArguments(array $arguments, $languageArgumentIndex, array $languages) + protected function setLanguagesPassTroughArguments(array $arguments, $languageArgumentIndex, array $languages): array { $arguments[$languageArgumentIndex] = [ 'languages' => $languages, diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index 30279d2456..c42742f92f 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -28,7 +28,7 @@ public function getSiteAccessAwareServiceClassName(): string return TrashService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $location = new Location(); $newLocation = new Location(); @@ -49,7 +49,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { // string $method, array $arguments, bool $return, int $languageArgumentIndex return []; diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index fc600a2f80..a40c46f9a5 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -24,7 +24,7 @@ public function getSiteAccessAwareServiceClassName(): string return URLAliasService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $location = new Location(); $urlAlias = new URLAlias(); @@ -42,12 +42,12 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { $location = new Location(); $urlAlias = new URLAlias(); - $callback = function ($languageLookup) { + $callback = function ($languageLookup): void { $this->languageResolverMock ->expects($this->once()) ->method('getShowAllTranslations') @@ -62,7 +62,7 @@ public function providerForLanguagesLookupMethods() ]; } - protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages) + protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages): array { $arguments[$languageArgumentIndex] = $languages; $arguments[$languageArgumentIndex - 1] = true; diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index c37cc72a85..e18f848a9b 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -34,7 +34,7 @@ public function getSiteAccessAwareServiceClassName(): string return UserService::class; } - public function providerForPassTroughMethods() + public function providerForPassTroughMethods(): array { $userGroupCreateStruct = new UserGroupCreateStruct(); $userGroupUpdateStruct = new UserGroupUpdateStruct(); @@ -84,7 +84,7 @@ public function providerForPassTroughMethods() ]; } - public function providerForLanguagesLookupMethods() + public function providerForLanguagesLookupMethods(): array { $userGroup = new UserGroup(); $user = new User(); diff --git a/tests/lib/Repository/Validator/TargetContentValidatorTest.php b/tests/lib/Repository/Validator/TargetContentValidatorTest.php index b7c0f07e1a..3ae1e67376 100644 --- a/tests/lib/Repository/Validator/TargetContentValidatorTest.php +++ b/tests/lib/Repository/Validator/TargetContentValidatorTest.php @@ -12,18 +12,19 @@ use Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Core\Repository\Validator\TargetContentValidator; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class TargetContentValidatorTest extends TestCase { /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit_Framework_MockObject_MockObject */ - private $contentHandler; + private MockObject $contentHandler; /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit_Framework_MockObject_MockObject */ - private $contentTypeHandler; + private MockObject $contentTypeHandler; /** @var \Ibexa\Core\Repository\Validator\TargetContentValidator */ - private $targetContentValidator; + private TargetContentValidator $targetContentValidator; public function setUp(): void { diff --git a/tests/lib/Repository/Values/Content/ContentTest.php b/tests/lib/Repository/Values/Content/ContentTest.php index f1bdd191d1..59c3f58321 100644 --- a/tests/lib/Repository/Values/Content/ContentTest.php +++ b/tests/lib/Repository/Values/Content/ContentTest.php @@ -21,10 +21,10 @@ final class ContentTest extends TestCase { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Field[] */ - private $internalFields; + private array $internalFields; /** @var \Ibexa\Core\Repository\Values\Content\Content */ - private $content; + private Content $content; protected function setUp(): void { diff --git a/tests/lib/Repository/Values/Content/LanguageTest.php b/tests/lib/Repository/Values/Content/LanguageTest.php index 10c32866bc..ebe2a3b825 100644 --- a/tests/lib/Repository/Values/Content/LanguageTest.php +++ b/tests/lib/Repository/Values/Content/LanguageTest.php @@ -23,7 +23,7 @@ class LanguageTest extends TestCase /** * Test default properties of just created class. */ - public function testNewClass() + public function testNewClass(): void { $language = new Language(); @@ -41,7 +41,7 @@ public function testNewClass() /** * Test retrieving missing property. */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); $this->expectExceptionMessage('Property \'notDefined\' not found on class'); @@ -54,7 +54,7 @@ public function testMissingProperty() /** * Test setting read only property. */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); $this->expectExceptionMessage('Property \'id\' is readonly on class'); @@ -67,7 +67,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $language = new Language(); $value = isset($language->notDefined); @@ -80,7 +80,7 @@ public function testIsPropertySet() /** * Test unsetting a property. */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); $this->expectExceptionMessage('Property \'id\' is readonly on class'); diff --git a/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php b/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php index ccf8f75215..97bb997a13 100644 --- a/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php +++ b/tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php @@ -15,7 +15,7 @@ final class DateMetadataTest extends TestCase /** * @dataProvider provideValidConstructorArguments */ - public function testConstruction(string $target, string $operator, $value): void + public function testConstruction(string $target, string $operator, int $value): void { $criterion = new DateMetadata($target, $operator, $value); self::assertSame($target, $criterion->target); diff --git a/tests/lib/Repository/Values/Content/SectionTest.php b/tests/lib/Repository/Values/Content/SectionTest.php index c64f66e726..932831e8b5 100644 --- a/tests/lib/Repository/Values/Content/SectionTest.php +++ b/tests/lib/Repository/Values/Content/SectionTest.php @@ -22,7 +22,7 @@ class SectionTest extends TestCase * * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Section::__construct */ - public function testNewClass() + public function testNewClass(): void { $section = new Section(); @@ -41,7 +41,7 @@ public function testNewClass() * * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Section::__get */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -55,7 +55,7 @@ public function testMissingProperty() * * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Section::__set */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -69,7 +69,7 @@ public function testReadOnlyProperty() * * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Section::__isset */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $section = new Section(); $value = isset($section->notDefined); @@ -84,7 +84,7 @@ public function testIsPropertySet() * * @covers \Ibexa\Contracts\Core\Repository\Values\Content\Section::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/Content/TrashItemTest.php b/tests/lib/Repository/Values/Content/TrashItemTest.php index 41e3ca2f9c..8350a8ca8d 100644 --- a/tests/lib/Repository/Values/Content/TrashItemTest.php +++ b/tests/lib/Repository/Values/Content/TrashItemTest.php @@ -21,7 +21,7 @@ class TrashItemTest extends TestCase { use ValueObjectTestTrait; - public function testNewClass() + public function testNewClass(): void { // create ContentInfo to be able to retrieve the contentId property via magic method $contentInfo = new ContentInfo(); @@ -50,7 +50,7 @@ public function testNewClass() /** * Test retrieving missing property. */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -62,7 +62,7 @@ public function testMissingProperty() /** * Test setting read only property. */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -74,7 +74,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $trashItem = new TrashItem(); $value = isset($trashItem->notDefined); @@ -89,7 +89,7 @@ public function testIsPropertySet() * * @covers \Ibexa\Core\Repository\Values\Content\TrashItem::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php index afb8eb15b5..43393acef1 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php @@ -16,7 +16,7 @@ */ class ContentTypeDraftTest extends TestCase { - public function testObjectProperties() + public function testObjectProperties(): void { $object = new ContentTypeDraft( [ diff --git a/tests/lib/Repository/Values/MultiLanguageTestTrait.php b/tests/lib/Repository/Values/MultiLanguageTestTrait.php index 24495987c7..5451a17d59 100644 --- a/tests/lib/Repository/Values/MultiLanguageTestTrait.php +++ b/tests/lib/Repository/Values/MultiLanguageTestTrait.php @@ -23,7 +23,7 @@ trait MultiLanguageTestTrait * * @param \Ibexa\Contracts\Core\Repository\Values\MultiLanguageName $object tested ValueObject */ - public function testGetMultiLanguagePrioritizedName($object) + public function testGetMultiLanguagePrioritizedName($object): void { if (!$object instanceof MultiLanguageName) { self::markTestSkipped( @@ -42,7 +42,7 @@ public function testGetMultiLanguagePrioritizedName($object) * * @param \Ibexa\Contracts\Core\Repository\Values\MultiLanguageName $object tested ValueObject */ - public function testGetMultiLanguageDefaultName($object) + public function testGetMultiLanguageDefaultName($object): void { if (!$object instanceof MultiLanguageName) { self::markTestSkipped( @@ -72,7 +72,7 @@ public function testGetMultiLanguageDefaultName($object) * * @param \Ibexa\Contracts\Core\Repository\Values\MultiLanguageDescription $object tested ValueObject */ - public function testGetMultiLanguagePrioritizedDescription($object) + public function testGetMultiLanguagePrioritizedDescription($object): void { if (!$object instanceof MultiLanguageDescription) { self::markTestSkipped( @@ -91,7 +91,7 @@ public function testGetMultiLanguagePrioritizedDescription($object) * * @param \Ibexa\Contracts\Core\Repository\Values\MultiLanguageDescription $object tested ValueObject */ - public function testGetMultiLanguageDefaultDescription($object) + public function testGetMultiLanguageDefaultDescription($object): void { if (!$object instanceof MultiLanguageDescription) { self::markTestSkipped( diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php index f9d0f70a2b..cc5e12406b 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php @@ -25,7 +25,7 @@ class ObjectStateGroupTest extends TestCase /** * Test a new class and default values on properties. */ - public function testNewClass() + public function testNewClass(): void { $objectStateGroup = new ObjectStateGroup(); @@ -47,7 +47,7 @@ public function testNewClass() * * @return \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup */ - public function testNewClassWithMultiLanguageProperties() + public function testNewClassWithMultiLanguageProperties(): ObjectStateGroup { $properties = [ 'names' => [ @@ -77,7 +77,7 @@ public function testNewClassWithMultiLanguageProperties() * * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup::__get */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -91,7 +91,7 @@ public function testMissingProperty() * * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup::__set */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -103,7 +103,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $objectStateGroup = new ObjectStateGroup(); $value = isset($objectStateGroup->notDefined); @@ -118,7 +118,7 @@ public function testIsPropertySet() * * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php index e5e4cbb321..3706157cbf 100644 --- a/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php +++ b/tests/lib/Repository/Values/ObjectState/ObjectStateTest.php @@ -25,7 +25,7 @@ class ObjectStateTest extends TestCase /** * Test a new class and default values on properties. */ - public function testNewClass() + public function testNewClass(): void { $objectState = new ObjectState(); @@ -48,7 +48,7 @@ public function testNewClass() * * @return \Ibexa\Core\Repository\Values\ObjectState\ObjectState */ - public function testNewClassWithMultiLanguageProperties() + public function testNewClassWithMultiLanguageProperties(): ObjectState { $properties = [ 'names' => [ @@ -79,7 +79,7 @@ public function testNewClassWithMultiLanguageProperties() * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectState::__get * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup::__get */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -94,7 +94,7 @@ public function testMissingProperty() * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectState::__set * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup::__set */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -106,7 +106,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $objectState = new ObjectState(); $value = isset($objectState->notDefined); @@ -122,7 +122,7 @@ public function testIsPropertySet() * @covers \Ibexa\Core\Repository\Values\ObjectState\ObjectState::__unset * @covers \Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateGroup::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/User/PolicyTest.php b/tests/lib/Repository/Values/User/PolicyTest.php index 72245b8545..d6e2158ebf 100644 --- a/tests/lib/Repository/Values/User/PolicyTest.php +++ b/tests/lib/Repository/Values/User/PolicyTest.php @@ -22,7 +22,7 @@ class PolicyTest extends TestCase * * @covers \Ibexa\Core\Repository\Values\User\Policy::__construct */ - public function testNewClass() + public function testNewClass(): void { $this->assertPropertiesCorrect( [ @@ -41,7 +41,7 @@ public function testNewClass() * * @covers \Ibexa\Core\Repository\Values\User\Policy::__get */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -55,7 +55,7 @@ public function testMissingProperty() * * @covers \Ibexa\Core\Repository\Values\User\Policy::__set */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -69,7 +69,7 @@ public function testReadOnlyProperty() * * @covers \Ibexa\Core\Repository\Values\User\Policy::__isset */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $policy = new Policy(); $value = isset($policy->notDefined); @@ -84,7 +84,7 @@ public function testIsPropertySet() * * @covers \Ibexa\Core\Repository\Values\User\Policy::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/User/RoleTest.php b/tests/lib/Repository/Values/User/RoleTest.php index de08368001..3e4078ec31 100644 --- a/tests/lib/Repository/Values/User/RoleTest.php +++ b/tests/lib/Repository/Values/User/RoleTest.php @@ -23,7 +23,7 @@ class RoleTest extends TestCase /** * Test a new class and default values on properties. */ - public function testNewClass() + public function testNewClass(): void { $this->assertPropertiesCorrect( [ @@ -40,7 +40,7 @@ public function testNewClass() * * @covers \Ibexa\Core\Repository\Values\User\Role::__get */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -54,7 +54,7 @@ public function testMissingProperty() * * @covers \Ibexa\Core\Repository\Values\User\Role::__set */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -66,7 +66,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $role = new Role(); $value = isset($role->notDefined); @@ -81,7 +81,7 @@ public function testIsPropertySet() * * @covers \Ibexa\Core\Repository\Values\User\Role::__unset */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/User/UserGroupTest.php b/tests/lib/Repository/Values/User/UserGroupTest.php index 8ff052cc6c..64dd0931cc 100644 --- a/tests/lib/Repository/Values/User/UserGroupTest.php +++ b/tests/lib/Repository/Values/User/UserGroupTest.php @@ -22,7 +22,7 @@ class UserGroupTest extends TestCase { use ValueObjectTestTrait; - public function testNewClass() + public function testNewClass(): void { $group = new UserGroup(); self::assertNull($group->parentId); @@ -38,7 +38,7 @@ public function testNewClass() /** * Test getName method. */ - public function testGetName() + public function testGetName(): void { $name = 'Translated name'; $contentMock = $this->createMock(Content::class); @@ -60,7 +60,7 @@ public function testGetName() /** * Test retrieving missing property. */ - public function testMissingProperty() + public function testMissingProperty(): void { $this->expectException(PropertyNotFoundException::class); @@ -69,7 +69,7 @@ public function testMissingProperty() self::fail('Succeeded getting non existing property'); } - public function testObjectProperties() + public function testObjectProperties(): void { $object = new UserGroup(); $properties = $object->attributes(); @@ -94,7 +94,7 @@ public function testObjectProperties() /** * Test setting read only property. */ - public function testReadOnlyProperty() + public function testReadOnlyProperty(): void { $this->expectException(PropertyReadOnlyException::class); @@ -106,7 +106,7 @@ public function testReadOnlyProperty() /** * Test if property exists. */ - public function testIsPropertySet() + public function testIsPropertySet(): void { $userGroup = new UserGroup(); $value = isset($userGroup->notDefined); @@ -119,7 +119,7 @@ public function testIsPropertySet() /** * Test unsetting a property. */ - public function testUnsetProperty() + public function testUnsetProperty(): void { $this->expectException(PropertyReadOnlyException::class); diff --git a/tests/lib/Repository/Values/ValueObjectTestTrait.php b/tests/lib/Repository/Values/ValueObjectTestTrait.php index 5334cd612a..7381f59060 100644 --- a/tests/lib/Repository/Values/ValueObjectTestTrait.php +++ b/tests/lib/Repository/Values/ValueObjectTestTrait.php @@ -18,7 +18,7 @@ trait ValueObjectTestTrait * @param mixed[] $expectedValues * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $actualValueObject */ - public function assertPropertiesCorrect(array $expectedValues, ValueObject $actualValueObject) + public function assertPropertiesCorrect(array $expectedValues, ValueObject $actualValueObject): void { foreach ($expectedValues as $propertyName => $propertyValue) { self::assertSame( diff --git a/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php b/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php index 4fb72112c8..349d3d3f9a 100644 --- a/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php +++ b/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php @@ -16,18 +16,19 @@ use Ibexa\Contracts\Core\Search\Handler as SearchHandler; use Ibexa\Core\Repository\Values\Content\TrashItem; use Ibexa\Core\Search\Common\EventSubscriber\TrashEventSubscriber; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class TrashEventSubscriberTest extends TestCase { /** @var \Ibexa\Contracts\Core\Search\Handler&\PHPUnit\Framework\MockObject\MockObject */ - private $searchHandler; + private MockObject $searchHandler; /** @var \Ibexa\Contracts\Core\Persistence\Handler&\PHPUnit\Framework\MockObject\MockObject */ - private $persistenceHandler; + private MockObject $persistenceHandler; /** @var \Ibexa\Core\Search\Common\EventSubscriber\TrashEventSubscriber */ - private $subscriber; + private TrashEventSubscriber $subscriber; protected function setUp(): void { diff --git a/tests/lib/Search/Common/FieldValueMapper/AggregateTest.php b/tests/lib/Search/Common/FieldValueMapper/AggregateTest.php index ee34111799..a4e30fa9b8 100644 --- a/tests/lib/Search/Common/FieldValueMapper/AggregateTest.php +++ b/tests/lib/Search/Common/FieldValueMapper/AggregateTest.php @@ -24,7 +24,7 @@ final class AggregateTest extends TestCase private const MAPPED_VALUE = true; /** @var \Ibexa\Core\Search\Common\FieldValueMapper\Aggregate */ - private $aggregateMapper; + private Aggregate $aggregateMapper; public function setUp(): void { diff --git a/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php b/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php index 16812d8a77..12b6c7ab0d 100644 --- a/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php +++ b/tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php @@ -22,7 +22,7 @@ final class RemoteIdentifierMapperTest extends TestCase { /** @var \Ibexa\Core\Search\Common\FieldValueMapper\RemoteIdentifierMapper */ - private $mapper; + private RemoteIdentifierMapper $mapper; protected function setUp(): void { diff --git a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php index d4672d30a2..74f2ceb39c 100644 --- a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php +++ b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php @@ -21,6 +21,7 @@ use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Search\Common\EventSubscriber\LocationEventSubscriber; use Ibexa\Core\Search\Legacy\Content\Handler as SearchHandler; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class LocationEventSubscriberTest extends TestCase @@ -30,13 +31,13 @@ final class LocationEventSubscriberTest extends TestCase private const EXAMPLE_VERSION_NO = 3; /** @var \Ibexa\Core\Search\Legacy\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $searchHandler; + private MockObject $searchHandler; /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private $persistenceHandler; + private MockObject $persistenceHandler; /** @var \Ibexa\Core\Search\Common\EventSubscriber\LocationEventSubscriber */ - private $subscriber; + private LocationEventSubscriber $subscriber; protected function setUp(): void { diff --git a/tests/lib/Search/FieldNameResolverTest.php b/tests/lib/Search/FieldNameResolverTest.php index 04482068d6..43c0456f69 100644 --- a/tests/lib/Search/FieldNameResolverTest.php +++ b/tests/lib/Search/FieldNameResolverTest.php @@ -17,13 +17,14 @@ use Ibexa\Core\Search\Common\FieldNameGenerator; use Ibexa\Core\Search\Common\FieldNameResolver; use Ibexa\Core\Search\Common\FieldRegistry; +use PHPUnit\Framework\MockObject\MockObject; /** * @covers \Ibexa\Core\Search\Common\FieldNameResolver */ class FieldNameResolverTest extends TestCase { - public function testGetFieldNamesReturnsEmptyArray() + public function testGetFieldNamesReturnsEmptyArray(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $criterionMock = $this->getCriterionMock(); @@ -61,7 +62,7 @@ public function testGetFieldNamesReturnsEmptyArray() self::assertEmpty($fieldNames); } - public function testGetFieldNames() + public function testGetFieldNames(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $criterionMock = $this->getCriterionMock(); @@ -135,7 +136,7 @@ public function testGetFieldNames() ); } - public function testGetFieldNamesWithNamedField() + public function testGetFieldNamesWithNamedField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $criterionMock = $this->getCriterionMock(); @@ -211,7 +212,7 @@ public function testGetFieldNamesWithNamedField() ); } - public function testGetFieldNamesWithTypedField() + public function testGetFieldNamesWithTypedField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $criterionMock = $this->getCriterionMock(); @@ -272,7 +273,7 @@ public function testGetFieldNamesWithTypedField() ); } - public function testGetFieldNamesWithTypedAndNamedField() + public function testGetFieldNamesWithTypedAndNamedField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $criterionMock = $this->getCriterionMock(); @@ -333,7 +334,7 @@ public function testGetFieldNamesWithTypedAndNamedField() ); } - public function testGetSortFieldName() + public function testGetSortFieldName(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $sortClauseMock = $this->getSortClauseMock(); @@ -378,7 +379,7 @@ public function testGetSortFieldName() self::assertEquals('index_field_name', $fieldName); } - public function testGetSortFieldNameReturnsNull() + public function testGetSortFieldNameReturnsNull(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap', 'getIndexFieldName']); $sortClauseMock = $this->getSortClauseMock(); @@ -409,7 +410,7 @@ public function testGetSortFieldNameReturnsNull() self::assertNull($fieldName); } - public function testGetIndexFieldNameCustomField() + public function testGetIndexFieldNameCustomField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap']); @@ -437,7 +438,7 @@ public function testGetIndexFieldNameCustomField() self::assertEquals('custom_field_name', key($customFieldName)); } - public function testGetIndexFieldNameNamedField() + public function testGetIndexFieldNameNamedField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap']); $indexFieldType = $this->getIndexFieldTypeMock(); @@ -499,7 +500,7 @@ public function testGetIndexFieldNameNamedField() self::assertEquals('generated_typed_field_name', key($fieldName)); } - public function testGetIndexFieldNameDefaultMatchField() + public function testGetIndexFieldNameDefaultMatchField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap']); $indexFieldType = $this->getIndexFieldTypeMock(); @@ -566,7 +567,7 @@ public function testGetIndexFieldNameDefaultMatchField() self::assertEquals('generated_typed_field_name', key($fieldName)); } - public function testGetIndexFieldNameDefaultSortField() + public function testGetIndexFieldNameDefaultSortField(): void { $mockedFieldNameResolver = $this->getMockedFieldNameResolver(['getSearchableFieldMap']); $indexFieldType = $this->getIndexFieldTypeMock(); @@ -633,7 +634,7 @@ public function testGetIndexFieldNameDefaultSortField() self::assertEquals('generated_typed_field_name', key($fieldName)); } - public function testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException() + public function testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -677,7 +678,7 @@ public function testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException() ); } - public function testGetIndexFieldNameDefaultSortFieldThrowsRuntimeException() + public function testGetIndexFieldNameDefaultSortFieldThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -721,7 +722,7 @@ public function testGetIndexFieldNameDefaultSortFieldThrowsRuntimeException() ); } - public function testGetIndexFieldNameNamedFieldThrowsRuntimeException() + public function testGetIndexFieldNameNamedFieldThrowsRuntimeException(): void { $this->expectException(\RuntimeException::class); @@ -767,7 +768,7 @@ public function testGetIndexFieldNameNamedFieldThrowsRuntimeException() * * @return \Ibexa\Core\Search\Common\FieldNameResolver|\PHPUnit\Framework\MockObject\MockObject */ - protected function getMockedFieldNameResolver(array $methods = []) + protected function getMockedFieldNameResolver(array $methods = []): MockObject { $fieldNameResolver = $this ->getMockBuilder(FieldNameResolver::class) @@ -785,7 +786,7 @@ protected function getMockedFieldNameResolver(array $methods = []) } /** @var \Ibexa\Core\Search\Common\FieldRegistry|\PHPUnit\Framework\MockObject\MockObject */ - protected $fieldRegistryMock; + protected ?MockObject $fieldRegistryMock = null; /** * @return \Ibexa\Core\Search\Common\FieldRegistry|\PHPUnit\Framework\MockObject\MockObject @@ -802,7 +803,7 @@ protected function getFieldRegistryMock() /** * @return \Ibexa\Contracts\Core\FieldType\Indexable|\PHPUnit\Framework\MockObject\MockObject */ - protected function getIndexFieldTypeMock() + protected function getIndexFieldTypeMock(): MockObject { return $this->createMock(Indexable::class); } @@ -810,13 +811,13 @@ protected function getIndexFieldTypeMock() /** * @return \Ibexa\Contracts\Core\Search\FieldType|\PHPUnit\Framework\MockObject\MockObject */ - protected function getSearchFieldTypeMock() + protected function getSearchFieldTypeMock(): MockObject { return $this->createMock(SPIFieldType::class); } /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected $contentTypeHandlerMock; + protected ?MockObject $contentTypeHandlerMock = null; /** * @return \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject @@ -831,7 +832,7 @@ protected function getContentTypeHandlerMock() } /** @var \Ibexa\Core\Search\Common\FieldNameGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected $fieldNameGeneratorMock; + protected ?MockObject $fieldNameGeneratorMock = null; /** * @return \Ibexa\Core\Search\Common\FieldNameGenerator|\PHPUnit\Framework\MockObject\MockObject @@ -848,7 +849,7 @@ protected function getFieldNameGeneratorMock() /** * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion|\PHPUnit\Framework\MockObject\MockObject */ - protected function getCriterionMock() + protected function getCriterionMock(): MockObject { return $this->createMock(APICriterion::class); } @@ -856,7 +857,7 @@ protected function getCriterionMock() /** * @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause|\PHPUnit\Framework\MockObject\MockObject */ - protected function getSortClauseMock() + protected function getSortClauseMock(): MockObject { return $this->createMock(APISortClause::class); } diff --git a/tests/lib/Search/Legacy/Content/AbstractTestCase.php b/tests/lib/Search/Legacy/Content/AbstractTestCase.php index a53b70569a..9baa54db48 100644 --- a/tests/lib/Search/Legacy/Content/AbstractTestCase.php +++ b/tests/lib/Search/Legacy/Content/AbstractTestCase.php @@ -14,6 +14,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Mapper\ResolveVirtualFieldSubscriber; use Ibexa\Core\Persistence\Legacy\Content\StorageRegistry; use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase as ContentTypeGateway; +use Ibexa\Core\Persistence\Legacy\Content\Type\Handler; use Ibexa\Core\Persistence\Legacy\Content\Type\Handler as ContentTypeHandler; use Ibexa\Core\Persistence\Legacy\Content\Type\Mapper as ContentTypeMapper; use Ibexa\Core\Persistence\Legacy\Content\Type\StorageDispatcherInterface; @@ -28,17 +29,14 @@ class AbstractTestCase extends LanguageAwareTestCase { /** @var bool */ - private static $databaseInitialized = false; + private static bool $databaseInitialized = false; /** * Field registry mock. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - private $converterRegistry; + private ?ConverterRegistry $converterRegistry = null; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler */ - private $contentTypeHandler; + private ?Handler $contentTypeHandler = null; /** * Only set up once for these read only tests on a large fixture. @@ -65,7 +63,10 @@ protected function assertSearchResults($expectedIds, $searchResult) self::assertEquals($expectedIds, $ids); } - protected function getIds($searchResult) + /** + * @return mixed[] + */ + protected function getIds($searchResult): array { $ids = array_map( static function ($hit) { diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 75c42f537f..b909796a18 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -16,7 +16,9 @@ use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper as LocationMapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Search\Legacy\Content; +use Ibexa\Core\Search\Legacy\Content\Handler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway as LocationGateway; +use PHPUnit\Framework\MockObject\MockObject; /** * Content Search test case for ContentSearchHandler. @@ -28,7 +30,7 @@ class HandlerContentSortTest extends AbstractTestCase * * @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\ConverterRegistry */ - protected $fieldRegistry; + protected ?MockObject $fieldRegistry = null; /** * Returns the content search handler to test. @@ -40,11 +42,11 @@ class HandlerContentSortTest extends AbstractTestCase * * @return \Ibexa\Core\Search\Legacy\Content\Handler */ - protected function getContentSearchHandler(array $fullTextSearchConfiguration = []) + protected function getContentSearchHandler(array $fullTextSearchConfiguration = []): Handler { $connection = $this->getDatabaseConnection(); - return new Content\Handler( + return new Handler( new Content\Gateway\DoctrineDatabase( $connection, new Content\Common\Gateway\CriteriaConverter( @@ -95,7 +97,7 @@ protected function getContentSearchHandler(array $fullTextSearchConfiguration = * * @return \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected function getContentMapperMock() + protected function getContentMapperMock(): MockObject { $mapperMock = $this->getMockBuilder(ContentMapper::class) ->setConstructorArgs( @@ -153,7 +155,7 @@ protected function getFieldRegistry() * * @return \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected function getContentFieldHandlerMock() + protected function getContentFieldHandlerMock(): MockObject { return $this->getMockBuilder(FieldHandler::class) ->disableOriginalConstructor() @@ -161,7 +163,7 @@ protected function getContentFieldHandlerMock() ->getMock(); } - public function testNoSorting() + public function testNoSorting(): void { $locator = $this->getContentSearchHandler(); @@ -188,7 +190,7 @@ static function ($hit) { ); } - public function testSortDateModified() + public function testSortDateModified(): void { $locator = $this->getContentSearchHandler(); @@ -216,7 +218,7 @@ static function ($hit) { ); } - public function testSortDatePublished() + public function testSortDatePublished(): void { $locator = $this->getContentSearchHandler(); @@ -244,7 +246,7 @@ static function ($hit) { ); } - public function testSortSectionIdentifier() + public function testSortSectionIdentifier(): void { $locator = $this->getContentSearchHandler(); @@ -289,7 +291,7 @@ static function ($hit) { } } - public function testSortSectionName() + public function testSortSectionName(): void { $locator = $this->getContentSearchHandler(); @@ -342,7 +344,7 @@ static function ($hit) { } } - public function testSortContentName() + public function testSortContentName(): void { $locator = $this->getContentSearchHandler(); @@ -370,7 +372,7 @@ static function ($hit) { ); } - public function testSortFieldText() + public function testSortFieldText(): void { $locator = $this->getContentSearchHandler(); @@ -439,7 +441,7 @@ static function ($hit) { } } - public function testSortFieldNumeric() + public function testSortFieldNumeric(): void { $locator = $this->getContentSearchHandler(); diff --git a/tests/lib/Search/Legacy/Content/HandlerContentTest.php b/tests/lib/Search/Legacy/Content/HandlerContentTest.php index 26befbcdcf..c2331e63f7 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentTest.php @@ -19,7 +19,9 @@ use Ibexa\Core\Persistence\Legacy\Content\Location\Mapper as LocationMapper; use Ibexa\Core\Persistence\Legacy\Content\Mapper as ContentMapper; use Ibexa\Core\Search\Legacy\Content; +use Ibexa\Core\Search\Legacy\Content\Handler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway as LocationGateway; +use PHPUnit\Framework\MockObject\MockObject; /** * Content Search test case for ContentSearchHandler. @@ -36,7 +38,7 @@ class HandlerContentTest extends AbstractTestCase * * @return \Ibexa\Core\Search\Legacy\Content\Handler */ - protected function getContentSearchHandler(array $fullTextSearchConfiguration = []) + protected function getContentSearchHandler(array $fullTextSearchConfiguration = []): Handler { $transformationProcessor = new Persistence\TransformationProcessor\DefinitionBased( new Persistence\TransformationProcessor\DefinitionBased\Parser(), @@ -65,7 +67,7 @@ protected function getContentSearchHandler(array $fullTextSearchConfiguration = $transformationProcessor ); - return new Content\Handler( + return new Handler( new Content\Gateway\DoctrineDatabase( $connection, new Content\Common\Gateway\CriteriaConverter( @@ -194,7 +196,7 @@ protected function getContentSearchHandler(array $fullTextSearchConfiguration = * * @return \Ibexa\Core\Persistence\Legacy\Content\Mapper */ - protected function getContentMapperMock() + protected function getContentMapperMock(): MockObject { $mapperMock = $this->getMockBuilder(ContentMapper::class) ->setConstructorArgs( @@ -235,7 +237,7 @@ static function ($rows): array { * * @return \Ibexa\Core\Persistence\Legacy\Content\FieldHandler */ - protected function getContentFieldHandlerMock() + protected function getContentFieldHandlerMock(): MockObject { return $this->getMockBuilder(FieldHandler::class) ->disableOriginalConstructor() @@ -246,7 +248,7 @@ protected function getContentFieldHandlerMock() /** * Bug #80. */ - public function testFindWithoutOffsetLimit() + public function testFindWithoutOffsetLimit(): void { $locator = $this->getContentSearchHandler(); @@ -267,7 +269,7 @@ public function testFindWithoutOffsetLimit() /** * Bug #81, bug #82. */ - public function testFindWithZeroLimit() + public function testFindWithZeroLimit(): void { $locator = $this->getContentSearchHandler(); @@ -294,7 +296,7 @@ public function testFindWithZeroLimit() /** * Issue with PHP_MAX_INT limit overflow in databases. */ - public function testFindWithNullLimit() + public function testFindWithNullLimit(): void { $locator = $this->getContentSearchHandler(); @@ -321,7 +323,7 @@ public function testFindWithNullLimit() /** * Issue with offsetting to the nonexistent results produces \ezcQueryInvalidParameterException exception. */ - public function testFindWithOffsetToNonexistent() + public function testFindWithOffsetToNonexistent(): void { $locator = $this->getContentSearchHandler(); @@ -345,7 +347,7 @@ public function testFindWithOffsetToNonexistent() ); } - public function testFindSingle() + public function testFindSingle(): void { $locator = $this->getContentSearchHandler(); @@ -354,7 +356,7 @@ public function testFindSingle() self::assertEquals(10, $contentInfo->id); } - public function testFindSingleWithNonSearchableField() + public function testFindSingleWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); @@ -368,7 +370,7 @@ public function testFindSingleWithNonSearchableField() ); } - public function testFindContentWithNonSearchableField() + public function testFindContentWithNonSearchableField(): void { $this->expectException(InvalidArgumentException::class); @@ -387,7 +389,7 @@ public function testFindContentWithNonSearchableField() ); } - public function testFindSingleTooMany() + public function testFindSingleTooMany(): void { $this->expectException(InvalidArgumentException::class); @@ -395,7 +397,7 @@ public function testFindSingleTooMany() $locator->findSingle(new Criterion\ContentId([4, 10, 12, 23])); } - public function testFindSingleZero() + public function testFindSingleZero(): void { $this->expectException(NotFoundException::class); @@ -403,7 +405,7 @@ public function testFindSingleZero() $locator->findSingle(new Criterion\ContentId(0)); } - public function testContentIdFilter() + public function testContentIdFilter(): void { $this->assertSearchResults( [4, 10], @@ -420,7 +422,7 @@ public function testContentIdFilter() ); } - public function testContentIdFilterCount() + public function testContentIdFilterCount(): void { $locator = $this->getContentSearchHandler(); @@ -438,7 +440,7 @@ public function testContentIdFilterCount() self::assertSame(2, $result->totalCount); } - public function testContentAndCombinatorFilter() + public function testContentAndCombinatorFilter(): void { $this->assertSearchResults( [4], @@ -462,7 +464,7 @@ public function testContentAndCombinatorFilter() ); } - public function testContentOrCombinatorFilter() + public function testContentOrCombinatorFilter(): void { $locator = $this->getContentSearchHandler(); @@ -498,7 +500,7 @@ public function testContentOrCombinatorFilter() } } - public function testContentNotCombinatorFilter() + public function testContentNotCombinatorFilter(): void { $this->assertSearchResults( [4], @@ -524,7 +526,7 @@ public function testContentNotCombinatorFilter() ); } - public function testContentSubtreeFilterIn() + public function testContentSubtreeFilterIn(): void { $this->assertSearchResults( [67, 68, 69, 70, 71, 72, 73, 74], @@ -541,7 +543,7 @@ public function testContentSubtreeFilterIn() ); } - public function testContentSubtreeFilterEq() + public function testContentSubtreeFilterEq(): void { $this->assertSearchResults( [67, 68, 69, 70, 71, 72, 73, 74], @@ -556,7 +558,7 @@ public function testContentSubtreeFilterEq() ); } - public function testContentTypeIdFilter() + public function testContentTypeIdFilter(): void { $this->assertSearchResults( [10, 14, 226], @@ -571,7 +573,7 @@ public function testContentTypeIdFilter() ); } - public function testContentTypeIdentifierFilter() + public function testContentTypeIdentifierFilter(): void { $this->assertSearchResults( [41, 45, 49, 50, 51], @@ -587,7 +589,7 @@ public function testContentTypeIdentifierFilter() ); } - public function testContentTypeGroupFilter() + public function testContentTypeGroupFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 42, 225, 226], @@ -602,7 +604,7 @@ public function testContentTypeGroupFilter() ); } - public function testDateMetadataFilterModifiedGreater() + public function testDateMetadataFilterModifiedGreater(): void { $this->assertSearchResults( [11, 225, 226], @@ -621,7 +623,7 @@ public function testDateMetadataFilterModifiedGreater() ); } - public function testDateMetadataFilterModifiedGreaterOrEqual() + public function testDateMetadataFilterModifiedGreaterOrEqual(): void { $this->assertSearchResults( [11, 14, 225, 226], @@ -640,7 +642,7 @@ public function testDateMetadataFilterModifiedGreaterOrEqual() ); } - public function testDateMetadataFilterModifiedIn() + public function testDateMetadataFilterModifiedIn(): void { $this->assertSearchResults( [11, 14, 225, 226], @@ -659,7 +661,7 @@ public function testDateMetadataFilterModifiedIn() ); } - public function testDateMetadataFilterModifiedBetween() + public function testDateMetadataFilterModifiedBetween(): void { $this->assertSearchResults( [11, 14, 225, 226], @@ -678,7 +680,7 @@ public function testDateMetadataFilterModifiedBetween() ); } - public function testDateMetadataFilterCreatedBetween() + public function testDateMetadataFilterCreatedBetween(): void { $this->assertSearchResults( [66, 131, 225], @@ -697,7 +699,7 @@ public function testDateMetadataFilterCreatedBetween() ); } - public function testLocationIdFilter() + public function testLocationIdFilter(): void { $this->assertSearchResults( [4, 65], @@ -712,7 +714,7 @@ public function testLocationIdFilter() ); } - public function testParentLocationIdFilter() + public function testParentLocationIdFilter(): void { $this->assertSearchResults( [4, 41, 45, 56, 65], @@ -727,7 +729,7 @@ public function testParentLocationIdFilter() ); } - public function testRemoteIdFilter() + public function testRemoteIdFilter(): void { $this->assertSearchResults( [4, 10], @@ -744,7 +746,7 @@ public function testRemoteIdFilter() ); } - public function testLocationRemoteIdFilter() + public function testLocationRemoteIdFilter(): void { $this->assertSearchResults( [4, 65], @@ -761,7 +763,7 @@ public function testLocationRemoteIdFilter() ); } - public function testSectionFilter() + public function testSectionFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 42, 226], @@ -776,7 +778,7 @@ public function testSectionFilter() ); } - public function testStatusFilter() + public function testStatusFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -802,7 +804,7 @@ public function testStatusFilter() ); } - public function testFieldFilter() + public function testFieldFilter(): void { $this->assertSearchResults( [11], @@ -821,7 +823,7 @@ public function testFieldFilter() ); } - public function testFieldFilterIn() + public function testFieldFilterIn(): void { $this->assertSearchResults( [11, 42], @@ -840,7 +842,7 @@ public function testFieldFilterIn() ); } - public function testFieldFilterContainsPartial() + public function testFieldFilterContainsPartial(): void { $this->assertSearchResults( [42], @@ -859,7 +861,7 @@ public function testFieldFilterContainsPartial() ); } - public function testFieldFilterContainsSimple() + public function testFieldFilterContainsSimple(): void { $this->assertSearchResults( [77], @@ -878,7 +880,7 @@ public function testFieldFilterContainsSimple() ); } - public function testFieldFilterContainsSimpleNoMatch() + public function testFieldFilterContainsSimpleNoMatch(): void { $this->assertSearchResults( [], @@ -897,7 +899,7 @@ public function testFieldFilterContainsSimpleNoMatch() ); } - public function testFieldFilterBetween() + public function testFieldFilterBetween(): void { $this->assertSearchResults( [186, 187], @@ -916,7 +918,7 @@ public function testFieldFilterBetween() ); } - public function testFieldFilterOr() + public function testFieldFilterOr(): void { $this->assertSearchResults( [11, 186, 187], @@ -944,7 +946,7 @@ public function testFieldFilterOr() ); } - public function testFullTextFilter() + public function testFullTextFilter(): void { $this->assertSearchResults( [191], @@ -959,7 +961,7 @@ public function testFullTextFilter() ); } - public function testFullTextWildcardFilter() + public function testFullTextWildcardFilter(): void { $this->assertSearchResults( [191], @@ -974,7 +976,7 @@ public function testFullTextWildcardFilter() ); } - public function testFullTextDisabledWildcardFilter() + public function testFullTextDisabledWildcardFilter(): void { $this->assertSearchResults( [], @@ -991,7 +993,7 @@ public function testFullTextDisabledWildcardFilter() ); } - public function testFullTextFilterStopwordRemoval() + public function testFullTextFilterStopwordRemoval(): void { $handler = $this->getContentSearchHandler( [ @@ -1012,7 +1014,7 @@ public function testFullTextFilterStopwordRemoval() ); } - public function testFullTextFilterNoStopwordRemoval() + public function testFullTextFilterNoStopwordRemoval(): void { $handler = $this->getContentSearchHandler( [ @@ -1042,7 +1044,7 @@ static function ($hit) { ); } - public function testFullTextFilterInvalidStopwordThreshold() + public function testFullTextFilterInvalidStopwordThreshold(): void { $this->expectException(InvalidArgumentException::class); @@ -1053,7 +1055,7 @@ public function testFullTextFilterInvalidStopwordThreshold() ); } - public function testObjectStateIdFilter() + public function testObjectStateIdFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1069,7 +1071,7 @@ public function testObjectStateIdFilter() ); } - public function testObjectStateIdFilterIn() + public function testObjectStateIdFilterIn(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1085,7 +1087,7 @@ public function testObjectStateIdFilterIn() ); } - public function testLanguageCodeFilter() + public function testLanguageCodeFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1101,7 +1103,7 @@ public function testLanguageCodeFilter() ); } - public function testLanguageCodeFilterIn() + public function testLanguageCodeFilterIn(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1117,7 +1119,7 @@ public function testLanguageCodeFilterIn() ); } - public function testLanguageCodeFilterWithAlwaysAvailable() + public function testLanguageCodeFilterWithAlwaysAvailable(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49, 50, 51, 56, 57, 65, 68, 70, 74, 76, 80], @@ -1133,7 +1135,7 @@ public function testLanguageCodeFilterWithAlwaysAvailable() ); } - public function testVisibilityFilter() + public function testVisibilityFilter(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1151,7 +1153,7 @@ public function testVisibilityFilter() ); } - public function testUserMetadataFilterOwnerWrongUserId() + public function testUserMetadataFilterOwnerWrongUserId(): void { $this->assertSearchResults( [], @@ -1169,7 +1171,7 @@ public function testUserMetadataFilterOwnerWrongUserId() ); } - public function testUserMetadataFilterOwnerAdministrator() + public function testUserMetadataFilterOwnerAdministrator(): void { $this->assertSearchResults( [4, 10, 11, 12, 13, 14, 41, 42, 45, 49], @@ -1189,7 +1191,7 @@ public function testUserMetadataFilterOwnerAdministrator() ); } - public function testUserMetadataFilterOwnerEqAMember() + public function testUserMetadataFilterOwnerEqAMember(): void { $this->assertSearchResults( [223], @@ -1207,7 +1209,7 @@ public function testUserMetadataFilterOwnerEqAMember() ); } - public function testUserMetadataFilterOwnerInAMember() + public function testUserMetadataFilterOwnerInAMember(): void { $this->assertSearchResults( [223], @@ -1225,7 +1227,7 @@ public function testUserMetadataFilterOwnerInAMember() ); } - public function testUserMetadataFilterCreatorEqAMember() + public function testUserMetadataFilterCreatorEqAMember(): void { $this->assertSearchResults( [223], @@ -1243,7 +1245,7 @@ public function testUserMetadataFilterCreatorEqAMember() ); } - public function testUserMetadataFilterCreatorInAMember() + public function testUserMetadataFilterCreatorInAMember(): void { $this->assertSearchResults( [223], @@ -1261,7 +1263,7 @@ public function testUserMetadataFilterCreatorInAMember() ); } - public function testUserMetadataFilterEqGroupMember() + public function testUserMetadataFilterEqGroupMember(): void { $this->assertSearchResults( [223], @@ -1279,7 +1281,7 @@ public function testUserMetadataFilterEqGroupMember() ); } - public function testUserMetadataFilterInGroupMember() + public function testUserMetadataFilterInGroupMember(): void { $this->assertSearchResults( [223], @@ -1297,7 +1299,7 @@ public function testUserMetadataFilterInGroupMember() ); } - public function testUserMetadataFilterEqGroupMemberNoMatch() + public function testUserMetadataFilterEqGroupMemberNoMatch(): void { $this->assertSearchResults( [], @@ -1315,7 +1317,7 @@ public function testUserMetadataFilterEqGroupMemberNoMatch() ); } - public function testUserMetadataFilterInGroupMemberNoMatch() + public function testUserMetadataFilterInGroupMemberNoMatch(): void { $this->assertSearchResults( [], @@ -1333,7 +1335,7 @@ public function testUserMetadataFilterInGroupMemberNoMatch() ); } - public function testFieldRelationFilterContainsSingle() + public function testFieldRelationFilterContainsSingle(): void { $this->assertSearchResults( [67], @@ -1351,7 +1353,7 @@ public function testFieldRelationFilterContainsSingle() ); } - public function testFieldRelationFilterContainsSingleNoMatch() + public function testFieldRelationFilterContainsSingleNoMatch(): void { $this->assertSearchResults( [], @@ -1369,7 +1371,7 @@ public function testFieldRelationFilterContainsSingleNoMatch() ); } - public function testFieldRelationFilterContainsArray() + public function testFieldRelationFilterContainsArray(): void { $this->assertSearchResults( [67], @@ -1387,7 +1389,7 @@ public function testFieldRelationFilterContainsArray() ); } - public function testFieldRelationFilterContainsArrayNotMatch() + public function testFieldRelationFilterContainsArrayNotMatch(): void { $this->assertSearchResults( [], @@ -1405,7 +1407,7 @@ public function testFieldRelationFilterContainsArrayNotMatch() ); } - public function testFieldRelationFilterInArray() + public function testFieldRelationFilterInArray(): void { $this->assertSearchResults( [67, 75], @@ -1423,7 +1425,7 @@ public function testFieldRelationFilterInArray() ); } - public function testFieldRelationFilterInArrayNotMatch() + public function testFieldRelationFilterInArrayNotMatch(): void { $this->assertSearchResults( [], diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 9c9865ea75..0429ff25c0 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -19,15 +19,20 @@ use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler as CommonSortClauseHandler; use Ibexa\Core\Search\Legacy\Content\Gateway as ContentGateway; +use Ibexa\Core\Search\Legacy\Content\Handler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler as LocationCriterionHandler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler as LocationSortClauseHandler; +use PHPUnit\Framework\MockObject\MockObject; /** * Location Search test case for ContentSearchHandler. */ class HandlerLocationSortTest extends AbstractTestCase { - protected function getIds($searchResult) + /** + * @return mixed[] + */ + protected function getIds($searchResult): array { $ids = array_map( static function ($hit) { @@ -46,11 +51,11 @@ static function ($hit) { * * @return \Ibexa\Core\Search\Legacy\Content\Handler */ - protected function getContentSearchHandler() + protected function getContentSearchHandler(): Handler { $connection = $this->getDatabaseConnection(); - return new Content\Handler( + return new Handler( $this->createMock(ContentGateway::class), new Content\Location\Gateway\DoctrineDatabase( $connection, @@ -110,7 +115,7 @@ protected function getContentSearchHandler() * * @return \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected function getLocationMapperMock() + protected function getLocationMapperMock(): MockObject { $mapperMock = $this->getMockBuilder(LocationMapper::class) ->setMethods(['createLocationsFromRows']) @@ -139,7 +144,7 @@ static function ($rows): array { return $mapperMock; } - public function testNoSorting() + public function testNoSorting(): void { $handler = $this->getContentSearchHandler(); @@ -161,7 +166,7 @@ public function testNoSorting() ); } - public function testSortLocationPath() + public function testSortLocationPath(): void { $handler = $this->getContentSearchHandler(); @@ -182,7 +187,7 @@ public function testSortLocationPath() ); } - public function testSortLocationDepth() + public function testSortLocationDepth(): void { $handler = $this->getContentSearchHandler(); @@ -203,7 +208,7 @@ public function testSortLocationDepth() ); } - public function testSortLocationDepthAndPath() + public function testSortLocationDepthAndPath(): void { $handler = $this->getContentSearchHandler(); @@ -227,7 +232,7 @@ public function testSortLocationDepthAndPath() ); } - public function testSortLocationPriority() + public function testSortLocationPriority(): void { $handler = $this->getContentSearchHandler(); @@ -250,7 +255,7 @@ public function testSortLocationPriority() ); } - public function testSortDateModified() + public function testSortDateModified(): void { $handler = $this->getContentSearchHandler(); @@ -273,7 +278,7 @@ public function testSortDateModified() ); } - public function testSortDatePublished() + public function testSortDatePublished(): void { $handler = $this->getContentSearchHandler(); @@ -296,7 +301,7 @@ public function testSortDatePublished() ); } - public function testSortSectionIdentifier() + public function testSortSectionIdentifier(): void { $handler = $this->getContentSearchHandler(); @@ -338,7 +343,7 @@ public function testSortSectionIdentifier() } } - public function testSortContentName() + public function testSortContentName(): void { $handler = $this->getContentSearchHandler(); @@ -361,7 +366,7 @@ public function testSortContentName() ); } - public function testSortContentId() + public function testSortContentId(): void { $handler = $this->getContentSearchHandler(); @@ -384,7 +389,7 @@ public function testSortContentId() ); } - public function testSortLocationId() + public function testSortLocationId(): void { $handler = $this->getContentSearchHandler(); @@ -407,7 +412,7 @@ public function testSortLocationId() ); } - public function testSortLocationVisibilityAscending() + public function testSortLocationVisibilityAscending(): void { $handler = $this->getContentSearchHandler(); @@ -430,7 +435,7 @@ public function testSortLocationVisibilityAscending() ); } - public function testSortLocationVisibilityDescending() + public function testSortLocationVisibilityDescending(): void { $handler = $this->getContentSearchHandler(); @@ -453,7 +458,7 @@ public function testSortLocationVisibilityDescending() ); } - public function testSortSectionName() + public function testSortSectionName(): void { $handler = $this->getContentSearchHandler(); @@ -506,7 +511,7 @@ static function ($hit) { } } - public function testSortFieldText() + public function testSortFieldText(): void { $handler = $this->getContentSearchHandler(); @@ -575,7 +580,7 @@ static function ($hit) { } } - public function testSortFieldNumeric() + public function testSortFieldNumeric(): void { $handler = $this->getContentSearchHandler(); @@ -608,7 +613,7 @@ static function ($hit) { ); } - public function testSortIsMainLocationAscending() + public function testSortIsMainLocationAscending(): void { $handler = $this->getContentSearchHandler(); @@ -631,7 +636,7 @@ public function testSortIsMainLocationAscending() ); } - public function testSortIsMainLocationDescending() + public function testSortIsMainLocationDescending(): void { $handler = $this->getContentSearchHandler(); diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php index 3d6ef6da82..cb71d655a6 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationTest.php @@ -21,8 +21,10 @@ use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler as CommonSortClauseHandler; use Ibexa\Core\Search\Legacy\Content\Gateway as ContentGateway; +use Ibexa\Core\Search\Legacy\Content\Handler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler as LocationCriterionHandler; use Ibexa\Core\Search\Legacy\Content\Location\Gateway\SortClauseHandler as LocationSortClauseHandler; +use PHPUnit\Framework\MockObject\MockObject; /** * Location Search test case for ContentSearchHandler. @@ -38,7 +40,7 @@ class HandlerLocationTest extends AbstractTestCase * * @return \Ibexa\Core\Search\Legacy\Content\Handler */ - protected function getContentSearchHandler(array $fullTextSearchConfiguration = []) + protected function getContentSearchHandler(array $fullTextSearchConfiguration = []): Handler { $transformationProcessor = new Persistence\TransformationProcessor\DefinitionBased( new Persistence\TransformationProcessor\DefinitionBased\Parser(), @@ -67,7 +69,7 @@ protected function getContentSearchHandler(array $fullTextSearchConfiguration = $transformationProcessor ); - return new Content\Handler( + return new Handler( $this->createMock(ContentGateway::class), new Content\Location\Gateway\DoctrineDatabase( $connection, @@ -171,7 +173,7 @@ protected function getContentSearchHandler(array $fullTextSearchConfiguration = * * @return \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected function getLocationMapperMock() + protected function getLocationMapperMock(): MockObject { $mapperMock = $this->getMockBuilder(LocationMapper::class) ->setMethods(['createLocationsFromRows']) @@ -200,7 +202,7 @@ static function ($rows): array { return $mapperMock; } - public function testFindWithoutOffsetLimit() + public function testFindWithoutOffsetLimit(): void { $handler = $this->getContentSearchHandler(); @@ -216,7 +218,7 @@ public function testFindWithoutOffsetLimit() self::assertCount(1, $searchResult->searchHits); } - public function testFindWithZeroLimit() + public function testFindWithZeroLimit(): void { $handler = $this->getContentSearchHandler(); @@ -237,7 +239,7 @@ public function testFindWithZeroLimit() /** * Issue with PHP_MAX_INT limit overflow in databases. */ - public function testFindWithNullLimit() + public function testFindWithNullLimit(): void { $handler = $this->getContentSearchHandler(); @@ -258,7 +260,7 @@ public function testFindWithNullLimit() /** * Issue with offsetting to the nonexistent results produces \ezcQueryInvalidParameterException exception. */ - public function testFindWithOffsetToNonexistent() + public function testFindWithOffsetToNonexistent(): void { $handler = $this->getContentSearchHandler(); @@ -276,7 +278,7 @@ public function testFindWithOffsetToNonexistent() self::assertEquals([], $searchResult->searchHits); } - public function testLocationIdFilter() + public function testLocationIdFilter(): void { $this->assertSearchResults( [12, 13], @@ -293,7 +295,7 @@ public function testLocationIdFilter() ); } - public function testParentLocationIdFilter() + public function testParentLocationIdFilter(): void { $this->assertSearchResults( [12, 13, 14, 44, 227], @@ -308,7 +310,7 @@ public function testParentLocationIdFilter() ); } - public function testLocationIdAndCombinatorFilter() + public function testLocationIdAndCombinatorFilter(): void { $this->assertSearchResults( [13], @@ -332,7 +334,7 @@ public function testLocationIdAndCombinatorFilter() ); } - public function testLocationIdParentLocationIdAndCombinatorFilter() + public function testLocationIdParentLocationIdAndCombinatorFilter(): void { $this->assertSearchResults( [44, 160], @@ -356,7 +358,7 @@ public function testLocationIdParentLocationIdAndCombinatorFilter() ); } - public function testContentDepthFilterEq() + public function testContentDepthFilterEq(): void { $this->assertSearchResults( [2, 5, 43, 48, 58], @@ -371,7 +373,7 @@ public function testContentDepthFilterEq() ); } - public function testContentDepthFilterIn() + public function testContentDepthFilterIn(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 43, 44, 48, 51, 52, 53, 54, 56, 58, 59, 69, 77, 86, 96, 107, 153, 156, 167, 190, 227], @@ -386,7 +388,7 @@ public function testContentDepthFilterIn() ); } - public function testContentDepthFilterBetween() + public function testContentDepthFilterBetween(): void { $this->assertSearchResults( [2, 5, 43, 48, 58], @@ -400,7 +402,7 @@ public function testContentDepthFilterBetween() ); } - public function testContentDepthFilterGreaterThan() + public function testContentDepthFilterGreaterThan(): void { $this->assertSearchResults( [99, 102, 135, 136, 137, 139, 140, 142, 143, 144, 145, 148, 151, 174, 175, 177, 194, 196, 197, 198, 199, 200, 201, 202, 203, 205, 206, 207, 208, 209, 210, 211, 212, 214, 215], @@ -415,7 +417,7 @@ public function testContentDepthFilterGreaterThan() ); } - public function testContentDepthFilterGreaterThanOrEqual() + public function testContentDepthFilterGreaterThanOrEqual(): void { $this->assertSearchResults( [99, 102, 135, 136, 137, 139, 140, 142, 143, 144, 145, 148, 151, 174, 175, 177, 194, 196, 197, 198, 199, 200, 201, 202, 203, 205, 206, 207, 208, 209, 210, 211, 212, 214, 215], @@ -430,7 +432,7 @@ public function testContentDepthFilterGreaterThanOrEqual() ); } - public function testContentDepthFilterLessThan() + public function testContentDepthFilterLessThan(): void { $this->assertSearchResults( [2, 5, 43, 48, 58], @@ -445,7 +447,7 @@ public function testContentDepthFilterLessThan() ); } - public function testContentDepthFilterLessThanOrEqual() + public function testContentDepthFilterLessThanOrEqual(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 43, 44, 48, 51, 52, 53, 54, 56, 58, 59, 69, 77, 86, 96, 107, 153, 156, 167, 190, 227], @@ -460,7 +462,7 @@ public function testContentDepthFilterLessThanOrEqual() ); } - public function testLocationPriorityFilter() + public function testLocationPriorityFilter(): void { $this->assertSearchResults( [156, 167, 190], @@ -478,7 +480,7 @@ public function testLocationPriorityFilter() ); } - public function testLocationRemoteIdFilter() + public function testLocationRemoteIdFilter(): void { $this->assertSearchResults( [2, 5], @@ -495,7 +497,7 @@ public function testLocationRemoteIdFilter() ); } - public function testVisibilityFilterVisible() + public function testVisibilityFilterVisible(): void { $this->assertSearchResults( [2, 5, 12, 13, 14], @@ -513,7 +515,7 @@ public function testVisibilityFilterVisible() ); } - public function testVisibilityFilterHidden() + public function testVisibilityFilterHidden(): void { $this->assertSearchResults( [228], @@ -529,7 +531,7 @@ public function testVisibilityFilterHidden() ); } - public function testLocationNotCombinatorFilter() + public function testLocationNotCombinatorFilter(): void { $this->assertSearchResults( [2, 5], @@ -555,7 +557,7 @@ public function testLocationNotCombinatorFilter() ); } - public function testLocationOrCombinatorFilter() + public function testLocationOrCombinatorFilter(): void { $this->assertSearchResults( [2, 5, 12, 13, 14], @@ -579,7 +581,7 @@ public function testLocationOrCombinatorFilter() ); } - public function testContentIdFilterEquals() + public function testContentIdFilterEquals(): void { $this->assertSearchResults( [225], @@ -593,7 +595,7 @@ public function testContentIdFilterEquals() ); } - public function testContentIdFilterIn() + public function testContentIdFilterIn(): void { $this->assertSearchResults( [225, 226, 227], @@ -609,7 +611,7 @@ public function testContentIdFilterIn() ); } - public function testContentTypeGroupFilter() + public function testContentTypeGroupFilter(): void { $this->assertSearchResults( [5, 12, 13, 14, 15, 44, 45, 227, 228], @@ -624,7 +626,7 @@ public function testContentTypeGroupFilter() ); } - public function testContentTypeIdFilter() + public function testContentTypeIdFilter(): void { $this->assertSearchResults( [15, 45, 228], @@ -639,7 +641,7 @@ public function testContentTypeIdFilter() ); } - public function testContentTypeIdentifierFilter() + public function testContentTypeIdentifierFilter(): void { $this->assertSearchResults( [43, 48, 51, 52, 53], @@ -655,7 +657,7 @@ public function testContentTypeIdentifierFilter() ); } - public function testObjectStateIdFilter() + public function testObjectStateIdFilter(): void { $this->assertSearchResults( [5, 12, 13, 14, 15, 43, 44, 45, 48, 51], @@ -671,7 +673,7 @@ public function testObjectStateIdFilter() ); } - public function testObjectStateIdFilterIn() + public function testObjectStateIdFilterIn(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48], @@ -687,7 +689,7 @@ public function testObjectStateIdFilterIn() ); } - public function testRemoteIdFilter() + public function testRemoteIdFilter(): void { $this->assertSearchResults( [5, 45], @@ -704,7 +706,7 @@ public function testRemoteIdFilter() ); } - public function testSectionFilter() + public function testSectionFilter(): void { $this->assertSearchResults( [5, 12, 13, 14, 15, 44, 45, 228], @@ -719,7 +721,7 @@ public function testSectionFilter() ); } - public function testDateMetadataFilterModifiedGreater() + public function testDateMetadataFilterModifiedGreater(): void { $this->assertSearchResults( [12, 227, 228], @@ -738,7 +740,7 @@ public function testDateMetadataFilterModifiedGreater() ); } - public function testDateMetadataFilterModifiedGreaterOrEqual() + public function testDateMetadataFilterModifiedGreaterOrEqual(): void { $this->assertSearchResults( [12, 15, 227, 228], @@ -757,7 +759,7 @@ public function testDateMetadataFilterModifiedGreaterOrEqual() ); } - public function testDateMetadataFilterModifiedIn() + public function testDateMetadataFilterModifiedIn(): void { $this->assertSearchResults( [12, 15, 227, 228], @@ -776,7 +778,7 @@ public function testDateMetadataFilterModifiedIn() ); } - public function testDateMetadataFilterModifiedBetween() + public function testDateMetadataFilterModifiedBetween(): void { $this->assertSearchResults( [12, 15, 227, 228], @@ -795,7 +797,7 @@ public function testDateMetadataFilterModifiedBetween() ); } - public function testDateMetadataFilterCreatedBetween() + public function testDateMetadataFilterCreatedBetween(): void { $this->assertSearchResults( [68, 133, 227], @@ -814,7 +816,7 @@ public function testDateMetadataFilterCreatedBetween() ); } - public function testUserMetadataFilterOwnerWrongUserId() + public function testUserMetadataFilterOwnerWrongUserId(): void { $this->assertSearchResults( [], @@ -832,7 +834,7 @@ public function testUserMetadataFilterOwnerWrongUserId() ); } - public function testUserMetadataFilterOwnerAdministrator() + public function testUserMetadataFilterOwnerAdministrator(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48], @@ -852,7 +854,7 @@ public function testUserMetadataFilterOwnerAdministrator() ); } - public function testUserMetadataFilterOwnerEqAMember() + public function testUserMetadataFilterOwnerEqAMember(): void { $this->assertSearchResults( [225], @@ -870,7 +872,7 @@ public function testUserMetadataFilterOwnerEqAMember() ); } - public function testUserMetadataFilterOwnerInAMember() + public function testUserMetadataFilterOwnerInAMember(): void { $this->assertSearchResults( [225], @@ -888,7 +890,7 @@ public function testUserMetadataFilterOwnerInAMember() ); } - public function testUserMetadataFilterCreatorEqAMember() + public function testUserMetadataFilterCreatorEqAMember(): void { $this->assertSearchResults( [225], @@ -906,7 +908,7 @@ public function testUserMetadataFilterCreatorEqAMember() ); } - public function testUserMetadataFilterCreatorInAMember() + public function testUserMetadataFilterCreatorInAMember(): void { $this->assertSearchResults( [225], @@ -924,7 +926,7 @@ public function testUserMetadataFilterCreatorInAMember() ); } - public function testUserMetadataFilterEqGroupMember() + public function testUserMetadataFilterEqGroupMember(): void { $this->assertSearchResults( [225], @@ -942,7 +944,7 @@ public function testUserMetadataFilterEqGroupMember() ); } - public function testUserMetadataFilterInGroupMember() + public function testUserMetadataFilterInGroupMember(): void { $this->assertSearchResults( [225], @@ -960,7 +962,7 @@ public function testUserMetadataFilterInGroupMember() ); } - public function testUserMetadataFilterEqGroupMemberNoMatch() + public function testUserMetadataFilterEqGroupMemberNoMatch(): void { $this->assertSearchResults( [], @@ -978,7 +980,7 @@ public function testUserMetadataFilterEqGroupMemberNoMatch() ); } - public function testUserMetadataFilterInGroupMemberNoMatch() + public function testUserMetadataFilterInGroupMemberNoMatch(): void { $this->assertSearchResults( [], @@ -996,7 +998,7 @@ public function testUserMetadataFilterInGroupMemberNoMatch() ); } - public function testLanguageCodeFilter() + public function testLanguageCodeFilter(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48], @@ -1012,7 +1014,7 @@ public function testLanguageCodeFilter() ); } - public function testLanguageCodeFilterIn() + public function testLanguageCodeFilterIn(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48], @@ -1028,7 +1030,7 @@ public function testLanguageCodeFilterIn() ); } - public function testLanguageCodeFilterWithAlwaysAvailable() + public function testLanguageCodeFilterWithAlwaysAvailable(): void { $this->assertSearchResults( [2, 5, 12, 13, 14, 15, 43, 44, 45, 48, 51, 52, 53, 58, 59, 70, 72, 76, 78, 82], @@ -1044,7 +1046,7 @@ public function testLanguageCodeFilterWithAlwaysAvailable() ); } - public function testMatchAllFilter() + public function testMatchAllFilter(): void { $result = $this->getContentSearchHandler()->findLocations( new LocationQuery( @@ -1064,7 +1066,7 @@ public function testMatchAllFilter() ); } - public function testFullTextFilter() + public function testFullTextFilter(): void { $this->assertSearchResults( [193], @@ -1079,7 +1081,7 @@ public function testFullTextFilter() ); } - public function testFullTextWildcardFilter() + public function testFullTextWildcardFilter(): void { $this->assertSearchResults( [193], @@ -1094,7 +1096,7 @@ public function testFullTextWildcardFilter() ); } - public function testFullTextDisabledWildcardFilter() + public function testFullTextDisabledWildcardFilter(): void { $this->assertSearchResults( [], @@ -1109,7 +1111,7 @@ public function testFullTextDisabledWildcardFilter() ); } - public function testFullTextFilterStopwordRemoval() + public function testFullTextFilterStopwordRemoval(): void { $handler = $this->getContentSearchHandler( [ @@ -1129,7 +1131,7 @@ public function testFullTextFilterStopwordRemoval() ); } - public function testFullTextFilterNoStopwordRemoval() + public function testFullTextFilterNoStopwordRemoval(): void { $handler = $this->getContentSearchHandler( [ @@ -1161,7 +1163,7 @@ static function ($hit) { ); } - public function testFullTextFilterInvalidStopwordThreshold() + public function testFullTextFilterInvalidStopwordThreshold(): void { $this->expectException(InvalidArgumentException::class); @@ -1172,7 +1174,7 @@ public function testFullTextFilterInvalidStopwordThreshold() ); } - public function testFieldRelationFilterContainsSingle() + public function testFieldRelationFilterContainsSingle(): void { $this->assertSearchResults( [69], @@ -1190,7 +1192,7 @@ public function testFieldRelationFilterContainsSingle() ); } - public function testFieldRelationFilterContainsSingleNoMatch() + public function testFieldRelationFilterContainsSingleNoMatch(): void { $this->assertSearchResults( [], @@ -1208,7 +1210,7 @@ public function testFieldRelationFilterContainsSingleNoMatch() ); } - public function testFieldRelationFilterContainsArray() + public function testFieldRelationFilterContainsArray(): void { $this->assertSearchResults( [69], @@ -1226,7 +1228,7 @@ public function testFieldRelationFilterContainsArray() ); } - public function testFieldRelationFilterContainsArrayNotMatch() + public function testFieldRelationFilterContainsArrayNotMatch(): void { $this->assertSearchResults( [], @@ -1244,7 +1246,7 @@ public function testFieldRelationFilterContainsArrayNotMatch() ); } - public function testFieldRelationFilterInArray() + public function testFieldRelationFilterInArray(): void { $this->assertSearchResults( [69, 77], @@ -1262,7 +1264,7 @@ public function testFieldRelationFilterInArray() ); } - public function testFieldRelationFilterInArrayNotMatch() + public function testFieldRelationFilterInArrayNotMatch(): void { $this->assertSearchResults( [], @@ -1280,7 +1282,7 @@ public function testFieldRelationFilterInArrayNotMatch() ); } - public function testFieldFilter() + public function testFieldFilter(): void { $this->assertSearchResults( [12], @@ -1299,7 +1301,7 @@ public function testFieldFilter() ); } - public function testFieldFilterIn() + public function testFieldFilterIn(): void { $this->assertSearchResults( [12, 44], @@ -1318,7 +1320,7 @@ public function testFieldFilterIn() ); } - public function testFieldFilterContainsPartial() + public function testFieldFilterContainsPartial(): void { $this->assertSearchResults( [44], @@ -1337,7 +1339,7 @@ public function testFieldFilterContainsPartial() ); } - public function testFieldFilterContainsSimple() + public function testFieldFilterContainsSimple(): void { $this->assertSearchResults( [79], @@ -1356,7 +1358,7 @@ public function testFieldFilterContainsSimple() ); } - public function testFieldFilterContainsSimpleNoMatch() + public function testFieldFilterContainsSimpleNoMatch(): void { $this->assertSearchResults( [], @@ -1375,7 +1377,7 @@ public function testFieldFilterContainsSimpleNoMatch() ); } - public function testFieldFilterBetween() + public function testFieldFilterBetween(): void { $this->assertSearchResults( [188, 189], @@ -1394,7 +1396,7 @@ public function testFieldFilterBetween() ); } - public function testFieldFilterOr() + public function testFieldFilterOr(): void { $this->assertSearchResults( [12, 188, 189], @@ -1422,7 +1424,7 @@ public function testFieldFilterOr() ); } - public function testIsMainLocationFilter() + public function testIsMainLocationFilter(): void { $this->assertSearchResults( [225], @@ -1444,7 +1446,7 @@ public function testIsMainLocationFilter() ); } - public function testIsNotMainLocationFilter() + public function testIsNotMainLocationFilter(): void { $this->assertSearchResults( [510], From 741b258bcf933c419bb7b9afe4a59a2339b0379a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 3 Mar 2025 22:54:22 +0100 Subject: [PATCH 002/185] IBX-8471: [Composer] Dropped obsolete symfony/proxy-manager-bridge --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 976626e245..470b4ea7e4 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,6 @@ "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^9.6", "symfony/phpunit-bridge": "^5.4", - "symfony/proxy-manager-bridge": "^6.4", "symfony/runtime": "^6.4.0" }, "conflict": { From 694774e3e28279ee3e1288f52c2ed6230ac8979d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 3 Mar 2025 22:54:23 +0100 Subject: [PATCH 003/185] IBX-8471: [Composer] Bumped Symfony packages requirements to ^7.2 --- composer.json | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/composer.json b/composer.json index 470b4ea7e4..045aa43078 100644 --- a/composer.json +++ b/composer.json @@ -35,27 +35,27 @@ "pagerfanta/pagerfanta": "^3.6.2", "psr/event-dispatcher": "^1.0", "symfony-cmf/routing": "^3.0", - "symfony/cache": "^6.4.0", - "symfony/console": "^6.4.0", - "symfony/dependency-injection": "^6.4.0", - "symfony/event-dispatcher": "^6.4.0", - "symfony/expression-language": "^6.4.0", - "symfony/framework-bundle": "^6.4.0", - "symfony/http-client": "^6.4.0", - "symfony/http-foundation": "^6.4.0", - "symfony/http-kernel": "^6.4.0", - "symfony/mime": "^6.4.0", + "symfony/cache": "^7.2", + "symfony/console": "^7.2", + "symfony/dependency-injection": "^7.2", + "symfony/event-dispatcher": "^7.2", + "symfony/expression-language": "^7.2", + "symfony/framework-bundle": "^7.2", + "symfony/http-client": "^7.2", + "symfony/http-foundation": "^7.2", + "symfony/http-kernel": "^7.2", + "symfony/mime": "^7.2", "symfony/polyfill-php80": "^1.27", - "symfony/process": "^6.4.0", - "symfony/security-bundle": "^6.4.0", - "symfony/security-core": "^6.4.0", - "symfony/security-http": "^6.4.0", - "symfony/serializer": "^6.4.0", + "symfony/process": "^7.2", + "symfony/security-bundle": "^7.2", + "symfony/security-core": "^7.2", + "symfony/security-http": "^7.2", + "symfony/serializer": "^7.2", "symfony/templating": "^6.4.0", - "symfony/translation": "^6.4.0", - "symfony/validator": "^6.4.0", - "symfony/var-dumper": "^6.4.0", - "symfony/yaml": "^6.4.0", + "symfony/translation": "^7.2", + "symfony/validator": "^7.2", + "symfony/var-dumper": "^7.2", + "symfony/yaml": "^7.2", "twig/extra-bundle": "^3.0", "twig/twig": ">=3.0 <3.16 || ^3.19.0" }, @@ -70,8 +70,8 @@ "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-symfony": "^2.0", "phpunit/phpunit": "^9.6", - "symfony/phpunit-bridge": "^5.4", - "symfony/runtime": "^6.4.0" + "symfony/phpunit-bridge": "^7.2", + "symfony/runtime": "^7.2" }, "conflict": { "doctrine/dbal": "2.7.0", From 138fedef7c17c40e2138fb3a28bfa8110e989605 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 3 Mar 2025 22:54:24 +0100 Subject: [PATCH 004/185] IBX-8471: [Composer] Bumped 3rd party packages compatible with for Symfony 7 --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 045aa43078..341c5c6673 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "ext-mbstring": "*", "ext-xsl": "*", "composer/package-versions-deprecated": "^1.11", - "doctrine/dbal": "^2.13.0", - "doctrine/doctrine-bundle": "^2.0", + "doctrine/dbal": "^3.7.0", + "doctrine/doctrine-bundle": "^2.11.0", "doctrine/orm": "^2.7", "friendsofphp/proxy-manager-lts": "^1.0", - "friendsofsymfony/http-cache-bundle": "^2.8", + "friendsofsymfony/http-cache-bundle": "^3.0", "friendsofsymfony/jsrouting-bundle": "^3.5", "ibexa/doctrine-schema": "~5.0.x-dev", "jms/translation-bundle": "^2.4", @@ -65,7 +65,7 @@ "ibexa/code-style": "~2.0.0", "ibexa/rector": "~5.0.x-dev", "jenner/simple_fork": "^1.2", - "matthiasnoback/symfony-dependency-injection-test": "^4.1", + "matthiasnoback/symfony-dependency-injection-test": "^5.0", "phpstan/phpstan": "^2.0", "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-symfony": "^2.0", From a15ee39f9e79c7de4845945be385fb0002cada2e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 3 Mar 2025 22:54:25 +0100 Subject: [PATCH 005/185] [TMP] Switched to dev branch of ibexa packages --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 341c5c6673..368c8457ce 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "friendsofphp/proxy-manager-lts": "^1.0", "friendsofsymfony/http-cache-bundle": "^3.0", "friendsofsymfony/jsrouting-bundle": "^3.5", - "ibexa/doctrine-schema": "~5.0.x-dev", + "ibexa/doctrine-schema": "dev-ibx-8471-symfony-7 as 5.0.x-dev", "jms/translation-bundle": "^2.4", "league/flysystem-memory": "^2.0.6", "liip/imagine-bundle": "^2.3", @@ -63,7 +63,7 @@ "behat/behat": "^3.6.1", "friends-of-behat/mink-extension": "^2.4", "ibexa/code-style": "~2.0.0", - "ibexa/rector": "~5.0.x-dev", + "ibexa/rector": "dev-ibx-8471-symfony-7 as 5.0.x-dev", "jenner/simple_fork": "^1.2", "matthiasnoback/symfony-dependency-injection-test": "^5.0", "phpstan/phpstan": "^2.0", From d50ee80a7e0db6ed1979f7c2242646c4f13179bc Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 27 Mar 2025 15:47:20 +0100 Subject: [PATCH 006/185] IBX-9811: Upgraded codebase to doctrine/dbal v3 Doctrine DBAL upgrade was a combination of: * applying `DoctrineSetList` Rector sets, * manual code style fixes of Rector changes, * manual fixes of issues found by SonarQube PHPStorm plugin, * manual fixes of issues found by PHPStan. --- .../Core/Command/CleanupVersionsCommand.php | 6 +- .../LegacyStorageImageFileRowReader.php | 25 +- .../LegacyStorageFileRowReader.php | 10 +- .../Installer/CoreInstaller.php | 6 +- .../Installer/DbBasedInstaller.php | 4 +- .../FieldType/GatewayBasedStorage.php | 1 - .../Persistence/Filter/CriterionVisitor.php | 2 +- .../Filter/Doctrine/FilteringQueryBuilder.php | 8 +- .../Persistence/Fixture/FixtureImporter.php | 12 +- .../Test/Repository/SetupFactory/Legacy.php | 2 +- src/lib/Base/Exceptions/DatabaseException.php | 2 +- .../Gateway/DoctrineStorage.php | 123 ++-- .../ImageStorage/Gateway/DoctrineStorage.php | 125 ++-- .../Gateway/DoctrineStorage.php | 46 +- .../Gateway/DoctrineStorage.php | 123 ++-- .../MediaStorage/Gateway/DoctrineStorage.php | 83 +-- .../UrlStorage/Gateway/DoctrineStorage.php | 69 +-- src/lib/FieldType/User/UserStorage.php | 11 +- .../FieldType/User/UserStorage/Gateway.php | 2 +- .../UserStorage/Gateway/DoctrineStorage.php | 144 +++-- .../IO/IOMetadataHandler/LegacyDFSCluster.php | 21 +- .../Bookmark/Gateway/DoctrineDatabase.php | 59 +- .../Bookmark/Gateway/ExceptionConversion.php | 2 +- .../Converter/RelationListConverter.php | 9 +- .../Content/Gateway/DoctrineDatabase.php | 580 ++++++++++-------- .../Gateway/DoctrineDatabase/QueryBuilder.php | 4 +- .../Content/Gateway/ExceptionConversion.php | 2 +- .../Language/Gateway/DoctrineDatabase.php | 8 +- .../Language/Gateway/ExceptionConversion.php | 2 +- .../Location/Gateway/DoctrineDatabase.php | 67 +- .../Location/Gateway/ExceptionConversion.php | 2 +- .../ObjectState/Gateway/DoctrineDatabase.php | 18 +- .../Gateway/ExceptionConversion.php | 2 +- .../Section/Gateway/DoctrineDatabase.php | 15 +- .../Section/Gateway/ExceptionConversion.php | 2 +- .../Content/Type/Gateway/DoctrineDatabase.php | 250 ++++---- .../Type/Gateway/ExceptionConversion.php | 2 +- .../UrlAlias/Gateway/DoctrineDatabase.php | 58 +- .../UrlAlias/Gateway/ExceptionConversion.php | 2 +- .../UrlWildcard/Gateway/DoctrineDatabase.php | 2 +- .../Gateway/ExceptionConversion.php | 2 +- .../Content/DateMetadataQueryBuilder.php | 2 +- .../Content/LanguageCodeQueryBuilder.php | 2 +- .../Location/DepthQueryBuilder.php | 2 +- .../Location/PriorityQueryBuilder.php | 2 +- .../Location/SubtreeQueryBuilder.php | 2 +- .../Location/VisibilityQueryBuilder.php | 4 +- .../LogicalAndQueryBuilder.php | 2 +- .../LogicalOrQueryBuilder.php | 2 +- .../User/IsUserBasedQueryBuilder.php | 2 +- .../Content/Doctrine/DoctrineGateway.php | 12 +- .../Location/Doctrine/DoctrineGateway.php | 59 +- .../Notification/Gateway/DoctrineDatabase.php | 4 +- .../Gateway/ExceptionConversion.php | 2 +- .../Setting/Gateway/DoctrineDatabase.php | 8 +- .../Setting/Gateway/ExceptionConversion.php | 2 +- .../Legacy/SharedGateway/GatewayFactory.php | 2 +- .../Legacy/URL/Gateway/DoctrineDatabase.php | 51 +- .../URL/Gateway/ExceptionConversion.php | 2 +- .../URL/Query/CriterionHandler/Base.php | 2 +- .../URL/Query/CriterionHandler/LogicalAnd.php | 2 +- .../URL/Query/CriterionHandler/LogicalOr.php | 2 +- .../Query/CriterionHandler/VisibleOnly.php | 2 +- .../Legacy/User/Gateway/DoctrineDatabase.php | 71 ++- .../User/Gateway/ExceptionConversion.php | 2 +- .../User/Role/Gateway/DoctrineDatabase.php | 45 +- .../User/Role/Gateway/ExceptionConversion.php | 2 +- .../LimitationHandler/ObjectStateHandler.php | 3 +- .../Gateway/DoctrineDatabase.php | 5 +- .../Gateway/ExceptionConversion.php | 12 +- .../Common/Gateway/CriterionHandler.php | 2 +- .../Common/Gateway/CriterionHandler/Field.php | 2 +- .../Gateway/CriterionHandler/FieldBase.php | 8 +- .../Gateway/CriterionHandler/FieldEmpty.php | 2 +- .../CriterionHandler/FieldRelation.php | 4 +- .../CriterionHandler/FieldValue/Handler.php | 2 +- .../FieldValue/Handler/Collection.php | 2 +- .../Gateway/CriterionHandler/FullText.php | 6 +- .../Gateway/CriterionHandler/LogicalAnd.php | 2 +- .../Gateway/CriterionHandler/LogicalOr.php | 2 +- .../CriterionHandler/MapLocationDistance.php | 2 +- .../ObjectStateIdentifier.php | 2 +- .../Common/Gateway/SortClauseHandler.php | 14 +- .../RandomSortClauseHandlerFactory.php | 2 +- .../Gateway/SortClauseHandler/Field.php | 31 +- .../SortClauseHandler/MapLocationDistance.php | 8 +- .../CriterionHandler/PermissionSubtree.php | 2 +- .../Gateway/CriterionHandler/Subtree.php | 2 +- .../Gateway/CriterionHandler/Visibility.php | 4 +- .../Content/Gateway/DoctrineDatabase.php | 11 +- .../Content/Gateway/ExceptionConversion.php | 2 +- .../Legacy/Content/Location/Gateway.php | 16 +- .../Gateway/CriterionHandler/Subtree.php | 2 +- .../Location/Gateway/DoctrineDatabase.php | 168 +++-- .../Location/Gateway/ExceptionConversion.php | 8 +- .../WordIndexer/Repository/SearchIndex.php | 5 +- 96 files changed, 1325 insertions(+), 1209 deletions(-) diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 64219b2d62..1a16f9c28e 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -241,6 +241,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int * * @return array * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ protected function getObjectsIds($keep, $status, $excludedContentTypes = []): array @@ -273,10 +274,7 @@ protected function getObjectsIds($keep, $status, $excludedContentTypes = []): ar )->setParameter(':contentTypes', $excludedContentTypes, Connection::PARAM_STR_ARRAY); } - /** @var \Doctrine\DBAL\ForwardCompatibility\Result $stmt */ - $stmt = $query->execute(); - - return $stmt->fetchFirstColumn(); + return $query->executeQuery()->fetchFirstColumn(); } /** diff --git a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php index 32ac88afa2..831ceb219b 100644 --- a/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php +++ b/src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php @@ -8,33 +8,44 @@ namespace Ibexa\Bundle\Core\Imagine\VariationPurger; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Result; class LegacyStorageImageFileRowReader implements ImageFileRowReader { private Connection $connection; - /** @var \Doctrine\DBAL\Driver\Statement */ - private $statement; + private Result $result; public function __construct(Connection $connection) { $this->connection = $connection; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function init(): void { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery->select('filepath')->from('ezimagefile'); - $this->statement = $selectQuery->execute(); + $this->result = $selectQuery->executeQuery(); } - public function getRow() + /** + * @phpstan-return array + * + * @throws \Doctrine\DBAL\Exception + */ + public function getRow(): array { - return $this->statement->fetchColumn(0); + return $this->result->fetchOne(); } - public function getCount() + /** + * @throws \Doctrine\DBAL\Exception + */ + public function getCount(): int { - return $this->statement->rowCount(); + return $this->result->rowCount(); } } diff --git a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php index b99ee1051b..a005c9ff44 100644 --- a/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php +++ b/src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php @@ -8,14 +8,14 @@ namespace Ibexa\Bundle\IO\Migration\FileLister\FileRowReader; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Result; use Ibexa\Bundle\IO\Migration\FileLister\FileRowReaderInterface; abstract class LegacyStorageFileRowReader implements FileRowReaderInterface { private Connection $connection; - /** @var \Doctrine\DBAL\Driver\Statement */ - private $statement; + private Result $result; public function __construct(Connection $connection) { @@ -28,7 +28,7 @@ final public function init(): void $selectQuery ->select('filename', 'mime_type') ->from($this->getStorageTable()); - $this->statement = $selectQuery->execute(); + $this->result = $selectQuery->executeQuery(); } /** @@ -40,14 +40,14 @@ abstract protected function getStorageTable(); final public function getRow() { - $row = $this->statement->fetch(); + $row = $this->result->fetchAssociative(); return false !== $row ? $this->prependMimeToPath($row['filename'], $row['mime_type']) : null; } final public function getCount() { - return $this->statement->rowCount(); + return $this->result->rowCount(); } /** diff --git a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php index 269c1e575a..b5ce73340f 100644 --- a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php @@ -40,7 +40,7 @@ public function __construct(Connection $db, SchemaBuilderInterface $schemaBuilde * @see \Ibexa\Contracts\DoctrineSchema\Event\SchemaBuilderEvent * @see \Ibexa\Bundle\RepositoryInstaller\Event\Subscriber\BuildSchemaSubscriber * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function importSchema(): void { @@ -66,7 +66,7 @@ public function importSchema(): void $progressBar->start($queriesCount); foreach ($queries as $query) { - $this->db->exec($query); + $this->db->executeStatement($query); $progressBar->advance(1); } @@ -78,7 +78,7 @@ public function importSchema(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function importData(): void diff --git a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php index ebbae03ca7..621c2dc64c 100644 --- a/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php @@ -67,7 +67,7 @@ protected function runQueriesFromFile($file) } foreach ($queries as $query) { - $this->db->exec($query); + $this->db->executeStatement($query); } } @@ -79,7 +79,7 @@ protected function runQueriesFromFile($file) * @return string absolute existing file path * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * * @since 6.13 */ diff --git a/src/contracts/FieldType/GatewayBasedStorage.php b/src/contracts/FieldType/GatewayBasedStorage.php index 9487c420a4..ec06ddfc75 100644 --- a/src/contracts/FieldType/GatewayBasedStorage.php +++ b/src/contracts/FieldType/GatewayBasedStorage.php @@ -20,7 +20,6 @@ abstract class GatewayBasedStorage implements FieldStorage /** * Field Type External Storage Gateway. * - * * @phpstan-var T */ protected StorageGatewayInterface $gateway; diff --git a/src/contracts/Persistence/Filter/CriterionVisitor.php b/src/contracts/Persistence/Filter/CriterionVisitor.php index 9d3ba0f35b..8042c3651f 100644 --- a/src/contracts/Persistence/Filter/CriterionVisitor.php +++ b/src/contracts/Persistence/Filter/CriterionVisitor.php @@ -20,5 +20,5 @@ interface CriterionVisitor public function visitCriteria( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): string; + ): ?string; } diff --git a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php index 58ac699220..3f6755ffe1 100644 --- a/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php +++ b/src/contracts/Persistence/Filter/Doctrine/FilteringQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Contracts\Core\Persistence\Filter\Doctrine; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -166,7 +166,7 @@ private function isJoinedAsFromTableAlias(string $tableAlias): bool } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildOperatorBasedCriterionConstraint( string $columnName, @@ -177,7 +177,7 @@ public function buildOperatorBasedCriterionConstraint( case Operator::IN: return $this->expr()->in( $columnName, - $this->createNamedParameter($criterionValue, Connection::PARAM_INT_ARRAY) + $this->createNamedParameter($criterionValue, ArrayParameterType::INTEGER) ); case Query\Criterion\Operator::BETWEEN: @@ -215,7 +215,7 @@ public function joinPublishedVersion(): FilteringQueryBuilder 'content', ContentGateway::CONTENT_VERSION_TABLE, 'version', - (string)$expressionBuilder->andX( + (string)$expressionBuilder->and( 'content.id = version.contentobject_id', 'content.current_version = version.version', $expressionBuilder->eq( diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index df96ed4d44..192cfb907b 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -9,8 +9,8 @@ namespace Ibexa\Contracts\Core\Test\Persistence\Fixture; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\PDOException; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Schema\Column; use Ibexa\Contracts\Core\Test\Persistence\Fixture; @@ -32,7 +32,7 @@ public function __construct(Connection $connection) } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function import(Fixture $fixture): void { @@ -62,7 +62,7 @@ static function ($tableData): bool { /** * @param string[] $tables a list of table names * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function truncateTables(array $tables): void { @@ -71,7 +71,7 @@ private function truncateTables(array $tables): void foreach ($tables as $table) { try { // Cleanup before inserting (using TRUNCATE for speed, however not possible to rollback) - $this->connection->executeUpdate( + $this->connection->executeStatement( $dbPlatform->getTruncateTableSql($this->connection->quoteIdentifier($table)) ); } catch (DBALException | PDOException $e) { @@ -86,12 +86,12 @@ private function truncateTables(array $tables): void * * @param string[] $affectedTables * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function resetSequences(array $affectedTables): void { foreach ($this->getSequenceResetStatements($affectedTables) as $statement) { - $this->connection->exec($statement); + $this->connection->executeStatement($statement); } } diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index 08aa69f894..c0eb8dcafc 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -189,7 +189,7 @@ public function getIdManager(): Php /** * Insert the database data. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function insertData(): void { diff --git a/src/lib/Base/Exceptions/DatabaseException.php b/src/lib/Base/Exceptions/DatabaseException.php index e4bce1b475..8dcb6c5dee 100644 --- a/src/lib/Base/Exceptions/DatabaseException.php +++ b/src/lib/Base/Exceptions/DatabaseException.php @@ -16,7 +16,7 @@ */ final class DatabaseException extends RuntimeException { - public const DEFAULT_MESSAGE = 'Database error'; + public const string DEFAULT_MESSAGE = 'Database error'; public static function wrap( Throwable $previous, diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index 122ff5e9a0..3c8d645b15 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -7,19 +7,26 @@ namespace Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway; -use PDO; /** * Base class for binary files external storage DoctrineStorage gateways. */ abstract class DoctrineStorage extends Gateway { + private const string FIELD_ID_PARAM_NAME = ':fieldId'; + private const string FILENAME_PARAM_NAME = ':filename'; + private const string MIME_TYPE_PARAM_NAME = ':mimeType'; + private const string ORIGINAL_FILENAME_PARAM_NAME = ':originalFilename'; + private const string VERSION_NO_PARAM_NAME = ':versionNo'; + private const string FIELD_ID_LIST_PARAMETER_NAME = ':fieldIds'; + protected Connection $connection; public function __construct(Connection $connection) @@ -91,16 +98,16 @@ protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versio protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) { $queryBuilder - ->setValue('contentobject_attribute_id', ':fieldId') - ->setValue('filename', ':filename') - ->setValue('mime_type', ':mimeType') - ->setValue('original_filename', ':originalFilename') - ->setValue('version', ':versionNo') - ->setParameter(':fieldId', $field->id, PDO::PARAM_INT) - ->setParameter(':filename', $this->removeMimeFromPath($field->value->externalData['id'])) - ->setParameter(':mimeType', $field->value->externalData['mimeType']) - ->setParameter(':originalFilename', $field->value->externalData['fileName']) - ->setParameter(':versionNo', $versionInfo->versionNo, PDO::PARAM_INT) + ->setValue('contentobject_attribute_id', self::FIELD_ID_PARAM_NAME) + ->setValue('filename', self::FILENAME_PARAM_NAME) + ->setValue('mime_type', self::MIME_TYPE_PARAM_NAME) + ->setValue('original_filename', self::ORIGINAL_FILENAME_PARAM_NAME) + ->setValue('version', self::VERSION_NO_PARAM_NAME) + ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) + ->setParameter(self::FILENAME_PARAM_NAME, $this->removeMimeFromPath($field->value->externalData['id'])) + ->setParameter(self::MIME_TYPE_PARAM_NAME, $field->value->externalData['mimeType']) + ->setParameter(self::ORIGINAL_FILENAME_PARAM_NAME, $field->value->externalData['fileName']) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; } @@ -112,16 +119,16 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) { $queryBuilder - ->set('contentobject_attribute_id', ':fieldId') - ->set('filename', ':filename') - ->set('mime_type', ':mimeType') - ->set('original_filename', ':originalFilename') - ->set('version', ':versionNo') - ->setParameter(':fieldId', $field->id, ParameterType::INTEGER) - ->setParameter(':filename', $this->removeMimeFromPath($field->value->externalData['id'])) - ->setParameter(':mimeType', $field->value->externalData['mimeType']) - ->setParameter(':originalFilename', $field->value->externalData['fileName']) - ->setParameter(':versionNo', $versionInfo->versionNo, ParameterType::INTEGER) + ->set('contentobject_attribute_id', self::FIELD_ID_PARAM_NAME) + ->set('filename', self::FILENAME_PARAM_NAME) + ->set('mime_type', self::MIME_TYPE_PARAM_NAME) + ->set('original_filename', self::ORIGINAL_FILENAME_PARAM_NAME) + ->set('version', self::VERSION_NO_PARAM_NAME) + ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) + ->setParameter(self::FILENAME_PARAM_NAME, $this->removeMimeFromPath($field->value->externalData['id'])) + ->setParameter(self::MIME_TYPE_PARAM_NAME, $field->value->externalData['mimeType']) + ->setParameter(self::ORIGINAL_FILENAME_PARAM_NAME, $field->value->externalData['fileName']) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; } @@ -160,22 +167,22 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field) $this->setUpdateColumns($updateQuery, $versionInfo, $field); $updateQuery ->where( - $updateQuery->expr()->andX( + $updateQuery->expr()->and( $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $updateQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldId', $field->id, ParameterType::INTEGER) - ->setParameter(':versionNo', $versionInfo->versionNo, ParameterType::INTEGER) + ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; - $updateQuery->execute(); + $updateQuery->executeStatement(); } /** @@ -191,7 +198,7 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field) $this->setInsertColumns($insertQuery, $versionInfo, $field); - $insertQuery->execute(); + $insertQuery->executeStatement(); } /** @@ -225,24 +232,24 @@ public function getFileReferenceData($fieldId, $versionNo) $selectQuery ->from($this->connection->quoteIdentifier($this->getStorageTable())) ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); - $result = $statement->fetchAll(PDO::FETCH_ASSOC); + $result = $statement->fetchAllAssociative(); if (count($result) < 1) { return null; @@ -300,9 +307,7 @@ protected function castToPropertyValue($value, $columnName) */ public function prependMimeToPath(string $path, $mimeType) { - $res = substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; - - return $res; + return substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; } /** @@ -321,22 +326,22 @@ public function removeFileReferences(array $fieldIds, $versionNo): void $deleteQuery ->delete($this->connection->quoteIdentifier($this->getStorageTable())) ->where( - $deleteQuery->expr()->andX( + $deleteQuery->expr()->and( $deleteQuery->expr()->in( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldIds' + self::FIELD_ID_LIST_PARAMETER_NAME ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_LIST_PARAMETER_NAME, $fieldIds, ArrayParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } /** @@ -351,22 +356,22 @@ public function removeFileReference($fieldId, $versionNo): void $deleteQuery ->delete($this->connection->quoteIdentifier($this->getStorageTable())) ->where( - $deleteQuery->expr()->andX( + $deleteQuery->expr()->and( $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } /** @@ -390,28 +395,28 @@ public function getReferencedFiles(array $fieldIds, $versionNo) ) ->from($this->connection->quoteIdentifier($this->getStorageTable())) ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->in( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldIds' + self::FIELD_ID_LIST_PARAMETER_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_LIST_PARAMETER_NAME, $fieldIds, Connection::PARAM_INT_ARRAY) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); return array_map( function (array $row) { return $this->prependMimeToPath($row['filename'], $row['mime_type']); }, - $statement->fetchAll(PDO::FETCH_ASSOC) + $statement->fetchAllAssociative() ); } @@ -459,10 +464,10 @@ public function countFileReferences(array $files) ) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); $countMap = []; - foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) { + foreach ($statement->fetchAllAssociative() as $row) { $path = $this->prependMimeToPath($row['filename'], $row['mime_type']); $countMap[$path] = (int)$row['count']; } diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index 0d974e9f8b..4c57c4cd94 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\FieldType\Image\ImageStorage\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use DOMDocument; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; @@ -21,7 +20,12 @@ */ class DoctrineStorage extends Gateway { - public const IMAGE_FILE_TABLE = 'ezimagefile'; + public const string IMAGE_FILE_TABLE = 'ezimagefile'; + private const string PATH_PARAM_NAME = ':path'; + private const string LIKE_PATH_PARAM_NAME = ':likePath'; + private const string FIELD_ID_PARAM_NAME = ':field_id'; + private const string VERSION_NO_PARAM_NAME = ':versionNo'; + private const string CONTENT_OBJECT_ID = ':contentObjectId'; protected Connection $connection; @@ -49,23 +53,23 @@ public function __construct(UrlRedecoratorInterface $redecorator, Connection $co /** * Return the node path string of $versionInfo. * - * @return string + * @throws \Doctrine\DBAL\Exception */ - public function getNodePathString(VersionInfo $versionInfo) + public function getNodePathString(VersionInfo $versionInfo): string { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery ->select($this->connection->quoteIdentifier('path_identification_string')) ->from($this->connection->quoteIdentifier('ezcontentobject_tree')) ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - ':contentObjectId' + self::CONTENT_OBJECT_ID ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('node_id'), @@ -73,13 +77,10 @@ public function getNodePathString(VersionInfo $versionInfo) ) ) ) - ->setParameter(':contentObjectId', $versionInfo->contentInfo->id, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionInfo->versionNo, PDO::PARAM_INT) - ; + ->setParameter(self::CONTENT_OBJECT_ID, $versionInfo->contentInfo->id, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER); - $statement = $selectQuery->execute(); - - return $statement->fetchColumn(); + return $selectQuery->executeQuery()->fetchOne(); } /** @@ -98,15 +99,15 @@ public function storeImageReference($uri, $fieldId): void ->insert($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->values( [ - $this->connection->quoteIdentifier('contentobject_attribute_id') => ':fieldId', - $this->connection->quoteIdentifier('filepath') => ':path', + $this->connection->quoteIdentifier('contentobject_attribute_id') => self::FIELD_ID_PARAM_NAME, + $this->connection->quoteIdentifier('filepath') => self::PATH_PARAM_NAME, ] ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':path', $path) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::PATH_PARAM_NAME, $path) ; - $insertQuery->execute(); + $insertQuery->executeStatement(); } /** @@ -115,6 +116,8 @@ public function storeImageReference($uri, $fieldId): void * @param int $versionNo * * @return array + * + * @throws \Doctrine\DBAL\Exception */ public function getXmlForImages($versionNo, array $fieldIds): array { @@ -126,10 +129,10 @@ public function getXmlForImages($versionNo, array $fieldIds): array ) ->from($this->connection->quoteIdentifier('ezcontentobject_attribute'), 'attr') ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('attr.version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ), $selectQuery->expr()->in( $this->connection->quoteIdentifier('attr.id'), @@ -137,14 +140,14 @@ public function getXmlForImages($versionNo, array $fieldIds): array ) ) ) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); $fieldLookup = []; - foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) { + foreach ($statement->fetchAllAssociative() as $row) { $fieldLookup[$row['id']] = $row['data_text']; } @@ -164,13 +167,13 @@ public function getAllVersionsImageXmlForFieldId(int $fieldId): array ->where( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('id'), - ':field_id' + self::FIELD_ID_PARAM_NAME ) ) - ->setParameter(':field_id', $fieldId, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); $fieldLookup = []; foreach ($statement->fetchAllAssociative() as $row) { @@ -204,22 +207,22 @@ public function removeImageReferences($uri, $versionNo, $fieldId): void $deleteQuery ->delete($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->where( - $deleteQuery->expr()->andX( + $deleteQuery->expr()->and( $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $deleteQuery->expr()->like( $this->connection->quoteIdentifier('filepath'), - ':likePath' + self::LIKE_PATH_PARAM_NAME ) ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':likePath', $path . '%') + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::LIKE_PATH_PARAM_NAME, $path . '%') ; - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } /** @@ -228,6 +231,8 @@ public function removeImageReferences($uri, $versionNo, $fieldId): void * @param string $uri File IO uri (not legacy) * * @return int + * + * @throws \Doctrine\DBAL\Exception */ public function countImageReferences($uri): int { @@ -246,11 +251,15 @@ public function countImageReferences($uri): int ->setParameter(':filepath', $path) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); - return (int) $statement->fetchColumn(); + return (int) $statement->fetchFirstColumn(); } + /** + * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException + * @throws \Doctrine\DBAL\Exception + */ public function isImageReferenced(string $uri): bool { $path = $this->redecorator->redecorateFromSource($uri); @@ -262,13 +271,13 @@ public function isImageReferenced(string $uri): bool ->where( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('filepath'), - ':likePath' + self::LIKE_PATH_PARAM_NAME ) ) - ->setParameter(':likePath', $path) + ->setParameter(self::LIKE_PATH_PARAM_NAME, $path) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); return (bool)$statement->fetchOne(); } @@ -281,7 +290,7 @@ public function countDistinctImagesData(): int ->from($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); return (int) $statement->fetchOne(); } @@ -312,20 +321,20 @@ protected function canRemoveImageReference($path, $versionNo, $fieldId): bool ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ) ) ->andWhere( $expressionBuilder->neq( $this->connection->quoteIdentifier('version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) ; - $imageXMLs = $selectQuery->execute()->fetchAll(FetchMode::COLUMN); + $imageXMLs = $selectQuery->executeQuery()->fetchFirstColumn(); foreach ($imageXMLs as $imageXML) { $storedFilePath = $this->extractFilesFromXml($imageXML)['original'] ?? null; if ($storedFilePath === $path) { @@ -391,7 +400,7 @@ public function getImagesData(int $offset, int $limit): array ->setFirstResult($offset) ->setMaxResults($limit); - return $selectQuery->execute()->fetchAllAssociative(); + return $selectQuery->executeQuery()->fetchAllAssociative(); } public function updateImageData(int $fieldId, int $versionNo, string $xml): void @@ -409,7 +418,7 @@ public function updateImageData(int $fieldId, int $versionNo, string $xml): void ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('id'), - ':field_id' + self::FIELD_ID_PARAM_NAME ) ) ->andWhere( @@ -418,13 +427,16 @@ public function updateImageData(int $fieldId, int $versionNo, string $xml): void ':version_no' ) ) - ->setParameter(':field_id', $fieldId, ParameterType::INTEGER) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) ->setParameter(':version_no', $versionNo, ParameterType::INTEGER) ->setParameter(':xml', $xml, ParameterType::STRING) ->execute() ; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateImagePath(int $fieldId, string $oldPath, string $newPath): void { $updateQuery = $this->connection->createQueryBuilder(); @@ -440,7 +452,7 @@ public function updateImagePath(int $fieldId, string $oldPath, string $newPath): ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':field_id' + self::FIELD_ID_PARAM_NAME ) ) ->andWhere( @@ -449,16 +461,15 @@ public function updateImagePath(int $fieldId, string $oldPath, string $newPath): ':old_path' ) ) - ->setParameter(':field_id', $fieldId, ParameterType::INTEGER) - ->setParameter(':old_path', $oldPath, ParameterType::STRING) - ->setParameter(':new_path', $newPath, ParameterType::STRING) - ->execute() + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(':old_path', $oldPath) + ->setParameter(':new_path', $newPath) + ->executeStatement() ; } /** * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ public function hasImageReference(string $uri, int $fieldId): bool @@ -472,20 +483,20 @@ public function hasImageReference(string $uri, int $fieldId): bool ->andWhere( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('filepath'), - ':path' + self::PATH_PARAM_NAME ) ) ->andWhere( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':field_id' + self::FIELD_ID_PARAM_NAME ) ) - ->setParameter(':path', $path) - ->setParameter(':field_id', $fieldId) + ->setParameter(self::PATH_PARAM_NAME, $path) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); return (bool)$statement->fetchOne(); } diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index aa0cbb6e37..f1abe6f909 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\FieldType\Keyword\KeywordStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\Content\Field; @@ -17,6 +18,7 @@ class DoctrineStorage extends Gateway { public const KEYWORD_TABLE = 'ezkeyword'; public const KEYWORD_ATTRIBUTE_LINK_TABLE = 'ezkeyword_attribute_link'; + private const string CONTENT_TYPE_ID_PARAM_NAME = ':contentTypeId'; protected Connection $connection; @@ -28,7 +30,6 @@ public function __construct(Connection $connection) /** * Stores the keyword list from $field->value->externalData. * - * @param \Ibexa\Contracts\Core\Persistence\Content\Field * @param int $contentTypeId */ public function storeFieldData(Field $field, $contentTypeId): void @@ -130,7 +131,7 @@ protected function getAssignedKeywords(int $fieldId, int $versionNo): array ->setParameter('field_id', $fieldId, ParameterType::INTEGER) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); - return $query->execute()->fetchFirstColumn(); + return $query->executeQuery()->fetchFirstColumn(); } /** @@ -151,9 +152,9 @@ protected function loadContentTypeId($fieldDefinitionId): int ) ->setParameter(':fieldDefinitionId', $fieldDefinitionId); - $statement = $query->execute(); + $statement = $query->executeQuery(); - $row = $statement->fetch(\PDO::FETCH_ASSOC); + $row = $statement->fetchAssociative(); if ($row === false) { throw new RuntimeException( @@ -182,6 +183,8 @@ protected function loadContentTypeId($fieldDefinitionId): int * @param int $contentTypeId * * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ protected function getExistingKeywords($keywordList, $contentTypeId): array { @@ -194,24 +197,24 @@ protected function getExistingKeywords($keywordList, $contentTypeId): array ) ->from($this->connection->quoteIdentifier(self::KEYWORD_TABLE)) ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->in( $this->connection->quoteIdentifier('keyword'), ':keywordList' ), $query->expr()->eq( $this->connection->quoteIdentifier('class_id'), - ':contentTypeId' + self::CONTENT_TYPE_ID_PARAM_NAME ) ) ) ->setParameter(':keywordList', $keywordList, Connection::PARAM_STR_ARRAY) - ->setParameter(':contentTypeId', $contentTypeId); + ->setParameter(self::CONTENT_TYPE_ID_PARAM_NAME, $contentTypeId); - $statement = $query->execute(); + $statement = $query->executeQuery(); $existingKeywordMap = []; - foreach ($statement->fetchAll(\PDO::FETCH_ASSOC) as $row) { + foreach ($statement->fetchAllAssociative() as $row) { // filter out keywords that aren't the exact match (e.g. differ by case) if (!in_array($row['keyword'], $keywordList)) { continue; @@ -249,15 +252,15 @@ protected function insertKeywords(array $keywordsToInsert, $contentTypeId): arra ->insert($this->connection->quoteIdentifier(self::KEYWORD_TABLE)) ->values( [ - $this->connection->quoteIdentifier('class_id') => ':contentTypeId', + $this->connection->quoteIdentifier('class_id') => self::CONTENT_TYPE_ID_PARAM_NAME, $this->connection->quoteIdentifier('keyword') => ':keyword', ] ) - ->setParameter(':contentTypeId', $contentTypeId, \PDO::PARAM_INT); + ->setParameter(self::CONTENT_TYPE_ID_PARAM_NAME, $contentTypeId, \PDO::PARAM_INT); foreach (array_keys($keywordsToInsert) as $keyword) { $insertQuery->setParameter(':keyword', $keyword); - $insertQuery->execute(); + $insertQuery->executeStatement(); $keywordIdMap[$keyword] = (int)$this->connection->lastInsertId( $this->getSequenceName(self::KEYWORD_TABLE, 'id') ); @@ -273,7 +276,7 @@ protected function deleteOldKeywordAssignments(int $fieldId, int $versionNo): vo $deleteQuery ->delete($this->connection->quoteIdentifier(self::KEYWORD_ATTRIBUTE_LINK_TABLE)) ->where( - $deleteQuery->expr()->andX( + $deleteQuery->expr()->and( $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('objectattribute_id'), ':fieldId' @@ -287,7 +290,7 @@ protected function deleteOldKeywordAssignments(int $fieldId, int $versionNo): vo ->setParameter('fieldId', $fieldId, ParameterType::INTEGER) ->setParameter('versionNo', $versionNo, ParameterType::INTEGER); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } /** @@ -300,6 +303,8 @@ protected function deleteOldKeywordAssignments(int $fieldId, int $versionNo): vo * // ... * ); * + * + * @throws \Doctrine\DBAL\Exception */ protected function assignKeywords(int $fieldId, array $keywordMap, int $versionNo): void { @@ -315,12 +320,13 @@ protected function assignKeywords(int $fieldId, array $keywordMap, int $versionN ) ; - foreach ($keywordMap as $keyword => $keywordId) { + foreach ($keywordMap as $keywordId) { $insertQuery ->setParameter('keywordId', $keywordId, ParameterType::INTEGER) ->setParameter('fieldId', $fieldId, ParameterType::INTEGER) ->setParameter('versionNo', $versionNo, ParameterType::INTEGER); - $insertQuery->execute(); + + $insertQuery->executeStatement(); } } @@ -347,8 +353,8 @@ protected function deleteOrphanedKeywords() ) ->where($query->expr()->isNull('attr.id')); - $statement = $query->execute(); - $ids = $statement->fetchAll(\PDO::FETCH_COLUMN); + $statement = $query->executeQuery(); + $ids = $statement->fetchFirstColumn(); if (empty($ids)) { return; @@ -360,8 +366,8 @@ protected function deleteOrphanedKeywords() ->where( $deleteQuery->expr()->in($this->connection->quoteIdentifier('id'), ':ids') ) - ->setParameter(':ids', $ids, Connection::PARAM_INT_ARRAY); + ->setParameter(':ids', $ids, ArrayParameterType::INTEGER); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } } diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index ffcf537162..62baf318b4 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -7,7 +7,9 @@ namespace Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway; @@ -15,7 +17,12 @@ class DoctrineStorage extends Gateway { - public const MAP_LOCATION_TABLE = 'ezgmaplocation'; + public const string MAP_LOCATION_TABLE = 'ezgmaplocation'; + private const string LATITUDE_PARAM_NAME = ':latitude'; + private const string LONGITUDE_PARAM_NAME = ':longitude'; + private const string ADDRESS_PARAM_NAME = ':address'; + private const string FIELD_ID_PARAM_NAME = ':fieldId'; + private const string VERSION_NO_PARAM_NAME = ':versionNo'; protected Connection $connection; @@ -25,15 +32,7 @@ public function __construct(Connection $connection) } /** - * Store the data stored in the given $field. - * - * Potentially rewrites data in $field and returns true, if the $field - * needs to be updated in the database. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return bool If restoring of the internal field data is required + * @throws \Doctrine\DBAL\Exception */ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { @@ -63,76 +62,62 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool } /** - * Perform an update on the field data. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field + * @throws \Doctrine\DBAL\Exception */ - protected function updateFieldData(VersionInfo $versionInfo, Field $field) + protected function updateFieldData(VersionInfo $versionInfo, Field $field): void { $updateQuery = $this->connection->createQueryBuilder(); $updateQuery->update($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE)) - ->set($this->connection->quoteIdentifier('latitude'), ':latitude') - ->set($this->connection->quoteIdentifier('longitude'), ':longitude') - ->set($this->connection->quoteIdentifier('address'), ':address') + ->set($this->connection->quoteIdentifier('latitude'), self::LATITUDE_PARAM_NAME) + ->set($this->connection->quoteIdentifier('longitude'), self::LONGITUDE_PARAM_NAME) + ->set($this->connection->quoteIdentifier('address'), self::ADDRESS_PARAM_NAME) ->where( - $updateQuery->expr()->andX( + $updateQuery->expr()->and( $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':latitude', $field->value->externalData['latitude']) - ->setParameter(':longitude', $field->value->externalData['longitude']) - ->setParameter(':address', $field->value->externalData['address']) - ->setParameter(':fieldId', $field->id, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionInfo->versionNo, PDO::PARAM_INT) + ->setParameter(self::LATITUDE_PARAM_NAME, $field->value->externalData['latitude']) + ->setParameter(self::LONGITUDE_PARAM_NAME, $field->value->externalData['longitude']) + ->setParameter(self::ADDRESS_PARAM_NAME, $field->value->externalData['address']) + ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; - $updateQuery->execute(); + $updateQuery->executeStatement(); } /** - * Store new field data. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field + * @throws \Doctrine\DBAL\Exception */ - protected function storeNewFieldData(VersionInfo $versionInfo, Field $field) + protected function storeNewFieldData(VersionInfo $versionInfo, Field $field): void { $insertQuery = $this->connection->createQueryBuilder(); $insertQuery ->insert($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE)) ->values([ - 'latitude' => ':latitude', - 'longitude' => ':longitude', - 'address' => ':address', - 'contentobject_attribute_id' => ':fieldId', - 'contentobject_version' => ':versionNo', + 'latitude' => self::LATITUDE_PARAM_NAME, + 'longitude' => self::LONGITUDE_PARAM_NAME, + 'address' => self::ADDRESS_PARAM_NAME, + 'contentobject_attribute_id' => self::FIELD_ID_PARAM_NAME, + 'contentobject_version' => self::VERSION_NO_PARAM_NAME, ]) - ->setParameter(':latitude', $field->value->externalData['latitude']) - ->setParameter(':longitude', $field->value->externalData['longitude']) - ->setParameter(':address', $field->value->externalData['address']) - ->setParameter(':fieldId', $field->id) - ->setParameter(':versionNo', $versionInfo->versionNo) + ->setParameter(self::LATITUDE_PARAM_NAME, $field->value->externalData['latitude']) + ->setParameter(self::LONGITUDE_PARAM_NAME, $field->value->externalData['longitude']) + ->setParameter(self::ADDRESS_PARAM_NAME, $field->value->externalData['address']) + ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo) ; - $insertQuery->execute(); + $insertQuery->executeStatement(); } - /** - * Set the loaded field data into $field->externalData. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return array - */ public function getFieldData(VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $this->loadFieldData($field->id, $versionInfo->versionNo); @@ -143,12 +128,11 @@ public function getFieldData(VersionInfo $versionInfo, Field $field): void * * If no data is found, null is returned. * - * @param int $fieldId - * @param int $versionNo + * @return array{latitude: float, longitude: float}|null * - * @return array|null + * @throws \Doctrine\DBAL\Exception */ - protected function loadFieldData($fieldId, $versionNo) + protected function loadFieldData(int $fieldId, int $versionNo): ?array { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery @@ -159,24 +143,24 @@ protected function loadFieldData($fieldId, $versionNo) ) ->from($this->connection->quoteIdentifier('ezgmaplocation')) ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - ':fieldId' + self::FIELD_ID_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) - ->setParameter(':versionNo', $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) ; - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); - $rows = $statement->fetchAll(PDO::FETCH_ASSOC); + $rows = $statement->fetchAllAssociative(); if (!isset($rows[0])) { return null; } @@ -202,10 +186,7 @@ protected function hasFieldData($fieldId, $versionNo): bool } /** - * Delete the data for all given $fieldIds. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param int[] $fieldIds + * @throws \Doctrine\DBAL\Exception */ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void { @@ -218,21 +199,21 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void $deleteQuery ->delete($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE)) ->where( - $deleteQuery->expr()->andX( + $deleteQuery->expr()->and( $deleteQuery->expr()->in( $this->connection->quoteIdentifier('contentobject_attribute_id'), ':fieldIds' ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - ':versionNo' + self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) - ->setParameter(':versionNo', $versionInfo->versionNo, PDO::PARAM_INT) + ->setParameter(':fieldIds', $fieldIds, ArrayParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } } diff --git a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php index dd084e4a2d..0a13b1fc1b 100644 --- a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php @@ -19,6 +19,15 @@ */ class DoctrineStorage extends BaseDoctrineStorage { + private const string CONTROLS_PARAM_NAME = ':controls'; + private const string HAS_CONTROLLER_PARAM_NAME = ':hasController'; + private const string HEIGHT_PARAM_NAME = ':height'; + private const string IS_AUTOPLAY_PARAM_NAME = ':isAutoplay'; + private const string IS_LOOP_PARAM_NAME = ':isLoop'; + private const string PLUGINS_PAGE_PAGE = ':pluginsPage'; + private const string QUALITY_PARAM_NAME = ':quality'; + private const string WIDTH_PARAM_NAME = ':width'; + /** * {@inheritdoc} */ @@ -70,15 +79,7 @@ protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versio { parent::setFetchColumns($queryBuilder, $fieldId, $versionNo); - $queryBuilder->addSelect( - [ - $this->connection->quoteIdentifier('has_controller'), - $this->connection->quoteIdentifier('is_autoplay'), - $this->connection->quoteIdentifier('is_loop'), - $this->connection->quoteIdentifier('width'), - $this->connection->quoteIdentifier('height'), - ] - ); + $queryBuilder->addSelect($this->connection->quoteIdentifier('has_controller'), $this->connection->quoteIdentifier('is_autoplay'), $this->connection->quoteIdentifier('is_loop'), $this->connection->quoteIdentifier('width'), $this->connection->quoteIdentifier('height')); } /** @@ -89,26 +90,26 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver parent::setInsertColumns($queryBuilder, $versionInfo, $field); $queryBuilder - ->setValue('controls', ':controls') - ->setValue('has_controller', ':hasController') - ->setValue('height', ':height') - ->setValue('is_autoplay', ':isAutoplay') - ->setValue('is_loop', ':isLoop') - ->setValue('pluginspage', ':pluginsPage') - ->setValue('quality', ':quality') - ->setValue('width', ':width') - ->setParameter(':controls', '') + ->setValue('controls', self::CONTROLS_PARAM_NAME) + ->setValue('has_controller', self::HAS_CONTROLLER_PARAM_NAME) + ->setValue('height', self::HEIGHT_PARAM_NAME) + ->setValue('is_autoplay', self::IS_AUTOPLAY_PARAM_NAME) + ->setValue('is_loop', self::IS_LOOP_PARAM_NAME) + ->setValue('pluginspage', self::PLUGINS_PAGE_PAGE) + ->setValue('quality', self::QUALITY_PARAM_NAME) + ->setValue('width', self::WIDTH_PARAM_NAME) + ->setParameter(self::CONTROLS_PARAM_NAME, '') ->setParameter( - ':hasController', + self::HAS_CONTROLLER_PARAM_NAME, $field->value->externalData['hasController'], PDO::PARAM_INT ) - ->setParameter(':height', $field->value->externalData['height'], PDO::PARAM_INT) - ->setParameter(':isAutoplay', $field->value->externalData['autoplay'], PDO::PARAM_INT) - ->setParameter(':isLoop', $field->value->externalData['loop'], PDO::PARAM_INT) - ->setParameter(':pluginsPage', '') - ->setParameter(':quality', 'high') - ->setParameter(':width', $field->value->externalData['width'], PDO::PARAM_INT) + ->setParameter(self::HEIGHT_PARAM_NAME, $field->value->externalData['height'], PDO::PARAM_INT) + ->setParameter(self::IS_AUTOPLAY_PARAM_NAME, $field->value->externalData['autoplay'], PDO::PARAM_INT) + ->setParameter(self::IS_LOOP_PARAM_NAME, $field->value->externalData['loop'], PDO::PARAM_INT) + ->setParameter(self::PLUGINS_PAGE_PAGE, '') + ->setParameter(self::QUALITY_PARAM_NAME, 'high') + ->setParameter(self::WIDTH_PARAM_NAME, $field->value->externalData['width'], PDO::PARAM_INT) ; } @@ -120,26 +121,26 @@ protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $ver parent::setUpdateColumns($queryBuilder, $versionInfo, $field); $queryBuilder - ->set('controls', ':controls') - ->set('has_controller', ':hasController') - ->set('height', ':height') - ->set('is_autoplay', ':isAutoplay') - ->set('is_loop', ':isLoop') - ->set('pluginspage', ':pluginsPage') - ->set('quality', ':quality') - ->set('width', ':width') - ->setParameter(':controls', '') + ->set('controls', self::CONTROLS_PARAM_NAME) + ->set('has_controller', self::HAS_CONTROLLER_PARAM_NAME) + ->set('height', self::HEIGHT_PARAM_NAME) + ->set('is_autoplay', self::IS_AUTOPLAY_PARAM_NAME) + ->set('is_loop', self::IS_LOOP_PARAM_NAME) + ->set('pluginspage', self::PLUGINS_PAGE_PAGE) + ->set('quality', self::QUALITY_PARAM_NAME) + ->set('width', self::WIDTH_PARAM_NAME) + ->setParameter(self::CONTROLS_PARAM_NAME, '') ->setParameter( - ':hasController', + self::HAS_CONTROLLER_PARAM_NAME, $field->value->externalData['hasController'], ParameterType::INTEGER ) - ->setParameter(':height', $field->value->externalData['height'], ParameterType::INTEGER) - ->setParameter(':isAutoplay', $field->value->externalData['autoplay'], ParameterType::INTEGER) - ->setParameter(':isLoop', $field->value->externalData['loop'], ParameterType::INTEGER) - ->setParameter(':pluginsPage', '') - ->setParameter(':quality', 'high') - ->setParameter(':width', $field->value->externalData['width'], ParameterType::INTEGER) + ->setParameter(self::HEIGHT_PARAM_NAME, $field->value->externalData['height'], ParameterType::INTEGER) + ->setParameter(self::IS_AUTOPLAY_PARAM_NAME, $field->value->externalData['autoplay'], ParameterType::INTEGER) + ->setParameter(self::IS_LOOP_PARAM_NAME, $field->value->externalData['loop'], ParameterType::INTEGER) + ->setParameter(self::PLUGINS_PAGE_PAGE, '') + ->setParameter(self::QUALITY_PARAM_NAME, 'high') + ->setParameter(self::WIDTH_PARAM_NAME, $field->value->externalData['width'], ParameterType::INTEGER) ; } } diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 78da762803..019d9db148 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -17,6 +17,9 @@ class DoctrineStorage extends Gateway { public const URL_TABLE = DoctrineDatabase::URL_TABLE; public const URL_LINK_TABLE = DoctrineDatabase::URL_LINK_TABLE; + private const string CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME = ':contentobject_attribute_id'; + private const string CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME = ':contentobject_attribute_version'; + private const string URL_ID_PARAM_NAME = ':url_id'; protected Connection $connection; @@ -49,8 +52,8 @@ public function getIdUrlMap(array $ids): array ->where('id IN (:ids)') ->setParameter(':ids', $ids, Connection::PARAM_INT_ARRAY); - $statement = $query->execute(); - foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) { + $result = $query->executeQuery(); + foreach ($result->fetchAllAssociative() as $row) { $map[$row['id']] = $row['url']; } } @@ -84,8 +87,8 @@ public function getUrlIdMap(array $urls): array ) ->setParameter(':urls', $urls, Connection::PARAM_STR_ARRAY); - $statement = $query->execute(); - foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) { + $result = $query->executeQuery(); + foreach ($result->fetchAllAssociative() as $row) { $map[$row['url']] = $row['id']; } } @@ -122,7 +125,7 @@ public function insertUrl($url): int ->setParameter(':url', $url) ; - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId( $this->getSequenceName(self::URL_TABLE, 'id') @@ -130,11 +133,7 @@ public function insertUrl($url): int } /** - * Create link to URL with $urlId for field with $fieldId in $versionNo. - * - * @param int $urlId - * @param int $fieldId - * @param int $versionNo + * @throws \Doctrine\DBAL\Exception */ public function linkUrl($urlId, $fieldId, $versionNo): void { @@ -144,25 +143,21 @@ public function linkUrl($urlId, $fieldId, $versionNo): void ->insert($this->connection->quoteIdentifier(self::URL_LINK_TABLE)) ->values( [ - 'contentobject_attribute_id' => ':contentobject_attribute_id', - 'contentobject_attribute_version' => ':contentobject_attribute_version', - 'url_id' => ':url_id', + 'contentobject_attribute_id' => self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, + 'contentobject_attribute_version' => self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, + 'url_id' => self::URL_ID_PARAM_NAME, ] ) - ->setParameter(':contentobject_attribute_id', $fieldId, PDO::PARAM_INT) - ->setParameter(':contentobject_attribute_version', $versionNo, PDO::PARAM_INT) - ->setParameter(':url_id', $urlId, PDO::PARAM_INT) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, $versionNo, PDO::PARAM_INT) + ->setParameter(self::URL_ID_PARAM_NAME, $urlId, PDO::PARAM_INT) ; - $query->execute(); + $query->executeStatement(); } /** - * Remove link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs. - * - * @param int $fieldId - * @param int $versionNo - * @param int[] $excludeUrlIds + * @throws \Doctrine\DBAL\Exception */ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void { @@ -171,21 +166,21 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void ->select('link.url_id') ->from($this->connection->quoteIdentifier(self::URL_LINK_TABLE), 'link') ->where( - $selectQuery->expr()->andX( + $selectQuery->expr()->and( $selectQuery->expr()->in( 'link.contentobject_attribute_id', - ':contentobject_attribute_id' + self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME ), $selectQuery->expr()->in( 'link.contentobject_attribute_version', - ':contentobject_attribute_version' + self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME ) ) ) - ->setParameter(':contentobject_attribute_id', $fieldId, ParameterType::INTEGER) - ->setParameter(':contentobject_attribute_version', $versionNo, ParameterType::INTEGER); + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, $versionNo, ParameterType::INTEGER); - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); $potentiallyOrphanedUrls = $statement->fetchFirstColumn(); if (empty($potentiallyOrphanedUrls)) { @@ -199,16 +194,16 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void $deleteQuery->expr()->and( $deleteQuery->expr()->in( 'contentobject_attribute_id', - ':contentobject_attribute_id' + self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME ), $deleteQuery->expr()->in( 'contentobject_attribute_version', - ':contentobject_attribute_version' + self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME ) ) ) - ->setParameter(':contentobject_attribute_id', $fieldId, ParameterType::INTEGER) - ->setParameter(':contentobject_attribute_version', $versionNo, ParameterType::INTEGER); + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, $versionNo, ParameterType::INTEGER); if (empty($excludeUrlIds) === false) { $deleteQuery @@ -221,7 +216,7 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void ->setParameter('url_ids', $excludeUrlIds, Connection::PARAM_INT_ARRAY); } - $deleteQuery->execute(); + $deleteQuery->executeStatement(); $this->deleteOrphanedUrls($potentiallyOrphanedUrls); } @@ -234,6 +229,8 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void * URL is orphaned if it is not linked to a content attribute through ezurl_object_link table. * * @param int[] $potentiallyOrphanedUrls + * + * @throws \Doctrine\DBAL\Exception */ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void { @@ -257,9 +254,7 @@ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void ->setParameter('url_ids', $potentiallyOrphanedUrls, Connection::PARAM_INT_ARRAY) ; - $statement = $query->execute(); - - $ids = $statement->fetchAll(PDO::FETCH_COLUMN); + $ids = $query->executeQuery()->fetchFirstColumn(); if (empty($ids)) { return; } @@ -271,6 +266,6 @@ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void ->setParameter(':ids', $ids, Connection::PARAM_STR_ARRAY) ; - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } } diff --git a/src/lib/FieldType/User/UserStorage.php b/src/lib/FieldType/User/UserStorage.php index 6c436738dd..bfdd04b921 100644 --- a/src/lib/FieldType/User/UserStorage.php +++ b/src/lib/FieldType/User/UserStorage.php @@ -25,16 +25,11 @@ * - is_locked * - last_visit * - login_count + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\User\UserStorage\Gateway> */ class UserStorage extends GatewayBasedStorage { - /** - * Field Type External Storage Gateway. - * - * @var \Ibexa\Core\FieldType\User\UserStorage\Gateway - */ - protected $gateway; - public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { return $this->gateway->storeFieldData($versionInfo, $field); @@ -50,7 +45,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field): void * * @return bool * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool { diff --git a/src/lib/FieldType/User/UserStorage/Gateway.php b/src/lib/FieldType/User/UserStorage/Gateway.php index c62c119769..bafe8269e8 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway.php +++ b/src/lib/FieldType/User/UserStorage/Gateway.php @@ -47,7 +47,7 @@ abstract public function storeFieldData(VersionInfo $versionInfo, Field $field): * * @return bool * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ abstract public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool; diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index 544287082c..583ce9b9e6 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -21,8 +21,16 @@ */ class DoctrineStorage extends Gateway { - public const USER_TABLE = 'ezuser'; - public const USER_SETTING_TABLE = 'ezuser_setting'; + public const string USER_TABLE = 'ezuser'; + public const string USER_SETTING_TABLE = 'ezuser_setting'; + private const string USER_ID_PARAM_NAME = ':userId'; + private const string LOGIN_PARAM_NAME = ':login'; + private const string EMAIL_PARAM_NAME = ':email'; + private const string PASSWORD_HASH_PARAM_NAME = ':passwordHash'; + private const string PASSWORD_HASH_TYPE_PARAM_NAME = ':passwordHashType'; + private const string PASSWORD_UPDATED_AT_PARAM_NAME = ':passwordUpdatedAt'; + private const string IS_ENABLED_PARAM_NAME = ':isEnabled'; + private const string MAX_LOGIN_PARAM_NAME = ':maxLogin'; protected Connection $connection; @@ -31,7 +39,7 @@ class DoctrineStorage extends Gateway * * @var array */ - protected $defaultValues = [ + protected array $defaultValues = [ 'hasStoredLogin' => false, 'contentId' => null, 'login' => null, @@ -61,7 +69,7 @@ public function getFieldData($fieldId, $userId = null) return $this->defaultValues; } - $result = array_merge( + return array_merge( $this->defaultValues, [ 'hasStoredLogin' => true, @@ -69,8 +77,6 @@ public function getFieldData($fieldId, $userId = null) $userData, $this->fetchUserSettings($userId) ); - - return $result; } /** @@ -153,6 +159,8 @@ protected function convertColumnsToProperties(array $databaseValues): array * @param int $fieldId * * @return int + * + * @throws \Doctrine\DBAL\Exception */ protected function fetchUserId($fieldId): int { @@ -171,9 +179,9 @@ protected function fetchUserId($fieldId): int ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) ; - $statement = $query->execute(); + $statement = $query->executeQuery(); - return (int) $statement->fetchColumn(); + return (int) $statement->fetchFirstColumn(); } /** @@ -182,6 +190,8 @@ protected function fetchUserId($fieldId): int * @param int $userId * * @return array + * + * @throws \Doctrine\DBAL\Exception */ protected function fetchUserData($userId) { @@ -199,15 +209,13 @@ protected function fetchUserData($userId) ->where( $query->expr()->eq( $this->connection->quoteIdentifier('usr.contentobject_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $userId, PDO::PARAM_INT) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) ; - $statement = $query->execute(); - - $rows = $statement->fetchAll(PDO::FETCH_ASSOC); + $rows = $query->executeQuery()->fetchAllAssociative(); return isset($rows[0]) ? $this->convertColumnsToProperties($rows[0]) : []; } @@ -231,15 +239,13 @@ protected function fetchUserSettings($userId) ->where( $query->expr()->eq( $this->connection->quoteIdentifier('s.user_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $userId, PDO::PARAM_INT) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) ; - $statement = $query->execute(); - - $rows = $statement->fetchAll(PDO::FETCH_ASSOC); + $rows = $query->executeQuery()->fetchAllAssociative(); return isset($rows[0]) ? $this->convertColumnsToProperties($rows[0]) : []; } @@ -272,86 +278,92 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool return true; } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function insertFieldData(VersionInfo $versionInfo, Field $field): void { $insertQuery = $this->connection->createQueryBuilder(); $insertQuery ->insert($this->connection->quoteIdentifier(self::USER_TABLE)) - ->setValue('contentobject_id', ':userId') - ->setValue('login', ':login') - ->setValue('email', ':email') - ->setValue('password_hash', ':passwordHash') - ->setValue('password_hash_type', ':passwordHashType') - ->setValue('password_updated_at', ':passwordUpdatedAt') - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER) - ->setParameter(':login', $field->value->externalData['login'], ParameterType::STRING) - ->setParameter(':email', $field->value->externalData['email'], ParameterType::STRING) - ->setParameter(':passwordHash', $field->value->externalData['passwordHash'], ParameterType::STRING) - ->setParameter(':passwordHashType', $field->value->externalData['passwordHashType'], ParameterType::INTEGER) - ->setParameter(':passwordUpdatedAt', $field->value->externalData['passwordUpdatedAt']) + ->setValue('contentobject_id', self::USER_ID_PARAM_NAME) + ->setValue('login', self::LOGIN_PARAM_NAME) + ->setValue('email', self::EMAIL_PARAM_NAME) + ->setValue('password_hash', self::PASSWORD_HASH_PARAM_NAME) + ->setValue('password_hash_type', self::PASSWORD_HASH_TYPE_PARAM_NAME) + ->setValue('password_updated_at', self::PASSWORD_UPDATED_AT_PARAM_NAME) + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) + ->setParameter(self::LOGIN_PARAM_NAME, $field->value->externalData['login']) + ->setParameter(self::EMAIL_PARAM_NAME, $field->value->externalData['email']) + ->setParameter(self::PASSWORD_HASH_PARAM_NAME, $field->value->externalData['passwordHash']) + ->setParameter(self::PASSWORD_HASH_TYPE_PARAM_NAME, $field->value->externalData['passwordHashType'], ParameterType::INTEGER) + ->setParameter(self::PASSWORD_UPDATED_AT_PARAM_NAME, $field->value->externalData['passwordUpdatedAt']) ; - $insertQuery->execute(); + $insertQuery->executeStatement(); $settingsQuery = $this->connection->createQueryBuilder(); $settingsQuery ->insert($this->connection->quoteIdentifier(self::USER_SETTING_TABLE)) - ->setValue('user_id', ':userId') - ->setValue('is_enabled', ':isEnabled') - ->setValue('max_login', ':maxLogin') - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER) - ->setParameter(':isEnabled', $field->value->externalData['enabled'], ParameterType::INTEGER) - ->setParameter(':maxLogin', $field->value->externalData['maxLogin'], ParameterType::INTEGER); - - $settingsQuery->execute(); + ->setValue('user_id', self::USER_ID_PARAM_NAME) + ->setValue('is_enabled', self::IS_ENABLED_PARAM_NAME) + ->setValue('max_login', self::MAX_LOGIN_PARAM_NAME) + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) + ->setParameter(self::IS_ENABLED_PARAM_NAME, $field->value->externalData['enabled'], ParameterType::INTEGER) + ->setParameter(self::MAX_LOGIN_PARAM_NAME, $field->value->externalData['maxLogin'], ParameterType::INTEGER); + + $settingsQuery->executeQuery(); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function updateFieldData(VersionInfo $versionInfo, Field $field): void { $queryBuilder = $this->connection->createQueryBuilder(); $queryBuilder ->update($this->connection->quoteIdentifier(self::USER_TABLE)) - ->set('login', ':login') - ->set('email', ':email') - ->set('password_hash', ':passwordHash') - ->set('password_hash_type', ':passwordHashType') - ->set('password_updated_at', ':passwordUpdatedAt') - ->setParameter(':login', $field->value->externalData['login'], ParameterType::STRING) - ->setParameter(':email', $field->value->externalData['email'], ParameterType::STRING) - ->setParameter(':passwordHash', $field->value->externalData['passwordHash'], ParameterType::STRING) - ->setParameter(':passwordHashType', $field->value->externalData['passwordHashType'], ParameterType::INTEGER) - ->setParameter(':passwordUpdatedAt', $field->value->externalData['passwordUpdatedAt']) + ->set('login', self::LOGIN_PARAM_NAME) + ->set('email', self::EMAIL_PARAM_NAME) + ->set('password_hash', self::PASSWORD_HASH_PARAM_NAME) + ->set('password_hash_type', self::PASSWORD_HASH_TYPE_PARAM_NAME) + ->set('password_updated_at', self::PASSWORD_UPDATED_AT_PARAM_NAME) + ->setParameter(self::LOGIN_PARAM_NAME, $field->value->externalData['login'], ParameterType::STRING) + ->setParameter(self::EMAIL_PARAM_NAME, $field->value->externalData['email'], ParameterType::STRING) + ->setParameter(self::PASSWORD_HASH_PARAM_NAME, $field->value->externalData['passwordHash'], ParameterType::STRING) + ->setParameter(self::PASSWORD_HASH_TYPE_PARAM_NAME, $field->value->externalData['passwordHashType'], ParameterType::INTEGER) + ->setParameter(self::PASSWORD_UPDATED_AT_PARAM_NAME, $field->value->externalData['passwordUpdatedAt']) ->where( $queryBuilder->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER) + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) ; - $queryBuilder->execute(); + $queryBuilder->executeStatement(); $settingsQuery = $this->connection->createQueryBuilder(); $settingsQuery ->update($this->connection->quoteIdentifier(self::USER_SETTING_TABLE)) - ->set('is_enabled', ':isEnabled') - ->set('max_login', ':maxLogin') - ->setParameter(':isEnabled', $field->value->externalData['enabled'], ParameterType::INTEGER) - ->setParameter(':maxLogin', $field->value->externalData['maxLogin'], ParameterType::INTEGER) + ->set('is_enabled', self::IS_ENABLED_PARAM_NAME) + ->set('max_login', self::MAX_LOGIN_PARAM_NAME) + ->setParameter(self::IS_ENABLED_PARAM_NAME, $field->value->externalData['enabled'], ParameterType::INTEGER) + ->setParameter(self::MAX_LOGIN_PARAM_NAME, $field->value->externalData['maxLogin'], ParameterType::INTEGER) ->where( $queryBuilder->expr()->eq( $this->connection->quoteIdentifier('user_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER); + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); - $settingsQuery->execute(); + $settingsQuery->executeStatement(); } public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool @@ -368,12 +380,12 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool ->where( $query->expr()->eq( $this->connection->quoteIdentifier('user_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER); + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); $query = $this->connection->createQueryBuilder(); $query @@ -381,12 +393,12 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool ->where( $query->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - ':userId' + self::USER_ID_PARAM_NAME ) ) - ->setParameter(':userId', $versionInfo->contentInfo->id, ParameterType::INTEGER); + ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); return true; } @@ -396,7 +408,7 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool * * @return bool * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function isLastRelationToFieldType(array $fieldIds): bool { diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index ce8df91fe8..d48dd8143b 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -25,6 +25,9 @@ */ class LegacyDFSCluster implements IOMetadataHandler { + private const string NAME_HASH_PARAM_NAME = ':name_hash'; + private const string DFS_IS_EXPIRED_COMPARISON = 'e.expired != true'; + private Connection $db; private ?UrlDecorator $urlDecorator; @@ -114,7 +117,7 @@ public function delete($spiBinaryFileId): void * @return \Ibexa\Contracts\Core\IO\BinaryFile * * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException if no row is found for $spiBinaryFileId - * @throws \Doctrine\DBAL\DBALException Any unhandled DBAL exception + * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception */ public function load($spiBinaryFileId) { @@ -134,8 +137,8 @@ public function load($spiBinaryFileId) 'e.status', ) ->from('ezdfsfile', 'e') - ->andWhere('e.name_hash = :name_hash') - ->andWhere('e.expired != true') + ->andWhere('e.name_hash = ' . self::NAME_HASH_PARAM_NAME) + ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') ->setParameter('name_hash', md5($path)) ->execute() @@ -156,7 +159,7 @@ public function load($spiBinaryFileId) * @param string $spiBinaryFileId * * @throws \Ibexa\Core\Base\Exceptions\NotFoundException - * @throws \Doctrine\DBAL\DBALException Any unhandled DBAL exception + * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception * * @return bool */ @@ -179,7 +182,7 @@ public function exists($spiBinaryFileId): bool ) ->from('ezdfsfile', 'e') ->andWhere('e.name_hash = :name_hash') - ->andWhere('e.expired != true') + ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') ->setParameter('name_hash', md5($path)) ->execute() @@ -256,7 +259,7 @@ public function getMimeType($spiBinaryFileId) ->select('e.datatype') ->from('ezdfsfile', 'e') ->andWhere('e.name_hash = :name_hash') - ->andWhere('e.expired != true') + ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') ->setParameter('name_hash', md5($this->addPrefix($spiBinaryFileId))) ->execute() @@ -275,6 +278,8 @@ public function getMimeType($spiBinaryFileId) * Delete directory and all the content under specified directory. * * @param string $spiPath SPI Path, not prefixed by URL decoration + * + * @throws \Doctrine\DBAL\Exception */ public function deleteDirectory($spiPath): void { @@ -287,11 +292,11 @@ public function deleteDirectory($spiPath): void ':spiPath', addcslashes($this->addPrefix(rtrim($spiPath, '/')), '%_') . '/%' ); - $query->execute(); + $query->executeStatement(); } /** - * Maps an array of data base properties (id, size, mtime, datatype, md5_path, path...) to an SPIBinaryFile object. + * Maps an array of database properties (id, size, mtime, datatype, md5_path, path...) to an SPIBinaryFile object. * * @param array $properties database properties array * diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php index ef9c392252..fc1fdfc81e 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php @@ -23,6 +23,8 @@ class DoctrineDatabase extends Gateway public const COLUMN_USER_ID = 'user_id'; public const COLUMN_LOCATION_ID = 'node_id'; public const COLUMN_NAME = 'name'; + private const string USER_ID_PARAM_NAME = ':user_id'; + private const string LOCATION_ID_PARAM_NAME = ':location_id'; protected Connection $connection; @@ -32,7 +34,7 @@ public function __construct(Connection $connection) } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function insertBookmark(Bookmark $bookmark): int { @@ -40,19 +42,19 @@ public function insertBookmark(Bookmark $bookmark): int $query ->insert(self::TABLE_BOOKMARKS) ->values([ - self::COLUMN_USER_ID => ':user_id', - self::COLUMN_LOCATION_ID => ':location_id', + self::COLUMN_USER_ID => self::USER_ID_PARAM_NAME, + self::COLUMN_LOCATION_ID => self::LOCATION_ID_PARAM_NAME, ]) - ->setParameter(':user_id', $bookmark->userId, PDO::PARAM_INT) - ->setParameter(':location_id', $bookmark->locationId, PDO::PARAM_INT); + ->setParameter(self::USER_ID_PARAM_NAME, $bookmark->userId, PDO::PARAM_INT) + ->setParameter(self::LOCATION_ID_PARAM_NAME, $bookmark->locationId, PDO::PARAM_INT); - $query->execute(); + $query->executeStatement(); return (int) $this->connection->lastInsertId(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function deleteBookmark(int $id): void { @@ -62,11 +64,11 @@ public function deleteBookmark(int $id): void ->where($query->expr()->eq(self::COLUMN_ID, ':id')) ->setParameter(':id', $id, PDO::PARAM_INT); - $query->execute(); + $query->executeStatement(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadBookmarkDataById(int $id): array { @@ -77,11 +79,11 @@ public function loadBookmarkDataById(int $id): array ->where($query->expr()->eq(self::COLUMN_ID, ':id')) ->setParameter(':id', $id, PDO::PARAM_INT); - return $query->execute()->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locationIds): array { @@ -89,16 +91,19 @@ public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locati $query ->select(...$this->getColumns()) ->from(self::TABLE_BOOKMARKS) - ->where($query->expr()->andX( - $query->expr()->eq(self::COLUMN_USER_ID, ':user_id'), - $query->expr()->in(self::COLUMN_LOCATION_ID, ':location_id') + ->where($query->expr()->and( + $query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME), + $query->expr()->in(self::COLUMN_LOCATION_ID, self::LOCATION_ID_PARAM_NAME) )) - ->setParameter(':user_id', $userId, PDO::PARAM_INT) - ->setParameter(':location_id', $locationIds, Connection::PARAM_INT_ARRAY); + ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) + ->setParameter(self::LOCATION_ID_PARAM_NAME, $locationIds, Connection::PARAM_INT_ARRAY); - return $query->execute()->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUserIdsByLocation(Location $location): array { $queryBuilder = $this->connection->createQueryBuilder(); @@ -117,11 +122,11 @@ public function loadUserIdsByLocation(Location $location): array ) ); - return $queryBuilder->execute()->fetchFirstColumn(); + return $queryBuilder->executeQuery()->fetchFirstColumn(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1): array { @@ -129,7 +134,7 @@ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1) $query ->select(...$this->getColumns()) ->from(self::TABLE_BOOKMARKS) - ->where($query->expr()->eq(self::COLUMN_USER_ID, ':user_id')) + ->where($query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME)) ->setFirstResult($offset); if ($limit > 0) { @@ -137,13 +142,13 @@ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1) } $query->orderBy(self::COLUMN_ID, 'DESC'); - $query->setParameter(':user_id', $userId, PDO::PARAM_INT); + $query->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT); - return $query->execute()->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function countUserBookmarks(int $userId): int { @@ -151,10 +156,10 @@ public function countUserBookmarks(int $userId): int $query ->select('COUNT(' . self::COLUMN_ID . ')') ->from(self::TABLE_BOOKMARKS) - ->where($query->expr()->eq(self::COLUMN_USER_ID, ':user_id')) - ->setParameter(':user_id', $userId, PDO::PARAM_INT); + ->where($query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME)) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT); - return (int) $query->execute()->fetchColumn(); + return (int) $query->executeQuery()->fetchFirstColumn(); } /** @@ -166,7 +171,7 @@ public function locationSwapped(int $location1Id, int $location2Id): void $query ->update(self::TABLE_BOOKMARKS) ->set(self::COLUMN_LOCATION_ID, '(CASE WHEN node_id = :source_id THEN :target_id ELSE :source_id END)') - ->where($query->expr()->orX( + ->where($query->expr()->or( $query->expr()->eq(self::COLUMN_LOCATION_ID, ':source_id'), $query->expr()->eq(self::COLUMN_LOCATION_ID, ':target_id') )); diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php index 70bdaf18ae..f7e5d1f7e1 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Bookmark\Bookmark; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index c2a11c67de..c9fc6251ab 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use DOMDocument; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; @@ -297,7 +296,7 @@ protected function getRelationXmlHashFromDB(array $destinationContentIds): array 'c', LocationGateway::CONTENT_TREE_TABLE, 't', - $query->expr()->andX( + $query->expr()->and( 't.contentobject_id = c.id', 't.node_id = t.main_node_id' ) @@ -306,7 +305,7 @@ protected function getRelationXmlHashFromDB(array $destinationContentIds): array 'c', ContentTypeGateway::CONTENT_TYPE_TABLE, 'ct', - $query->expr()->andX( + $query->expr()->and( 'ct.id = c.contentclass_id', // in Legacy Storage ezcontentclass.version contains status (draft, defined) 'ct.version = :content_type_status' @@ -325,9 +324,9 @@ protected function getRelationXmlHashFromDB(array $destinationContentIds): array ) ->setParameter('content_ids', $destinationContentIds, Connection::PARAM_INT_ARRAY); - $stmt = $query->execute(); + $stmt = $query->executeQuery(); - return $this->groupResultSetById($stmt->fetchAll(FetchMode::ASSOCIATIVE)); + return $this->groupResultSetById($stmt->fetchAllAssociative()); } private static function dbAttributeMap(): array diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 8826c82319..52cdfc8244 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -8,9 +8,9 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\FetchMode; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\QueryBuilder as DoctrineQueryBuilder; use DOMDocument; use DOMXPath; @@ -50,7 +50,28 @@ final class DoctrineDatabase extends Gateway * Pre-computed integer constant which, when combined with proper bit-wise operator, * removes always available flag from the mask. */ - private const REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND = -2; + private const int REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND = -2; + private const string CONTENT_ID_PARAM_NAME = ':contentId'; + private const string LANGUAGE_MASK_PARAM_NAME = ':languageMask'; + private const string CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON = 'contentobject_id = :content_id'; + private const string VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON = 'version = :version_no'; + private const string VERSION_NO_PARAM_NAME = ':version_no'; + private const string LANGUAGE_MASK_OPERAND_PARAM_NAME = ':languageMaskOperand'; + private const string STATUS_PARAM_NAME = ':status'; + private const string FIELD_DEFINITION_ID_PARAM_NAME = ':field_definition_id'; + private const string DATA_TYPE_STRING_PARAM_NAME = ':data_type_string'; + private const string LANGUAGE_CODE_PARAM_NAME = ':language_code'; + private const string DATA_FLOAT_PARAM_NAME = ':data_float'; + private const string DATA_INT_PARAM_NAME = ':data_int'; + private const string DATA_TEXT_PARAM_NAME = ':data_text'; + private const string SORT_KEY_INT_PARAM_NAME = ':sort_key_int'; + private const string SORT_KEY_STRING_PARAM_NAME = ':sort_key_string'; + private const string LANGUAGE_ID_PARAM_NAME = ':language_id'; + private const string USER_ID_PARAM_NAME = ':user_id'; + private const string CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON = 'contentobject_id = :contentId'; + private const string RELATION_TYPE_PARAM_NAME = ':relation_type'; + private const string CONTENT_VERSION_VERSION_NO_PARAM_NAME = 'content_version = :version_no'; + private const string ID_RELATION_ID_PARAM_COMPARISON = 'id = :relation_id'; /** * The native Doctrine connection. @@ -64,26 +85,14 @@ final class DoctrineDatabase extends Gateway */ protected QueryBuilder $queryBuilder; - /** - * Caching language handler. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\CachingHandler - */ protected Handler $languageHandler; - /** - * Language mask generator. - */ protected MaskGenerator $languageMaskGenerator; private SharedGateway $sharedGateway; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $databasePlatform; + private AbstractPlatform $databasePlatform; - /** - * @throws \Doctrine\DBAL\DBALException - */ public function __construct( Connection $connection, SharedGateway $sharedGateway, @@ -92,13 +101,16 @@ public function __construct( LanguageMaskGenerator $languageMaskGenerator ) { $this->connection = $connection; - $this->databasePlatform = $connection->getDatabasePlatform(); $this->sharedGateway = $sharedGateway; $this->queryBuilder = $queryBuilder; $this->languageHandler = $languageHandler; $this->languageMaskGenerator = $languageMaskGenerator; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertContentObject(CreateStruct $struct, int $currentVersionNo = 1): int { $initialLanguageId = !empty($struct->mainLanguageId) ? $struct->mainLanguageId : $struct->initialLanguageId; @@ -150,11 +162,15 @@ public function insertContentObject(CreateStruct $struct, int $currentVersionNo ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::CONTENT_ITEM_SEQ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertVersion(VersionInfo $versionInfo, array $fields): int { $query = $this->connection->createQueryBuilder(); @@ -203,11 +219,15 @@ public function insertVersion(VersionInfo $versionInfo, array $fields): int ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::CONTENT_VERSION_SEQ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function updateContent( int $contentId, MetadataUpdateStruct $struct, @@ -247,6 +267,7 @@ public function updateContent( ], ]; + $updated = false; foreach ($fieldsForUpdateMap as $fieldName => $field) { if (null === $field['value']) { continue; @@ -255,6 +276,7 @@ public function updateContent( $fieldName, $query->createNamedParameter($field['value'], $field['type'], ":{$fieldName}") ); + $updated = true; } if ($prePublishVersionInfo !== null) { @@ -264,19 +286,20 @@ public function updateContent( ); $query->set( 'language_mask', - $query->createNamedParameter($mask, ParameterType::INTEGER, ':languageMask') + $query->createNamedParameter($mask, ParameterType::INTEGER, self::LANGUAGE_MASK_PARAM_NAME) ); + $updated = true; } $query->where( $query->expr()->eq( 'id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, ':contentId') + $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) ) ); - if (!empty($query->getQueryPart('set'))) { - $query->execute(); + if ($updated) { + $query->executeStatement(); } // Handle alwaysAvailable flag update separately as it's a more complex task and has impact on several tables @@ -289,6 +312,7 @@ public function updateContent( * Updates version $versionNo for content identified by $contentId, in respect to $struct. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function updateVersion(int $contentId, int $versionNo, UpdateStruct $struct): void { @@ -301,7 +325,7 @@ public function updateVersion(int $contentId, int $versionNo, UpdateStruct $stru ->set('initial_language_id', ':initial_language_id') ->set( 'language_mask', - $this->databasePlatform->getBitOrComparisonExpression( + $this->getDatabasePlatform()->getBitOrComparisonExpression( 'language_mask', ':language_mask' ) @@ -322,12 +346,12 @@ public function updateVersion(int $contentId, int $versionNo, UpdateStruct $stru ), ParameterType::INTEGER ) - ->where('contentobject_id = :content_id') - ->andWhere('version = :version_no') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } public function updateAlwaysAvailableFlag(int $contentId, ?bool $alwaysAvailable = null): void @@ -370,10 +394,10 @@ private function updateContentItemAlwaysAvailableFlag( ->where( $expr->eq( 'id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, ':contentId') + $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) ) ); - $query->execute(); + $query->executeStatement(); } private function updateContentNameAlwaysAvailableFlag( @@ -390,18 +414,21 @@ private function updateContentNameAlwaysAvailableFlag( ->where( $expr->eq( 'contentobject_id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, ':contentId') + $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) ) ) ->andWhere( $expr->eq( 'content_version', - $query->createNamedParameter($versionNo, ParameterType::INTEGER, ':versionNo') + $query->createNamedParameter($versionNo, ParameterType::INTEGER, self::VERSION_NO_PARAM_NAME) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function updateContentFieldsAlwaysAvailableFlag( int $contentId, int $versionNo, @@ -416,13 +443,13 @@ private function updateContentFieldsAlwaysAvailableFlag( ->where( $expr->eq( 'contentobject_id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, ':contentId') + $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) ) ) ->andWhere( $expr->eq( 'version', - $query->createNamedParameter($versionNo, ParameterType::INTEGER, ':versionNo') + $query->createNamedParameter($versionNo, ParameterType::INTEGER, self::VERSION_NO_PARAM_NAME) ) ); @@ -430,7 +457,7 @@ private function updateContentFieldsAlwaysAvailableFlag( if (!$this->languageMaskGenerator->isLanguageMaskComposite($languageMask)) { $this->setLanguageMaskForUpdateQuery($alwaysAvailable, $query, 'language_id'); - $query->execute(); + $query->executeStatement(); return; } @@ -440,24 +467,23 @@ private function updateContentFieldsAlwaysAvailableFlag( $query ->set( 'language_id', - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'language_id', - ':languageMaskOperand' + self::LANGUAGE_MASK_OPERAND_PARAM_NAME ) ) ->setParameter('languageMaskOperand', self::REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND) ; - $query->execute(); - $query->resetQueryPart('set'); + $query->executeStatement(); // 2. If Content is always available set the flag only on fields in main language if ($alwaysAvailable) { $query ->set( 'language_id', - $this->databasePlatform->getBitOrComparisonExpression( + $this->getDatabasePlatform()->getBitOrComparisonExpression( 'language_id', - ':languageMaskOperand' + self::LANGUAGE_MASK_OPERAND_PARAM_NAME ) ) ->setParameter( @@ -467,32 +493,40 @@ private function updateContentFieldsAlwaysAvailableFlag( $query->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'language_id', $query->createNamedParameter($initialLanguageId, ParameterType::INTEGER, ':initialLanguageId') ), $query->createNamedParameter(0, ParameterType::INTEGER, ':zero') ) ); - $query->execute(); + $query->executeStatement(); } } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Doctrine\DBAL\Exception + */ public function setStatus(int $contentId, int $version, int $status): bool { if ($status !== APIVersionInfo::STATUS_PUBLISHED) { $query = $this->queryBuilder->getSetVersionStatusQuery($contentId, $version, $status); - $rowCount = $query->execute(); + $rowCount = $query->executeStatement(); return $rowCount > 0; - } else { - // If the version's status is PUBLISHED, we use dedicated method for publishing - $this->setPublishedStatus($contentId, $version); - - return true; } + + // If the version's status is PUBLISHED, we use dedicated method for publishing + $this->setPublishedStatus($contentId, $version); + + return true; } + /** + * @throws \Ibexa\Core\Base\Exceptions\BadStateException + * @throws \Doctrine\DBAL\Exception + */ public function setPublishedStatus(int $contentId, int $versionNo): void { $query = $this->queryBuilder->getSetVersionStatusQuery( @@ -512,7 +546,7 @@ public function setPublishedStatus(int $contentId, int $versionNo): void SQL; $query->andWhere($notExistPublishedVersion); - if (0 === $query->execute()) { + if (0 === $query->executeStatement()) { throw new BadStateException( '$contentId', "Someone just published another version of Content item {$contentId}" @@ -526,13 +560,13 @@ private function markContentAsPublished(int $contentId, int $versionNo): void $query = $this->connection->createQueryBuilder(); $query ->update('ezcontentobject') - ->set('status', ':status') - ->set('current_version', ':versionNo') + ->set('status', self::STATUS_PARAM_NAME) + ->set('current_version', self::VERSION_NO_PARAM_NAME) ->where('id =:contentId') ->setParameter('status', ContentInfo::STATUS_PUBLISHED, ParameterType::INTEGER) ->setParameter('versionNo', $versionNo, ParameterType::INTEGER) ->setParameter('contentId', $contentId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** @@ -559,11 +593,15 @@ public function insertNewField(Content $content, Field $field, StorageFieldValue ->setParameter('field_id', $nextId, ParameterType::INTEGER); } - $query->execute(); + $query->executeStatement(); return (int)$this->sharedGateway->getLastInsertedId(self::CONTENT_FIELD_SEQ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertExistingField( Content $content, Field $field, @@ -577,7 +615,7 @@ public function insertExistingField( ->setValue('id', ':field_id') ->setParameter('field_id', $field->id, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** @@ -595,17 +633,17 @@ private function setInsertFieldValues( ->insert(self::CONTENT_FIELD_TABLE) ->values( [ - 'contentobject_id' => ':content_id', - 'contentclassattribute_id' => ':field_definition_id', - 'data_type_string' => ':data_type_string', - 'language_code' => ':language_code', - 'version' => ':version_no', - 'data_float' => ':data_float', - 'data_int' => ':data_int', - 'data_text' => ':data_text', - 'sort_key_int' => ':sort_key_int', - 'sort_key_string' => ':sort_key_string', - 'language_id' => ':language_id', + 'contentobject_id' => self::CONTENT_ID_PARAM_NAME, + 'contentclassattribute_id' => self::FIELD_DEFINITION_ID_PARAM_NAME, + 'data_type_string' => self::DATA_TYPE_STRING_PARAM_NAME, + 'language_code' => self::LANGUAGE_CODE_PARAM_NAME, + 'version' => self::VERSION_NO_PARAM_NAME, + 'data_float' => self::DATA_FLOAT_PARAM_NAME, + 'data_int' => self::DATA_INT_PARAM_NAME, + 'data_text' => self::DATA_TEXT_PARAM_NAME, + 'sort_key_int' => self::SORT_KEY_INT_PARAM_NAME, + 'sort_key_string' => self::SORT_KEY_STRING_PARAM_NAME, + 'language_id' => self::LANGUAGE_ID_PARAM_NAME, ] ) ->setParameter( @@ -614,12 +652,12 @@ private function setInsertFieldValues( ParameterType::INTEGER ) ->setParameter('field_definition_id', $field->fieldDefinitionId, ParameterType::INTEGER) - ->setParameter('data_type_string', $field->type, ParameterType::STRING) - ->setParameter('language_code', $field->languageCode, ParameterType::STRING) + ->setParameter('data_type_string', $field->type) + ->setParameter('language_code', $field->languageCode) ->setParameter('version_no', $field->versionNo, ParameterType::INTEGER) ->setParameter('data_float', $value->dataFloat) ->setParameter('data_int', $value->dataInt, ParameterType::INTEGER) - ->setParameter('data_text', $value->dataText, ParameterType::STRING) + ->setParameter('data_text', $value->dataText) ->setParameter('sort_key_int', $value->sortKeyInt, ParameterType::INTEGER) ->setParameter( 'sort_key_string', @@ -655,11 +693,11 @@ public function updateField(Field $field, StorageFieldValue $value): void $this->setFieldUpdateValues($query, $value); $query ->where('id = :field_id') - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('field_id', $field->id, ParameterType::INTEGER) ->setParameter('version_no', $field->versionNo, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** @@ -671,11 +709,11 @@ private function setFieldUpdateValues( ): void { $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_float', ':data_float') - ->set('data_int', ':data_int') - ->set('data_text', ':data_text') - ->set('sort_key_int', ':sort_key_int') - ->set('sort_key_string', ':sort_key_string') + ->set('data_float', self::DATA_FLOAT_PARAM_NAME) + ->set('data_int', self::DATA_INT_PARAM_NAME) + ->set('data_text', self::DATA_TEXT_PARAM_NAME) + ->set('sort_key_int', self::SORT_KEY_INT_PARAM_NAME) + ->set('sort_key_string', self::SORT_KEY_STRING_PARAM_NAME) ->setParameter('data_float', $value->dataFloat) ->setParameter('data_int', $value->dataInt, ParameterType::INTEGER) ->setParameter('data_text', $value->dataText, ParameterType::STRING) @@ -698,13 +736,13 @@ public function updateNonTranslatableField( $this->setFieldUpdateValues($query, $value); $query ->where('contentclassattribute_id = :field_definition_id') - ->andWhere('contentobject_id = :content_id') - ->andWhere('version = :version_no') + ->andWhere(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('field_definition_id', $field->fieldDefinitionId, ParameterType::INTEGER) ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('version_no', $field->versionNo, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } public function load(int $contentId, ?int $version = null, ?array $translations = null): array @@ -772,7 +810,7 @@ private function internalLoadContent( 'c', 'ezcontentobject_version', 'v', - $expr->andX( + $expr->and( $expr->eq('c.id', 'v.contentobject_id'), $expr->eq('v.version', $version ?? 'c.current_version') ) @@ -781,7 +819,7 @@ private function internalLoadContent( 'v', 'ezcontentobject_attribute', 'a', - $expr->andX( + $expr->and( $expr->eq('v.contentobject_id', 'a.contentobject_id'), $expr->eq('v.version', 'a.version') ) @@ -790,7 +828,7 @@ private function internalLoadContent( 'c', 'ezcontentobject_tree', 't', - $expr->andX( + $expr->and( $expr->eq('c.id', 't.contentobject_id'), $expr->eq('t.node_id', 't.main_node_id') ) @@ -812,7 +850,7 @@ private function internalLoadContent( ); } - return $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } public function loadContentInfo(int $contentId): array @@ -822,7 +860,7 @@ public function loadContentInfo(int $contentId): array ->where('c.id = :id') ->setParameter('id', $contentId, ParameterType::INTEGER); - $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + $results = $queryBuilder->executeQuery()->fetchAllAssociative(); if (empty($results)) { throw new NotFound('content', "id: $contentId"); } @@ -837,7 +875,7 @@ public function loadContentInfoList(array $contentIds): array ->where('c.id IN (:ids)') ->setParameter('ids', $contentIds, Connection::PARAM_INT_ARRAY); - return $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } public function loadContentInfoByRemoteId(string $remoteId): array @@ -847,7 +885,7 @@ public function loadContentInfoByRemoteId(string $remoteId): array ->where('c.remote_id = :id') ->setParameter('id', $remoteId, ParameterType::STRING); - $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + $results = $queryBuilder->executeQuery()->fetchAllAssociative(); if (empty($results)) { throw new NotFound('content', "remote_id: $remoteId"); } @@ -862,7 +900,7 @@ public function loadContentInfoByLocationId(int $locationId): array ->where('t.node_id = :id') ->setParameter('id', $locationId, ParameterType::INTEGER); - $results = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + $results = $queryBuilder->executeQuery()->fetchAllAssociative(); if (empty($results)) { throw new NotFound('content', "node_id: $locationId"); } @@ -870,6 +908,9 @@ public function loadContentInfoByLocationId(int $locationId): array return $results[0]; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array { $queryBuilder = $this->queryBuilder->createVersionInfoFindQueryBuilder(); @@ -882,7 +923,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array $queryBuilder->createNamedParameter( $contentId, ParameterType::INTEGER, - ':content_id' + self::CONTENT_ID_PARAM_NAME ) ) ); @@ -895,7 +936,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array $queryBuilder->createNamedParameter( $versionNo, ParameterType::INTEGER, - ':version_no' + self::VERSION_NO_PARAM_NAME ) ) ); @@ -903,10 +944,11 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array $queryBuilder->andWhere($expr->eq('v.version', 'c.current_version')); } - return $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } /** + * @throws \Doctrine\DBAL\Exception * @return array> */ public function loadVersionNoArchivedWithin(int $contentId, int $seconds): array @@ -956,27 +998,27 @@ public function countVersionsForUser(int $userId, int $status = VersionInfo::STA $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); $query - ->select($this->databasePlatform->getCountExpression('v.id')) + ->select('COUNT(v.id)') ->from('ezcontentobject_version', 'v') ->innerJoin( 'v', 'ezcontentobject', 'c', - $expr->andX( + $expr->and( $expr->eq('c.id', 'v.contentobject_id'), $expr->neq('c.status', ContentInfo::STATUS_TRASHED) ) ) ->where( - $query->expr()->andX( - $query->expr()->eq('v.status', ':status'), - $query->expr()->eq('v.creator_id', ':user_id') + $query->expr()->and( + $query->expr()->eq('v.status', self::STATUS_PARAM_NAME), + $query->expr()->eq('v.creator_id', self::USER_ID_PARAM_NAME) ) ) - ->setParameter(':status', $status, ParameterType::INTEGER) - ->setParameter(':user_id', $userId, ParameterType::INTEGER); + ->setParameter(self::STATUS_PARAM_NAME, $status, ParameterType::INTEGER) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); - return (int) $query->execute()->fetchColumn(); + return (int) $query->executeQuery()->fetchOne(); } /** @@ -994,7 +1036,7 @@ public function listVersionsForUser(int $userId, int $status = VersionInfo::STAT ->setParameter('user_id', $userId, ParameterType::INTEGER) ->orderBy('v.id'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function loadVersionsForUser( @@ -1006,15 +1048,15 @@ public function loadVersionsForUser( $query = $this->queryBuilder->createVersionInfoFindQueryBuilder(); $expr = $query->expr(); $query->where( - $expr->andX( - $expr->eq('v.status', ':status'), - $expr->eq('v.creator_id', ':user_id'), + $expr->and( + $expr->eq('v.status', self::STATUS_PARAM_NAME), + $expr->eq('v.creator_id', self::USER_ID_PARAM_NAME), $expr->neq('c.status', ContentInfo::STATUS_TRASHED) ) ) ->setFirstResult($offset) - ->setParameter(':status', $status, ParameterType::INTEGER) - ->setParameter(':user_id', $userId, ParameterType::INTEGER); + ->setParameter(self::STATUS_PARAM_NAME, $status, ParameterType::INTEGER) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); if ($limit > 0) { $query->setMaxResults($limit); @@ -1023,7 +1065,7 @@ public function loadVersionsForUser( $query->orderBy('v.modified', 'DESC'); $query->addOrderBy('v.id', 'DESC'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function listVersions(int $contentId, ?int $status = null, int $limit = -1): array @@ -1045,7 +1087,7 @@ public function listVersions(int $contentId, ?int $status = null, int $limit = - $query->orderBy('v.id'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -1057,29 +1099,34 @@ public function listVersionNumbers(int $contentId): array $query ->select('version') ->from(self::CONTENT_VERSION_TABLE) - ->where('contentobject_id = :contentId') + ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) ->groupBy('version') ->setParameter('contentId', $contentId, ParameterType::INTEGER); - return array_map('intval', $query->execute()->fetchAll(FetchMode::COLUMN)); + return array_map('intval', $query->executeQuery()->fetchFirstColumn()); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getLastVersionNumber(int $contentId): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->databasePlatform->getMaxExpression('version')) + ->select('MAX(version)') ->from(self::CONTENT_VERSION_TABLE) - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); - $statement = $query->execute(); + $statement = $query->executeQuery(); - return (int)$statement->fetchColumn(); + return (int)$statement->fetchOne(); } /** * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ public function getAllLocationIds(int $contentId): array { @@ -1087,12 +1134,10 @@ public function getAllLocationIds(int $contentId): array $query ->select('node_id') ->from('ezcontentobject_tree') - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); - $statement = $query->execute(); - - return $statement->fetchAll(FetchMode::COLUMN); + return $query->executeQuery()->fetchFirstColumn(); } /** @@ -1107,12 +1152,12 @@ public function getFieldIdsByType( $query ->select('id', 'data_type_string') ->from(self::CONTENT_FIELD_TABLE) - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); if (null !== $versionNo) { $query - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); } @@ -1122,10 +1167,10 @@ public function getFieldIdsByType( ->setParameter('language_code', $languageCode, ParameterType::STRING); } - $statement = $query->execute(); + $statement = $query->executeQuery(); $result = []; - foreach ($statement->fetchAll(FetchMode::ASSOCIATIVE) as $row) { + foreach ($statement->fetchAllAssociative() as $row) { if (!isset($result[$row['data_type_string']])) { $result[$row['data_type_string']] = []; } @@ -1135,6 +1180,9 @@ public function getFieldIdsByType( return $result; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteRelations(int $contentId, ?int $versionNo = null): void { $query = $this->connection->createQueryBuilder(); @@ -1151,21 +1199,23 @@ public function deleteRelations(int $contentId, ?int $versionNo = null): void $query->orWhere('to_contentobject_id = :content_id'); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeReverseFieldRelations(int $contentId): void { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); - $query - ->select(['a.id', 'a.version', 'a.data_type_string', 'a.data_text']) + $query->select('a.id', 'a.version', 'a.data_type_string', 'a.data_text') ->from(self::CONTENT_FIELD_TABLE, 'a') ->innerJoin( 'a', 'ezcontentobject_link', 'l', - $expr->andX( + $expr->and( 'l.from_contentobject_id = a.contentobject_id', 'l.from_contentobject_version = a.version', 'l.contentclassattribute_id = a.contentclassattribute_id' @@ -1174,9 +1224,9 @@ public function removeReverseFieldRelations(int $contentId): void ->where('l.to_contentobject_id = :content_id') ->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - ':relation_type' + self::RELATION_TYPE_PARAM_NAME ), 0 ) @@ -1184,9 +1234,9 @@ public function removeReverseFieldRelations(int $contentId): void ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('relation_type', Relation::FIELD | Relation::ASSET, ParameterType::INTEGER); - $statement = $query->execute(); + $statement = $query->executeQuery(); - while ($row = $statement->fetch(FetchMode::ASSOCIATIVE)) { + while ($row = $statement->fetchAssociative()) { if ($row['data_type_string'] === 'ezobjectrelation') { $this->removeRelationFromRelationField($row); } @@ -1201,6 +1251,9 @@ public function removeReverseFieldRelations(int $contentId): void } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeRelationsByFieldDefinitionId(int $fieldDefinitionId): void { $query = $this->connection->createQueryBuilder(); @@ -1208,7 +1261,7 @@ public function removeRelationsByFieldDefinitionId(int $fieldDefinitionId): void ->where('contentclassattribute_id = :field_definition_id') ->setParameter('field_definition_id', $fieldDefinitionId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** @@ -1233,14 +1286,14 @@ private function removeRelationFromRelationListField(int $contentId, array $row) $query = $this->connection->createQueryBuilder(); $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_text', ':data_text') + ->set('data_text', self::DATA_TEXT_PARAM_NAME) ->setParameter('data_text', $document->saveXML(), ParameterType::STRING) ->where('id = :attribute_id') - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('attribute_id', (int)$row['id'], ParameterType::INTEGER) ->setParameter('version_no', (int)$row['version'], ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** @@ -1248,18 +1301,20 @@ private function removeRelationFromRelationListField(int $contentId, array $row) * removing relation data. * * @param array $row + * + * @throws \Doctrine\DBAL\Exception */ private function removeRelationFromRelationField(array $row): void { $query = $this->connection->createQueryBuilder(); $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_int', ':data_int') - ->set('sort_key_int', ':sort_key_int') + ->set('data_int', self::DATA_INT_PARAM_NAME) + ->set('sort_key_int', self::SORT_KEY_INT_PARAM_NAME) ->setParameter('data_int', null, ParameterType::NULL) ->setParameter('sort_key_int', 0, ParameterType::INTEGER) ->where('id = :attribute_id') - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('attribute_id', (int)$row['id'], ParameterType::INTEGER) ->setParameter('version_no', (int)$row['version'], ParameterType::INTEGER); @@ -1290,9 +1345,12 @@ private function removeRelationFromAssetField(array $row): void ->setParameter('attribute_id', (int)$row['id'], ParameterType::INTEGER) ->setParameter('version_no', (int)$row['version'], ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteField(int $fieldId): void { $query = $this->connection->createQueryBuilder(); @@ -1302,79 +1360,90 @@ public function deleteField(int $fieldId): void ->setParameter('field_id', $fieldId, ParameterType::INTEGER) ; - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteFields(int $contentId, ?int $versionNo = null): void { $query = $this->connection->createQueryBuilder(); $query ->delete(self::CONTENT_FIELD_TABLE) - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); if (null !== $versionNo) { $query - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteVersions(int $contentId, ?int $versionNo = null): void { $query = $this->connection->createQueryBuilder(); $query ->delete(self::CONTENT_VERSION_TABLE) - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); if (null !== $versionNo) { $query - ->andWhere('version = :version_no') + ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteNames(int $contentId, int $versionNo = null): void { $query = $this->connection->createQueryBuilder(); $query ->delete(self::CONTENT_NAME_TABLE) - ->where('contentobject_id = :content_id') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->setParameter('content_id', $contentId, ParameterType::INTEGER); if (isset($versionNo)) { $query - ->andWhere('content_version = :version_no') + ->andWhere(self::CONTENT_VERSION_VERSION_NO_PARAM_NAME) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); } - $query->execute(); + $query->executeStatement(); } /** * Query Content name table to find if a name record for the given parameters exists. + * + * @throws \Doctrine\DBAL\Exception */ private function contentNameExists(int $contentId, int $version, string $languageCode): bool { $query = $this->connection->createQueryBuilder(); $query - ->select($this->databasePlatform->getCountExpression('contentobject_id')) + ->select('COUNT(contentobject_id)') ->from(self::CONTENT_NAME_TABLE) - ->where('contentobject_id = :content_id') - ->andWhere('content_version = :version_no') + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) + ->andWhere(self::CONTENT_VERSION_VERSION_NO_PARAM_NAME) ->andWhere('content_translation = :language_code') ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('version_no', $version, ParameterType::INTEGER) ->setParameter('language_code', $languageCode, ParameterType::STRING); - $stmt = $query->execute(); + $stmt = $query->executeQuery(); - return (int)$stmt->fetch(FetchMode::COLUMN) > 0; + return ((int)$stmt->fetchFirstColumn()) > 0; } public function setName(int $contentId, int $version, string $name, string $languageCode): void @@ -1397,12 +1466,12 @@ public function setName(int $contentId, int $version, string $name, string $lang ->insert(self::CONTENT_NAME_TABLE) ->values( [ - 'contentobject_id' => ':content_id', - 'content_version' => ':version_no', - 'content_translation' => ':language_code', + 'contentobject_id' => self::CONTENT_ID_PARAM_NAME, + 'content_version' => self::VERSION_NO_PARAM_NAME, + 'content_translation' => self::LANGUAGE_CODE_PARAM_NAME, 'name' => ':name', 'language_id' => $this->getSetNameLanguageMaskSubQuery(), - 'real_translation' => ':language_code', + 'real_translation' => self::LANGUAGE_CODE_PARAM_NAME, ] ); } else { @@ -1410,13 +1479,13 @@ public function setName(int $contentId, int $version, string $name, string $lang ->update(self::CONTENT_NAME_TABLE) ->set('name', ':name') ->set('language_id', $this->getSetNameLanguageMaskSubQuery()) - ->set('real_translation', ':language_code') - ->where('contentobject_id = :content_id') - ->andWhere('content_version = :version_no') + ->set('real_translation', self::LANGUAGE_CODE_PARAM_NAME) + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) + ->andWhere(self::CONTENT_VERSION_VERSION_NO_PARAM_NAME) ->andWhere('content_translation = :language_code'); } - $query->execute(); + $query->executeStatement(); } /** @@ -1441,7 +1510,7 @@ public function deleteContent(int $contentId): void ->setParameter('content_id', $contentId, ParameterType::INTEGER) ; - $query->execute(); + $query->executeStatement(); } public function loadRelations( @@ -1452,23 +1521,29 @@ public function loadRelations( $query = $this->queryBuilder->createRelationFindQueryBuilder(); $query = $this->prepareRelationQuery($query, $contentId, $contentVersionNo, $relationType); - return $query->execute()->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countRelations( int $contentId, ?int $contentVersionNo = null, ?int $relationType = null ): int { $query = $this->connection->createQueryBuilder(); - $query->select($this->databasePlatform->getCountExpression('l.id')) + $query->select('COUNT(l.id)') ->from(self::CONTENT_RELATION_TABLE, 'l'); $query = $this->prepareRelationQuery($query, $contentId, $contentVersionNo, $relationType); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function listRelations( int $contentId, int $limit, @@ -1484,7 +1559,7 @@ public function listRelations( $query->orderBy('l.id', 'DESC'); - return $query->execute()->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } private function prepareRelationQuery( @@ -1538,9 +1613,9 @@ private function prepareRelationQuery( $query ->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - ':relation_type' + self::RELATION_TYPE_PARAM_NAME ), 0 ) @@ -1556,16 +1631,16 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); $query - ->select($this->databasePlatform->getCountExpression('l.id')) + ->select('COUNT(l.id)') ->from(self::CONTENT_RELATION_TABLE, 'l') ->innerJoin( 'l', 'ezcontentobject', 'c', - $expr->andX( + $expr->and( $expr->eq('l.from_contentobject_id', 'c.id'), $expr->eq('l.from_contentobject_version', 'c.current_version'), - $expr->eq('c.status', ':status') + $expr->eq('c.status', self::STATUS_PARAM_NAME) ) ) ->where( @@ -1579,7 +1654,7 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul if ($relationType !== null) { $query->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', $relationType ), @@ -1588,7 +1663,7 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul ); } - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } public function loadReverseRelations(int $toContentId, ?int $relationType = null): array @@ -1600,7 +1675,7 @@ public function loadReverseRelations(int $toContentId, ?int $relationType = null 'l', 'ezcontentobject', 'c', - $expr->andX( + $expr->and( 'c.id = l.from_contentobject_id', 'c.current_version = l.from_contentobject_version', 'c.status = :status' @@ -1618,9 +1693,9 @@ public function loadReverseRelations(int $toContentId, ?int $relationType = null if (null !== $relationType) { $query->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - ':relation_type' + self::RELATION_TYPE_PARAM_NAME ), 0 ) @@ -1628,7 +1703,7 @@ public function loadReverseRelations(int $toContentId, ?int $relationType = null ->setParameter('relation_type', $relationType, ParameterType::INTEGER); } - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function listReverseRelations( @@ -1644,7 +1719,7 @@ public function listReverseRelations( 'l', 'ezcontentobject', 'c', - $expr->andX( + $expr->and( $expr->eq('l.from_contentobject_id', 'c.id'), $expr->eq('l.from_contentobject_version', 'c.current_version'), $expr->eq('c.status', ContentInfo::STATUS_PUBLISHED) @@ -1659,7 +1734,7 @@ public function listReverseRelations( if ($relationType !== null) { $query->andWhere( $expr->gt( - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', $relationType ), @@ -1673,9 +1748,12 @@ public function listReverseRelations( } $query->orderBy('l.id', 'DESC'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertRelation(RelationCreateStruct $createStruct): int { $query = $this->connection->createQueryBuilder(); @@ -1683,10 +1761,10 @@ public function insertRelation(RelationCreateStruct $createStruct): int ->insert(self::CONTENT_RELATION_TABLE) ->values( [ - 'contentclassattribute_id' => ':field_definition_id', + 'contentclassattribute_id' => self::FIELD_DEFINITION_ID_PARAM_NAME, 'from_contentobject_id' => ':from_content_id', 'from_contentobject_version' => ':from_version_no', - 'relation_type' => ':relation_type', + 'relation_type' => self::RELATION_TYPE_PARAM_NAME, 'to_contentobject_id' => ':to_content_id', ] ) @@ -1712,13 +1790,12 @@ public function insertRelation(RelationCreateStruct $createStruct): int ParameterType::INTEGER ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::CONTENT_RELATION_SEQ); } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ @@ -1733,7 +1810,7 @@ public function loadRelation(int $relationId): array ) ->setParameter('relationId', $relationId, ParameterType::INTEGER); - $result = $query->execute()->fetchAllAssociative(); + $result = $query->executeQuery()->fetchAllAssociative(); $resultCount = count($result); if ($resultCount === 0) { throw new NotFoundException('Relation', $relationId); @@ -1746,6 +1823,9 @@ public function loadRelation(int $relationId): array return current($result); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteRelation(int $relationId, int $type): void { // Legacy Storage stores COMMON, LINK and EMBED types using bitmask, therefore first load @@ -1754,26 +1834,26 @@ public function deleteRelation(int $relationId, int $type): void $query ->select('relation_type') ->from(self::CONTENT_RELATION_TABLE) - ->where('id = :relation_id') + ->where(self::ID_RELATION_ID_PARAM_COMPARISON) ->setParameter('relation_id', $relationId, ParameterType::INTEGER) ; - $loadedRelationType = $query->execute()->fetchColumn(); + $loadedRelationType = (int)$query->executeQuery()->fetchFirstColumn(); - if (!$loadedRelationType) { + if ($loadedRelationType <= 0) { return; } $query = $this->connection->createQueryBuilder(); // If relation type matches then delete - if (((int)$loadedRelationType) === ((int)$type)) { + if ($loadedRelationType === $type) { $query ->delete(self::CONTENT_RELATION_TABLE) - ->where('id = :relation_id') + ->where(self::ID_RELATION_ID_PARAM_COMPARISON) ->setParameter('relation_id', $relationId, ParameterType::INTEGER) ; - $query->execute(); + $query->executeStatement(); } elseif ($loadedRelationType & $type) { // If relation type is composite update bitmask @@ -1782,18 +1862,18 @@ public function deleteRelation(int $relationId, int $type): void ->set( 'relation_type', // make & operation removing given $type from the bitmask - $this->databasePlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'relation_type', - ':relation_type' + self::RELATION_TYPE_PARAM_NAME ) ) // set the relation type as needed for the above & expression ->setParameter('relation_type', ~$type, ParameterType::INTEGER) - ->where('id = :relation_id') + ->where(self::ID_RELATION_ID_PARAM_COMPARISON) ->setParameter('relation_id', $relationId, ParameterType::INTEGER) ; - $query->execute(); + $query->executeStatement(); } } @@ -1809,9 +1889,9 @@ public function getContentIdsByContentTypeId(int $contentTypeId): array ->where('contentclass_id = :content_type_id') ->setParameter('content_type_id', $contentTypeId, ParameterType::INTEGER); - $statement = $query->execute(); + $statement = $query->executeQuery(); - return array_map('intval', $statement->fetchAll(FetchMode::COLUMN)); + return array_map('intval', $statement->fetchFirstColumn()); } public function loadVersionedNameData(array $rows): array @@ -1820,7 +1900,7 @@ public function loadVersionedNameData(array $rows): array $expr = $query->expr(); $conditions = []; foreach ($rows as $row) { - $conditions[] = $expr->andX( + $conditions[] = $expr->and( $expr->eq( 'contentobject_id', $query->createPositionalParameter($row['id'], ParameterType::INTEGER) @@ -1832,13 +1912,13 @@ public function loadVersionedNameData(array $rows): array ); } - $query->where($expr->orX(...$conditions)); + $query->where($expr->or(...$conditions)); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function copyRelations( int $originalContentId, @@ -1877,7 +1957,7 @@ public function copyRelations( $insertQuery .= $selectQuery->getSQL(); - $this->connection->executeUpdate( + $this->connection->executeStatement( $insertQuery, $selectQuery->getParameters(), $selectQuery->getParameterTypes() @@ -1885,10 +1965,8 @@ public function copyRelations( } /** - * {@inheritdoc} - * * @throws \Doctrine\DBAL\ConnectionException - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function deleteTranslationFromContent(int $contentId, string $languageCode): void { @@ -1907,6 +1985,9 @@ public function deleteTranslationFromContent(int $contentId, string $languageCod } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteTranslatedFields( string $languageCode, int $contentId, @@ -1915,11 +1996,11 @@ public function deleteTranslatedFields( $query = $this->connection->createQueryBuilder(); $query ->delete('ezcontentobject_attribute') - ->where('contentobject_id = :contentId') + ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) ->andWhere('language_code = :languageCode') ->setParameters( [ - ':contentId' => $contentId, + self::CONTENT_ID_PARAM_NAME => $contentId, ':languageCode' => $languageCode, ] ) @@ -1927,18 +2008,18 @@ public function deleteTranslatedFields( if (null !== $versionNo) { $query - ->andWhere('version = :versionNo') - ->setParameter(':versionNo', $versionNo) + ->andWhere($query->expr()->and('version', self::VERSION_NO_PARAM_NAME)) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } - $query->execute(); + $query->executeStatement(); } /** * {@inheritdoc} * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function deleteTranslationFromVersion( int $contentId, @@ -1962,7 +2043,9 @@ public function deleteTranslationFromVersion( /** * Delete translation from the ezcontentobject_name table. * - * @param int $versionNo optional, if specified, apply to this Version only. + * @param int|null $versionNo optional, if specified, apply to this Version only. + * + * @throws \Doctrine\DBAL\Exception */ private function deleteTranslationFromContentNames( int $contentId, @@ -1977,49 +2060,47 @@ private function deleteTranslationFromContentNames( ->setParameters( [ ':languageCode' => $languageCode, - ':contentId' => $contentId, + self::CONTENT_ID_PARAM_NAME => $contentId, ] ) ; if (null !== $versionNo) { $query - ->andWhere('content_version = :versionNo') - ->setParameter(':versionNo', $versionNo) + ->andWhere($query->expr()->and('content_version', self::VERSION_NO_PARAM_NAME)) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } - $query->execute(); + $query->executeStatement(); } /** * Remove language from language_mask of ezcontentobject. * - * @param int $contentId - * @param int $languageId - * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\Base\Exceptions\BadStateException */ - private function deleteTranslationFromContentObject(int $contentId, $languageId): void + private function deleteTranslationFromContentObject(int $contentId, int $languageId): void { $query = $this->connection->createQueryBuilder(); $query->update('ezcontentobject') // parameter for bitwise operation has to be placed verbatim (w/o binding) for this to work cross-DBMS - ->set('language_mask', 'language_mask & ~ ' . $languageId) + ->set('language_mask', $this->getLanguageRemovalFromLanguageMaskExpression($languageId)) ->set('modified', ':now') ->where('id = :contentId') ->andWhere( // make sure removed translation is not the last one (incl. alwaysAvailable) - $query->expr()->andX( - 'language_mask & ~ ' . $languageId . ' <> 0', - 'language_mask & ~ ' . $languageId . ' <> 1' + $query->expr()->and( + $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 0', + $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 1' ) ) ->setParameter(':now', time()) - ->setParameter(':contentId', $contentId) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId) ; - $rowCount = $query->execute(); + $rowCount = $query->executeStatement(); // no rows updated means that most likely somehow it was the last remaining translation if ($rowCount === 0) { @@ -2036,6 +2117,7 @@ private function deleteTranslationFromContentObject(int $contentId, $languageId) * * @param int|null $versionNo optional, if specified, apply to this Version only. * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ private function deleteTranslationFromContentVersions( @@ -2046,7 +2128,7 @@ private function deleteTranslationFromContentVersions( $query = $this->connection->createQueryBuilder(); $query->update('ezcontentobject_version') // parameter for bitwise operation has to be placed verbatim (w/o binding) for this to work cross-DBMS - ->set('language_mask', 'language_mask & ~ ' . $languageId) + ->set('language_mask', $this->getLanguageRemovalFromLanguageMaskExpression($languageId)) ->set('modified', ':now') // update initial_language_id only if it matches removed translation languageId ->set( @@ -2055,27 +2137,27 @@ private function deleteTranslationFromContentVersions( 'THEN (SELECT initial_language_id AS main_language_id FROM ezcontentobject c WHERE c.id = :contentId) ' . 'ELSE initial_language_id END' ) - ->where('contentobject_id = :contentId') + ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) ->andWhere( // make sure removed translation is not the last one (incl. alwaysAvailable) - $query->expr()->andX( - 'language_mask & ~ ' . $languageId . ' <> 0', - 'language_mask & ~ ' . $languageId . ' <> 1' + $query->expr()->and( + $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 0', + $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 1' ) ) ->setParameter(':now', time()) - ->setParameter(':contentId', $contentId) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId) ->setParameter(':languageId', $languageId) ; if (null !== $versionNo) { $query - ->andWhere('version = :versionNo') - ->setParameter(':versionNo', $versionNo) + ->andWhere($query->expr()->and('version', self::VERSION_NO_PARAM_NAME)) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } - $rowCount = $query->execute(); + $rowCount = $query->executeStatement(); // no rows updated means that most likely somehow it was the last remaining translation if ($rowCount === 0) { @@ -2097,14 +2179,14 @@ private function setLanguageMaskForUpdateQuery( string $languageMaskColumnName ): DoctrineQueryBuilder { if ($alwaysAvailable) { - $languageMaskExpr = $this->databasePlatform->getBitOrComparisonExpression( + $languageMaskExpr = $this->getDatabasePlatform()->getBitOrComparisonExpression( $languageMaskColumnName, - ':languageMaskOperand' + self::LANGUAGE_MASK_OPERAND_PARAM_NAME ); } else { - $languageMaskExpr = $this->databasePlatform->getBitAndComparisonExpression( + $languageMaskExpr = $this->getDatabasePlatform()->getBitAndComparisonExpression( $languageMaskColumnName, - ':languageMaskOperand' + self::LANGUAGE_MASK_OPERAND_PARAM_NAME ); } @@ -2119,7 +2201,6 @@ private function setLanguageMaskForUpdateQuery( } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ public function loadVersionInfoList(array $contentIds): array @@ -2138,6 +2219,27 @@ public function loadVersionInfoList(array $contentIds): array $expr->eq('v.version', 'c.current_version') ); - return $queryBuilder->execute()->fetchAllAssociative(); + return $queryBuilder->executeQuery()->fetchAllAssociative(); + } + + private function getLanguageRemovalFromLanguageMaskExpression(int $languageId): string + { + return 'language_mask & ~ ' . $languageId; + } + + /** + * @throws \Doctrine\DBAL\Exception + */ + private function getDatabasePlatform(): AbstractPlatform + { + if (!isset($this->databasePlatform)) { + $databasePlatform = $this->connection->getDatabasePlatform(); + if (null === $databasePlatform) { + throw new LogicException('Unable to fetch database platform'); + } + $this->databasePlatform = $databasePlatform; + } + + return $this->databasePlatform; } } diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php index 96d085be6b..b84536f045 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php @@ -105,7 +105,7 @@ public function createLoadContentInfoQueryBuilder( $joinCondition = $expr->eq('c.id', 't.contentobject_id'); if ($joinMainLocation) { // wrap join condition with AND operator and join by a Main Location - $joinCondition = $expr->andX( + $joinCondition = $expr->and( $joinCondition, $expr->eq('t.node_id', 't.main_node_id') ); @@ -175,7 +175,7 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder 'v', 'ezcontentobject_tree', 't', - $expr->andX( + $expr->and( $expr->eq('t.contentobject_id', 'v.contentobject_id'), $expr->eq('t.main_node_id', 't.node_id') ) diff --git a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php index 5523674b41..fcd79127f7 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content; use Ibexa\Contracts\Core\Persistence\Content\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Field; diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php index 1ce10b6745..55978272bc 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php @@ -33,7 +33,7 @@ final class DoctrineDatabase extends Gateway private $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection) { @@ -122,7 +122,7 @@ public function loadLanguageListData(array $ids): iterable ->where('id IN (:ids)') ->setParameter('ids', $ids, Connection::PARAM_INT_ARRAY); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function loadLanguageListDataByLanguageCode(array $languageCodes): iterable @@ -132,7 +132,7 @@ public function loadLanguageListDataByLanguageCode(array $languageCodes): iterab ->where('locale IN (:locale)') ->setParameter('locale', $languageCodes, Connection::PARAM_STR_ARRAY); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -150,7 +150,7 @@ private function createFindQuery(): QueryBuilder public function loadAllLanguagesData(): array { - return $this->createFindQuery()->execute()->fetchAll(); + return $this->createFindQuery()->executeQuery()->fetchAllAssociative(); } public function deleteLanguage(int $id): void diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php index 0d80223091..185ddaa85a 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Language\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content\Language; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Language\Gateway; diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 3bd07be2d4..b6d58ff762 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -36,6 +36,11 @@ */ final class DoctrineDatabase extends Gateway { + private const string CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION = 't.contentobject_id = c.id'; + private const string CONTENT_ID_PARAM_NAME = ':contentId'; + private const string VERSION_NO_PARAM_NAME = ':versionNo'; + private const string MAIN_NODE_ID_PARAM_NAME = ':mainNodeId'; + private Connection $connection; private MaskGenerator $languageMaskGenerator; @@ -48,7 +53,7 @@ final class DoctrineDatabase extends Gateway private SortClauseConverter $trashSortClauseConverter; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -90,7 +95,7 @@ public function getNodeDataList(array $locationIds, array $translations = null, ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function getBasicNodeDataByRemoteId( @@ -133,7 +138,7 @@ public function loadLocationDataByContent(int $contentId, ?int $rootLocationId = $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } /** @@ -158,7 +163,7 @@ public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocatio $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadParentLocationsDataForDraftContent(int $contentId): array @@ -172,7 +177,7 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array 't', 'eznode_assignment', 'a', - $expr->andX( + $expr->and( $expr->eq( 't.node_id', 'a.parent_node' @@ -194,7 +199,7 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array 'a', 'ezcontentobject', 'c', - $expr->andX( + $expr->and( $expr->eq( 'a.contentobject_id', 'c.id' @@ -211,7 +216,7 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array @@ -223,7 +228,7 @@ public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array ->where($this->getSubtreeLimitationExpression($query, $sourceId)) ->orderBy('t.depth') ->addOrderBy('t.node_id'); - $statement = $query->execute(); + $statement = $query->executeQuery(); $results = $statement->fetchAll($onlyIds ? (FetchMode::COLUMN | PDO::FETCH_GROUP) : FetchMode::ASSOCIATIVE); @@ -302,7 +307,7 @@ public function getChildren(int $locationId): array ); $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } private function getSubtreeNodesData(string $pathString): array @@ -323,9 +328,8 @@ private function getSubtreeNodesData(string $pathString): array $query->createPositionalParameter($pathString . '%', ParameterType::STRING) ) ); - $statement = $query->execute(); - return $statement->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -638,9 +642,8 @@ private function loadHiddenSubtreesByPath(string $pathString): array ) ) ); - $statement = $query->execute(); - return $statement->fetchAll(FetchMode::COLUMN); + return $query->executeQuery()->fetchFirstColumn(); } private function buildHiddenSubtreeQuery(string $selectExpr): QueryBuilder @@ -650,9 +653,9 @@ private function buildHiddenSubtreeQuery(string $selectExpr): QueryBuilder $query ->select($selectExpr) ->from(self::CONTENT_TREE_TABLE, 't') - ->leftJoin('t', 'ezcontentobject', 'c', 't.contentobject_id = c.id') + ->leftJoin('t', 'ezcontentobject', 'c', self::CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION) ->where( - $expr->orX( + $expr->or( $expr->eq( 't.is_hidden', $query->createPositionalParameter(1, ParameterType::INTEGER) @@ -689,7 +692,7 @@ public function swap(int $locationId1, int $locationId2): bool ; $statement = $queryBuilder->execute(); $contentObjects = []; - foreach ($statement->fetchAll(FetchMode::ASSOCIATIVE) as $row) { + foreach ($statement->fetchAllAssociative() as $row) { $row['is_main_node'] = (int)$row['main_node_id'] === (int)$row['node_id']; $contentObjects[$row['node_id']] = $row; } @@ -710,18 +713,18 @@ public function swap(int $locationId1, int $locationId2): bool $queryBuilder = $this->connection->createQueryBuilder(); $queryBuilder ->update(self::CONTENT_TREE_TABLE) - ->set('contentobject_id', ':contentId') - ->set('contentobject_version', ':versionNo') - ->set('main_node_id', ':mainNodeId') + ->set('contentobject_id', self::CONTENT_ID_PARAM_NAME) + ->set('contentobject_version', self::VERSION_NO_PARAM_NAME) + ->set('main_node_id', self::MAIN_NODE_ID_PARAM_NAME) ->where( $expr->eq('node_id', ':locationId') ); $queryBuilder - ->setParameter(':contentId', $content2data['contentobject_id']) - ->setParameter(':versionNo', $content2data['contentobject_version']) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $content2data['contentobject_id']) + ->setParameter(self::VERSION_NO_PARAM_NAME, $content2data['contentobject_version']) ->setParameter( - ':mainNodeId', + self::MAIN_NODE_ID_PARAM_NAME, // make main Location main again, preserve main Location id of non-main one $content2data['is_main_node'] ? $content1data['node_id'] @@ -733,10 +736,10 @@ public function swap(int $locationId1, int $locationId2): bool $queryBuilder->execute(); $queryBuilder - ->setParameter(':contentId', $content1data['contentobject_id']) - ->setParameter(':versionNo', $content1data['contentobject_version']) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $content1data['contentobject_id']) + ->setParameter(self::VERSION_NO_PARAM_NAME, $content1data['contentobject_version']) ->setParameter( - ':mainNodeId', + self::MAIN_NODE_ID_PARAM_NAME, $content1data['is_main_node'] // make main Location main again, preserve main Location id of non-main one ? $content2data['node_id'] @@ -998,7 +1001,7 @@ private function getMainNodeId(int $contentId): ?int ->select('node_id') ->from(self::CONTENT_TREE_TABLE) ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter($contentId, ParameterType::INTEGER) @@ -1240,7 +1243,7 @@ public function listTrashed( $query ->select('t.*') ->from(self::TRASH_TABLE, 't') - ->leftJoin('t', ContentGateway::CONTENT_ITEM_TABLE, 'c', 't.contentobject_id = c.id'); + ->leftJoin('t', ContentGateway::CONTENT_ITEM_TABLE, 'c', self::CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION); $this->addSort($sort, $query); $this->addConditionsByCriterion($criterion, $query); @@ -1252,7 +1255,7 @@ public function listTrashed( $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function countTrashed(?CriterionInterface $criterion = null): int @@ -1260,7 +1263,7 @@ public function countTrashed(?CriterionInterface $criterion = null): int $query = $this->connection->createQueryBuilder() ->select($this->dbPlatform->getCountExpression(1)) ->from(self::TRASH_TABLE, 't') - ->innerJoin('t', ContentGateway::CONTENT_ITEM_TABLE, 'c', 't.contentobject_id = c.id'); + ->innerJoin('t', ContentGateway::CONTENT_ITEM_TABLE, 'c', self::CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION); $this->addConditionsByCriterion($criterion, $query); @@ -1309,7 +1312,7 @@ public function setSectionForSubtree(string $pathString, int $sectionId): bool $contentIds = array_map( 'intval', - $selectContentIdsQuery->execute()->fetchAll(FetchMode::COLUMN) + $selectContentIdsQuery->executeQuery()->fetchFirstColumn() ); if (empty($contentIds)) { @@ -1425,7 +1428,7 @@ public function loadAllLocationsData(int $offset, int $limit): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } /** @@ -1478,7 +1481,7 @@ private function appendContentItemTranslationsConstraint( ); $queryBuilder->andWhere( - $expr->orX( + $expr->or( $expr->gt( $this->dbPlatform->getBitAndComparisonExpression('c.language_mask', $mask), 0 diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 3990fa5c56..60ccff44e3 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Location\CreateStruct; use Ibexa\Contracts\Core\Persistence\Content\Location\UpdateStruct; diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php index 480b64fbca..e02ff99978 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php @@ -37,7 +37,7 @@ final class DoctrineDatabase extends Gateway private $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection, MaskGenerator $maskGenerator) { @@ -58,14 +58,14 @@ public function loadObjectStateData(int $stateId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadObjectStateDataByIdentifier(string $identifier, int $groupId): array { $query = $this->createObjectStateFindQuery(); $query->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'state.identifier', $query->createPositionalParameter($identifier, ParameterType::STRING) @@ -79,7 +79,7 @@ public function loadObjectStateDataByIdentifier(string $identifier, int $groupId $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadObjectStateListData(int $groupId): array @@ -114,7 +114,7 @@ public function loadObjectStateGroupData(int $groupId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadObjectStateGroupDataByIdentifier(string $identifier): array @@ -129,7 +129,7 @@ public function loadObjectStateGroupDataByIdentifier(string $identifier): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadObjectStateGroupListData(int $offset, int $limit): array @@ -151,7 +151,7 @@ public function loadObjectStateGroupListData(int $offset, int $limit): array } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function insertObjectState(ObjectState $objectState, int $groupId): void @@ -203,7 +203,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void // If this is a first state in group, assign it to all content objects if ($maxPriority === null) { - $this->connection->executeUpdate( + $this->connection->executeStatement( 'INSERT INTO ezcobj_state_link (contentobject_id, contentobject_state_id) ' . "SELECT id, {$objectState->id} FROM ezcontentobject" ); @@ -481,7 +481,7 @@ public function loadObjectStateDataForContent(int $contentId, int $stateGroupId) $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function getContentCount(int $stateId): int diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php index 866516d442..7c96832c72 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; use Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php index b9363e13fc..6c7b519986 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; @@ -28,7 +27,7 @@ final class DoctrineDatabase extends Gateway /** * Creates a new DoctrineDatabase Section Gateway. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection) { @@ -73,8 +72,7 @@ public function updateSection(int $id, string $name, string $identifier): void public function loadSectionData(int $id): array { $query = $this->connection->createQueryBuilder(); - $query - ->select(['id', 'identifier', 'name']) + $query->select('id', 'identifier', 'name') ->from(self::CONTENT_SECTION_TABLE) ->where( $query->expr()->eq( @@ -85,19 +83,18 @@ public function loadSectionData(int $id): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadAllSectionData(): array { $query = $this->connection->createQueryBuilder(); - $query - ->select(['id', 'identifier', 'name']) + $query->select('id', 'identifier', 'name') ->from(self::CONTENT_SECTION_TABLE); $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadSectionDataByIdentifier(string $identifier): array @@ -118,7 +115,7 @@ public function loadSectionDataByIdentifier(string $identifier): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function countContentObjectsInSection(int $id): int diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php index af0fb23632..78b8abf5db 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; use PDOException; diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php index 36ac18d9a3..5af1f2adaf 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php @@ -9,8 +9,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Type\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\FetchMode; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Type; @@ -34,6 +33,14 @@ */ final class DoctrineDatabase extends Gateway { + private const string STATUS_PARAM_NAME = ':status'; + private const string CREATED_PARAM_NAME = ':created'; + private const string CREATOR_ID_PARAM_NAME = ':creator_id'; + private const string GROUP_ID_PARAM_NAME = ':gid'; + private const string VERSION_PARAM_NAME = ':version'; + private const string CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON = 'contentclass_attribute_id = :field_definition_id'; + private const string STATUS_PARAM_COMPARISON = 'version = :status'; + /** * Columns of database tables. */ @@ -107,7 +114,7 @@ final class DoctrineDatabase extends Gateway private MaskGenerator $languageMaskGenerator; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -326,17 +333,17 @@ public function insertType(Type $type, ?int $typeId = null): int 'version' => $query->createNamedParameter( $type->status, ParameterType::INTEGER, - ':status' + self::STATUS_PARAM_NAME ), 'created' => $query->createNamedParameter( $type->created, ParameterType::INTEGER, - ':created' + self::CREATED_PARAM_NAME ), 'creator_id' => $query->createNamedParameter( $type->creatorId, ParameterType::INTEGER, - ':creator_id' + self::CREATOR_ID_PARAM_NAME ), ] ); @@ -476,7 +483,7 @@ public function loadGroupData(array $groupIds): array ->where($query->expr()->in('id', ':ids')) ->setParameter('ids', $groupIds, Connection::PARAM_INT_ARRAY); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function loadGroupDataByIdentifier(string $identifier): array @@ -489,7 +496,7 @@ public function loadGroupDataByIdentifier(string $identifier): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function loadAllGroupsData(): array @@ -503,7 +510,7 @@ public function loadAllGroupsData(): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -530,13 +537,13 @@ public function loadTypesDataForGroup(int $groupId, int $status): array $query = $this->getLoadTypeQueryBuilder(); $expr = $query->expr(); $query - ->where($expr->eq('g.group_id', ':gid')) - ->andWhere($expr->eq('c.version', ':version')) + ->where($expr->eq('g.group_id', self::GROUP_ID_PARAM_NAME)) + ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) ->addOrderBy('c.identifier') ->setParameter('gid', $groupId, ParameterType::INTEGER) ->setParameter('version', $status, ParameterType::INTEGER); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function insertFieldDefinition( @@ -558,7 +565,7 @@ public function insertFieldDefinition( 'version' => $query->createNamedParameter( $status, ParameterType::INTEGER, - ':status' + self::STATUS_PARAM_NAME ), ] ); @@ -612,7 +619,7 @@ private function insertFieldDefinitionMultilingualData( 'name' => ':name', 'description' => ':description', 'contentclass_attribute_id' => ':field_definition_id', - 'version' => ':status', + 'version' => self::STATUS_PARAM_NAME, 'language_id' => ':language_id', ] ) @@ -681,21 +688,19 @@ public function loadFieldDefinition(int $id, int $status): array $this ->selectColumns($query, self::FIELD_DEFINITION_TABLE, 'f_def') ->addSelect( - [ - 'ct.initial_language_id AS ezcontentclass_initial_language_id', - 'transl_f_def.name AS ezcontentclass_attribute_multilingual_name', - 'transl_f_def.description AS ezcontentclass_attribute_multilingual_description', - 'transl_f_def.language_id AS ezcontentclass_attribute_multilingual_language_id', - 'transl_f_def.data_text AS ezcontentclass_attribute_multilingual_data_text', - 'transl_f_def.data_json AS ezcontentclass_attribute_multilingual_data_json', - ] + 'ct.initial_language_id AS ezcontentclass_initial_language_id', + 'transl_f_def.name AS ezcontentclass_attribute_multilingual_name', + 'transl_f_def.description AS ezcontentclass_attribute_multilingual_description', + 'transl_f_def.language_id AS ezcontentclass_attribute_multilingual_language_id', + 'transl_f_def.data_text AS ezcontentclass_attribute_multilingual_data_text', + 'transl_f_def.data_json AS ezcontentclass_attribute_multilingual_data_json' ) ->from(self::FIELD_DEFINITION_TABLE, 'f_def') ->leftJoin( 'f_def', self::CONTENT_TYPE_TABLE, 'ct', - $expr->andX( + $expr->and( $expr->eq('f_def.contentclass_id', 'ct.id'), $expr->eq('f_def.version', 'ct.version') ) @@ -704,7 +709,7 @@ public function loadFieldDefinition(int $id, int $status): array 'f_def', self::MULTILINGUAL_FIELD_DEFINITION_TABLE, 'transl_f_def', - $expr->andX( + $expr->and( $expr->eq( 'f_def.id', 'transl_f_def.contentclass_attribute_id' @@ -730,7 +735,7 @@ public function loadFieldDefinition(int $id, int $status): array $stmt = $query->execute(); - return $stmt->fetchAll(FetchMode::ASSOCIATIVE); + return $stmt->fetchAllAssociative(); } public function deleteFieldDefinition( @@ -742,12 +747,12 @@ public function deleteFieldDefinition( $deleteQuery = $this->connection->createQueryBuilder(); $deleteQuery ->delete(self::MULTILINGUAL_FIELD_DEFINITION_TABLE) - ->where('contentclass_attribute_id = :field_definition_id') - ->andWhere('version = :status') + ->where(self::CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON) + ->andWhere(self::STATUS_PARAM_COMPARISON) ->setParameter('field_definition_id', $fieldDefinitionId, ParameterType::INTEGER) ->setParameter('status', $status, ParameterType::INTEGER); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); // Delete legacy Field Definition data $query = $this->connection->createQueryBuilder(); @@ -781,7 +786,7 @@ public function updateFieldDefinition( $query ->update(self::FIELD_DEFINITION_TABLE) ->where('id = :field_definition_id') - ->andWhere('version = :status') + ->andWhere(self::STATUS_PARAM_COMPARISON) ->setParameter('field_definition_id', $fieldDefinition->id, ParameterType::INTEGER) ->setParameter('status', $status, ParameterType::INTEGER); @@ -833,8 +838,8 @@ private function fieldDefinitionMultilingualDataExist( $existQuery ->select($this->dbPlatform->getCountExpression('1')) ->from(self::MULTILINGUAL_FIELD_DEFINITION_TABLE) - ->where('contentclass_attribute_id = :field_definition_id') - ->andWhere('version = :status') + ->where(self::CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON) + ->andWhere(self::STATUS_PARAM_COMPARISON) ->andWhere('language_id = :language_id') ->setParameter('field_definition_id', $fieldDefinition->id, ParameterType::INTEGER) ->setParameter('status', $status, ParameterType::INTEGER) @@ -855,8 +860,8 @@ private function updateFieldDefinitionMultilingualData( ->set('data_json', ':data_json') ->set('name', ':name') ->set('description', ':description') - ->where('contentclass_attribute_id = :field_definition_id') - ->andWhere('version = :status') + ->where(self::CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON) + ->andWhere(self::STATUS_PARAM_COMPARISON) ->andWhere('language_id = :languageId') ->setParameter('data_text', $multilingualData->dataText) ->setParameter('data_json', $multilingualData->dataJson) @@ -920,7 +925,7 @@ public function updateType(int $typeId, int $status, Type $type): void ->andWhere( $expr->eq( 'version', - $query->createNamedParameter($status, ParameterType::INTEGER, ':status') + $query->createNamedParameter($status, ParameterType::INTEGER, self::STATUS_PARAM_NAME) ) ); @@ -939,7 +944,7 @@ public function loadTypesListData(array $typeIds): array ->andWhere($query->expr()->eq('c.version', Type::STATUS_DEFINED)) ->setParameter('ids', $typeIds, Connection::PARAM_INT_ARRAY); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function loadTypesDataByFieldDefinitionIdentifier(string $identifier): array @@ -962,11 +967,11 @@ public function loadTypeData(int $typeId, int $status): array $expr = $query->expr(); $query ->where($expr->eq('c.id', ':id')) - ->andWhere($expr->eq('c.version', ':version')) + ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) ->setParameter('id', $typeId, ParameterType::INTEGER) ->setParameter('version', $status, ParameterType::INTEGER); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function loadTypeDataByIdentifier(string $identifier, int $status): array @@ -975,11 +980,11 @@ public function loadTypeDataByIdentifier(string $identifier, int $status): array $expr = $query->expr(); $query ->where($expr->eq('c.identifier', ':identifier')) - ->andWhere($expr->eq('c.version', ':version')) + ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) ->setParameter('identifier', $identifier, ParameterType::STRING) ->setParameter('version', $status, ParameterType::INTEGER); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } public function loadTypeDataByRemoteId(string $remoteId, int $status): array @@ -987,11 +992,11 @@ public function loadTypeDataByRemoteId(string $remoteId, int $status): array $query = $this->getLoadTypeQueryBuilder(); $query ->where($query->expr()->eq('c.remote_id', ':remote')) - ->andWhere($query->expr()->eq('c.version', ':version')) + ->andWhere($query->expr()->eq('c.version', self::VERSION_PARAM_NAME)) ->setParameter('remote', $remoteId, ParameterType::STRING) ->setParameter('version', $status, ParameterType::INTEGER); - return $query->execute()->fetchAll(); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -1003,68 +1008,63 @@ private function getLoadTypeQueryBuilder(): QueryBuilder $expr = $query->expr(); $query ->select( - [ - 'c.id AS ezcontentclass_id', - 'c.version AS ezcontentclass_version', - 'c.serialized_name_list AS ezcontentclass_serialized_name_list', - 'c.serialized_description_list AS ezcontentclass_serialized_description_list', - 'c.identifier AS ezcontentclass_identifier', - 'c.created AS ezcontentclass_created', - 'c.modified AS ezcontentclass_modified', - 'c.modifier_id AS ezcontentclass_modifier_id', - 'c.creator_id AS ezcontentclass_creator_id', - 'c.remote_id AS ezcontentclass_remote_id', - 'c.url_alias_name AS ezcontentclass_url_alias_name', - 'c.contentobject_name AS ezcontentclass_contentobject_name', - 'c.is_container AS ezcontentclass_is_container', - 'c.initial_language_id AS ezcontentclass_initial_language_id', - 'c.always_available AS ezcontentclass_always_available', - 'c.sort_field AS ezcontentclass_sort_field', - 'c.sort_order AS ezcontentclass_sort_order', - 'c.language_mask AS ezcontentclass_language_mask', - - 'a.id AS ezcontentclass_attribute_id', - 'a.serialized_name_list AS ezcontentclass_attribute_serialized_name_list', - 'a.serialized_description_list AS ezcontentclass_attribute_serialized_description_list', - 'a.identifier AS ezcontentclass_attribute_identifier', - 'a.category AS ezcontentclass_attribute_category', - 'a.data_type_string AS ezcontentclass_attribute_data_type_string', - 'a.can_translate AS ezcontentclass_attribute_can_translate', - 'a.is_required AS ezcontentclass_attribute_is_required', - 'a.is_information_collector AS ezcontentclass_attribute_is_information_collector', - 'a.is_searchable AS ezcontentclass_attribute_is_searchable', - 'a.is_thumbnail AS ezcontentclass_attribute_is_thumbnail', - 'a.placement AS ezcontentclass_attribute_placement', - 'a.data_float1 AS ezcontentclass_attribute_data_float1', - 'a.data_float2 AS ezcontentclass_attribute_data_float2', - 'a.data_float3 AS ezcontentclass_attribute_data_float3', - 'a.data_float4 AS ezcontentclass_attribute_data_float4', - 'a.data_int1 AS ezcontentclass_attribute_data_int1', - 'a.data_int2 AS ezcontentclass_attribute_data_int2', - 'a.data_int3 AS ezcontentclass_attribute_data_int3', - 'a.data_int4 AS ezcontentclass_attribute_data_int4', - 'a.data_text1 AS ezcontentclass_attribute_data_text1', - 'a.data_text2 AS ezcontentclass_attribute_data_text2', - 'a.data_text3 AS ezcontentclass_attribute_data_text3', - 'a.data_text4 AS ezcontentclass_attribute_data_text4', - 'a.data_text5 AS ezcontentclass_attribute_data_text5', - 'a.serialized_data_text AS ezcontentclass_attribute_serialized_data_text', - - 'g.group_id AS ezcontentclass_classgroup_group_id', - - 'ml.name AS ezcontentclass_attribute_multilingual_name', - 'ml.description AS ezcontentclass_attribute_multilingual_description', - 'ml.language_id AS ezcontentclass_attribute_multilingual_language_id', - 'ml.data_text AS ezcontentclass_attribute_multilingual_data_text', - 'ml.data_json AS ezcontentclass_attribute_multilingual_data_json', - ] + 'c.id AS ezcontentclass_id', + 'c.version AS ezcontentclass_version', + 'c.serialized_name_list AS ezcontentclass_serialized_name_list', + 'c.serialized_description_list AS ezcontentclass_serialized_description_list', + 'c.identifier AS ezcontentclass_identifier', + 'c.created AS ezcontentclass_created', + 'c.modified AS ezcontentclass_modified', + 'c.modifier_id AS ezcontentclass_modifier_id', + 'c.creator_id AS ezcontentclass_creator_id', + 'c.remote_id AS ezcontentclass_remote_id', + 'c.url_alias_name AS ezcontentclass_url_alias_name', + 'c.contentobject_name AS ezcontentclass_contentobject_name', + 'c.is_container AS ezcontentclass_is_container', + 'c.initial_language_id AS ezcontentclass_initial_language_id', + 'c.always_available AS ezcontentclass_always_available', + 'c.sort_field AS ezcontentclass_sort_field', + 'c.sort_order AS ezcontentclass_sort_order', + 'c.language_mask AS ezcontentclass_language_mask', + 'a.id AS ezcontentclass_attribute_id', + 'a.serialized_name_list AS ezcontentclass_attribute_serialized_name_list', + 'a.serialized_description_list AS ezcontentclass_attribute_serialized_description_list', + 'a.identifier AS ezcontentclass_attribute_identifier', + 'a.category AS ezcontentclass_attribute_category', + 'a.data_type_string AS ezcontentclass_attribute_data_type_string', + 'a.can_translate AS ezcontentclass_attribute_can_translate', + 'a.is_required AS ezcontentclass_attribute_is_required', + 'a.is_information_collector AS ezcontentclass_attribute_is_information_collector', + 'a.is_searchable AS ezcontentclass_attribute_is_searchable', + 'a.is_thumbnail AS ezcontentclass_attribute_is_thumbnail', + 'a.placement AS ezcontentclass_attribute_placement', + 'a.data_float1 AS ezcontentclass_attribute_data_float1', + 'a.data_float2 AS ezcontentclass_attribute_data_float2', + 'a.data_float3 AS ezcontentclass_attribute_data_float3', + 'a.data_float4 AS ezcontentclass_attribute_data_float4', + 'a.data_int1 AS ezcontentclass_attribute_data_int1', + 'a.data_int2 AS ezcontentclass_attribute_data_int2', + 'a.data_int3 AS ezcontentclass_attribute_data_int3', + 'a.data_int4 AS ezcontentclass_attribute_data_int4', + 'a.data_text1 AS ezcontentclass_attribute_data_text1', + 'a.data_text2 AS ezcontentclass_attribute_data_text2', + 'a.data_text3 AS ezcontentclass_attribute_data_text3', + 'a.data_text4 AS ezcontentclass_attribute_data_text4', + 'a.data_text5 AS ezcontentclass_attribute_data_text5', + 'a.serialized_data_text AS ezcontentclass_attribute_serialized_data_text', + 'g.group_id AS ezcontentclass_classgroup_group_id', + 'ml.name AS ezcontentclass_attribute_multilingual_name', + 'ml.description AS ezcontentclass_attribute_multilingual_description', + 'ml.language_id AS ezcontentclass_attribute_multilingual_language_id', + 'ml.data_text AS ezcontentclass_attribute_multilingual_data_text', + 'ml.data_json AS ezcontentclass_attribute_multilingual_data_json' ) ->from(self::CONTENT_TYPE_TABLE, 'c') ->leftJoin( 'c', self::FIELD_DEFINITION_TABLE, 'a', - $expr->andX( + $expr->and( $expr->eq('c.id', 'a.contentclass_id'), $expr->eq('c.version', 'a.version') ) @@ -1073,7 +1073,7 @@ private function getLoadTypeQueryBuilder(): QueryBuilder 'c', self::CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE, 'g', - $expr->andX( + $expr->and( $expr->eq('c.id', 'g.contentclass_id'), $expr->eq('c.version', 'g.contentclass_version') ) @@ -1082,7 +1082,7 @@ private function getLoadTypeQueryBuilder(): QueryBuilder 'a', self::MULTILINGUAL_FIELD_DEFINITION_TABLE, 'ml', - $expr->andX( + $expr->and( $expr->eq('a.id', 'ml.contentclass_attribute_id'), $expr->eq('a.version', 'ml.version') ) @@ -1130,7 +1130,7 @@ public function deleteFieldDefinitionsForType(int $typeId, int $status): void ->setParameter('content_type_id', $typeId, ParameterType::INTEGER) ->setParameter('status', $status, ParameterType::INTEGER); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); @@ -1166,7 +1166,7 @@ public function deleteType(int $typeId, int $status): void $query ->delete(self::CONTENT_TYPE_TABLE) ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'id', $query->createPositionalParameter($typeId, ParameterType::INTEGER) @@ -1346,7 +1346,7 @@ public function getSearchableFieldMapData(): array $statement = $query->execute($query); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function removeFieldDefinitionTranslation( @@ -1361,18 +1361,18 @@ public function removeFieldDefinitionTranslation( $deleteQuery = $this->connection->createQueryBuilder(); $deleteQuery ->delete(self::MULTILINGUAL_FIELD_DEFINITION_TABLE) - ->where('contentclass_attribute_id = :field_definition_id') - ->andWhere('version = :status') + ->where(self::CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON) + ->andWhere(self::STATUS_PARAM_COMPARISON) ->andWhere('language_id = :language_id') ->setParameter('field_definition_id', $fieldDefinitionId, ParameterType::INTEGER) ->setParameter('status', $status, ParameterType::INTEGER) ->setParameter('language_id', $languageId, ParameterType::INTEGER); - $deleteQuery->execute(); + $deleteQuery->executeStatement(); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function removeByUserAndVersion(int $userId, int $version): void { @@ -1399,7 +1399,7 @@ public function removeByUserAndVersion(int $userId, int $version): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function cleanupAssociations(): void { @@ -1410,7 +1410,7 @@ private function cleanupAssociations(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function cleanupClassAttributeTable(): void { @@ -1418,58 +1418,58 @@ private function cleanupClassAttributeTable(): void DELETE FROM ezcontentclass_attribute WHERE NOT EXISTS ( SELECT 1 FROM ezcontentclass - WHERE ezcontentclass.id = ezcontentclass_attribute.contentclass_id + WHERE ezcontentclass.id = ezcontentclass_attribute.contentclass_id AND ezcontentclass.version = ezcontentclass_attribute.version ) SQL; - $this->connection->executeUpdate($sql); + $this->connection->executeStatement($sql); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function cleanupClassAttributeMLTable(): void { $sql = <<connection->executeUpdate($sql); + $this->connection->executeStatement($sql); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function cleanupClassGroupTable(): void { $sql = <<connection->executeUpdate($sql); + $this->connection->executeStatement($sql); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function cleanupClassNameTable(): void { $sql = <<< SQL - DELETE FROM ezcontentclass_name + DELETE FROM ezcontentclass_name WHERE NOT EXISTS ( - SELECT 1 FROM ezcontentclass - WHERE ezcontentclass.id = ezcontentclass_name.contentclass_id + SELECT 1 FROM ezcontentclass + WHERE ezcontentclass.id = ezcontentclass_name.contentclass_id AND ezcontentclass.version = ezcontentclass_name.contentclass_version ) SQL; - $this->connection->executeUpdate($sql); + $this->connection->executeStatement($sql); } } diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php index 964860de56..bfa5545bd9 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Type\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content\Type; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; use Ibexa\Contracts\Core\Persistence\Content\Type\Group; diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 0230bc7f48..214e4c67b3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -46,6 +46,8 @@ final class DoctrineDatabase extends Gateway 'parent' => ParameterType::INTEGER, 'text_md5' => ParameterType::STRING, ]; + private const string ACTION_PARAMETER_NAME = ':action'; + private const string LANGUAGE_MASK_PARAMETER_NAME = ':languageMask'; private MaskGenerator $languageMaskGenerator; @@ -60,7 +62,7 @@ final class DoctrineDatabase extends Gateway private $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -91,7 +93,7 @@ public function loadAllLocationEntries(int $locationId): array ->setParameter('action', "eznode:{$locationId}", ParameterType::STRING) ->setParameter('is_original', 1, ParameterType::INTEGER); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function loadLocationEntries( @@ -152,7 +154,7 @@ public function loadLocationEntries( $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function listGlobalEntries( @@ -222,7 +224,7 @@ public function listGlobalEntries( } $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function isRootEntry(int $id): bool @@ -295,7 +297,7 @@ public function cleanupAfterPublish( ->andWhere( sprintf( 'NOT (%s)', - $expr->andX( + $expr->and( $expr->eq( 'parent', $query->createPositionalParameter($parentId, ParameterType::INTEGER) @@ -363,7 +365,7 @@ public function historizeBeforeSwap(string $action, int $languageMask): void ) ) ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'action', $query->createPositionalParameter($action, ParameterType::STRING) @@ -421,7 +423,7 @@ private function historize(int $parentId, string $textMD5, int $newId): void ) ) ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'parent', $query->createPositionalParameter($parentId, ParameterType::INTEGER) @@ -490,7 +492,7 @@ public function historizeId(int $id, int $link): void )->from( $this->connection->quoteIdentifier($this->table) )->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'is_alias', $query->createPositionalParameter(0, ParameterType::INTEGER) @@ -515,7 +517,7 @@ public function historizeId(int $id, int $link): void $statement = $query->execute(); - $rows = $statement->fetchAll(FetchMode::ASSOCIATIVE); + $rows = $statement->fetchAllAssociative(); foreach ($rows as $row) { $this->historize((int)$row['parent'], $row['text_md5'], $link); @@ -644,7 +646,7 @@ public function loadRow(int $parentId, string $textMD5): array $query->select('*')->from( $this->connection->quoteIdentifier($this->table) )->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'parent', $query->createPositionalParameter( @@ -727,7 +729,7 @@ public function loadAutogeneratedEntry(string $action, ?int $parentId = null): a )->from( $this->connection->quoteIdentifier($this->table) )->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'action', $query->createPositionalParameter($action, ParameterType::STRING) @@ -781,7 +783,7 @@ public function loadPathData(int $id): array $statement = $query->execute(); - $rows = $statement->fetchAll(FetchMode::ASSOCIATIVE); + $rows = $statement->fetchAllAssociative(); if (empty($rows)) { // Normally this should never happen $pathDataArray = []; @@ -814,7 +816,7 @@ public function loadPathDataByHierarchy(array $hierarchyData): array $hierarchyConditions = []; foreach ($hierarchyData as $levelData) { - $hierarchyConditions[] = $query->expr()->andX( + $hierarchyConditions[] = $query->expr()->and( $query->expr()->eq( 'parent', $query->createPositionalParameter( @@ -846,12 +848,12 @@ public function loadPathDataByHierarchy(array $hierarchyData): array )->from( $this->connection->quoteIdentifier($this->table) )->where( - $query->expr()->orX(...$hierarchyConditions) + $query->expr()->or(...$hierarchyConditions) ); $statement = $query->execute(); - $rows = $statement->fetchAll(FetchMode::ASSOCIATIVE); + $rows = $statement->fetchAllAssociative(); $rowsMap = []; foreach ($rows as $row) { $rowsMap[$row['action']][] = $row; @@ -875,7 +877,7 @@ public function removeCustomAlias(int $parentId, string $textMD5): bool $query->delete( $this->connection->quoteIdentifier($this->table) )->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'parent', $query->createPositionalParameter( @@ -978,7 +980,7 @@ public function loadAutogeneratedEntries(int $parentId, bool $includeHistory = f $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function getLocationContentMainLanguageId(int $locationId): int @@ -1096,16 +1098,16 @@ private function loadLocationEntriesMatchingMultipleLanguages( ->where('action = :action') // fetch rows matching any of the given Languages ->andWhere('lang_mask & :languageMask <> 0') - ->setParameter(':action', 'eznode:' . $locationId) - ->setParameter(':languageMask', $languageMask); + ->setParameter(self::ACTION_PARAMETER_NAME, 'eznode:' . $locationId) + ->setParameter(self::LANGUAGE_MASK_PARAMETER_NAME, $languageMask); $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function deleteUrlAliasesWithoutLocation(): int { @@ -1142,7 +1144,7 @@ public function deleteUrlAliasesWithoutLocation(): int sprintf('NOT EXISTS (%s)', $subQuery->getSQL()) ); - return $deleteQuery->execute(); + return $deleteQuery->executeStatement(); } public function deleteUrlAliasesWithoutParent(): int @@ -1206,7 +1208,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void ->set('link', ':linkId') ->set('parent', ':newParentId') ->where( - $expr->eq('action', ':action') + $expr->eq('action', self::ACTION_PARAMETER_NAME) ) ->andWhere( $expr->eq( @@ -1220,7 +1222,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void ->andWhere( $expr->eq('text_md5', ':textMD5') ) - ->setParameter(':action', "eznode:{$locationId}"); + ->setParameter(self::ACTION_PARAMETER_NAME, "eznode:{$locationId}"); foreach ($urlAliasesData as $urlAliasData) { if ($urlAliasData['is_original'] === 1 || !isset($originalUrlAliases[$urlAliasData['lang_mask']])) { @@ -1256,7 +1258,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function deleteUrlNopAliasesWithoutChildren(): int { @@ -1307,7 +1309,7 @@ public function deleteUrlNopAliasesWithoutChildren(): int } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function getAllChildrenAliases(int $parentId): array { @@ -1329,7 +1331,7 @@ public function getAllChildrenAliases(int $parentId): array ) ); - return $queryBuilder->execute()->fetchAll(); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } /** @@ -1416,7 +1418,7 @@ private function getUrlAliasesForLocation(int $locationId): array ) ); - return $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } /** diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php index 48b3053694..50a750121d 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; use PDOException; diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 2ada094e80..4c0480bfd8 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -168,7 +168,7 @@ public function loadUrlWildcardsData(int $offset = 0, int $limit = -1): array $stmt = $query->execute(); - return $stmt->fetchAll(FetchMode::ASSOCIATIVE); + return $stmt->fetchAllAssociative(); } public function find( diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php index 1a9d193f5a..5fcc8e1db9 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; use Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard\Query\Criterion; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php index ede1cfb16c..2a4476c24c 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php @@ -24,7 +24,7 @@ public function accepts(FilteringCriterion $criterion): bool } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php index 9ac518978c..60e47ef608 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php @@ -53,7 +53,7 @@ public function buildQueryConstraint( ); if ($criterion->matchAlwaysAvailable) { - $expr = (string)$queryBuilder->expr()->orX($expr, 'version.language_mask & 1 = 1'); + $expr = (string)$queryBuilder->expr()->or($expr, 'version.language_mask & 1 = 1'); } return $expr; diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php index 96cb3db583..7deeaed6f0 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php @@ -23,7 +23,7 @@ public function accepts(FilteringCriterion $criterion): bool } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php index 2dfc731972..0c1569c850 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php @@ -23,7 +23,7 @@ public function accepts(FilteringCriterion $criterion): bool } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php index c28381b850..a085c10e25 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php @@ -42,6 +42,6 @@ static function (string $pathString) use ($queryBuilder, $expressionBuilder): st $criterion->value ); - return (string)$expressionBuilder->orX(...$statements); + return (string)$expressionBuilder->or(...$statements); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php index 28fab968e1..4bd4c2e98d 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php @@ -38,8 +38,8 @@ public function buildQueryConstraint( ); return $criterion->value[0] === Visibility::VISIBLE - ? (string)$expressionBuilder->andX(...$columnsExpressions) - : (string)$expressionBuilder->orX(...$columnsExpressions); + ? (string)$expressionBuilder->and(...$columnsExpressions) + : (string)$expressionBuilder->or(...$columnsExpressions); } private function getVisibilityColumnsExpressions( diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php index c00e84bcc4..becec7a4d3 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php @@ -49,6 +49,6 @@ public function buildQueryConstraint( return null; } - return (string)$queryBuilder->expr()->andX(...$constraints); + return (string)$queryBuilder->expr()->and(...$constraints); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php index f2c0ebdc50..08d1385081 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php @@ -49,6 +49,6 @@ public function buildQueryConstraint( return null; } - return (string)$queryBuilder->expr()->orX(...$constraints); + return (string)$queryBuilder->expr()->or(...$constraints); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php index 86a834ca40..e17c8c48fe 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php @@ -23,7 +23,7 @@ public function accepts(FilteringCriterion $criterion): bool } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index de1aced5b1..d2d29451d3 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -10,7 +10,7 @@ use function array_filter; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\QueryBuilder; @@ -149,7 +149,7 @@ private function buildQuery( 'content', LocationGateway::CONTENT_TREE_TABLE, 'main_location', - $expressionBuilder->andX( + $expressionBuilder->and( 'content.id = main_location.contentobject_id', 'main_location.main_node_id = main_location.node_id' ) @@ -215,7 +215,7 @@ private function bulkFetchVersionNames(FilteringQueryBuilder $query): array 'content', ContentGateway::CONTENT_NAME_TABLE, 'content_name', - (string)$query->expr()->andX( + (string)$query->expr()->and( 'content.id = content_name.contentobject_id', 'version.version = content_name.content_version', 'version.language_mask & content_name.language_id > 0' @@ -226,7 +226,7 @@ private function bulkFetchVersionNames(FilteringQueryBuilder $query): array ->setFirstResult(null) ->resetQueryPart('orderBy'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } private function bulkFetchFieldValues(FilteringQueryBuilder $query): array @@ -251,7 +251,7 @@ private function bulkFetchFieldValues(FilteringQueryBuilder $query): array 'content', ContentGateway::CONTENT_FIELD_TABLE, 'content_field', - (string)$query->expr()->andX( + (string)$query->expr()->and( 'content.id = content_field.contentobject_id', 'version.version = content_field.version', 'version.language_mask & content_field.language_id = content_field.language_id' @@ -262,7 +262,7 @@ private function bulkFetchFieldValues(FilteringQueryBuilder $query): array ->setFirstResult(null) ->resetQueryPart('orderBy'); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } private function getColumns(): Traversable diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php index bf23ff3009..adf967ebdc 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php @@ -9,7 +9,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\Gateway\Location\Doctrine; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\Platforms\AbstractPlatform; use Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor; @@ -86,37 +86,32 @@ private function buildQuery(FilteringCriterion $criterion): FilteringQueryBuilde $queryBuilder = new FilteringQueryBuilder($this->connection); $queryBuilder ->select( - [ - // Location - 'location.node_id AS location_node_id', - 'location.priority AS location_priority', - 'location.is_hidden AS location_is_hidden', - 'location.is_invisible AS location_is_invisible', - 'location.remote_id AS location_remote_id', - 'location.contentobject_id AS location_contentobject_id', - 'location.parent_node_id AS location_parent_node_id', - 'location.path_identification_string AS location_path_identification_string', - 'location.path_string AS location_path_string', - 'location.depth AS location_depth', - 'location.sort_field AS location_sort_field', - 'location.sort_order AS location_sort_order', - // Main Location (nullable) - 'location.main_node_id AS content_main_location_id', - // Content Info - 'content.id AS content_id', - 'content.contentclass_id AS content_type_id', - 'content.current_version AS content_current_version', - 'content.initial_language_id AS content_initial_language_id', - 'content.language_mask AS content_language_mask', - 'content.modified AS content_modified', - 'content.name AS content_name', - 'content.owner_id AS content_owner_id', - 'content.published AS content_published', - 'content.remote_id AS content_remote_id', - 'content.section_id AS content_section_id', - 'content.status AS content_status', - 'content.is_hidden AS content_is_hidden', - ] + 'location.node_id AS location_node_id', + 'location.priority AS location_priority', + 'location.is_hidden AS location_is_hidden', + 'location.is_invisible AS location_is_invisible', + 'location.remote_id AS location_remote_id', + 'location.contentobject_id AS location_contentobject_id', + 'location.parent_node_id AS location_parent_node_id', + 'location.path_identification_string AS location_path_identification_string', + 'location.path_string AS location_path_string', + 'location.depth AS location_depth', + 'location.sort_field AS location_sort_field', + 'location.sort_order AS location_sort_order', + 'location.main_node_id AS content_main_location_id', + 'content.id AS content_id', + 'content.contentclass_id AS content_type_id', + 'content.current_version AS content_current_version', + 'content.initial_language_id AS content_initial_language_id', + 'content.language_mask AS content_language_mask', + 'content.modified AS content_modified', + 'content.name AS content_name', + 'content.owner_id AS content_owner_id', + 'content.published AS content_published', + 'content.remote_id AS content_remote_id', + 'content.section_id AS content_section_id', + 'content.status AS content_status', + 'content.is_hidden AS content_is_hidden' ) ->distinct() ->from(LocationGateway::CONTENT_TREE_TABLE, 'location') diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index 13894fa087..b2bd28a9ce 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -74,7 +74,7 @@ public function getNotificationById(int $notificationId): array $query->setParameter(':id', $notificationId, PDO::PARAM_INT); - return $query->execute()->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -148,7 +148,7 @@ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = $query->orderBy(self::COLUMN_ID, 'DESC'); $query->setParameter(':user_id', $userId, PDO::PARAM_INT); - return $query->execute()->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } /** diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php index c02d594da2..78e37c3e96 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Notification\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\Notification\CreateStruct; use Ibexa\Contracts\Core\Persistence\Notification\Notification; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php index 0a1799faec..7023aff599 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php @@ -68,11 +68,11 @@ public function loadSetting(string $group, string $identifier): ?array { $query = $this->connection->createQueryBuilder(); $query - ->select([ + ->select( $this->connection->quoteIdentifier('group'), 'identifier', 'value', - ]) + ) ->from(self::SETTING_TABLE) ->where( $query->expr()->eq( @@ -99,11 +99,11 @@ public function loadSettingById(int $id): ?array { $query = $this->connection->createQueryBuilder(); $query - ->select([ + ->select( $this->connection->quoteIdentifier('group'), 'identifier', 'value', - ]) + ) ->from(self::SETTING_TABLE) ->where( $query->expr()->eq( diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php index adbb26332e..6e65523359 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Setting\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Setting\Gateway; use PDOException; diff --git a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php index 9e043cbd27..a29de97a90 100644 --- a/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php +++ b/src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php @@ -29,7 +29,7 @@ public function __construct(Gateway $fallbackGateway, iterable $gateways) } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function buildSharedGateway(Connection $connection): Gateway { diff --git a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php index 64d3b8b615..0f12da446e 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\Persistence\Legacy\URL\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\URL\URL; @@ -26,23 +25,27 @@ class DoctrineDatabase extends Gateway { /** @internal */ - public const URL_TABLE = 'ezurl'; + public const string URL_TABLE = 'ezurl'; /** @internal */ - public const URL_LINK_TABLE = 'ezurl_object_link'; + public const string URL_LINK_TABLE = 'ezurl_object_link'; - public const COLUMN_ID = 'id'; - public const COLUMN_URL = 'url'; - public const COLUMN_ORIGINAL_URL_MD5 = 'original_url_md5'; - public const COLUMN_IS_VALID = 'is_valid'; - public const COLUMN_LAST_CHECKED = 'last_checked'; - public const COLUMN_MODIFIED = 'modified'; - public const COLUMN_CREATED = 'created'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_URL = 'url'; + public const string COLUMN_ORIGINAL_URL_MD5 = 'original_url_md5'; + public const string COLUMN_IS_VALID = 'is_valid'; + public const string COLUMN_LAST_CHECKED = 'last_checked'; + public const string COLUMN_MODIFIED = 'modified'; + public const string COLUMN_CREATED = 'created'; - public const SORT_DIRECTION_MAP = [ + /** + * @phpstan-var array + */ + public const array SORT_DIRECTION_MAP = [ SortClause::SORT_ASC => 'ASC', SortClause::SORT_DESC => 'DESC', ]; + private const string URL_TABLE_COLUMN_NAME_FORMAT = 'url.%s'; protected Connection $connection; @@ -81,7 +84,7 @@ public function find(Criterion $criterion, $offset, $limit, array $sortClauses = ->setFirstResult($offset); foreach ($sortClauses as $sortClause) { - $column = sprintf('url.%s', $sortClause->target); + $column = sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, $sortClause->target); $query->addOrderBy($column, $this->getQuerySortingDirection($sortClause->direction)); } @@ -107,7 +110,7 @@ public function findUsages($id): array 'c', ContentGateway::CONTENT_FIELD_TABLE, 'f_def', - $expr->andX( + $expr->and( 'c.id = f_def.contentobject_id', 'c.current_version = f_def.version' ) @@ -116,7 +119,7 @@ public function findUsages($id): array 'f_def', self::URL_LINK_TABLE, 'u_lnk', - $expr->andX( + $expr->and( 'f_def.id = u_lnk.contentobject_attribute_id', 'f_def.version = u_lnk.contentobject_attribute_version' ) @@ -128,7 +131,7 @@ public function findUsages($id): array ) ); - return $query->execute()->fetchAll(FetchMode::COLUMN); + return $query->executeQuery()->fetchFirstColumn(); } /** @@ -181,7 +184,7 @@ public function loadUrlData($id): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -197,7 +200,7 @@ public function loadUrlDataByUrl($url): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -238,13 +241,13 @@ private function createSelectDistinctQuery(): QueryBuilder private function getSelectColumns(): array { return [ - sprintf('url.%s', self::COLUMN_ID), - sprintf('url.%s', self::COLUMN_URL), - sprintf('url.%s', self::COLUMN_ORIGINAL_URL_MD5), - sprintf('url.%s', self::COLUMN_IS_VALID), - sprintf('url.%s', self::COLUMN_LAST_CHECKED), - sprintf('url.%s', self::COLUMN_CREATED), - sprintf('url.%s', self::COLUMN_MODIFIED), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_ID), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_URL), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_ORIGINAL_URL_MD5), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_IS_VALID), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_LAST_CHECKED), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_CREATED), + sprintf(self::URL_TABLE_COLUMN_NAME_FORMAT, self::COLUMN_MODIFIED), ]; } diff --git a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php index 69beecda84..474af8ef99 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\URL\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\URL\URL; use Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php index ea27a3b9db..ce4feeb5b1 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php @@ -55,7 +55,7 @@ protected function joinContentObjectAttribute(QueryBuilder $query): void 'u_lnk', ContentGateway::CONTENT_FIELD_TABLE, 'f_def', - $query->expr()->andX( + $query->expr()->and( 'u_lnk.contentobject_attribute_id = f_def.id', 'u_lnk.contentobject_attribute_version = f_def.version' ) diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php index 909d43d71c..c3d6a0890a 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php @@ -34,6 +34,6 @@ public function handle(CriteriaConverter $converter, QueryBuilder $queryBuilder, $subexpressions[] = $converter->convertCriteria($queryBuilder, $subCriterion); } - return $queryBuilder->expr()->andX(...$subexpressions); + return $queryBuilder->expr()->and(...$subexpressions); } } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php index 43195a1b9b..efd6d8cb36 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php @@ -37,6 +37,6 @@ public function handle( $subexpressions[] = $converter->convertCriteria($queryBuilder, $subCriterion); } - return $queryBuilder->expr()->orX(...$subexpressions); + return $queryBuilder->expr()->or(...$subexpressions); } } diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php index 3b75f458d3..25dc9c263e 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/VisibleOnly.php @@ -38,7 +38,7 @@ public function handle( 'f_def', Gateway::CONTENT_TREE_TABLE, 't', - $queryBuilder->expr()->andX( + $queryBuilder->expr()->and( 't.contentobject_id = f_def.contentobject_id', 't.contentobject_version = f_def.version' ) diff --git a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php index f0d084a8e7..a6b465939d 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\User\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\User; @@ -28,18 +27,14 @@ final class DoctrineDatabase extends Gateway { private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - - /** - * @throws \Doctrine\DBAL\DBALException - */ public function __construct(Connection $connection) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function load(int $userId): array { $query = $this->getLoadUserQueryBuilder(); @@ -51,11 +46,12 @@ public function load(int $userId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadByLogin(string $login): array { $query = $this->getLoadUserQueryBuilder(); @@ -63,7 +59,7 @@ public function loadByLogin(string $login): array $query ->where( $expr->eq( - $this->dbPlatform->getLowerExpression('u.login'), + 'LOWER(u.login)', // Index is case in-sensitive, on some db's lowercase, so we lowercase $login $query->createPositionalParameter( mb_strtolower($login, 'UTF-8'), @@ -72,9 +68,12 @@ public function loadByLogin(string $login): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadByEmail(string $email): array { $query = $this->getLoadUserQueryBuilder(); @@ -85,11 +84,12 @@ public function loadByEmail(string $email): array ) ); - $statement = $query->execute(); - - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUserByToken(string $hash): array { $query = $this->getLoadUserQueryBuilder(); @@ -116,11 +116,12 @@ public function loadUserByToken(string $hash): array ) ); - $statement = $query->execute(); - - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateUserPassword(User $user): void { $queryBuilder = $this->connection->createQueryBuilder(); @@ -141,9 +142,12 @@ public function updateUserPassword(User $user): void ) ->setParameter(':userId', $user->id, ParameterType::INTEGER); - $queryBuilder->execute(); + $queryBuilder->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct): void { $query = $this->connection->createQueryBuilder(); @@ -169,9 +173,12 @@ public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct): v $query->setParameter('time', $userTokenUpdateStruct->time, ParameterType::INTEGER); $query->setParameter('user_id', $userTokenUpdateStruct->userId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function expireUserToken(string $hash): void { $query = $this->connection->createQueryBuilder(); @@ -186,9 +193,12 @@ public function expireUserToken(string $hash): void $query->createPositionalParameter($hash, ParameterType::STRING) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function assignRole(int $contentId, int $roleId, array $limitation): void { foreach ($limitation as $identifier => $values) { @@ -216,11 +226,14 @@ public function assignRole(int $contentId, int $roleId, array $limitation): void ), ] ); - $query->execute(); + $query->executeStatement(); } } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeRole(int $contentId, int $roleId): void { $query = $this->connection->createQueryBuilder(); @@ -239,9 +252,12 @@ public function removeRole(int $contentId, int $roleId): void $query->createPositionalParameter($roleId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeRoleAssignmentById(int $roleAssignmentId): void { $query = $this->connection->createQueryBuilder(); @@ -253,7 +269,7 @@ public function removeRoleAssignmentById(int $roleAssignmentId): void $query->createPositionalParameter($roleAssignmentId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } private function getLoadUserQueryBuilder(): QueryBuilder @@ -285,6 +301,9 @@ private function getLoadUserQueryBuilder(): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function userHasToken(int $userId): bool { $query = $this->connection->createQueryBuilder(); @@ -302,6 +321,6 @@ private function userHasToken(int $userId): bool ) ); - return !empty($query->execute()->fetch(FetchMode::ASSOCIATIVE)); + return !empty($query->executeQuery()->fetchAssociative()); } } diff --git a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php index 209688081e..bde6d7fd1e 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\User\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\User; use Ibexa\Contracts\Core\Persistence\User\UserTokenUpdateStruct; use Ibexa\Core\Base\Exceptions\DatabaseException; diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index f08f5893df..03f10aaf24 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\User\Role\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\User\Policy; @@ -27,20 +26,14 @@ */ final class DoctrineDatabase extends Gateway { - private Connection $connection; + private const string POLICY_TO_LIMITATION_JOIN_CONDITION = 'l.policy_id = p.id'; + private const string LIMITATION_TO_VALUE_JOIN_CONDITION = 'v.limitation_id = l.id'; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; + private Connection $connection; - /** - * Construct from database handler. - * - * @throws \Doctrine\DBAL\DBALException - */ public function __construct(Connection $connection) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); } public function createRole(Role $role): Role @@ -132,8 +125,8 @@ private function getLoadRoleQueryBuilder(): QueryBuilder ) ->from(self::ROLE_TABLE, 'r') ->leftJoin('r', self::POLICY_TABLE, 'p', 'p.role_id = r.id') - ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', 'l.policy_id = p.id') - ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', 'v.limitation_id = l.id'); + ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', self::POLICY_TO_LIMITATION_JOIN_CONDITION) + ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', self::LIMITATION_TO_VALUE_JOIN_CONDITION); return $query; } @@ -203,7 +196,7 @@ public function loadRoleDraftByRoleId(int $roleId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadRoles(int $status = Role::STATUS_DEFINED): array @@ -215,7 +208,7 @@ public function loadRoles(int $status = Role::STATUS_DEFINED): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadRolesForContentObjects( @@ -250,8 +243,8 @@ public function loadRolesForContentObjects( ) ->leftJoin('r', self::USER_ROLE_TABLE, 'ur', 'ur.role_id = r.id') ->leftJoin('r', self::POLICY_TABLE, 'p', 'p.role_id = r.id') - ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', 'l.policy_id = p.id') - ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', 'v.limitation_id = l.id') + ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', self::POLICY_TO_LIMITATION_JOIN_CONDITION) + ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', self::LIMITATION_TO_VALUE_JOIN_CONDITION) ->where( $expr->in( 'urs.contentobject_id', @@ -259,7 +252,7 @@ public function loadRolesForContentObjects( ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function loadRoleAssignment(int $roleAssignmentId): array @@ -282,7 +275,7 @@ public function loadRoleAssignment(int $roleAssignmentId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = false): array @@ -318,7 +311,7 @@ public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = fal $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } public function loadRoleAssignmentsByRoleId(int $roleId): array @@ -341,7 +334,7 @@ public function loadRoleAssignmentsByRoleId(int $roleId): array $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } /** @@ -449,9 +442,7 @@ private function fetchUserGroups(int $userId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAll(FetchMode::COLUMN); + return $query->executeQuery()->fetchFirstColumn(); } public function updateRole(RoleUpdateStruct $role): void @@ -645,8 +636,8 @@ private function loadPolicyLimitationValues(int $policyId): array 'v.id AS ezpolicy_limitation_value_id' ) ->from(self::POLICY_TABLE, 'p') - ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', 'l.policy_id = p.id') - ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', 'v.limitation_id = l.id') + ->leftJoin('p', self::POLICY_LIMITATION_TABLE, 'l', self::POLICY_TO_LIMITATION_JOIN_CONDITION) + ->leftJoin('l', self::POLICY_LIMITATION_VALUE_TABLE, 'v', self::LIMITATION_TO_VALUE_JOIN_CONDITION) ->where( $query->expr()->eq( 'p.id', @@ -654,7 +645,7 @@ private function loadPolicyLimitationValues(int $policyId): array ) ); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } public function removePolicyLimitations(int $policyId): void @@ -716,7 +707,7 @@ private function getAncestorLocationIdsForUser(int $userId): array ) ); - $paths = $query->execute()->fetchAll(FetchMode::COLUMN); + $paths = $query->executeQuery()->fetchFirstColumn(); $nodeIds = array_unique( array_reduce( array_map( diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php index 954ec3d5dd..9612956d50 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\User\Role\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\User\Policy; use Ibexa\Contracts\Core\Persistence\User\Role; use Ibexa\Contracts\Core\Persistence\User\RoleUpdateStruct; diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php index b6dee68148..5c37b46cba 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Ibexa\Contracts\Core\Persistence\User\Policy; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler; @@ -125,7 +124,7 @@ protected function getGroupMap(array $limitIds = null): array $statement = $query->execute(); $map = []; - $groupValues = $statement->fetchAll(FetchMode::ASSOCIATIVE); + $groupValues = $statement->fetchAllAssociative(); foreach ($groupValues as $groupValue) { $map[self::STATE_GROUP . $groupValue['identifier']][] = (int)$groupValue['id']; } diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php index bae1729611..2c59e1f04a 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct; use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; @@ -83,7 +82,7 @@ public function getUserPreferenceByUserIdAndName(int $userId, string $name): arr $query->setParameter(':userId', $userId, ParameterType::INTEGER); $query->setParameter(':name', $name, ParameterType::STRING); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -105,7 +104,7 @@ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = - $query->orderBy(self::COLUMN_ID, 'ASC'); $query->setParameter(':user_id', $userId, ParameterType::INTEGER); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php index a8ec422867..e2ea588055 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php @@ -8,11 +8,11 @@ namespace Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct; +use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; use PDOException; -use RuntimeException; class ExceptionConversion extends Gateway { @@ -39,7 +39,7 @@ public function getUserPreferenceByUserIdAndName(int $userId, string $name): arr try { return $this->innerGateway->getUserPreferenceByUserIdAndName($userId, $name); } catch (DBALException | PDOException $e) { - throw new RuntimeException('Database error', 0, $e); + throw DatabaseException::wrap($e); } } @@ -51,7 +51,7 @@ public function countUserPreferences(int $userId): int try { return $this->innerGateway->countUserPreferences($userId); } catch (DBALException | PDOException $e) { - throw new RuntimeException('Database error', 0, $e); + throw DatabaseException::wrap($e); } } @@ -63,7 +63,7 @@ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = - try { return $this->innerGateway->loadUserPreferences($userId, $offset, $limit); } catch (DBALException | PDOException $e) { - throw new RuntimeException('Database error', 0, $e); + throw DatabaseException::wrap($e); } } @@ -75,7 +75,7 @@ public function setUserPreference(UserPreferenceSetStruct $setStruct): int try { return $this->innerGateway->setUserPreference($setStruct); } catch (DBALException | PDOException $e) { - throw new RuntimeException('Database error', 0, $e); + throw DatabaseException::wrap($e); } } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php index 24eda511fe..e0cb698a62 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php @@ -36,7 +36,7 @@ abstract class CriterionHandler protected $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection) { diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index ee45ec705f..a43fde2d75 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -143,7 +143,7 @@ public function handle( $fieldsInfo['column'] ); - $whereExpressions[] = $subSelect->expr()->andX( + $whereExpressions[] = $subSelect->expr()->and( $subSelect->expr()->in( 'contentclassattribute_id', $queryBuilder->createNamedParameter( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php index 727d108bd2..f16a5b914c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php @@ -32,7 +32,7 @@ abstract class FieldBase extends CriterionHandler protected LanguageHandler $languageHandler; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -124,7 +124,7 @@ protected function getFieldCondition(QueryBuilder $query, array $languageSetting $rightSide = "$rightSide + ($addToRightSide)"; } - return $expr->andX( + return $expr->and( $expr->gt( $this->dbPlatform->getBitAndComparisonExpression( 'c.language_mask', @@ -164,9 +164,9 @@ protected function getInExpressionWithFieldConditions( $expr = $subSelect->expr(); $subSelect->where( - $expr->andX( + $expr->and( 'f_def.version = c.current_version', - $expr->orX(...$fieldWhereExpressions), + $expr->or(...$fieldWhereExpressions), // pass main Query Builder to set query parameters $this->getFieldCondition($query, $languageSettings) ) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php index dc2e7859db..031b6582d6 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php @@ -122,7 +122,7 @@ public function handle( ? $subSelect->expr()->eq($fieldsInfo['column'], $filterPlaceholder) : $subSelect->expr()->neq($fieldsInfo['column'], $filterPlaceholder); - $whereExpressions[] = $subSelect->expr()->andX( + $whereExpressions[] = $subSelect->expr()->and( $subSelect->expr()->in( 'contentclassattribute_id', $queryBuilder->createNamedParameter($fieldsInfo['ids'], Connection::PARAM_INT_ARRAY) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index a5fc72dba7..72a886b8f3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -90,7 +90,7 @@ public function handle( $fieldDefinitionIds ); - return $queryBuilder->expr()->andX(...$subRequest); + return $queryBuilder->expr()->and(...$subRequest); } // Intentionally omitting break @@ -129,7 +129,7 @@ protected function buildQueryForContainsOperator( ->from(ContentGateway::CONTENT_RELATION_TABLE, 'c_rel'); $subSelect->where( - $expr->andX( + $expr->and( $expr->eq( 'c_rel.from_contentobject_version', 'c.current_version' diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php index 8025e5f90e..b155752f64 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php @@ -46,7 +46,7 @@ abstract class Handler protected $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection, TransformationProcessor $transformationProcessor) { diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php index 520f1e34b3..3af6436a43 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php @@ -58,7 +58,7 @@ public function handle( $value = isset($value) ? $value : $this->prepareLikeString($criterion->value); $quotedColumn = $column; $expr = $subQuery->expr(); - $filter = $expr->orX( + $filter = $expr->or( $expr->$singleValueExpr( $quotedColumn, $outerQuery->createNamedParameter($value, ParameterType::STRING) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index cea1b2b9f7..c553cbf8ac 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -83,7 +83,7 @@ class FullText extends CriterionHandler * @param array $configuration * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException On invalid $configuration values - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -170,11 +170,11 @@ protected function getWordIdSubquery(QueryBuilder $query, string $string): strin // Search for provided string itself as well $wordExpressions[] = $this->getWordExpression($query, $string); - $whereCondition = $subQuery->expr()->orX(...$wordExpressions); + $whereCondition = $subQuery->expr()->or(...$wordExpressions); // If stop word threshold is below 100%, make it part of $whereCondition if ($this->configuration['stopWordThresholdFactor'] < 1) { - $whereCondition = $subQuery->expr()->andX( + $whereCondition = $subQuery->expr()->and( $whereCondition, $subQuery->expr()->lt( 'object_count', diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php index 6e425e45f8..26ef386620 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php @@ -41,6 +41,6 @@ public function handle( ); } - return $queryBuilder->expr()->andX(...$subexpressions); + return $queryBuilder->expr()->and(...$subexpressions); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php index ba7897a96a..b6fc863751 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php @@ -41,6 +41,6 @@ public function handle( ); } - return $queryBuilder->expr()->orX(...$subexpressions); + return $queryBuilder->expr()->or(...$subexpressions); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index 53e8adf500..50a741349f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -179,7 +179,7 @@ public function handle( 'f_def', 'ezgmaplocation', 'map', - $expr->andX( + $expr->and( 'map.contentobject_version = f_def.version', 'map.contentobject_attribute_id = f_def.id', ...$boundingConstraints diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php index 4ef01b0d37..d3df19ddfc 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php @@ -39,7 +39,7 @@ public function handle( if (null !== $criterion->target) { $criterionTarget = (array)$criterion->target; - $constraints = $queryBuilder->expr()->andX( + $constraints = $queryBuilder->expr()->and( $queryBuilder->expr()->in( 't3.identifier', $queryBuilder->createNamedParameter( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php index 0fcde0177c..b6be1b07f7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause; @@ -18,11 +19,10 @@ abstract class SortClauseHandler { protected Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform|null */ - protected $dbPlatform; + protected AbstractPlatform $dbPlatform; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection) { @@ -68,14 +68,10 @@ public function applyJoin( /** * Returns the quoted sort column name. - * - * @param int $number - * - * @return string */ - protected function getSortColumnName($number) + protected function getSortColumnName(string $columnNameExpressions): string { - return $this->connection->quoteIdentifier('sort_column_' . $number); + return $this->connection->quoteIdentifier('sort_column_' . $columnNameExpressions); } /** diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php index c9ba29c83f..9bb5bc40f3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php @@ -26,7 +26,7 @@ public function __construct(Connection $connection, iterable $randomSortClauseGa } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ public function getGateway(): AbstractRandom diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php index d7aa888ab6..8c54a265c5 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php @@ -23,6 +23,8 @@ */ class Field extends SortClauseHandler { + private const string STR_AS_STR_FORMAT = '%s AS %s'; + /** * Language handler. */ @@ -76,26 +78,26 @@ public function applySelect( $query ->addSelect( sprintf( - '%s AS %s', + self::STR_AS_STR_FORMAT, $query->expr()->isNotNull( $this->getSortTableName($number) . '.sort_key_int' ), $column1 = $this->getSortColumnName($number . '_null') ), sprintf( - '%s AS %s', + self::STR_AS_STR_FORMAT, $query->expr()->isNotNull( $this->getSortTableName($number) . '.sort_key_string' ), $column2 = $this->getSortColumnName($number . '_bis_null') ), sprintf( - '%s AS %s', + self::STR_AS_STR_FORMAT, $this->getSortTableName($number) . '.sort_key_int', $column3 = $this->getSortColumnName($number) ), sprintf( - '%s AS %s', + self::STR_AS_STR_FORMAT, $this->getSortTableName($number) . '.sort_key_string', $column4 = $this->getSortColumnName($number . '_bis') ) @@ -131,7 +133,7 @@ public function applyJoin( 'c', Gateway::CONTENT_FIELD_TABLE, $tableAlias, - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( $query->createNamedParameter( $fieldDefinitionId, @@ -162,7 +164,7 @@ protected function getFieldCondition( return $query->expr()->gt( $this->dbPlatform->getBitAndComparisonExpression( 'c.initial_language_id', - $fieldTableName . '.language_id' + $this->getLanguageIdColumnExpressionForTable($fieldTableName) ), $query->createNamedParameter(0, ParameterType::INTEGER) ); @@ -174,13 +176,13 @@ protected function getFieldCondition( 'c.language_mask - %s', $this->dbPlatform->getBitAndComparisonExpression( 'c.language_mask', - $fieldTableName . '.language_id' + $this->getLanguageIdColumnExpressionForTable($fieldTableName) ) ), $query->createNamedParameter(1, ParameterType::INTEGER) ); $rightSide = $this->dbPlatform->getBitAndComparisonExpression( - $fieldTableName . '.language_id', + $this->getLanguageIdColumnExpressionForTable($fieldTableName), $query->createNamedParameter(1, ParameterType::INTEGER) ); @@ -195,13 +197,13 @@ protected function getFieldCondition( 'c.language_mask - %s', $this->dbPlatform->getBitAndComparisonExpression( 'c.language_mask', - $fieldTableName . '.language_id' + $this->getLanguageIdColumnExpressionForTable($fieldTableName) ) ), $query->createNamedParameter($languageId, ParameterType::INTEGER) ); $addToRightSide = $this->dbPlatform->getBitAndComparisonExpression( - $fieldTableName . '.language_id', + $this->getLanguageIdColumnExpressionForTable($fieldTableName), $query->createNamedParameter($languageId, ParameterType::INTEGER) ); @@ -223,15 +225,20 @@ protected function getFieldCondition( $rightSide = "$rightSide + ($addToRightSide)"; } - return $query->expr()->andX( + return $query->expr()->and( $query->expr()->gt( $this->dbPlatform->getBitAndComparisonExpression( 'c.language_mask', - $fieldTableName . '.language_id' + $this->getLanguageIdColumnExpressionForTable($fieldTableName) ), $query->createNamedParameter(0, ParameterType::INTEGER) ), $query->expr()->lt($leftSide, $rightSide) ); } + + private function getLanguageIdColumnExpressionForTable(string $fieldTableName): string + { + return $fieldTableName . '.language_id'; + } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php index 700fe0536d..619c65f620 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php @@ -43,8 +43,8 @@ public function applySelect( $latitudePlaceholder = $query->createNamedParameter($target->latitude); $longitudePlaceholder = $query->createNamedParameter($target->longitude); - // note: can have literal name for all visits of this Criterion because it's constant - $query->setParameter(':longitude_correction', cos(deg2rad($target->latitude)) ** 2); + // note: can have a literal name for all visits of this Criterion because it's constant + $query->setParameter('longitude_correction', cos(deg2rad($target->latitude)) ** 2); // build: (latitude1 - latitude2)^2 + (longitude2 - longitude2)^2 * longitude_correction) $latitudeSubstrExpr = "({$externalTable}.latitude - {$latitudePlaceholder})"; @@ -89,7 +89,7 @@ public function applyJoin( 'c', ContentGateway::CONTENT_FIELD_TABLE, $tableAlias, - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( $query->createNamedParameter($fieldDefinitionId, ParameterType::INTEGER), $tableAlias . '.contentclassattribute_id' @@ -109,7 +109,7 @@ public function applyJoin( $tableAlias, 'ezgmaplocation', $externalTableAlias, - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( $externalTableAlias . '.contentobject_version', $tableAlias . '.version' diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php index eff6b55752..69159cba18 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php @@ -57,6 +57,6 @@ public function handle( ); } - return $queryBuilder->expr()->orX(...$statements); + return $queryBuilder->expr()->or(...$statements); } } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php index 0f830935e8..cef42e7e6d 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php @@ -45,7 +45,7 @@ public function handle( $subSelect ->select('contentobject_id') ->from('ezcontentobject_tree') - ->where($queryBuilder->expr()->orX(...$statements)); + ->where($queryBuilder->expr()->or(...$statements)); return $queryBuilder->expr()->in( 'c.id', diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php index 84d745e291..0a54382515 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php @@ -36,7 +36,7 @@ public function handle( $subSelect = $this->connection->createQueryBuilder(); if ($criterion->value[0] === Criterion\Visibility::VISIBLE) { - $expression = $queryBuilder->expr()->andX( + $expression = $queryBuilder->expr()->and( $queryBuilder->expr()->eq( 'subquery_location.is_hidden', 0 @@ -47,7 +47,7 @@ public function handle( ) ); } else { - $expression = $queryBuilder->expr()->orX( + $expression = $queryBuilder->expr()->or( $queryBuilder->expr()->eq( 'subquery_location.is_hidden', 1 diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 446dd7f117..794bfb8424 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; @@ -49,7 +48,7 @@ final class DoctrineDatabase extends Gateway private Handler $languageHandler; /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function __construct( Connection $connection, @@ -126,7 +125,7 @@ private function getQueryCondition( array $languageFilter ) { $expr = $query->expr(); - $condition = $expr->andX( + $condition = $expr->and( $this->criteriaConverter->convertCriteria($query, $filter, $languageFilter), $expr->eq( 'c.status', @@ -140,7 +139,7 @@ private function getQueryCondition( // If not main-languages query if (!empty($languageFilter['languages'])) { - $condition = $expr->andX( + $condition = $expr->and( $condition, $expr->gt( $this->dbPlatform->getBitAndComparisonExpression( @@ -228,7 +227,7 @@ private function getContentInfoList( 'c', LocationGateway::CONTENT_TREE_TABLE, 'main_tree', - $query->expr()->andX( + $query->expr()->and( 'main_tree.contentobject_id = c.id', 'main_tree.main_node_id = main_tree.node_id' ) @@ -251,6 +250,6 @@ private function getContentInfoList( $statement = $query->execute(); - return $statement->fetchAll(FetchMode::ASSOCIATIVE); + return $statement->fetchAllAssociative(); } } diff --git a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php index b104ffcea3..e360378853 100644 --- a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Search\Legacy\Content\Gateway; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway.php b/src/lib/Search/Legacy/Content/Location/Gateway.php index 2bf572b007..bd689ad678 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway.php @@ -11,29 +11,29 @@ /** * Base class for location search gateways. + * + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ abstract class Gateway { /** * Returns total count and data for all Locations satisfying the parameters. * - * @param int $offset - * @param int $limit * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[] $sortClauses - * @param array $languageFilter - * @param bool $doCount * - * @return mixed[][] + * @phpstan-param TSearchLanguageFilter $languageFilter + * + * @return array{count: int|null, rows: list>|array{}} * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if Criterion is not applicable to its target * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException if a given Criterion Handler or Sort Clause is not implemented */ abstract public function find( CriterionInterface $criterion, - $offset, - $limit, + int $offset, + int $limit, array $sortClauses = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array; } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php index 079332158f..f078eae38f 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php @@ -36,7 +36,7 @@ public function handle( ); } - return $queryBuilder->expr()->orX(...$statements); + return $queryBuilder->expr()->or(...$statements); } public function accept(CriterionInterface $criterion): bool diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 59ab7aad38..cd7ed060a9 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -8,8 +8,8 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -21,14 +21,15 @@ /** * Location gateway implementation using the Doctrine database. + * + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ final class DoctrineDatabase extends Gateway { /** - * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run - * on 64 bit systems. + * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run on 64-bit systems. */ - public const MAX_LIMIT = 1073741824; + public const int MAX_LIMIT = 1073741824; private Connection $connection; @@ -36,19 +37,8 @@ final class DoctrineDatabase extends Gateway private SortClauseConverter $sortClauseConverter; - /** - * Language handler. - */ private Handler $languageHandler; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - - /** - * Construct from database handler. - * - * @throws \Doctrine\DBAL\DBALException - */ public function __construct( Connection $connection, CriteriaConverter $criteriaConverter, @@ -56,19 +46,23 @@ public function __construct( LanguageHandler $languageHandler ) { $this->connection = $connection; - $this->dbPlatform = $connection->getDatabasePlatform(); $this->criteriaConverter = $criteriaConverter; $this->sortClauseConverter = $sortClauseConverter; $this->languageHandler = $languageHandler; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function find( CriterionInterface $criterion, - $offset, - $limit, + int $offset, + int $limit, array $sortClauses = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array { $count = $doCount ? $this->getTotalCount($criterion, $languageFilter) : null; @@ -110,39 +104,7 @@ public function find( $this->sortClauseConverter->applyJoin($selectQuery, $sortClauses, $languageFilter); } - $selectQuery->where( - $this->criteriaConverter->convertCriteria($selectQuery, $criterion, $languageFilter), - $selectQuery->expr()->eq( - 'c.status', - //ContentInfo::STATUS_PUBLISHED - $selectQuery->createNamedParameter(1, ParameterType::INTEGER) - ), - $selectQuery->expr()->eq( - 'v.status', - //VersionInfo::STATUS_PUBLISHED - $selectQuery->createNamedParameter(1, ParameterType::INTEGER) - ), - $selectQuery->expr()->neq( - 't.depth', - $selectQuery->createNamedParameter(0, ParameterType::INTEGER) - ) - ); - - // If not main-languages query - if (!empty($languageFilter['languages'])) { - $selectQuery->andWhere( - $selectQuery->expr()->gt( - $this->dbPlatform->getBitAndComparisonExpression( - 'c.language_mask', - $selectQuery->createNamedParameter( - $this->getLanguageMask($languageFilter), - ParameterType::INTEGER - ) - ), - $selectQuery->createNamedParameter(0, ParameterType::INTEGER) - ) - ); - } + $this->addFindConstraints($selectQuery, $criterion, $languageFilter); if ($sortClauses !== null) { $this->sortClauseConverter->applyOrderBy($selectQuery); @@ -151,27 +113,28 @@ public function find( $selectQuery->setMaxResults($limit); $selectQuery->setFirstResult($offset); - $statement = $selectQuery->execute(); + $statement = $selectQuery->executeQuery(); return [ 'count' => $count, - 'rows' => $statement->fetchAll(FetchMode::ASSOCIATIVE), + 'rows' => $statement->fetchAllAssociative(), ]; } /** * Returns total results count for $criterion and $sortClauses. * - * @param array $languageFilter + * @phpstan-param TSearchLanguageFilter $languageFilter * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ private function getTotalCount(CriterionInterface $criterion, array $languageFilter): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->dbPlatform->getCountExpression('*')) + ->select('COUNT(t.node_id)') ->from('ezcontentobject_tree', 't') ->innerJoin( 't', @@ -186,49 +149,17 @@ private function getTotalCount(CriterionInterface $criterion, array $languageFil 'c.id = v.contentobject_id' ); - $query->where( - $this->criteriaConverter->convertCriteria($query, $criterion, $languageFilter), - $query->expr()->eq( - 'c.status', - //ContentInfo::STATUS_PUBLISHED - $query->createNamedParameter(1, ParameterType::INTEGER) - ), - $query->expr()->eq( - 'v.status', - //VersionInfo::STATUS_PUBLISHED - $query->createNamedParameter(1, ParameterType::INTEGER) - ), - $query->expr()->neq( - 't.depth', - $query->createNamedParameter(0, ParameterType::INTEGER) - ) - ); - - // If not main-languages query - if (!empty($languageFilter['languages'])) { - $query->andWhere( - $query->expr()->gt( - $this->dbPlatform->getBitAndComparisonExpression( - 'c.language_mask', - $query->createNamedParameter( - $this->getLanguageMask($languageFilter), - ParameterType::INTEGER - ) - ), - $query->createNamedParameter(0, ParameterType::INTEGER) - ) - ); - } + $this->addFindConstraints($query, $criterion, $languageFilter); - $statement = $query->execute(); + $statement = $query->executeQuery(); - return (int)$statement->fetchColumn(); + return (int)$statement->fetchOne(); } /** * Generates a language mask from the given $languageFilter. * - * @param array $languageFilter + * @phpstan-param TSearchLanguageFilter $languageFilter * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ @@ -253,4 +184,55 @@ private function getLanguageMask(array $languageFilter): int return $mask; } + + /** + * @phpstan-param TSearchLanguageFilter $languageFilter + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ + private function addFindConstraints( + QueryBuilder $selectQuery, + CriterionInterface $criterion, + array $languageFilter + ): void { + $selectQuery->where( + $this->criteriaConverter->convertCriteria($selectQuery, $criterion, $languageFilter), + $selectQuery->expr()->eq( + 'c.status', + //ContentInfo::STATUS_PUBLISHED + $selectQuery->createNamedParameter(1, ParameterType::INTEGER) + ), + $selectQuery->expr()->eq( + 'v.status', + //VersionInfo::STATUS_PUBLISHED + $selectQuery->createNamedParameter(1, ParameterType::INTEGER) + ), + $selectQuery->expr()->neq( + 't.depth', + $selectQuery->createNamedParameter(0, ParameterType::INTEGER) + ) + ); + + // If not main-languages query + if (!empty($languageFilter['languages'])) { + $databasePlatform = $this->connection->getDatabasePlatform(); + if (null === $databasePlatform) { + throw new \LogicException('Unable to determine DBMS'); + } + $selectQuery->andWhere( + $selectQuery->expr()->gt( + $databasePlatform->getBitAndComparisonExpression( + 'c.language_mask', + $selectQuery->createNamedParameter( + $this->getLanguageMask($languageFilter), + ParameterType::INTEGER + ) + ), + $selectQuery->createNamedParameter(0, ParameterType::INTEGER) + ) + ); + } + } } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php index 12296dad9f..37bbe723ae 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway; -use Doctrine\DBAL\DBALException; +use Doctrine\DBAL\Exception as DBALException; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Search\Legacy\Content\Location\Gateway; @@ -35,11 +35,11 @@ public function __construct(Gateway $innerGateway) public function find( CriterionInterface $criterion, - $offset = 0, - $limit = null, + int $offset, + int $limit, array $sortClauses = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array { try { return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $languageFilter, $doCount); diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php index 685c524c86..dd620bec23 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php @@ -8,7 +8,6 @@ namespace Ibexa\Core\Search\Legacy\Content\WordIndexer\Repository; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; @@ -43,7 +42,7 @@ public function getWords(array $words): array // use array_map as some DBMS-es do not cast integers to strings by default ->setParameter('words', array_map('strval', $words), Connection::PARAM_STR_ARRAY); - return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -206,7 +205,7 @@ public function getContentObjectWords(int $contentId): array ) ); - return $query->execute()->fetchAll(FetchMode::COLUMN); + return $query->executeQuery()->fetchFirstColumn(); } /** From 732935001f0c39972e7dc596cf985912e89cb8aa Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 28 Mar 2025 15:38:02 +0100 Subject: [PATCH 007/185] IBX-9811: [Tests] Upgraded tests to doctrine/dbal v3 Doctrine DBAL upgrade was a combination of: * applying `DoctrineSetList` Rector sets, * manual code style fixes of Rector changes, * manual fixes of issues found by SonarQube PHPStorm plugin, * manual fixes of issues found by PHPStan, * manual code quality improvements. --- .../Core/Repository/URLAliasServiceTest.php | 25 +- .../Persistence/DatabaseConnectionFactory.php | 13 +- .../Bookmark/Gateway/DoctrineDatabaseTest.php | 8 +- .../Content/Gateway/DoctrineDatabaseTest.php | 356 ++++++++---------- .../RandomSortClauseHandlerFactoryTest.php | 4 +- .../Language/Gateway/DoctrineDatabaseTest.php | 16 +- .../Legacy/Content/LanguageAwareTestCase.php | 7 +- .../Location/Gateway/DoctrineDatabaseTest.php | 188 +++++---- .../Gateway/DoctrineDatabaseTrashTest.php | 55 +-- .../Gateway/DoctrineDatabaseTest.php | 19 +- .../Section/Gateway/DoctrineDatabaseTest.php | 16 +- .../Type/Gateway/DoctrineDatabaseTest.php | 61 +-- .../UrlAlias/Gateway/DoctrineDatabaseTest.php | 6 +- .../Content/UrlAlias/UrlAliasHandlerTest.php | 7 +- .../Gateway/DoctrineDatabaseTest.php | 6 +- .../UrlWildcard/UrlWildcardHandlerTest.php | 18 +- .../SharedGateway/GatewayFactoryTest.php | 24 +- tests/lib/Persistence/Legacy/TestCase.php | 7 +- .../User/Gateway/DoctrineDatabaseTest.php | 8 +- .../Role/Gateway/DoctrineDatabaseTest.php | 18 +- .../Legacy/User/UserHandlerTest.php | 77 ++-- .../Gateway/DoctrineDatabaseTest.php | 3 +- tests/lib/Repository/LegacySchemaImporter.php | 8 +- .../Legacy/Content/AbstractTestCase.php | 2 +- 24 files changed, 436 insertions(+), 516 deletions(-) diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 0dfa57b488..68fc23d243 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -301,7 +301,6 @@ public function testCreateUrlAliasThrowsInvalidArgumentException(): void $locationId = $this->generateId('location', 5); - /* BEGIN: Use Case */ // $locationId is the ID of an existing location $locationService = $repository->getLocationService(); @@ -311,8 +310,7 @@ public function testCreateUrlAliasThrowsInvalidArgumentException(): void // Throws InvalidArgumentException, since this path already exists for the // language - $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Design/Plain-site', 'eng-US'); - /* END: Use Case */ + $urlAliasService->createUrlAlias($location, '/Design/Plain-site', 'eng-US'); } /** @@ -588,17 +586,14 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentException(): void $repository = $this->getRepository(); - /* BEGIN: Use Case */ $urlAliasService = $repository->getURLAliasService(); - // Throws InvalidArgumentException, since this path already exists for the - // language - $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( + // Throws InvalidArgumentException, since this path already exists for the language + $urlAliasService->createGlobalUrlAlias( 'module:content/search?SearchText=Ibexa', '/Design/Plain-site', 'eng-US' ); - /* END: Use Case */ } /** @@ -993,7 +988,7 @@ public function testLookUpThrowsNotFoundExceptionWithLanguageFilter(): void /** * Test for the lookUp() method. * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp($url, $languageCode) + * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::lookUp() */ public function testLookUpThrowsInvalidArgumentException(): void { @@ -1001,12 +996,10 @@ public function testLookUpThrowsInvalidArgumentException(): void $repository = $this->getRepository(); - /* BEGIN: Use Case */ $urlAliasService = $repository->getURLAliasService(); // Throws InvalidArgumentException - $loadedAlias = $urlAliasService->lookup(str_repeat('/1', 99), 'ger-DE'); - /* END: Use Case */ + $urlAliasService->lookup(str_repeat('/1', 99), 'ger-DE'); } /** @@ -1354,7 +1347,7 @@ static function (Connection $connection) use ($folderLocation) { $queryBuilder ->delete('ezurlalias_ml') ->where( - $expr->andX( + $expr->and( $expr->eq( 'action', $queryBuilder->createPositionalParameter( @@ -1632,20 +1625,20 @@ public function testDeleteCorruptedUrlAliases(): void $connection = $this->getRawDatabaseConnection(); $query = $connection->createQueryBuilder()->select('*')->from('ezurlalias_ml'); - $originalRows = $query->execute()->fetchAll(PDO::FETCH_ASSOC); + $originalRows = $query->executeQuery()->fetchAllAssociative(); $expectedCount = count($originalRows); $expectedCount += $this->insertBrokenUrlAliasTableFixtures($connection); // sanity check - $updatedRows = $query->execute()->fetchAll(PDO::FETCH_ASSOC); + $updatedRows = $query->executeQuery()->fetchAllAssociative(); self::assertCount($expectedCount, $updatedRows, 'Found unexpected number of new rows'); // BEGIN API use case $urlAliasService->deleteCorruptedUrlAliases(); // END API use case - $updatedRows = $query->execute()->fetchAll(PDO::FETCH_ASSOC); + $updatedRows = $query->executeQuery()->fetchAllAssociative(); self::assertCount( // API should also remove already broken pre-existing URL aliases count($originalRows) - 4, diff --git a/tests/lib/Persistence/DatabaseConnectionFactory.php b/tests/lib/Persistence/DatabaseConnectionFactory.php index dde97680e7..6e1487bfb9 100644 --- a/tests/lib/Persistence/DatabaseConnectionFactory.php +++ b/tests/lib/Persistence/DatabaseConnectionFactory.php @@ -14,11 +14,15 @@ /** * Database connection factory for integration tests. + * + * @phpstan-type TIbexaDatabasePlatform \Ibexa\DoctrineSchema\Database\DbPlatform\DbPlatformInterface & \Doctrine\DBAL\Platforms\AbstractPlatform */ class DatabaseConnectionFactory { /** * Associative array of [driver => AbstractPlatform]. + * + * @phpstan-var array */ private array $databasePlatforms; @@ -34,8 +38,7 @@ class DatabaseConnectionFactory private static ?array $connectionPool = null; /** - * @param \Ibexa\DoctrineSchema\Database\DbPlatform\DbPlatformInterface[] $databasePlatforms - * @param \Doctrine\Common\EventManager $eventManager + * @phpstan-param array $databasePlatforms */ public function __construct(iterable $databasePlatforms, EventManager $eventManager) { @@ -50,11 +53,7 @@ public function __construct(iterable $databasePlatforms, EventManager $eventMana /** * Connect to a database described by URL (a.k.a. DSN). * - * @param string $databaseURL - * - * @return \Doctrine\DBAL\Connection - * - * @throws \Doctrine\DBAL\DBALException if connection failed + * @throws \Doctrine\DBAL\Exception if connection failed */ public function createConnection(string $databaseURL): Connection { diff --git a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php index 0e48618b2a..1fed877905 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php @@ -12,7 +12,6 @@ use Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; use Ibexa\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; -use PDO; /** * @covers \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway\DoctrineDatabase::insertBookmark @@ -139,19 +138,20 @@ public function testLocationSwapped(): void /** * Return a ready to test DoctrineStorage gateway. - * - * @throws \Doctrine\DBAL\DBALException */ protected function getGateway(): Gateway { return new DoctrineDatabase($this->getDatabaseConnection()); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function loadBookmark(int $id): array { $data = $this->connection ->executeQuery('SELECT * FROM ezcontentbrowsebookmark WHERE id = :id', ['id' => $id]) - ->fetch(PDO::FETCH_ASSOC); + ->fetchAssociative(); return is_array($data) ? $data : []; } diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index 9da5955cf3..ed5df55ebb 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -44,7 +44,7 @@ public function testInsertContentObject(): void $gateway = $this->getDatabaseGateway(); $gateway->insertContentObject($struct); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'name' => 'Content name', @@ -60,22 +60,21 @@ public function testInsertContentObject(): void 'status' => ContentInfo::STATUS_DRAFT, ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() ->select( - [ - 'name', - 'contentclass_id', - 'section_id', - 'owner_id', - 'current_version', - 'initial_language_id', - 'remote_id', - 'language_mask', - 'modified', - 'published', - 'status', - ] + 'name', + 'contentclass_id', + 'section_id', + 'owner_id', + 'current_version', + 'initial_language_id', + 'remote_id', + 'language_mask', + 'modified', + 'published', + 'status' )->from('ezcontentobject') ); } @@ -170,7 +169,7 @@ public function testInsertVersion(): void $gateway = $this->getDatabaseGateway(); $gateway->insertVersion($version, []); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentobject_id' => '2342', @@ -187,19 +186,16 @@ public function testInsertVersion(): void ], ], $this->getDatabaseConnection() - ->createQueryBuilder() - ->select( - [ - 'contentobject_id', - 'created', - 'creator_id', - 'modified', - 'status', - 'workflow_event_pos', - 'version', - 'language_mask', - 'initial_language_id', - ] + ->createQueryBuilder()->select( + 'contentobject_id', + 'created', + 'creator_id', + 'modified', + 'status', + 'workflow_event_pos', + 'version', + 'language_mask', + 'initial_language_id' )->from('ezcontentobject_version') ); } @@ -221,7 +217,7 @@ public function testSetStatus(): void $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PENDING) ); - $this->assertQueryResult( + self::assertQueryResult( [[VersionInfo::STATUS_PENDING]], $this->getDatabaseConnection() ->createQueryBuilder() @@ -230,7 +226,7 @@ public function testSetStatus(): void ); // check that content status has not been set to published - $this->assertQueryResult( + self::assertQueryResult( [[VersionInfo::STATUS_DRAFT]], $this->getDatabaseConnection() ->createQueryBuilder() @@ -256,7 +252,7 @@ public function testSetStatusPublished(): void $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PUBLISHED) ); - $this->assertQueryResult( + self::assertQueryResult( [[VersionInfo::STATUS_PUBLISHED]], $this->getDatabaseConnection() ->createQueryBuilder() @@ -265,7 +261,7 @@ public function testSetStatusPublished(): void ); // check that content status has been set to published - $this->assertQueryResult( + self::assertQueryResult( [[ContentInfo::STATUS_PUBLISHED]], $this->getDatabaseConnection() ->createQueryBuilder() @@ -288,14 +284,14 @@ public function testUpdateContent(): void $gateway = $this->getDatabaseGateway(); $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $metadataStruct = $this->getMetadataUpdateStructFixture(); $gateway->updateContent(10, $metadataStruct); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'initial_language_id' => '3', @@ -358,14 +354,14 @@ public function testUpdateVersion(): void $gateway = $this->getDatabaseGateway(); $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway->updateVersion(10, 2, $this->getUpdateStructFixture()); $query = $this->getDatabaseConnection()->createQueryBuilder(); $expr = $query->expr(); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'creator_id' => '23', @@ -373,16 +369,9 @@ public function testUpdateVersion(): void 'modified' => '234567', ], ], - $query - ->select( - [ - 'creator_id', - 'initial_language_id', - 'modified', - ] - )->from('ezcontentobject_version') + $query->select('creator_id', 'initial_language_id', 'modified')->from('ezcontentobject_version') ->where( - $expr->andX( + $expr->and( $expr->eq('contentobject_id', 10), $expr->eq('version', 2) ) @@ -401,7 +390,7 @@ public function testInsertNewField(): void $gateway = $this->getDatabaseGateway(); $gateway->insertNewField($content, $field, $value); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentclassattribute_id' => '231', @@ -417,23 +406,23 @@ public function testInsertNewField(): void 'version' => '1', ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() ->select( - [ - 'contentclassattribute_id', - 'contentobject_id', - 'data_float', - 'data_int', - 'data_text', - 'data_type_string', - 'language_code', - 'language_id', - 'sort_key_int', - 'sort_key_string', - 'version', - ] - )->from('ezcontentobject_attribute') + 'contentclassattribute_id', + 'contentobject_id', + 'data_float', + 'data_int', + 'data_text', + 'data_type_string', + 'language_code', + 'language_id', + 'sort_key_int', + 'sort_key_string', + 'version' + ) + ->from('ezcontentobject_attribute') ); } @@ -450,7 +439,7 @@ public function testInsertNewAlwaysAvailableField(): void $gateway = $this->getDatabaseGateway(); $gateway->insertNewField($content, $field, $value); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentclassattribute_id' => '231', @@ -466,23 +455,23 @@ public function testInsertNewAlwaysAvailableField(): void 'version' => '1', ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() ->select( - [ - 'contentclassattribute_id', - 'contentobject_id', - 'data_float', - 'data_int', - 'data_text', - 'data_type_string', - 'language_code', - 'language_id', - 'sort_key_int', - 'sort_key_string', - 'version', - ] - )->from('ezcontentobject_attribute') + 'contentclassattribute_id', + 'contentobject_id', + 'data_float', + 'data_int', + 'data_text', + 'data_type_string', + 'language_code', + 'language_id', + 'sort_key_int', + 'sort_key_string', + 'version' + ) + ->from('ezcontentobject_attribute') ); } @@ -509,7 +498,7 @@ public function testUpdateField(): void $gateway->updateField($field, $newValue); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'data_float' => '124.42', @@ -519,16 +508,15 @@ public function testUpdateField(): void 'sort_key_string' => 'new_text', ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() ->select( - [ - 'data_float', - 'data_int', - 'data_text', - 'sort_key_int', - 'sort_key_string', - ] + 'data_float', + 'data_int', + 'data_text', + 'sort_key_int', + 'sort_key_string' )->from('ezcontentobject_attribute') ); } @@ -546,8 +534,6 @@ public function testUpdateNonTranslatableField(): void $fieldGb->id = $gateway->insertNewField($content, $fieldGb, $value); $fieldUs->id = $gateway->insertNewField($content, $fieldUs, $value); - $updateStruct = new UpdateStruct(); - $newValue = new StorageFieldValue( [ 'dataFloat' => 124.42, @@ -560,7 +546,7 @@ public function testUpdateNonTranslatableField(): void $gateway->updateNonTranslatableField($fieldGb, $newValue, $content->versionInfo->contentInfo->id); - $this->assertQueryResult( + self::assertQueryResult( [ // Both fields updated [ @@ -578,24 +564,18 @@ public function testUpdateNonTranslatableField(): void 'sort_key_string' => 'new_text', ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() - ->select( - [ - 'data_float', - 'data_int', - 'data_text', - 'sort_key_int', - 'sort_key_string', - ] - )->from('ezcontentobject_attribute') + ->select('data_float', 'data_int', 'data_text', 'sort_key_int', 'sort_key_string') + ->from('ezcontentobject_attribute') ); } public function testListVersions(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -626,7 +606,7 @@ public function testListVersions(): void public function testListVersionNumbers(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -638,7 +618,7 @@ public function testListVersionNumbers(): void public function testListVersionsForUser(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -677,7 +657,7 @@ public function testListVersionsForUser(): void public function testLoadWithAllTranslations(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -699,7 +679,7 @@ public function testLoadWithAllTranslations(): void public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -711,18 +691,13 @@ public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions $orig = include __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php'; - /*$this->storeFixture( - __DIR__ . '/../_fixtures/extract_content_from_rows_multiple_versions.php', - $res - );*/ - self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows_multiple_versions.php) and tests needs to be adapted.'); } public function testCreateFixtureForMapperExtractContentFromRows(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -731,18 +706,13 @@ public function testCreateFixtureForMapperExtractContentFromRows(): void $orig = include __DIR__ . '/../_fixtures/extract_content_from_rows.php'; - /*$this->storeFixture( - __DIR__ . '/../_fixtures/extract_content_from_rows.php', - $res - );*/ - self::assertEquals($orig, $res, 'Fixtures differ between what was previously stored(expected) and what it now generates(actual), this hints either some mistake in impl or that the fixture (../_fixtures/extract_content_from_rows.php) and tests needs to be adapted.'); } public function testLoadWithSingleTranslation(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -767,7 +737,7 @@ public function testLoadWithSingleTranslation(): void public function testLoadNonExistentTranslation(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -810,7 +780,7 @@ protected function assertValuesInRows($columnKey, array $expectedValues, array $ public function testGetAllLocationIds(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -824,7 +794,7 @@ public function testGetAllLocationIds(): void public function testGetFieldIdsByType(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -842,7 +812,7 @@ public function testGetFieldIdsByType(): void public function testGetFieldIdsByTypeWithSecondArgument(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -858,7 +828,7 @@ public function testGetFieldIdsByTypeWithSecondArgument(): void public function testDeleteRelationsTo(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -888,7 +858,7 @@ public function testDeleteRelationsTo(): void public function testDeleteRelationsFrom(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -917,7 +887,7 @@ public function testDeleteRelationsFrom(): void public function testDeleteRelationsWithSecondArgument(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -944,12 +914,12 @@ public function testDeleteRelationsWithSecondArgument(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testDeleteField(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = $this->countContentFields(); @@ -962,7 +932,7 @@ public function testDeleteField(): void $this->countContentFields() ); - $this->assertQueryResult( + self::assertQueryResult( [], $this->getDatabaseConnection()->createQueryBuilder() ->select('*') @@ -974,7 +944,7 @@ public function testDeleteField(): void public function testDeleteFields(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1000,7 +970,7 @@ public function testDeleteFields(): void public function testDeleteFieldsWithSecondArgument(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1026,7 +996,7 @@ public function testDeleteFieldsWithSecondArgument(): void public function testDeleteVersions(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1052,7 +1022,7 @@ public function testDeleteVersions(): void public function testDeleteVersionsWithSecondArgument(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1081,7 +1051,7 @@ public function testDeleteVersionsWithSecondArgument(): void public function testSetName(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -1089,18 +1059,16 @@ public function testSetName(): void $gateway->setName(14, 2, 'Hello world!', self::ENG_GB); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[self::ENG_GB, 2, 14, 4, 'Hello world!', self::ENG_GB]], $query ->select( - [ - 'content_translation', - 'content_version', - 'contentobject_id', - 'language_id', - 'name', - 'real_translation', - ] + 'content_translation', + 'content_version', + 'contentobject_id', + 'language_id', + 'name', + 'real_translation' ) ->from('ezcontentobject_name') ->where('contentobject_id = :content_id') @@ -1115,7 +1083,7 @@ public function testSetName(): void public function testDeleteNames(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1141,7 +1109,7 @@ public function testDeleteNames(): void public function testDeleteNamesWithSecondArgument(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = [ @@ -1167,7 +1135,7 @@ public function testDeleteNamesWithSecondArgument(): void public function testDeleteContent(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $beforeCount = $this->countContent(); @@ -1214,7 +1182,7 @@ public function testLoadRelationById(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testLoadRelations(): void { @@ -1348,7 +1316,7 @@ protected function insertRelationFixture() public function testGetLastVersionNumber(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -1365,7 +1333,7 @@ public function testInsertRelation(): void $gateway = $this->getDatabaseGateway(); $gateway->insertRelation($struct); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => 1, @@ -1376,18 +1344,18 @@ public function testInsertRelation(): void 'relation_type' => $struct->type, ], ], - $this->getDatabaseConnection() + $this + ->getDatabaseConnection() ->createQueryBuilder() ->select( - [ - 'id', - 'from_contentobject_id', - 'from_contentobject_version', - 'contentclassattribute_id', - 'to_contentobject_id', - 'relation_type', - ] - )->from('ezcontentobject_link') + 'id', + 'from_contentobject_id', + 'from_contentobject_version', + 'contentclassattribute_id', + 'to_contentobject_id', + 'relation_type' + ) + ->from('ezcontentobject_link') ->where('id = 1') ); } @@ -1405,7 +1373,7 @@ public function testDeleteRelation(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testDeleteRelationWithCompositeBitmask(): void { @@ -1415,10 +1383,10 @@ public function testDeleteRelationWithCompositeBitmask(): void $gateway->deleteRelation(11, RelationValue::COMMON); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [['relation_type' => RelationValue::LINK]], $query - ->select(['relation_type']) + ->select('relation_type') ->from('ezcontentobject_link') ->where( $query->expr()->eq( @@ -1430,12 +1398,12 @@ public function testDeleteRelationWithCompositeBitmask(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testUpdateAlwaysAvailableFlagRemove(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -1443,10 +1411,10 @@ public function testUpdateAlwaysAvailableFlagRemove(): void $connection = $this->getDatabaseConnection(); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [['id' => 2]], $query - ->select(['language_mask']) + ->select('language_mask') ->from('ezcontentobject') ->where( $query->expr()->eq( @@ -1457,15 +1425,15 @@ public function testUpdateAlwaysAvailableFlagRemove(): void ); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [['language_id' => 2]], $query ->select( - ['language_id'] + 'language_id' )->from( 'ezcontentobject_name' )->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter(103, ParameterType::INTEGER) @@ -1479,7 +1447,7 @@ public function testUpdateAlwaysAvailableFlagRemove(): void ); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ ['language_id' => 2], ], @@ -1487,7 +1455,7 @@ public function testUpdateAlwaysAvailableFlagRemove(): void ->select('DISTINCT language_id') ->from('ezcontentobject_attribute') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq('contentobject_id', 103), $query->expr()->eq('version', 1) ) @@ -1496,12 +1464,12 @@ public function testUpdateAlwaysAvailableFlagRemove(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testUpdateAlwaysAvailableFlagAdd(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -1510,17 +1478,17 @@ public function testUpdateAlwaysAvailableFlagAdd(): void $connection = $this->getDatabaseConnection(); $expectedLanguageId = 3; - $this->assertQueryResult( + self::assertQueryResult( [['id' => $expectedLanguageId]], $connection->createQueryBuilder() - ->select(['language_mask']) + ->select('language_mask') ->from('ezcontentobject') ->where('id = 102') ); $versionNo = 1; $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ ['language_id' => $expectedLanguageId], ], @@ -1528,7 +1496,7 @@ public function testUpdateAlwaysAvailableFlagAdd(): void ->select('language_id') ->from('ezcontentobject_name') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter($contentId, ParameterType::INTEGER) @@ -1542,7 +1510,7 @@ public function testUpdateAlwaysAvailableFlagAdd(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ ['language_id' => $expectedLanguageId], ], @@ -1550,7 +1518,7 @@ public function testUpdateAlwaysAvailableFlagAdd(): void ->select('DISTINCT language_id') ->from('ezcontentobject_attribute') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter($contentId, ParameterType::INTEGER) @@ -1565,7 +1533,7 @@ public function testUpdateAlwaysAvailableFlagAdd(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testUpdateContentAddAlwaysAvailableFlagMultilingual(): void @@ -1583,10 +1551,10 @@ public function testUpdateContentAddAlwaysAvailableFlagMultilingual(): void ); $gateway->updateContent(4, $contentMetadataUpdateStruct); - $this->assertQueryResult( + self::assertQueryResult( [['id' => 7]], $this->getDatabaseConnection()->createQueryBuilder()->select( - ['language_mask'] + 'language_mask' )->from( 'ezcontentobject' )->where( @@ -1614,7 +1582,7 @@ public function testUpdateContentAddAlwaysAvailableFlagMultilingual(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testUpdateContentRemoveAlwaysAvailableFlagMultilingual(): void @@ -1632,10 +1600,10 @@ public function testUpdateContentRemoveAlwaysAvailableFlagMultilingual(): void ); $gateway->updateContent(4, $contentMetadataUpdateStruct); - $this->assertQueryResult( + self::assertQueryResult( [['id' => 6]], $this->getDatabaseConnection()->createQueryBuilder()->select( - ['language_mask'] + 'language_mask' )->from( 'ezcontentobject' )->where( @@ -1663,12 +1631,12 @@ public function testUpdateContentRemoveAlwaysAvailableFlagMultilingual(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testLoadVersionInfo(): void { $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $gateway = $this->getDatabaseGateway(); @@ -1691,7 +1659,7 @@ public function testLoadVersionInfo(): void * * @return int * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function countContentRelations(?int $fromId = null, ?int $toId = null): int { @@ -1731,7 +1699,7 @@ protected function countContentRelations(?int $fromId = null, ?int $toId = null) * * @return int * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function countContentFields(?int $contentId = null): int { @@ -1764,7 +1732,7 @@ protected function countContentFields(?int $contentId = null): int * * @return int * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function countContentVersions(?int $contentId = null): int { @@ -1797,7 +1765,7 @@ protected function countContentVersions(?int $contentId = null): int * * @return int * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function countContentNames(?int $contentId = null): int { @@ -1830,7 +1798,7 @@ protected function countContentNames(?int $contentId = null): int * * @return int * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function countContent(?int $contentId = null): int { @@ -1920,7 +1888,7 @@ protected function getStorageValueFixture(): StorageFieldValue /** * Returns a ready to test DoctrineDatabase gateway. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getDatabaseGateway(): DoctrineDatabase { @@ -1961,7 +1929,7 @@ protected function getRelationCreateStructFixture(): RelationCreateStruct * @param int $versionNo * @param array $expectation * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ private function assertContentVersionAttributesLanguages( int $contentId, @@ -1969,13 +1937,13 @@ private function assertContentVersionAttributesLanguages( array $expectation ): void { $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( $expectation, $query ->select('DISTINCT id, language_id') ->from('ezcontentobject_attribute') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter($contentId, ParameterType::INTEGER) diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php index 610bc0ccb5..d17b6bc1cf 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php @@ -22,7 +22,7 @@ class RandomSortClauseHandlerFactoryTest extends TestCase * * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom[] $gateways * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ public function testGetGateway(array $gateways): void @@ -51,7 +51,7 @@ public function testGetGateway(array $gateways): void * * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom[] $gateways * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException */ public function testGetGatewayNotImplemented(array $gateways): void diff --git a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php index 472ed9541e..e0c882ba3f 100644 --- a/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php @@ -18,10 +18,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\Gateway\DoctrineDatabase */ - protected $databaseGateway; + protected DoctrineDatabase $databaseGateway; /** * Inserts DB fixture. @@ -41,7 +39,7 @@ public function testInsertLanguage(): void $gateway->insertLanguage($this->getLanguageFixture()); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => '8', @@ -82,7 +80,7 @@ public function testUpdateLanguage(): void $gateway->updateLanguage($language); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => '2', @@ -146,9 +144,9 @@ public function testDeleteLanguage(): void { $gateway = $this->getDatabaseGateway(); - $result = $gateway->deleteLanguage(2); + $gateway->deleteLanguage(2); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'count' => '1', @@ -159,7 +157,7 @@ public function testDeleteLanguage(): void ->from('ezcontent_language') ); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'count' => '0', @@ -175,7 +173,7 @@ public function testDeleteLanguage(): void /** * Return a ready to test DoctrineDatabase gateway. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getDatabaseGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php index e8f60789d4..e16d51593f 100644 --- a/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php +++ b/tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php @@ -20,7 +20,12 @@ */ abstract class LanguageAwareTestCase extends TestCase { - protected const ENG_GB = 'eng-GB'; + protected const string ENG_GB = 'eng-GB'; + + protected const string FIXTURE_PATH_FULL_EXAMPLE_TREE = __DIR__ . '/Location/Gateway/_fixtures/full_example_tree.php'; + protected const string FIXTURE_PATH_CONTENT_OBJECTS = __DIR__ . '/_fixtures/contentobjects.php'; + + protected const string FIXTURE_PATH_OBJECTS_STATES = __DIR__ . '/_fixtures/objectstates.php'; /** * Language handler. diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index edbbd12c5e..55bfcc766b 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -7,7 +7,6 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -15,8 +14,8 @@ use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase; -use Ibexa\Core\Search\Legacy\Content; use Ibexa\Tests\Core\Persistence\Legacy\Content\LanguageAwareTestCase; +use ReflectionObject; /** * @covers \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase @@ -66,7 +65,7 @@ private function assertLoadLocationProperties(array $locationData): void public function testLoadLocationByRemoteId(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $data = $gateway->getBasicNodeDataByRemoteId('dbc2f3c8716c12f32c379dbf0b1cb133'); @@ -75,7 +74,7 @@ public function testLoadLocationByRemoteId(): void public function testLoadLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $data = $gateway->getBasicNodeData(77); @@ -84,7 +83,7 @@ public function testLoadLocation(): void public function testLoadLocationList(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $locationsData = $gateway->getNodeDataList([77]); @@ -99,14 +98,14 @@ public function testLoadInvalidLocation(): void { $this->expectException(NotFoundException::class); - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->getBasicNodeData(1337); } public function testLoadLocationDataByContent(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); @@ -121,7 +120,7 @@ public function testLoadLocationDataByContent(): void public function testLoadParentLocationDataForDraftContentAll(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); @@ -136,7 +135,7 @@ public function testLoadParentLocationDataForDraftContentAll(): void public function testLoadLocationDataByContentLimitSubtree(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); @@ -147,7 +146,7 @@ public function testLoadLocationDataByContentLimitSubtree(): void public function testMoveSubtreePathUpdate(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->moveSubtreeNodes( [ @@ -166,7 +165,7 @@ public function testMoveSubtreePathUpdate(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [65, '/1/2/', '', 1, 1, 0, 0], [67, '/1/2/77/69/', 'solutions/products', 77, 3, 0, 0], @@ -192,7 +191,7 @@ public function testMoveSubtreePathUpdate(): void public function testMoveHiddenDestinationUpdate(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/77/'); $gateway->moveSubtreeNodes( @@ -212,7 +211,7 @@ public function testMoveHiddenDestinationUpdate(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [65, '/1/2/', '', 1, 1, 0, 0], [67, '/1/2/77/69/', 'solutions/products', 77, 3, 0, 1], @@ -238,7 +237,7 @@ public function testMoveHiddenDestinationUpdate(): void public function testMoveHiddenSourceUpdate(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/'); $gateway->moveSubtreeNodes( @@ -258,7 +257,7 @@ public function testMoveHiddenSourceUpdate(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [65, '/1/2/', '', 1, 1, 0, 0], [67, '/1/2/77/69/', 'solutions/products', 77, 3, 1, 1], @@ -284,7 +283,7 @@ public function testMoveHiddenSourceUpdate(): void public function testMoveHiddenSourceChildUpdate(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/70/'); @@ -305,7 +304,7 @@ public function testMoveHiddenSourceChildUpdate(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [65, '/1/2/', '', 1, 1, 0, 0], [67, '/1/2/77/69/', 'solutions/products', 77, 3, 0, 0], @@ -335,32 +334,30 @@ public function testMoveHiddenSourceChildUpdate(): void */ public function testMoveSubtreeAssignmentUpdate(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->updateNodeAssignment(67, 2, 77, 5); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [67, 1, 0, 53, 1, 5, 77, '9cec85d730eec7578190ee95ce5a36f5', 0, 2, 1, 0, 0], ], $query ->select( - [ - 'contentobject_id', - 'contentobject_version', - 'from_node_id', - 'id', - 'is_main', - 'op_code', - 'parent_node', - 'parent_remote_id', - 'remote_id', - 'sort_field', - 'sort_order', - 'priority', - 'is_hidden', - ] + 'contentobject_id', + 'contentobject_version', + 'from_node_id', + 'id', + 'is_main', + 'op_code', + 'parent_node', + 'parent_remote_id', + 'remote_id', + 'sort_field', + 'sort_order', + 'priority', + 'is_hidden' ) ->from('eznode_assignment') ->where($query->expr()->eq('contentobject_id', 67)) @@ -369,12 +366,12 @@ public function testMoveSubtreeAssignmentUpdate(): void public function testHideUpdateHidden(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/'); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 0, 0], [2, 0, 0], @@ -394,13 +391,13 @@ public function testHideUpdateHidden(): void */ public function testHideUnhideUpdateHidden(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/'); $gateway->unhideSubtree('/1/2/69/'); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 0, 0], [2, 0, 0], @@ -420,14 +417,14 @@ public function testHideUnhideUpdateHidden(): void */ public function testHideUnhideParentTree(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/'); $gateway->hideSubtree('/1/2/69/70/'); $gateway->unhideSubtree('/1/2/69/'); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 0, 0], [2, 0, 0], @@ -449,14 +446,14 @@ public function testHideUnhideParentTree(): void */ public function testHideUnhidePartialSubtree(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->hideSubtree('/1/2/69/'); $gateway->hideSubtree('/1/2/69/70/'); $gateway->unhideSubtree('/1/2/69/70/'); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 0, 0], [2, 0, 0], @@ -475,12 +472,12 @@ public function testHideUnhidePartialSubtree(): void public function testSwapLocations(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->swap(70, 78); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [70, 76], [78, 68], @@ -495,7 +492,7 @@ public function testSwapLocations(): void public function testCreateLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->create( new CreateStruct( @@ -512,7 +509,7 @@ public function testCreateLocation(): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [70, '/1/2/69/70/'], [77, '/1/2/77/'], @@ -565,10 +562,10 @@ public function testGetMainNodeId(): void $parentLocationData ); - $gatewayReflection = new \ReflectionObject($gateway); + $gatewayReflection = new ReflectionObject($gateway); $methodReflection = $gatewayReflection->getMethod('getMainNodeId'); $methodReflection->setAccessible(true); - self::assertEquals($mainLocation->id, $res = $methodReflection->invoke($gateway, 68)); + self::assertEquals($mainLocation->id, $methodReflection->invoke($gateway, 68)); } public static function getCreateLocationValues(): array @@ -601,7 +598,7 @@ public function testCreateLocationValues(string $field, int|string $value): void self::markTestIncomplete('Proper value setting yet unknown.'); } - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->create( new CreateStruct( @@ -623,7 +620,7 @@ public function testCreateLocationValues(string $field, int|string $value): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[$value]], $query ->select($field) @@ -660,7 +657,7 @@ public function testCreateLocationReturnValues(string $field, int|bool|string $v self::markTestIncomplete('Proper value setting yet unknown.'); } - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $location = $gateway->create( new CreateStruct( @@ -700,7 +697,7 @@ public static function getUpdateLocationData(): array */ public function testUpdateLocation(string $field, int|string $value): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->update( new Location\UpdateStruct( @@ -715,7 +712,7 @@ public function testUpdateLocation(string $field, int|string $value): void ); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[$value]], $query ->select($field) @@ -809,7 +806,7 @@ private function buildContentTreeSelectContentWithParentQuery( */ public function testCreateLocationNodeAssignmentCreation(string $field, array $expectedResult): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( new CreateStruct( @@ -828,7 +825,7 @@ public function testCreateLocationNodeAssignmentCreation(string $field, array $e DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE ); - $this->assertQueryResult( + self::assertQueryResult( [$expectedResult], $this->buildNodeAssignmentSelectContentWithParentQuery(68, 77, [$field]) ); @@ -839,7 +836,7 @@ public function testCreateLocationNodeAssignmentCreation(string $field, array $e */ public function testCreateLocationNodeAssignmentCreationMainLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( new CreateStruct( @@ -857,7 +854,7 @@ public function testCreateLocationNodeAssignmentCreationMainLocation(): void DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE ); - $this->assertQueryResult( + self::assertQueryResult( [[1]], $this->buildNodeAssignmentSelectContentWithParentQuery(68, 77, ['is_main']) ); @@ -865,7 +862,7 @@ public function testCreateLocationNodeAssignmentCreationMainLocation(): void public function testUpdateLocationsContentVersionNo(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->create( @@ -886,7 +883,7 @@ public function testUpdateLocationsContentVersionNo(): void $gateway->updateLocationsContentVersionNo(4096, 2); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [2], ], @@ -905,13 +902,13 @@ public function testUpdateLocationsContentVersionNo(): void public function testDeleteNodeAssignment(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->deleteNodeAssignment(11); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[0]], $query ->select('count(*)') @@ -924,7 +921,7 @@ public function testDeleteNodeAssignment(): void public function testDeleteNodeAssignmentWithSecondArgument(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $query = $this->getDatabaseConnection()->createQueryBuilder(); @@ -940,7 +937,7 @@ public function testDeleteNodeAssignmentWithSecondArgument(): void $gateway->deleteNodeAssignment(11, 1); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[$nodeAssignmentsCount - 1]], $query ->select('count(*)') @@ -976,10 +973,12 @@ public static function getConvertNodeAssignmentsLocationValues(): array * @depends testCreateLocationNodeAssignmentCreation * * @dataProvider getConvertNodeAssignmentsLocationValues + * + * @throws \Doctrine\DBAL\Exception */ public function testConvertNodeAssignments(string $field, string|int $value): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( @@ -1023,11 +1022,10 @@ public function testConvertNodeAssignments(string $field, string|int $value): vo ); if ($field === 'modified_subnode') { - $statement = $query->execute(); - $result = $statement->fetch(FetchMode::ASSOCIATIVE); + $result = $query->executeQuery()->fetchAllAssociative(); self::assertGreaterThanOrEqual($value, $result); } else { - $this->assertQueryResult( + self::assertQueryResult( [[$value]], $query ); @@ -1039,7 +1037,7 @@ public function testConvertNodeAssignments(string $field, string|int $value): vo */ public function testConvertNodeAssignmentsMainLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( @@ -1059,12 +1057,12 @@ public function testConvertNodeAssignmentsMainLocation(): void ] ), 77, - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); - $this->assertQueryResult( + self::assertQueryResult( [[228]], $this->buildContentTreeSelectContentWithParentQuery(68, 77, ['main_node_id']) ); @@ -1075,7 +1073,7 @@ public function testConvertNodeAssignmentsMainLocation(): void */ public function testConvertNodeAssignmentsParentHidden(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( @@ -1095,12 +1093,12 @@ public function testConvertNodeAssignmentsParentHidden(): void ] ), 224, - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); - $this->assertQueryResult( + self::assertQueryResult( [[0, 1]], $this->buildContentTreeSelectContentWithParentQuery( 68, @@ -1115,7 +1113,7 @@ public function testConvertNodeAssignmentsParentHidden(): void */ public function testConvertNodeAssignmentsParentInvisible(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( @@ -1135,12 +1133,12 @@ public function testConvertNodeAssignmentsParentInvisible(): void ] ), 225, - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); - $this->assertQueryResult( + self::assertQueryResult( [[0, 1]], $this->buildContentTreeSelectContentWithParentQuery( 68, @@ -1155,7 +1153,7 @@ public function testConvertNodeAssignmentsParentInvisible(): void */ public function testConvertNodeAssignmentsUpdateAssignment(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->createNodeAssignment( @@ -1171,12 +1169,12 @@ public function testConvertNodeAssignmentsUpdateAssignment(): void ] ), '77', - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); - $this->assertQueryResult( + self::assertQueryResult( [[DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP]], $this->buildNodeAssignmentSelectContentWithParentQuery(68, 77, ['op_code']) ); @@ -1192,7 +1190,7 @@ public function testSetSectionForSubtree(): void $gateway->setSectionForSubtree('/1/2/69/70/', 23); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[68], [69]], $query ->select('id') @@ -1206,11 +1204,11 @@ public function testSetSectionForSubtree(): void * * * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testChangeMainLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); // Create additional location and assignment for test purpose $connection = $this->getDatabaseConnection(); $query = $connection->createQueryBuilder(); @@ -1242,7 +1240,7 @@ public function testChangeMainLocation(): void ), ] ); - $query->execute(); + $query->executeStatement(); $query = $connection->createQueryBuilder(); $query @@ -1266,7 +1264,7 @@ public function testChangeMainLocation(): void ), ] ); - $query->execute(); + $query->executeStatement(); $gateway = $this->getLocationGateway(); @@ -1278,7 +1276,7 @@ public function testChangeMainLocation(): void ); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[228], [228]], $query ->select('main_node_id') @@ -1292,13 +1290,13 @@ public function testChangeMainLocation(): void ); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[1]], $query ->select('is_main') ->from('eznode_assignment') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter(10, ParameterType::INTEGER) @@ -1316,13 +1314,13 @@ public function testChangeMainLocation(): void ); $query = $connection->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[0]], $query ->select('is_main') ->from('eznode_assignment') ->where( - $query->expr()->andX( + $query->expr()->and( $query->expr()->eq( 'contentobject_id', $query->createPositionalParameter(10, ParameterType::INTEGER) @@ -1345,7 +1343,7 @@ public function testChangeMainLocation(): void */ public function testGetChildren(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $childrenRows = $gateway->getChildren(213); @@ -1358,11 +1356,11 @@ public function testGetChildren(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testGetFallbackMainNodeData(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); // Create additional location for test purpose $connection = $this->getDatabaseConnection(); $query = $connection->createQueryBuilder(); @@ -1409,7 +1407,7 @@ public function testGetFallbackMainNodeData(): void */ public function testRemoveLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->removeLocation(13); @@ -1442,13 +1440,13 @@ public function testUpdatePathIdentificationString( string $text, string $expected ): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->updatePathIdentificationString($locationId, $parentLocationId, $text); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[$expected]], $query->select( 'path_identification_string' diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php index b0ab11a0f4..15f194686a 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php @@ -19,6 +19,9 @@ */ class DoctrineDatabaseTrashTest extends LanguageAwareTestCase { + /** + * @throws \Doctrine\DBAL\Exception + */ protected function getLocationGateway(): DoctrineDatabase { return new DoctrineDatabase( @@ -34,12 +37,12 @@ protected function getLocationGateway(): DoctrineDatabase */ public function testTrashLocation(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 0], [2, 0], @@ -55,12 +58,12 @@ public function testTrashLocation(): void public function testTrashLocationUpdateTrashTable(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [71, '/1/2/69/70/71/'], ], @@ -95,14 +98,14 @@ public static function getUntrashedLocationValues(): array */ public function testUntrashLocationDefault(string $property, int|string $value): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); $handler->untrashLocation(71); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [[$value]], $query ->select($property) @@ -113,14 +116,14 @@ public function testUntrashLocationDefault(string $property, int|string $value): public function testUntrashLocationNewParent(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); $handler->untrashLocation(71, 1); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [['228', '1', '/1/228/']], $query ->select('node_id', 'parent_node_id', 'path_string') @@ -133,7 +136,7 @@ public function testUntrashInvalidLocation(): void { $this->expectException(NotFoundException::class); - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->untrashLocation(23); @@ -143,7 +146,7 @@ public function testUntrashLocationInvalidParent(): void { $this->expectException(NotFoundException::class); - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); @@ -154,7 +157,7 @@ public function testUntrashLocationInvalidOldParent(): void { $this->expectException(NotFoundException::class); - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); $handler->trashLocation(70); @@ -188,7 +191,7 @@ public static function getLoadTrashValues(): array */ public function testLoadTrashByLocationId(string $field, int|string $value): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $handler->trashLocation(71); @@ -203,7 +206,7 @@ public function testLoadTrashByLocationId(string $field, int|string $value): voi public function testCountTrashed(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); self::assertEquals( @@ -221,7 +224,7 @@ public function testCountTrashed(): void public function testListEmptyTrash(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); self::assertEquals( @@ -245,7 +248,7 @@ protected function trashSubtree() public function testListFullTrash(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); @@ -257,7 +260,7 @@ public function testListFullTrash(): void public function testListTrashLimited(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); @@ -293,7 +296,7 @@ public static function getTrashValues(): array */ public function testListTrashItem(string $key, int|string $value): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); @@ -303,7 +306,7 @@ public function testListTrashItem(string $key, int|string $value): void public function testListTrashSortedPathStringDesc(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); @@ -322,7 +325,7 @@ public function testListTrashSortedPathStringDesc(): void static function (array $trashItem) { return $trashItem['path_string']; }, - $trashList = $handler->listTrashed( + $handler->listTrashed( 0, null, [ @@ -335,7 +338,7 @@ static function (array $trashItem) { public function testListTrashSortedDepth(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); @@ -354,7 +357,7 @@ public function testListTrashSortedDepth(): void static function (array $trashItem) { return $trashItem['path_string']; }, - $trashList = $handler->listTrashed( + $handler->listTrashed( 0, null, [ @@ -368,13 +371,13 @@ static function (array $trashItem) { public function testCleanupTrash(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); $handler->cleanupTrash(); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [], $query ->select('*') @@ -384,13 +387,13 @@ public function testCleanupTrash(): void public function testRemoveElementFromTrash(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); $this->trashSubtree(); $handler->removeElementFromTrash(71); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [], $query ->select('*') @@ -401,7 +404,7 @@ public function testRemoveElementFromTrash(): void public function testCountLocationsByContentId(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php'); + $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $handler = $this->getLocationGateway(); self::assertSame(0, $handler->countLocationsByContentId(123456789)); diff --git a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php index dd48f79f93..2161694de5 100644 --- a/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php @@ -19,17 +19,8 @@ class DoctrineDatabaseTest extends LanguageAwareTestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway\DoctrineDatabase - */ - protected $databaseGateway; - - /** - * Language mask generator. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator */ - protected $languageMaskGenerator; + protected DoctrineDatabase $databaseGateway; /** * Inserts DB fixture. @@ -39,11 +30,11 @@ protected function setUp(): void parent::setUp(); $this->insertDatabaseFixture( - __DIR__ . '/../../_fixtures/contentobjects.php' + self::FIXTURE_PATH_CONTENT_OBJECTS ); $this->insertDatabaseFixture( - __DIR__ . '/../../_fixtures/objectstates.php' + self::FIXTURE_PATH_OBJECTS_STATES ); } @@ -394,7 +385,7 @@ public function testSetContentState(): void $gateway->setContentState(42, 2, 2); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentobject_id' => 42, @@ -505,7 +496,7 @@ protected function getObjectStateGroupFixture(): Group /** * Returns a ready to test DoctrineDatabase gateway. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getDatabaseGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php index 11a651531b..1f945a5690 100644 --- a/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php @@ -18,10 +18,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase */ - protected $databaseGateway; + protected DoctrineDatabase $databaseGateway; /** * Inserts DB fixture. @@ -42,7 +40,7 @@ public function testInsertSection(): void $gateway->insertSection('New Section', 'new_section'); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => '7', @@ -69,7 +67,7 @@ public function testUpdateSection(): void $gateway->updateSection(2, 'New Section', 'new_section'); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => '2', @@ -208,7 +206,7 @@ public function testDeleteSection(): void $gateway->deleteSection(2); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'count' => '5', @@ -219,7 +217,7 @@ public function testDeleteSection(): void ->from('ezsection') ); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'count' => '0', @@ -245,7 +243,7 @@ public function testAssignSectionToContent(): void $beforeCount = $gateway->countContentObjectsInSection(4); - $result = $gateway->assignSectionToContent(4, 10); + $gateway->assignSectionToContent(4, 10); self::assertSame( $beforeCount + 1, @@ -258,7 +256,7 @@ public function testAssignSectionToContent(): void * * @return \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway\DoctrineDatabase * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getDatabaseGateway(): Gateway { diff --git a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php index 27564a6e5f..51b399681a 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php @@ -25,10 +25,8 @@ class DoctrineDatabaseTest extends LanguageAwareTestCase { /** * The DoctrineDatabase gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway\DoctrineDatabase */ - protected $gateway; + protected DoctrineDatabase $gateway; protected function setUp(): void { @@ -37,6 +35,9 @@ protected function setUp(): void $this->insertDatabaseFixture(__DIR__ . '/_fixtures/languages.php'); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testInsertGroup(): void { $gateway = $this->getGateway(); @@ -45,10 +46,10 @@ public function testInsertGroup(): void $id = $gateway->insertGroup($group); - $this->assertQueryResult( + self::assertQueryResult( [ [ - 'id' => '1', + 'id' => $id, 'created' => '1032009743', 'creator_id' => '14', 'modified' => '1033922120', @@ -105,9 +106,9 @@ public function testUpdateGroup(): void $struct = $this->getGroupUpdateStructFixture(); - $res = $gateway->updateGroup($struct); + $gateway->updateGroup($struct); - $this->assertQueryResult( + self::assertQueryResult( [ ['4'], ], @@ -128,7 +129,7 @@ public function testUpdateGroup(): void ) ->from('ezcontentclassgroup') ->orderBy('id'); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => 1, @@ -238,7 +239,7 @@ public function testDeleteGroup(): void $gateway->deleteGroup(2); - $this->assertQueryResult( + self::assertQueryResult( [ ['1'], ['3'], @@ -447,7 +448,7 @@ public function testInsertType(string $column, int|string $expectation): void $gateway->insertType($type); - $this->assertQueryResult( + self::assertQueryResult( [[$expectation]], $this->getDatabaseConnection()->createQueryBuilder() ->select($column) @@ -481,7 +482,7 @@ public function testInsertTypeContentClassName(string $column, array $expectatio $gateway->insertType($type); - $this->assertQueryResult( + self::assertQueryResult( array_map( static function ($value): array { return [$value]; @@ -543,7 +544,7 @@ public function testInsertFieldDefinition(): void $gateway->insertFieldDefinition(23, 1, $field, $storageField); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentclass_id' => '23', @@ -682,7 +683,7 @@ public function testDeleteFieldDefinition(): void $gateway->deleteFieldDefinition(1, 0, 119); - $this->assertQueryResult( + self::assertQueryResult( [[5]], $this->getDatabaseConnection()->createQueryBuilder() ->select('COUNT(*)') @@ -702,7 +703,7 @@ public function testUpdateFieldDefinition(): void $gateway = $this->getGateway(); $gateway->updateFieldDefinition(2, 0, $fieldDefinitionFixture, $storageFieldDefinitionFixture); - $this->assertQueryResult( + self::assertQueryResult( [ // "random" sample [ @@ -772,7 +773,7 @@ public function testInsertGroupAssignment(): void $gateway->insertGroupAssignment(3, 42, 1); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentclass_id' => '42', @@ -801,7 +802,7 @@ public function testDeleteGroupAssignment(): void $gateway->deleteGroupAssignment(1, 1, 0); - $this->assertQueryResult( + self::assertQueryResult( [['1']], $this->getDatabaseConnection()->createQueryBuilder() ->select( @@ -826,7 +827,7 @@ public function testUpdateType(string $fieldName, string $expectedValue): void $gateway->updateType(1, 0, $type); - $this->assertQueryResult( + self::assertQueryResult( [ [ $fieldName => $expectedValue, @@ -853,7 +854,7 @@ public function testUpdateTypeName(): void $gateway->updateType(1, 0, $type); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentclass_id' => 1, @@ -987,7 +988,7 @@ public function testDeleteFieldDefinitionsForTypeExisting(): void ) ); // 1 left with version 1 - $this->assertQueryResult( + self::assertQueryResult( [[1]], $countAffectedAttr ); @@ -996,7 +997,7 @@ public function testDeleteFieldDefinitionsForTypeExisting(): void $countNotAffectedAttr->select('COUNT(*)') ->from('ezcontentclass_attribute'); - $this->assertQueryResult( + self::assertQueryResult( [[2]], $countNotAffectedAttr ); @@ -1016,7 +1017,7 @@ public function testDeleteFieldDefinitionsForTypeNotExisting(): void $countNotAffectedAttr->select('COUNT(*)') ->from('ezcontentclass_attribute'); - $this->assertQueryResult( + self::assertQueryResult( [[5]], $countNotAffectedAttr ); @@ -1036,7 +1037,7 @@ public function testDeleteGroupAssignmentsForTypeExisting(): void $countAffectedAttr->select('COUNT(*)') ->from('ezcontentclass_classgroup'); - $this->assertQueryResult( + self::assertQueryResult( [[2]], $countAffectedAttr ); @@ -1056,7 +1057,7 @@ public function testDeleteGroupAssignmentsForTypeNotExisting(): void $countAffectedAttr->select('COUNT(*)') ->from('ezcontentclass_classgroup'); - $this->assertQueryResult( + self::assertQueryResult( [[3]], $countAffectedAttr ); @@ -1076,7 +1077,7 @@ public function testDeleteTypeExisting(): void $countAffectedAttr->select('COUNT(*)') ->from('ezcontentclass'); - $this->assertQueryResult( + self::assertQueryResult( [[1]], $countAffectedAttr ); @@ -1096,7 +1097,7 @@ public function testDeleteTypeNotExisting(): void $countAffectedAttr->select('COUNT(*)') ->from('ezcontentclass'); - $this->assertQueryResult( + self::assertQueryResult( [[2]], $countAffectedAttr ); @@ -1111,7 +1112,7 @@ public function testPublishTypeAndFields(): void $gateway = $this->getGateway(); $gateway->publishTypeAndFields(1, 1, 0); - $this->assertQueryResult( + self::assertQueryResult( [[1]], $this->getDatabaseConnection()->createQueryBuilder() ->select('COUNT( * )') @@ -1119,7 +1120,7 @@ public function testPublishTypeAndFields(): void ->where('id = 1 AND version = 0') ); - $this->assertQueryResult( + self::assertQueryResult( [[2]], $this->getDatabaseConnection()->createQueryBuilder() ->select('COUNT( * )') @@ -1127,7 +1128,7 @@ public function testPublishTypeAndFields(): void ->where('contentclass_id = 1 AND contentclass_version = 0') ); - $this->assertQueryResult( + self::assertQueryResult( [[3]], $this->getDatabaseConnection()->createQueryBuilder() ->select('COUNT( * )') @@ -1135,7 +1136,7 @@ public function testPublishTypeAndFields(): void ->where('contentclass_id = 1 AND version = 0') ); - $this->assertQueryResult( + self::assertQueryResult( [[1]], $this->getDatabaseConnection()->createQueryBuilder() ->select('COUNT( * )') @@ -1147,7 +1148,7 @@ public function testPublishTypeAndFields(): void /** * Return the DoctrineDatabase gateway to test. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php index ffa338c01e..1d5ee10edc 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php @@ -23,10 +23,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway */ - protected $gateway; + protected DoctrineDatabase $gateway; /** * Test for the loadUrlAliasData() method. @@ -495,7 +493,7 @@ public function testArchiveUrlAliasesForDeletedTranslations(int $locationId, arr /** * Return the DoctrineDatabase gateway implementation to test. * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php index 21d4aac118..6778f5037a 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php @@ -28,7 +28,6 @@ use Ibexa\Core\Persistence\TransformationProcessor\DefinitionBased\Parser; use Ibexa\Core\Persistence\TransformationProcessor\PcreCompiler; use Ibexa\Core\Persistence\Utf8Converter; -use Ibexa\Core\Search\Legacy\Content; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; use PHPUnit\Framework\MockObject\MockObject; @@ -2831,7 +2830,7 @@ public function testLocationMovedReparentSubtreeHistory(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException @@ -5377,7 +5376,7 @@ protected function getPartlyMockedHandler(array $methods): MockObject /** * @return \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Handler * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getHandler(): Handler { @@ -5411,7 +5410,7 @@ protected function getHandler(): Handler } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getLanguageHandler(): LanguageHandler { diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php index 5ec43d3f70..fc2c97b402 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php @@ -21,10 +21,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\DoctrineDatabase */ - protected $gateway; + protected DoctrineDatabase $gateway; protected $fixtureData = [ 0 => [ @@ -164,8 +162,6 @@ public function testDeleteUrlWildcard(): void /** * Return the DoctrineDatabase gateway to test. - * - * @throws \Doctrine\DBAL\DBALException */ protected function getGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php index a551c69bb8..cee9842ee2 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php @@ -22,6 +22,12 @@ */ class UrlWildcardHandlerTest extends TestCase { + protected DoctrineDatabase $gateway; + + protected Mapper $mapper; + + protected UrlWildcard\Handler $urlWildcardHandler; + public function testLoad(): void { $this->insertDatabaseFixture(__DIR__ . '/Gateway/_fixtures/urlwildcards.php'); @@ -218,18 +224,6 @@ public function testLoadAllWithOffsetAndLimit(): void ], ]; - /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\DoctrineDatabase */ - protected $gateway; - - /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Mapper */ - protected $mapper; - - /** @var \Ibexa\Contracts\Core\Persistence\Content\UrlWildcard\Handler */ - protected $urlWildcardHandler; - - /** - * @throws \Doctrine\DBAL\DBALException - */ protected function getHandler(): UrlWildcard\Handler { if (!isset($this->urlWildcardHandler)) { diff --git a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php index dce138ecea..34476301df 100644 --- a/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php +++ b/tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php @@ -24,9 +24,6 @@ final class GatewayFactoryTest extends TestCase /** @var \Ibexa\Core\Persistence\Legacy\SharedGateway\GatewayFactory */ private GatewayFactory $factory; - /** - * @throws \Doctrine\DBAL\DBALException - */ public function setUp(): void { $gateways = [ @@ -42,10 +39,9 @@ public function setUp(): void /** * @dataProvider getTestBuildSharedGatewayData * - * @param \Doctrine\DBAL\Connection $connectionMock - * @param string $expectedInstance + * @phpstan-param class-string $expectedInstance * - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testBuildSharedGateway( Connection $connectionMock, @@ -58,24 +54,26 @@ public function testBuildSharedGateway( } /** - * @return \Doctrine\DBAL\Connection[]|\PHPUnit\Framework\MockObject\MockObject[]|\Traversable + * @phpstan-return \Traversable< + * array{ + * \Doctrine\DBAL\Connection & \PHPUnit\Framework\MockObject\MockObject, + * class-string + * } + * > */ public function getTestBuildSharedGatewayData(): Traversable { $databasePlatformGatewayPairs = [ [new Platforms\SqlitePlatform(), SqliteGateway::class], [new Platforms\MySQL80Platform(), FallbackGateway::class], - [new Platforms\MySqlPlatform(), FallbackGateway::class], - [new Platforms\PostgreSqlPlatform(), FallbackGateway::class], + [new Platforms\MySQLPlatform(), FallbackGateway::class], + [new Platforms\PostgreSQLPlatform(), FallbackGateway::class], ]; foreach ($databasePlatformGatewayPairs as $databasePlatformGatewayPair) { [$databasePlatform, $sharedGateway] = $databasePlatformGatewayPair; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform $databasePlatform */ - $connectionMock = $this - ->createMock(Connection::class); + $connectionMock = $this->createMock(Connection::class); $connectionMock - ->expects(self::any()) ->method('getDatabasePlatform') ->willReturn($databasePlatform); diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index 1ba1246df5..f6566e5df1 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -10,8 +10,7 @@ use Doctrine\Common\EventManager as DoctrineEventManager; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ConnectionException; -use Doctrine\DBAL\DBALException; -use Doctrine\DBAL\FetchMode; +use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Test\Persistence\Fixture\FileFixtureFactory; use Ibexa\Contracts\Core\Test\Persistence\Fixture\FixtureImporter; @@ -106,7 +105,7 @@ final public function getDatabaseConnection(): Connection } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ final public function getSharedGateway(): Gateway { @@ -223,7 +222,7 @@ public static function assertQueryResult( QueryBuilder $query, string $message = '' ): void { - $result = $query->execute()->fetchAll(FetchMode::ASSOCIATIVE); + $result = $query->executeQuery()->fetchAllAssociative(); self::assertEquals( self::getResultTextRepresentation($expectation), diff --git a/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php index 50f57fe477..09a808f63c 100644 --- a/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php @@ -19,10 +19,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Gateway\DoctrineDatabase */ - protected $databaseGateway; + protected DoctrineDatabase $databaseGateway; /** * Inserts DB fixture. @@ -43,7 +41,7 @@ public function testRemoveRoleByAssignmentId(): void $gateway->removeRoleAssignmentById(38); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'contentobject_id' => '11', @@ -81,8 +79,6 @@ public function testRemoveRoleByAssignmentId(): void /** * Returns a ready to test DoctrineDatabase gateway. - * - * @throws \Doctrine\DBAL\DBALException */ protected function getDatabaseGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php index 4b4c1a38b8..37e59a4099 100644 --- a/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php @@ -20,10 +20,8 @@ class DoctrineDatabaseTest extends TestCase { /** * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\User\Role\Gateway\DoctrineDatabase */ - protected $databaseGateway; + protected DoctrineDatabase $databaseGateway; /** * Inserts DB fixture. @@ -40,7 +38,7 @@ protected function setUp(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testCreateRole(): void { @@ -53,7 +51,7 @@ public function testCreateRole(): void $gateway->createRole($spiRole); $query = $this->getDatabaseConnection()->createQueryBuilder(); - $this->assertQueryResult( + self::assertQueryResult( [ [ 'id' => '6', @@ -74,7 +72,7 @@ public function testCreateRole(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testLoadRoleAssignment(): void { @@ -95,7 +93,7 @@ public function testLoadRoleAssignment(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testLoadRoleAssignmentsByGroupId(): void { @@ -130,7 +128,7 @@ public function testLoadRoleAssignmentsByGroupId(): void } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ public function testLoadRoleAssignmentsByRoleId(): void { @@ -194,10 +192,6 @@ public function testLoadRoleAssignmentsByRoleIdWithOffsetAndLimit(): void /** * Returns a ready to test DoctrineDatabase gateway. - * - * @return \Ibexa\Core\Persistence\Legacy\User\Role\Gateway\DoctrineDatabase - * - * @throws \Doctrine\DBAL\DBALException */ protected function getDatabaseGateway(): DoctrineDatabase { diff --git a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php index 4e1fe6f1b3..a4c0787774 100644 --- a/tests/lib/Persistence/Legacy/User/UserHandlerTest.php +++ b/tests/lib/Persistence/Legacy/User/UserHandlerTest.php @@ -27,11 +27,8 @@ */ class UserHandlerTest extends TestCase { - private const TEST_USER_ID = 42; + private const int TEST_USER_ID = 42; - /** - * @throws \Doctrine\DBAL\DBALException - */ protected function getUserHandler(User\Gateway $userGateway = null): Handler { $connection = $this->getDatabaseConnection(); @@ -291,21 +288,17 @@ public function testUpdateUserToken(): void $handler->updateUserToken($this->getValidUserToken(1234567890)); - $this->assertQueryResult( + self::assertQueryResult( [['0800fc577294c34e0b28ad2839435945', 1, 1234567890, self::TEST_USER_ID]], - $this->getDatabaseConnection()->createQueryBuilder()->select( - ['hash_key', 'id', 'time', 'user_id'] - )->from('ezuser_accountkey'), + $this->getDatabaseConnection()->createQueryBuilder()->select('hash_key', 'id', 'time', 'user_id')->from('ezuser_accountkey'), 'Expected user data to be updated.' ); $handler->updateUserToken($this->getValidUserToken(2234567890)); - $this->assertQueryResult( + self::assertQueryResult( [['0800fc577294c34e0b28ad2839435945', 1, 2234567890, self::TEST_USER_ID]], - $this->getDatabaseConnection()->createQueryBuilder()->select( - ['hash_key', 'id', 'time', 'user_id'] - )->from('ezuser_accountkey'), + $this->getDatabaseConnection()->createQueryBuilder()->select('hash_key', 'id', 'time', 'user_id')->from('ezuser_accountkey'), 'Expected user token data to be updated.' ); } @@ -316,21 +309,17 @@ public function testExpireUserToken(): void $handler->updateUserToken($userToken = $this->getValidUserToken(1234567890)); - $this->assertQueryResult( + self::assertQueryResult( [['0800fc577294c34e0b28ad2839435945', 1, 1234567890, self::TEST_USER_ID]], - $this->getDatabaseConnection()->createQueryBuilder()->select( - ['hash_key', 'id', 'time', 'user_id'] - )->from('ezuser_accountkey'), + $this->getDatabaseConnection()->createQueryBuilder()->select('hash_key', 'id', 'time', 'user_id')->from('ezuser_accountkey'), 'Expected user data to be updated.' ); $handler->expireUserToken($userToken->hashKey); - $this->assertQueryResult( + self::assertQueryResult( [['0800fc577294c34e0b28ad2839435945', 1, 0, self::TEST_USER_ID]], - $this->getDatabaseConnection()->createQueryBuilder()->select( - ['hash_key', 'id', 'time', 'user_id'] - )->from('ezuser_accountkey'), + $this->getDatabaseConnection()->createQueryBuilder()->select('hash_key', 'id', 'time', 'user_id')->from('ezuser_accountkey'), 'Expected user token to be expired.' ); } @@ -372,7 +361,7 @@ public function testCreateNewRoleWithoutPolicies(): void $handler->createRole($createStruct); - $this->assertQueryResult( + self::assertQueryResult( [[1, 'Test', -1]], $this->getDatabaseConnection()->createQueryBuilder()->select('id', 'name', 'version')->from('ezrole'), 'Expected a new role draft.' @@ -392,7 +381,7 @@ public function testCreateRoleDraftWithoutPolicies(): void $handler->createRoleDraft($roleDraft->id); $publishedRoleId = 1; - $this->assertQueryResult( + self::assertQueryResult( [ [$publishedRoleId, 'Test', APIRole::STATUS_DEFINED], [2, 'Test', $publishedRoleId], @@ -573,7 +562,7 @@ public function testUpdateRole(): void $handler->updateRole($update); - $this->assertQueryResult( + self::assertQueryResult( [[1, 'Changed']], $this->getDatabaseConnection()->createQueryBuilder()->select('id', 'name')->from('ezrole'), 'Expected a changed role.' @@ -588,19 +577,19 @@ public function testDeleteRole(): void // 3 is the ID of Editor role $handler->deleteRole(3); - $this->assertQueryResult( + self::assertQueryResult( [], $this->getDatabaseConnection()->createQueryBuilder()->select('id')->from('ezrole')->where('id = 3'), 'Expected an empty set.' ); - $this->assertQueryResult( + self::assertQueryResult( [], $this->getDatabaseConnection()->createQueryBuilder()->select('role_id')->from('ezpolicy')->where('role_id = 3'), 'Expected an empty set.' ); - $this->assertQueryResult( + self::assertQueryResult( [], $this->getDatabaseConnection()->createQueryBuilder()->select('role_id')->from('ezuser_role')->where('role_id = 3'), 'Expected an empty set.' @@ -616,19 +605,19 @@ public function testDeleteRoleDraft(): void $roleDraft = $handler->createRoleDraft(3); $handler->deleteRole($roleDraft->id, APIRole::STATUS_DRAFT); - $this->assertQueryResult( + self::assertQueryResult( [['3', APIRole::STATUS_DEFINED]], $this->getDatabaseConnection()->createQueryBuilder()->select('id, version')->from('ezrole')->where('id = 3'), 'Expected a published role.' ); - $this->assertQueryResult( + self::assertQueryResult( [[implode("\n", array_fill(0, 28, '3, ' . APIRole::STATUS_DEFINED))]], $this->getDatabaseConnection()->createQueryBuilder()->select('role_id, original_id')->from('ezpolicy')->where('role_id = 3'), 'Expected 28 policies for the published role.' ); - $this->assertQueryResult( + self::assertQueryResult( [[3], [3]], $this->getDatabaseConnection()->createQueryBuilder()->select('role_id')->from('ezuser_role')->where('role_id = 3'), 'Expected that role assignments still exist.' @@ -647,7 +636,7 @@ public function testAddPolicyToRoleLimitations(): void $handler->addPolicy($role->id, $policy); - $this->assertQueryResult( + self::assertQueryResult( [[1, 'foo', 'bar', 1]], $this->getDatabaseConnection()->createQueryBuilder()->select('id', 'module_name', 'function_name', 'role_id')->from('ezpolicy'), 'Expected a new policy.' @@ -673,7 +662,7 @@ public function testAddPolicyLimitations(): void { $this->createTestRoleWithTestPolicy(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 'Subtree', 1], [2, 'Foo', 1], @@ -687,7 +676,7 @@ public function testAddPolicyLimitationValues(): void { $this->createTestRoleWithTestPolicy(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, '/1', 1], [2, '/1/2', 1], @@ -728,7 +717,7 @@ public function testImplicitlyCreatePolicies(): void { $this->createRole(); - $this->assertQueryResult( + self::assertQueryResult( [ [1, 'foo', 'bar', 1], [2, 'foo', 'blubb', 1], @@ -746,7 +735,7 @@ public function testDeletePolicy(): void $handler->publishRoleDraft($roleDraft->id); $handler->deletePolicy($roleDraft->policies[0]->id, $roleDraft->policies[0]->roleId); - $this->assertQueryResult( + self::assertQueryResult( [ [2, 'foo', 'blubb', 1], ], @@ -762,7 +751,7 @@ public function testDeletePolicyLimitations(): void $roleDraft = $this->createRole(); $handler->deletePolicy($roleDraft->policies[0]->id, $roleDraft->policies[0]->roleId); - $this->assertQueryResult( + self::assertQueryResult( [[3, 'Foo', 2]], $this->getDatabaseConnection()->createQueryBuilder()->select('*')->from('ezpolicy_limitation') ); @@ -775,7 +764,7 @@ public function testDeletePolicyLimitationValues(): void $roleDraft = $this->createRole(); $handler->deletePolicy($roleDraft->policies[0]->id, $roleDraft->policies[0]->roleId); - $this->assertQueryResult( + self::assertQueryResult( [[4, 3, 'Blubb']], $this->getDatabaseConnection()->createQueryBuilder()->select('*')->from('ezpolicy_limitation_value') ); @@ -794,7 +783,7 @@ public function testUpdatePolicies(): void $handler->updatePolicy($policy); - $this->assertQueryResult( + self::assertQueryResult( [ [3, 'Foo', 2], [4, 'new', 1], @@ -802,7 +791,7 @@ public function testUpdatePolicies(): void $this->getDatabaseConnection()->createQueryBuilder()->select('*')->from('ezpolicy_limitation') ); - $this->assertQueryResult( + self::assertQueryResult( [ [4, 3, 'Blubb'], [5, 4, 'something'], @@ -822,7 +811,7 @@ public function testAddRoleToUser(): void $handler->assignRole($user->id, $role->id, []); - $this->assertQueryResult( + self::assertQueryResult( [ [1, self::TEST_USER_ID, 1, null, null], ], @@ -848,7 +837,7 @@ public function testAddRoleToUserWithLimitation(): void ] ); - $this->assertQueryResult( + self::assertQueryResult( [ [1, self::TEST_USER_ID, 1, 'Subtree', '/1'], ], @@ -875,7 +864,7 @@ public function testAddRoleToUserWithComplexLimitation(): void ] ); - $this->assertQueryResult( + self::assertQueryResult( [ [1, self::TEST_USER_ID, 1, 'Subtree', '/1'], [2, self::TEST_USER_ID, 1, 'Subtree', '/1/2'], @@ -906,7 +895,7 @@ public function testRemoveUserRoleAssociation(): void $handler->unassignRole($user->id, $role->id); - $this->assertQueryResult( + self::assertQueryResult( [], $this->getDatabaseConnection()->createQueryBuilder()->select('id', 'contentobject_id', 'role_id', 'limit_identifier', 'limit_value')->from('ezuser_role'), 'Expected no user policy associations.' @@ -1112,7 +1101,7 @@ public function testLoadRoleDraftByRoleId(): void $originalRoleId = 3; $draft = $handler->createRoleDraft($originalRoleId); $loadedDraft = $handler->loadRoleDraftByRoleId($originalRoleId); - self::assertSame($loadedDraft->originalId, $originalRoleId); + self::assertSame($originalRoleId, $loadedDraft->originalId); self::assertEquals($draft, $loadedDraft); } @@ -1129,7 +1118,7 @@ public function testRoleDraftOnlyHavePolicyDraft(): void $draft = $handler->createRoleDraft($originalRoleId); $loadedDraft = $handler->loadRole($draft->id, Role::STATUS_DRAFT); - self::assertSame($loadedDraft->originalId, $originalRoleId); + self::assertSame($originalRoleId, $loadedDraft->originalId); self::assertEquals($draft, $loadedDraft); foreach ($loadedDraft->policies as $policy) { self::assertTrue(isset($originalPolicies[$policy->originalId])); diff --git a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php index 54c3dd60b5..79aee4ffd6 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php @@ -8,7 +8,6 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\UserPreference\Gateway; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct; use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; @@ -133,7 +132,7 @@ private function loadUserPreference(int $id): array $queryBuilder->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $result = $queryBuilder->execute()->fetchAll(FetchMode::ASSOCIATIVE); + $result = $queryBuilder->executeQuery()->fetchAllAssociative(); return reset($result); } diff --git a/tests/lib/Repository/LegacySchemaImporter.php b/tests/lib/Repository/LegacySchemaImporter.php index 0480bb30cb..b8626fb036 100644 --- a/tests/lib/Repository/LegacySchemaImporter.php +++ b/tests/lib/Repository/LegacySchemaImporter.php @@ -35,6 +35,8 @@ public function __construct(Connection $connection) * Import database schema from Doctrine Schema Yaml configuration file. * * @param string $schemaFilePath Yaml schema configuration file path + * + * @throws \Doctrine\DBAL\Exception */ public function importSchema(string $schemaFilePath): void { @@ -57,7 +59,7 @@ public function importSchema(string $schemaFilePath): void ); foreach ($statements as $statement) { - $this->connection->exec($statement); + $this->connection->executeStatement($statement); } } catch (InvalidConfigurationException $e) { throw new RuntimeException($e->getMessage(), 1, $e); @@ -66,13 +68,15 @@ public function importSchema(string $schemaFilePath): void /** * @return string[] + * + * @throws \Doctrine\DBAL\Exception */ private function getDropSqlStatementsForExistingSchema( DoctrineSchema $newSchema, AbstractPlatform $databasePlatform, Connection $connection ): array { - $existingSchema = $connection->getSchemaManager()->createSchema(); + $existingSchema = $connection->createSchemaManager()->introspectSchema(); $statements = []; // reverse table order for clean-up (due to FKs) $tables = array_reverse($newSchema->getTables()); diff --git a/tests/lib/Search/Legacy/Content/AbstractTestCase.php b/tests/lib/Search/Legacy/Content/AbstractTestCase.php index 9baa54db48..f6735b7430 100644 --- a/tests/lib/Search/Legacy/Content/AbstractTestCase.php +++ b/tests/lib/Search/Legacy/Content/AbstractTestCase.php @@ -81,7 +81,7 @@ static function ($hit) { } /** - * @throws \Doctrine\DBAL\DBALException + * @throws \Doctrine\DBAL\Exception */ protected function getContentTypeHandler(): SPIContentTypeHandler { From 63397c63c28831675e6912dfbead6f4e00794b75 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 28 Mar 2025 15:51:17 +0100 Subject: [PATCH 008/185] IBX-9811: Dropped obsolete `$postInsertStatements` member from Legacy SetupFactory --- src/contracts/Test/Repository/SetupFactory/Legacy.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index c0eb8dcafc..d9876a3880 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -73,13 +73,6 @@ class Legacy extends SetupFactory */ private static ?YamlFixture $initialDataFixture = null; - /** - * Cached in-memory post insert SQL statements. - * - * @var string[] - */ - private static $postInsertStatements; - protected $repositoryReference = 'ibexa.api.repository'; /** @var \Doctrine\DBAL\Connection */ From 946e6f216512d8357604f6e9401e5ebf11b0ecda Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 31 Mar 2025 13:00:13 +0200 Subject: [PATCH 009/185] IBX-8471: Upgraded ProxyCacheWarmer to Symfony 7 --- src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php index 1d7c84d7dc..61a4c2ff39 100644 --- a/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php +++ b/src/bundle/Core/Cache/Warmer/ProxyCacheWarmer.php @@ -22,7 +22,7 @@ final class ProxyCacheWarmer implements CacheWarmerInterface { - public const PROXY_CLASSES = [ + public const array PROXY_CLASSES = [ Content::class, ContentInfo::class, ContentType::class, @@ -46,7 +46,7 @@ public function isOptional(): bool return false; } - public function warmUp($cacheDir): array + public function warmUp(string $cacheDir, ?string $buildDir = null): array { $this->proxyGenerator->warmUp(self::PROXY_CLASSES); From f716eebe414896dad00c76f995b8bd7e6a6c533a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 31 Mar 2025 13:15:16 +0200 Subject: [PATCH 010/185] IBX-9811: [Tests] Upgraded Legacy SetupFactory to doctrine/dbal v3 and improved CS --- .../Test/Repository/SetupFactory/Legacy.php | 103 ++++++++---------- 1 file changed, 45 insertions(+), 58 deletions(-) diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index d9876a3880..962d1dea72 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -9,6 +9,7 @@ use Doctrine\DBAL\Connection; use Ibexa\Bundle\Core\DependencyInjection\ServiceTags; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder as FilteringCriterionQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Filter\SortClauseQueryBuilder as FilteringSortClauseQueryBuilder; use Ibexa\Contracts\Core\Test\Persistence\Fixture; @@ -24,6 +25,8 @@ use Ibexa\Tests\Core\Repository\IdManager\Php; use Ibexa\Tests\Core\Repository\LegacySchemaImporter; use Ibexa\Tests\Integration\Core\LegacyTestContainerBuilder; +use PHPUnit\Framework\Assert; +use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Filesystem\Filesystem; @@ -35,68 +38,59 @@ class Legacy extends SetupFactory { /** * Data source name. - * - * @var string */ - protected static $dsn; + protected static string $dsn; /** * Root dir for IO operations. - * - * @var string */ - protected static $ioRootDir; + protected static string $ioRootDir; /** * Database type (sqlite, mysql, ...). - * - * @var string */ - protected static $db; + protected static string $db; /** * Service container. - * - * @var \Ibexa\Core\Base\ServiceContainer */ - protected static $serviceContainer; + protected static ServiceContainer $serviceContainer; /** * If the DB schema has already been initialized. - * - * @var bool */ - protected static $schemaInitialized = false; + protected static bool $schemaInitialized = false; /** * Cached in-memory initial database data fixture. */ private static ?YamlFixture $initialDataFixture = null; - protected $repositoryReference = 'ibexa.api.repository'; + protected string $repositoryReference = 'ibexa.api.repository'; - /** @var \Doctrine\DBAL\Connection */ - private $connection; + private Connection $connection; /** * Creates a new setup factory. */ public function __construct() { - self::$dsn = getenv('DATABASE'); - if (!self::$dsn) { + $dsn = getenv('DATABASE'); + if (false === $dsn) { // use sqlite in-memory by default (does not need special handling for paratest as it's per process) self::$dsn = 'sqlite://:memory:'; } elseif (getenv('TEST_TOKEN') !== false) { // Using paratest, assuming dsn ends with db name here... - self::$dsn .= '_' . getenv('TEST_TOKEN'); + self::$dsn = $dsn . '_' . getenv('TEST_TOKEN'); } if ($repositoryReference = getenv('REPOSITORY_SERVICE_ID')) { $this->repositoryReference = $repositoryReference; } - self::$db = preg_replace('(^([a-z]+).*)', '\\1', self::$dsn); + $sanitizedDSN = preg_replace('(^([a-z]+).*)', '\\1', self::$dsn); + Assert::assertIsString($sanitizedDSN); + self::$db = $sanitizedDSN; if (!isset(self::$ioRootDir)) { self::$ioRootDir = $this->createTemporaryDirectory(); @@ -135,8 +129,11 @@ private function createTemporaryDirectory(): string * from scratch or re-used * * @return \Ibexa\Contracts\Core\Repository\Repository + * + * @throws \Doctrine\DBAL\ConnectionException + * @throws \Doctrine\DBAL\Exception */ - public function getRepository($initializeFromScratch = true) + public function getRepository($initializeFromScratch = true): Repository { if ($initializeFromScratch || !self::$schemaInitialized) { $this->initializeSchema(); @@ -155,25 +152,11 @@ public function getRepository($initializeFromScratch = true) return $repository; } - /** - * Returns a config value for $configKey. - * - * @param string $configKey - * - * @throws \Exception if $configKey could not be found. - * - * @return mixed - */ - public function getConfigValue($configKey) + public function getConfigValue($configKey): mixed { return $this->getServiceContainer()->getParameter($configKey); } - /** - * Returns a repository specific ID manager. - * - * @return \Ibexa\Tests\Integration\Core\Repository\IdManager - */ public function getIdManager(): Php { return new Php(); @@ -198,7 +181,7 @@ protected function getInitialVarDir(): string return __DIR__ . '/../../../../../var'; } - protected function cleanupVarDir(string $sourceDir) + protected function cleanupVarDir(string $sourceDir): void { $fs = new Filesystem(); $varDir = self::$ioRootDir . '/var'; @@ -210,13 +193,12 @@ protected function cleanupVarDir(string $sourceDir) } /** - * CLears internal in memory caches after inserting data circumventing the - * API. + * Clears internal in memory caches after inserting data circumventing the API. */ - protected function clearInternalCaches() + protected function clearInternalCaches(): void { - /** @var $handler \Ibexa\Core\Persistence\Legacy\Handler */ $handler = $this->getServiceContainer()->get(Handler::class); + Assert::assertInstanceOf(Handler::class, $handler); $contentLanguageHandler = $handler->contentLanguageHandler(); if ($contentLanguageHandler instanceof CachingLanguageHandler) { @@ -228,8 +210,8 @@ protected function clearInternalCaches() $contentTypeHandler->clearCache(); } - /** @var $cachePool \Psr\Cache\CacheItemPoolInterface */ $cachePool = $this->getServiceContainer()->get('ibexa.cache_pool'); + Assert::assertInstanceOf(CacheItemPoolInterface::class, $cachePool); $cachePool->clear(); } @@ -249,6 +231,7 @@ protected function getInitialDataFixture(): Fixture * Initializes the database schema. * * @throws \Doctrine\DBAL\ConnectionException + * @throws \Doctrine\DBAL\Exception */ protected function initializeSchema(): void { @@ -270,8 +253,10 @@ protected function initializeSchema(): void */ private function getDatabaseConnection(): Connection { - if (null === $this->connection) { - $this->connection = $this->getServiceContainer()->get('ibexa.persistence.connection'); + if (!isset($this->connection)) { + $connection = $this->getServiceContainer()->get('ibexa.persistence.connection'); + Assert::assertInstanceOf(Connection::class, $connection); + $this->connection = $connection; } return $this->connection; @@ -281,8 +266,10 @@ private function getDatabaseConnection(): Connection * Returns the service container used for initialization of the repository. * * @return \Ibexa\Core\Base\ServiceContainer + * + * @throws \Exception */ - public function getServiceContainer() + public function getServiceContainer(): ServiceContainer { if (!isset(self::$serviceContainer)) { $installDir = self::getInstallationDir(); @@ -302,10 +289,9 @@ public function getServiceContainer() self::$dsn ); - $containerBuilder->setParameter( - 'ibexa.io.dir.root', - self::$ioRootDir . '/' . $containerBuilder->getParameter('ibexa.io.dir.storage') - ); + $ioStorageDir = $containerBuilder->getParameter('ibexa.io.dir.storage'); + Assert::assertIsString($ioStorageDir, "Erroneous 'ibexa.io.dir.storage' container parameter"); + $containerBuilder->setParameter('ibexa.io.dir.root', self::$ioRootDir . '/' . $ioStorageDir); $containerBuilder->addCompilerPass(new Compiler\Search\FieldRegistryPass()); @@ -318,7 +304,7 @@ public function getServiceContainer() self::$serviceContainer = new ServiceContainer( $containerBuilder, $installDir, - $this->getCacheDir(), + self::getCacheDir(), true, true ); @@ -333,7 +319,7 @@ public function getServiceContainer() * * @param \Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder */ - protected function externalBuildContainer(ContainerBuilder $containerBuilder) + protected function externalBuildContainer(ContainerBuilder $containerBuilder): void { // Does nothing by default } @@ -343,7 +329,7 @@ protected function externalBuildContainer(ContainerBuilder $containerBuilder) * * @return string */ - public function getDB() + public function getDB(): string { return self::$db; } @@ -352,10 +338,8 @@ public function getDB() * Apply automatic configuration to needed Symfony Services. * * Note: Based on - * {@see \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension::registerForAutoConfiguration}, + * {@see \Ibexa\Bundle\Core\DependencyInjection\IbexaCoreExtension::registerForAutoConfiguration()}, * but only for services needed by integration test setup. - * - * @see */ private function registerForAutoConfiguration(ContainerBuilder $containerBuilder): void { @@ -372,7 +356,10 @@ private function registerForAutoConfiguration(ContainerBuilder $containerBuilder public static function getInstallationDir(): string { // package root directory: - return realpath(__DIR__ . '/../../../../../'); + $installationDir = realpath(__DIR__ . '/../../../../../'); + Assert::assertNotFalse($installationDir, 'Installation folder does not exist'); + + return $installationDir; } /** From f75a4a410ac90d16af29e47fed3c8224a4a8ddb6 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 31 Mar 2025 14:11:06 +0200 Subject: [PATCH 011/185] IBX-9811: [Tests] Upgraded FixtureImporter to doctrine/dbal v3 --- src/contracts/Test/Persistence/Fixture/FixtureImporter.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index 192cfb907b..0828a0234c 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -9,7 +9,6 @@ namespace Ibexa\Contracts\Core\Test\Persistence\Fixture; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\PDOException; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Schema\Column; use Ibexa\Contracts\Core\Test\Persistence\Fixture; @@ -74,7 +73,7 @@ private function truncateTables(array $tables): void $this->connection->executeStatement( $dbPlatform->getTruncateTableSql($this->connection->quoteIdentifier($table)) ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { // Fallback to DELETE if TRUNCATE failed (because of FKs for instance) $this->connection->createQueryBuilder()->delete($table)->execute(); } From 868586d06a8d2f2e741c7e7561891e9f8e645357 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 31 Mar 2025 14:13:28 +0200 Subject: [PATCH 012/185] IBX-9811: Upgraded Symfony Commands to doctrine/dbal v3 and improved code quality --- .../Command/UpdateTimestampsToUTCCommand.php | 152 ++++++------------ .../VirtualFieldDuplicateFixCommand.php | 34 ++-- 2 files changed, 76 insertions(+), 110 deletions(-) diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index 8678218b9b..2de98e376e 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -11,10 +11,10 @@ use DateTime; use DateTimeZone; use Doctrine\DBAL\Connection; -use PDO; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -33,20 +33,17 @@ class UpdateTimestampsToUTCCommand extends Command public const MAX_TIMESTAMP_VALUE = 2147483647; public const DEFAULT_ITERATION_COUNT = 100; - public const MODES = [ + public const array MODES = [ 'date' => ['ezdate'], 'datetime' => ['ezdatetime'], 'all' => ['ezdate', 'ezdatetime'], ]; - /** @var int */ - protected $done = 0; + protected int $done = 0; - /** @var string */ - protected $timezone; + protected string $timezone; - /** @var string */ - private $mode; + private string $mode; private ?int $from = null; @@ -54,10 +51,9 @@ class UpdateTimestampsToUTCCommand extends Command private Connection $connection; - private string|bool|null $phpPath = null; + private string $phpPath; - /** @var bool */ - private $dryRun; + private bool $dryRun; public function __construct(Connection $connection) { @@ -65,14 +61,13 @@ public function __construct(Connection $connection) parent::__construct(); } - protected function configure() + protected function configure(): void { $this ->addArgument( 'timezone', InputArgument::OPTIONAL, 'Original timestamp\'s TimeZone', - null ) ->addOption( 'dry-run', @@ -92,14 +87,12 @@ protected function configure() null, InputOption::VALUE_REQUIRED, 'Only versions AFTER this date will be converted', - null ) ->addOption( 'to', null, InputOption::VALUE_REQUIRED, 'Only versions BEFORE this date will be converted', - null ) ->addOption( 'offset', @@ -136,8 +129,8 @@ protected function configure() } /** - * @param \Symfony\Component\Console\Input\InputInterface $input - * @param \Symfony\Component\Console\Output\OutputInterface $output + * @throws \Doctrine\DBAL\Exception + * @throws \DateMalformedStringException */ protected function execute(InputInterface $input, OutputInterface $output): int { @@ -173,8 +166,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (getenv('INNER_CALL')) { $this->timezone = $input->getArgument('timezone'); - $this->processTimestamps((int) $input->getOption('offset'), $iterationCount, $output); - $output->writeln($this->done); + $this->processTimestamps((int)$input->getOption('offset'), $iterationCount); + $output->writeln((string)$this->done); } else { $timezone = $input->getArgument('timezone'); $this->timezone = $this->validateTimezone($timezone, $output); @@ -189,7 +182,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int '', ]); - if ($count == 0) { + if ($count === 0) { $output->writeln('Nothing to process, exiting.'); return self::SUCCESS; @@ -257,11 +250,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int } /** - * @param int $offset - * @param int $limit - * @param \Symfony\Component\Console\Output\OutputInterface $output + * @throws \Doctrine\DBAL\Exception + * @throws \DateInvalidTimeZoneException + * @throws \DateMalformedStringException */ - protected function processTimestamps($offset, $limit, $output) + protected function processTimestamps(int $offset, int $limit): void { $timestampBasedFields = $this->getTimestampBasedFields($offset, $limit); @@ -273,7 +266,7 @@ protected function processTimestamps($offset, $limit, $output) $dateTimeInUTC->setTimestamp($timestamp); $newTimestamp = $this->convertToUtcTimestamp($timestamp); - //failsafe for int field limitation (dates/datetimes after 01/19/2038 @ 4:14am (UTC)) + //failsafe for int field limitation (dates/date-times after 01/19/2038 @ 4:14am (UTC)) if ($newTimestamp <= self::MAX_TIMESTAMP_VALUE && !$this->dryRun) { $this->updateTimestampToUTC($timestampBasedField['id'], $timestampBasedField['version'], $newTimestamp); } @@ -282,12 +275,11 @@ protected function processTimestamps($offset, $limit, $output) } /** - * @param int $offset - * @param int $limit + * @phpstan-return list> * - * @return array + * @throws \Doctrine\DBAL\Exception */ - protected function getTimestampBasedFields($offset, $limit) + protected function getTimestampBasedFields(int $offset, int $limit): array { $query = $this->connection->createQueryBuilder(); $query @@ -317,15 +309,13 @@ protected function getTimestampBasedFields($offset, $limit) ->setParameter('toTimestamp', $this->to); } - $statement = $query->execute(); - - return $statement->fetchAll(PDO::FETCH_ASSOC); + return $query->executeQuery()->fetchAllAssociative(); } /** * Counts affected timestamp based fields using captured "mode", "from" and "to" command options. * - * @return int + * @throws \Doctrine\DBAL\Exception */ protected function countTimestampBasedFields(): int { @@ -355,35 +345,28 @@ protected function countTimestampBasedFields(): int ->setParameter('toTimestamp', $this->to); } - $statement = $query->execute(); + $statement = $query->executeQuery(); - return (int) $statement->fetchColumn(); + return (int) $statement->fetchOne(); } /** - * @param int $timestamp - * - * @return int + * @throws \DateMalformedStringException + * @throws \DateInvalidTimeZoneException */ - protected function convertToUtcTimestamp($timestamp): int + protected function convertToUtcTimestamp(int $timestamp): int { $dateTimeZone = new DateTimeZone($this->timezone); $dateTimeZoneUTC = new DateTimeZone('UTC'); $dateTime = new DateTime('now', $dateTimeZone); $dateTime->setTimestamp($timestamp); - $dateTimeUTC = new DateTime($dateTime->format('Y-m-d H:i:s'), $dateTimeZoneUTC); - return $dateTimeUTC->getTimestamp(); + return (new DateTime($dateTime->format('Y-m-d H:i:s'), $dateTimeZoneUTC)) + ->getTimestamp(); } - /** - * @param string $dateTimeString - * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return bool - */ - protected function validateDateTimeString($dateTimeString, OutputInterface $output): bool + protected function validateDateTimeString(string $dateTimeString, OutputInterface $output): bool { try { new DateTime($dateTimeString); @@ -396,28 +379,17 @@ protected function validateDateTimeString($dateTimeString, OutputInterface $outp return true; } - /** - * @param string $timezone - * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return string - */ - protected function validateTimezone($timezone, OutputInterface $output) + protected function validateTimezone(string $timezone, OutputInterface $output): string { - if (!$timezone) { + if (empty($timezone)) { $timezone = date_default_timezone_get(); $output->writeln([ sprintf('No Timezone set, using server Timezone: %s', $timezone), '', ]); } else { - if (!\in_array($timezone, timezone_identifiers_list())) { - $output->writeln([ - sprintf('%s is not correct Timezone.', $timezone), - '', - ]); - - return 0; + if (!\in_array($timezone, timezone_identifiers_list(), true)) { + throw new InvalidArgumentException(sprintf('%s is not correct Timezone.', $timezone)); } $output->writeln([ @@ -429,15 +401,7 @@ protected function validateTimezone($timezone, OutputInterface $output) return $timezone; } - /** - * Return configured progress bar helper. - * - * @param int $maxSteps - * @param \Symfony\Component\Console\Output\OutputInterface $output - * - * @return \Symfony\Component\Console\Helper\ProgressBar - */ - protected function getProgressBar($maxSteps, OutputInterface $output): ProgressBar + protected function getProgressBar(int $maxSteps, OutputInterface $output): ProgressBar { $progressBar = new ProgressBar($output, $maxSteps); $progressBar->setFormat( @@ -448,58 +412,48 @@ protected function getProgressBar($maxSteps, OutputInterface $output): ProgressB } /** - * @param int $contentAttributeId - * @param int $contentAttributeVersion - * @param int $newTimestamp + * @throws \Doctrine\DBAL\Exception */ protected function updateTimestampToUTC( - $contentAttributeId, - $contentAttributeVersion, - $newTimestamp - ) { + int $contentAttributeId, + int $contentAttributeVersion, + int $newTimestamp + ): void { $query = $this->connection->createQueryBuilder(); $query ->update('ezcontentobject_attribute', 'a') - ->set('a.data_int', $newTimestamp) - ->set('a.sort_key_int', $newTimestamp) + ->set('a.data_int', ':new_timestamp') + ->set('a.sort_key_int', ':new_timestamp') ->where('a.id = :id') ->andWhere('a.version = :version') + ->setParameter(':new_timestamp', $newTimestamp) ->setParameter(':id', $contentAttributeId) ->setParameter(':version', $contentAttributeVersion); - $query->execute(); + $query->executeStatement(); } - /** - * @return string - */ - private function getPhpPath() + private function getPhpPath(): string { - if ($this->phpPath) { + if (isset($this->phpPath)) { return $this->phpPath; } $phpFinder = new PhpExecutableFinder(); - $this->phpPath = $phpFinder->find(); - if (!$this->phpPath) { + $phpPath = $phpFinder->find(); + if (false === $phpPath) { throw new RuntimeException( 'The php executable could not be found. It is needed for executing parallel subprocesses, so add it to your PATH environment variable and try again' ); } - return $this->phpPath; + return $this->phpPath = $phpPath; } /** - * @param $dateString string - * - * @throws \Exception - * - * @return int + * @throws \DateMalformedStringException */ - private function dateStringToTimestamp($dateString): int + private function dateStringToTimestamp(string $dateString): int { - $date = new DateTime($dateString); - - return $date->getTimestamp(); + return (new DateTime($dateString))->getTimestamp(); } } diff --git a/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php b/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php index 74ebc3f41a..066859a94a 100644 --- a/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php +++ b/src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php @@ -9,6 +9,7 @@ namespace Ibexa\Bundle\Core\Command; use Doctrine\DBAL\Connection; +use Ibexa\Core\Persistence\Legacy\Content\Gateway; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -24,11 +25,11 @@ )] final class VirtualFieldDuplicateFixCommand extends Command { - private const DEFAULT_BATCH_SIZE = 10000; + private const int DEFAULT_BATCH_SIZE = 10000; - private const MAX_ITERATIONS_UNLIMITED = -1; + private const int MAX_ITERATIONS_UNLIMITED = -1; - private const DEFAULT_SLEEP = 0; + private const int DEFAULT_SLEEP = 0; private Connection $connection; @@ -67,6 +68,9 @@ public function configure(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function execute(InputInterface $input, OutputInterface $output): int { $style = new SymfonyStyle($input, $output); @@ -153,6 +157,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int return Command::SUCCESS; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function getDuplicatedAttributeTotalCount( SymfonyStyle $style, Stopwatch $stopwatch @@ -161,10 +168,10 @@ private function getDuplicatedAttributeTotalCount( $query = $this->connection->createQueryBuilder() ->select('COUNT(a.id) as instances') ->groupBy('version', 'contentclassattribute_id', 'contentobject_id', 'language_id') - ->from('ezcontentobject_attribute', 'a') + ->from(Gateway::CONTENT_FIELD_TABLE, 'a') ->having('instances > 1'); - $count = (int) $query->execute()->rowCount(); + $count = $query->executeQuery()->rowCount(); if ($count > 0) { $style->warning( @@ -186,6 +193,8 @@ private function getDuplicatedAttributeTotalCount( * contentobject_id: int, * language_id: int, * }> + * + * @throws \Doctrine\DBAL\Exception */ private function getDuplicatedAttributesBatch(int $batchSize): array { @@ -194,12 +203,13 @@ private function getDuplicatedAttributesBatch(int $batchSize): array $query ->select('version', 'contentclassattribute_id', 'contentobject_id', 'language_id') ->groupBy('version', 'contentclassattribute_id', 'contentobject_id', 'language_id') - ->from('ezcontentobject_attribute') + ->from(Gateway::CONTENT_FIELD_TABLE) ->having('COUNT(id) > 1') ->setFirstResult(0) ->setMaxResults($batchSize); - return $query->execute()->fetchAllAssociative(); + /** @phpstan-ignore return.type */ + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -211,6 +221,8 @@ private function getDuplicatedAttributesBatch(int $batchSize): array * } $attribute * * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ private function getDuplicatedAttributeIds(array $attribute): array { @@ -218,7 +230,7 @@ private function getDuplicatedAttributeIds(array $attribute): array $query ->select('id') - ->from('ezcontentobject_attribute') + ->from(Gateway::CONTENT_FIELD_TABLE) ->andWhere('version = :version') ->andWhere('contentclassattribute_id = :contentclassattribute_id') ->andWhere('contentobject_id = :contentobject_id') @@ -228,7 +240,7 @@ private function getDuplicatedAttributeIds(array $attribute): array ->setFirstResult(1); $query->setParameters($attribute); - $result = $query->execute()->fetchFirstColumn(); + $result = $query->executeQuery()->fetchFirstColumn(); return array_map('intval', $result); } @@ -255,9 +267,9 @@ private function deleteAttributes(array $ids): int $query = $this->connection->createQueryBuilder(); $query - ->delete('ezcontentobject_attribute') + ->delete(Gateway::CONTENT_FIELD_TABLE) ->andWhere($query->expr()->in('id', array_map('strval', $ids))); - return (int)$query->execute(); + return $query->executeStatement(); } } From 3856c796fdd3c548238f2401ed71e437e5b4bfe9 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 31 Mar 2025 14:30:08 +0200 Subject: [PATCH 013/185] IBX-9727: Fixed Strict types for MapLocation field type storage abstract Gateway --- .../MapLocation/MapLocationStorage/Gateway.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php index 629e6da54d..78a2700ef3 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php @@ -22,28 +22,19 @@ abstract class Gateway extends StorageGateway * Potentially rewrites data in $field and returns true, if the $field * needs to be updated in the database. * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * * @return bool If restoring of the internal field data is required */ - abstract public function storeFieldData(VersionInfo $versionInfo, Field $field); + abstract public function storeFieldData(VersionInfo $versionInfo, Field $field): bool; /** * Sets the loaded field data into $field->externalData. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return array */ - abstract public function getFieldData(VersionInfo $versionInfo, Field $field); + abstract public function getFieldData(VersionInfo $versionInfo, Field $field): void; /** * Deletes the data for all given $fieldIds. * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param array $fieldIds + * @param int[] $fieldIds */ - abstract public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds); + abstract public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void; } From 35d89bfe60a98496696379bff19bb1d5a8657986 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 1 Apr 2025 11:03:50 +0200 Subject: [PATCH 014/185] IBX-9811: [Rector] Added Doctrine sets to the configuration --- rector.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rector.php b/rector.php index 065d62d73e..75e1a9ec2f 100644 --- a/rector.php +++ b/rector.php @@ -8,6 +8,7 @@ use Ibexa\Contracts\Rector\Sets\IbexaSetList; use Rector\Config\RectorConfig; +use Rector\Doctrine\Set\DoctrineSetList; use Rector\Symfony\Set\SymfonySetList; use Rector\Symfony\Symfony61\Rector\Class_\CommandConfigureToAttributeRector; @@ -23,6 +24,9 @@ SymfonySetList::SYMFONY_62, SymfonySetList::SYMFONY_63, SymfonySetList::SYMFONY_64, + DoctrineSetList::DOCTRINE_COMMON_20, + DoctrineSetList::DOCTRINE_DBAL_30, + DoctrineSetList::DOCTRINE_DBAL_211, ]) ->withSkip([ CommandConfigureToAttributeRector::class => [ From b8df738340c77e60e8581f05935abbdb563ad9d5 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 1 Apr 2025 13:33:20 +0200 Subject: [PATCH 015/185] IBX-9811: Refactored Location Doctrine Gateway getSubtreeContent method to remove PDO::FETCH_GROUP usage Extracted getSubtreeContent `$onlyIds` behavior to a separate method as it applies to a different use case on a similar query. --- .../Legacy/Content/Location/Gateway.php | 11 +++++- .../Location/Gateway/DoctrineDatabase.php | 38 +++++++++++++------ .../Location/Gateway/ExceptionConversion.php | 13 ++++++- .../Legacy/Content/Location/Handler.php | 2 +- .../Legacy/Content/LocationHandlerTest.php | 16 ++++---- 5 files changed, 56 insertions(+), 24 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway.php b/src/lib/Persistence/Legacy/Content/Location/Gateway.php index 59365b76ab..3e2c7eb7ca 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway.php @@ -109,8 +109,17 @@ abstract public function loadParentLocationsDataForDraftContent(int $contentId): /** * Find all content in the given subtree. + * + * @phpstan-return array> + */ + abstract public function getSubtreeContent(int $sourceId): array; + + /** + * Find all content in the given subtree, but return only node ID to content ID map. + * + * @return array */ - abstract public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array; + abstract public function getSubtreeNodeIdToContentIdMap(int $sourceId): array; /** * Finds draft contents created under the given parent location. diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index b6d58ff762..4f1d79e0f7 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -23,7 +23,6 @@ use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter; -use PDO; use RuntimeException; use function time; @@ -219,25 +218,42 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array return $statement->fetchAllAssociative(); } - public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array + /** + * @throws \Doctrine\DBAL\Driver\Exception + * @throws \Doctrine\DBAL\Exception + */ + public function getSubtreeContent(int $sourceId): array { $query = $this->connection->createQueryBuilder(); $query - ->select($onlyIds ? 'node_id, contentobject_id, depth' : '*') + ->select('*') ->from(self::CONTENT_TREE_TABLE, 't') ->where($this->getSubtreeLimitationExpression($query, $sourceId)) ->orderBy('t.depth') ->addOrderBy('t.node_id'); - $statement = $query->executeQuery(); - $results = $statement->fetchAll($onlyIds ? (FetchMode::COLUMN | PDO::FETCH_GROUP) : FetchMode::ASSOCIATIVE); + return $query->executeQuery()->fetchAllAssociative(); + } + + /** + * @throws \Doctrine\DBAL\Exception + * @throws \Doctrine\DBAL\Driver\Exception + */ + public function getSubtreeNodeIdToContentIdMap(int $sourceId): array + { + $query = $this->connection->createQueryBuilder(); + $query + ->select('node_id', 'contentobject_id') + ->from(self::CONTENT_TREE_TABLE, 't') + ->where($this->getSubtreeLimitationExpression($query, $sourceId)) + ->orderBy('t.depth') + ->addOrderBy('t.node_id'); + $statement = $query->executeQuery(); - // array_map() is used to map all elements stored as $results[$i][0] to $results[$i] - return $onlyIds - ? array_map(static function (array $result) { - return $result[0]; - }, $results) - : $results; + return array_map( + static fn (array $row): int => $row['contentobject_id'], + $statement->fetchAllAssociativeIndexed() + ); } /** diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 60ccff44e3..6677c21c43 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -96,10 +96,19 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array } } - public function getSubtreeContent(int $sourceId, bool $onlyIds = false): array + public function getSubtreeContent(int $sourceId): array { try { - return $this->innerGateway->getSubtreeContent($sourceId, $onlyIds); + return $this->innerGateway->getSubtreeContent($sourceId); + } catch (DBALException | PDOException $e) { + throw DatabaseException::wrap($e); + } + } + + public function getSubtreeNodeIdToContentIdMap(int $sourceId): array + { + try { + return $this->innerGateway->getSubtreeNodeIdToContentIdMap($sourceId); } catch (DBALException | PDOException $e) { throw DatabaseException::wrap($e); } diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index 197c95a40a..60a72ecd91 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -112,7 +112,7 @@ public function loadList(array $locationIds, array $translations = null, bool $u */ public function loadSubtreeIds($locationId): array { - return $this->locationGateway->getSubtreeContent($locationId, true); + return $this->locationGateway->getSubtreeNodeIdToContentIdMap($locationId); } /** diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index 6a1d48892b..63d2630a86 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -105,15 +105,13 @@ public function testLoadLocationSubtree(): void { $this->locationGateway ->expects(self::once()) - ->method('getSubtreeContent') - ->with(77, true) - ->will( - self::returnValue( - [ - [77 => 100], - [78 => 101], - ] - ) + ->method('getSubtreeNodeIdToContentIdMap') + ->with(77) + ->willReturn( + [ + [77 => 100], + [78 => 101], + ] ); self::assertCount(2, $this->getLocationHandler()->loadSubtreeIds(77)); From 8f2f274e62c825d86abe1b0f68312e06c0023730 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 1 Apr 2025 14:45:59 +0200 Subject: [PATCH 016/185] IBX-9811: Upgraded Location Doctrine Gateway to doctrine/dbal v3 --- .../Legacy/Content/Location/Gateway.php | 67 +-- .../Location/Gateway/DoctrineDatabase.php | 407 +++++++++++------- .../Location/Gateway/ExceptionConversion.php | 85 ++-- 3 files changed, 328 insertions(+), 231 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway.php b/src/lib/Persistence/Legacy/Content/Location/Gateway.php index 3e2c7eb7ca..43aca74733 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway.php @@ -19,24 +19,24 @@ */ abstract class Gateway { - public const TRASH_TABLE = 'ezcontentobject_trash'; + public const string TRASH_TABLE = 'ezcontentobject_trash'; /** * Constants for node assignment op codes. */ - public const NODE_ASSIGNMENT_OP_CODE_NOP = 0; - public const NODE_ASSIGNMENT_OP_CODE_EXECUTE = 1; - public const NODE_ASSIGNMENT_OP_CODE_CREATE_NOP = 2; - public const NODE_ASSIGNMENT_OP_CODE_CREATE = 3; - public const NODE_ASSIGNMENT_OP_CODE_MOVE_NOP = 4; - public const NODE_ASSIGNMENT_OP_CODE_MOVE = 5; - public const NODE_ASSIGNMENT_OP_CODE_REMOVE_NOP = 6; - public const NODE_ASSIGNMENT_OP_CODE_REMOVE = 7; - public const NODE_ASSIGNMENT_OP_CODE_SET_NOP = 8; - public const NODE_ASSIGNMENT_OP_CODE_SET = 9; + public const int NODE_ASSIGNMENT_OP_CODE_NOP = 0; + public const int NODE_ASSIGNMENT_OP_CODE_EXECUTE = 1; + public const int NODE_ASSIGNMENT_OP_CODE_CREATE_NOP = 2; + public const int NODE_ASSIGNMENT_OP_CODE_CREATE = 3; + public const int NODE_ASSIGNMENT_OP_CODE_MOVE_NOP = 4; + public const int NODE_ASSIGNMENT_OP_CODE_MOVE = 5; + public const int NODE_ASSIGNMENT_OP_CODE_REMOVE_NOP = 6; + public const int NODE_ASSIGNMENT_OP_CODE_REMOVE = 7; + public const int NODE_ASSIGNMENT_OP_CODE_SET_NOP = 8; + public const int NODE_ASSIGNMENT_OP_CODE_SET = 9; - public const CONTENT_TREE_TABLE = 'ezcontentobject_tree'; - public const CONTENT_TREE_SEQ = 'ezcontentobject_tree_node_id_seq'; + public const string CONTENT_TREE_TABLE = 'ezcontentobject_tree'; + public const string CONTENT_TREE_SEQ = 'ezcontentobject_tree_node_id_seq'; /** * Returns an array with basic node data. @@ -46,11 +46,11 @@ abstract class Gateway * @param string[]|null $translations * @param bool $useAlwaysAvailable Respect always available flag on content when filtering on $translations. * - * @return array + * @return array */ abstract public function getBasicNodeData( int $nodeId, - array $translations = null, + ?array $translations = null, bool $useAlwaysAvailable = true ): array; @@ -61,7 +61,7 @@ abstract public function getBasicNodeData( * @param string[]|null $translations * @param bool $useAlwaysAvailable Respect always available flag on content when filtering on $translations. * - * @return array + * @phpstan-return list> * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ @@ -78,16 +78,20 @@ abstract public function getNodeDataList( * * @param string[]|null $translations * @param bool $useAlwaysAvailable Respect always available flag on content when filtering on $translations. + * + * @return array */ abstract public function getBasicNodeDataByRemoteId( string $remoteId, - array $translations = null, + ?array $translations = null, bool $useAlwaysAvailable = true ): array; /** * Loads data for all Locations for $contentId, optionally only in the * subtree starting at $rootLocationId. + * + * @phpstan-return list> */ abstract public function loadLocationDataByContent( int $contentId, @@ -98,12 +102,14 @@ abstract public function loadLocationDataByContent( * Loads data for all Locations for $contentId in trash, optionally only in the * subtree starting at $rootLocationId. * - * @return string[] + * @phpstan-return list> */ abstract public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocationId = null): array; /** * Loads data for all parent Locations for unpublished Content by given $contentId. + * + * @phpstan-return list> */ abstract public function loadParentLocationsDataForDraftContent(int $contentId): array; @@ -132,6 +138,8 @@ abstract public function getSubtreeSize(string $path): int; /** * Returns data for the first level children of the location identified by given $locationId. + * + * @phpstan-return list> */ abstract public function getChildren(int $locationId): array; @@ -143,8 +151,8 @@ abstract public function getChildren(int $locationId): array; * * @todo optimize * - * @param array $fromPathString - * @param array $toPathString + * @param array $fromPathString + * @param array $toPathString */ abstract public function moveSubtreeNodes(array $fromPathString, array $toPathString): void; @@ -176,7 +184,7 @@ abstract public function createLocationsFromNodeAssignments( abstract public function updateLocationsContentVersionNo(int $contentId, int $versionNo): void; /** - * Sets a location to be hidden, and it self + all children to invisible. + * Sets a location to be hidden, and itself + all children to invisible. */ abstract public function hideSubtree(string $pathString): void; @@ -211,7 +219,7 @@ abstract public function swap(int $locationId1, int $locationId2): bool; /** * Creates a new location in given $parentNode. * - * @param array $parentNode parent node raw data + * @param array $parentNode parent node raw data */ abstract public function create(CreateStruct $createStruct, array $parentNode): Location; @@ -260,6 +268,8 @@ abstract public function removeLocation(int $locationId): void; * This returns lowest node id for content identified by $contentId, and not of * the node identified by given $locationId (current main node). * Assumes that content has more than one location. + * + * @return array */ abstract public function getFallbackMainNodeData(int $contentId, int $locationId): array; @@ -278,7 +288,7 @@ abstract public function trashLocation(int $locationId): void; * Recreates the originally trashed location in the new position. If no new * position has been specified, it will be tried to re-create the location * at the old position. If this is not possible ( because the old location - * does not exist any more) and exception is thrown. + * does not exist anymore) and exception is thrown. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ @@ -287,12 +297,14 @@ abstract public function untrashLocation(int $locationId, ?int $newParentId = nu /** * Loads trash data specified by location ID. * + * @return array + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function loadTrashByLocation(int $locationId): array; /** - * Removes every entries in the trash. + * Removes every entry in the trash. * Will NOT remove associated content objects nor attributes. * * Basically truncates ezcontentobject_trash table. @@ -307,7 +319,7 @@ abstract public function cleanupTrash(): void; * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[] $sort * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface|null $criterion * - * @return array entries from ezcontentobject_trash. + * @return list> entries from ezcontentobject_trash. */ abstract public function listTrashed( int $offset, @@ -368,10 +380,7 @@ abstract public function countAllLocations(): int; /** * Load data of every Location, except the Root node. * - * @param int $offset Paginator offset - * @param int $limit Paginator limit - * - * @return array + * @phpstan-return list> */ abstract public function loadAllLocationsData(int $offset, int $limit): array; } diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php index 4f1d79e0f7..0456a0e3a9 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php @@ -7,8 +7,8 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; @@ -23,6 +23,7 @@ use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter; +use LogicException; use RuntimeException; use function time; @@ -36,24 +37,18 @@ final class DoctrineDatabase extends Gateway { private const string CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION = 't.contentobject_id = c.id'; - private const string CONTENT_ID_PARAM_NAME = ':contentId'; - private const string VERSION_NO_PARAM_NAME = ':versionNo'; - private const string MAIN_NODE_ID_PARAM_NAME = ':mainNodeId'; + private const string CONTENT_ID_PARAM_NAME = 'contentId'; + private const string VERSION_NO_PARAM_NAME = 'versionNo'; + private const string MAIN_NODE_ID_PARAM_NAME = 'mainNodeId'; private Connection $connection; private MaskGenerator $languageMaskGenerator; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - private CriteriaConverter $trashCriteriaConverter; private SortClauseConverter $trashSortClauseConverter; - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct( Connection $connection, MaskGenerator $languageMaskGenerator, @@ -61,12 +56,15 @@ public function __construct( SortClauseConverter $trashSortClauseConverter ) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); $this->languageMaskGenerator = $languageMaskGenerator; $this->trashCriteriaConverter = $trashCriteriaConverter; $this->trashSortClauseConverter = $trashSortClauseConverter; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function getBasicNodeData( int $nodeId, array $translations = null, @@ -77,43 +75,53 @@ public function getBasicNodeData( $query->expr()->eq('t.node_id', $query->createNamedParameter($nodeId, ParameterType::INTEGER)) ); - if ($row = $query->execute()->fetch(FetchMode::ASSOCIATIVE)) { + if ($row = $query->executeQuery()->fetchAssociative()) { return $row; } throw new NotFound('location', $nodeId); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getNodeDataList(array $locationIds, array $translations = null, bool $useAlwaysAvailable = true): iterable { $query = $this->createNodeQueryBuilder(['t.*'], $translations, $useAlwaysAvailable); $query->andWhere( $query->expr()->in( 't.node_id', - $query->createNamedParameter($locationIds, Connection::PARAM_INT_ARRAY) + $query->createNamedParameter($locationIds, ArrayParameterType::INTEGER) ) ); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function getBasicNodeDataByRemoteId( string $remoteId, - array $translations = null, + ?array $translations = null, bool $useAlwaysAvailable = true ): array { $query = $this->createNodeQueryBuilder(['t.*'], $translations, $useAlwaysAvailable); $query->andWhere( - $query->expr()->eq('t.remote_id', $query->createNamedParameter($remoteId, ParameterType::STRING)) + $query->expr()->eq('t.remote_id', $query->createNamedParameter($remoteId)) ); - if ($row = $query->execute()->fetch(FetchMode::ASSOCIATIVE)) { + if ($row = $query->executeQuery()->fetchAssociative()) { return $row; } throw new NotFound('location', $remoteId); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadLocationDataByContent(int $contentId, ?int $rootLocationId = null): array { $query = $this->connection->createQueryBuilder(); @@ -135,13 +143,11 @@ public function loadLocationDataByContent(int $contentId, ?int $rootLocationId = ; } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocationId = null): array { @@ -160,11 +166,12 @@ public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocatio ; } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadParentLocationsDataForDraftContent(int $contentId): array { $query = $this->connection->createQueryBuilder(); @@ -213,13 +220,10 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ public function getSubtreeContent(int $sourceId): array @@ -237,7 +241,6 @@ public function getSubtreeContent(int $sourceId): array /** * @throws \Doctrine\DBAL\Exception - * @throws \Doctrine\DBAL\Driver\Exception */ public function getSubtreeNodeIdToContentIdMap(int $sourceId): array { @@ -260,7 +263,6 @@ public function getSubtreeNodeIdToContentIdMap(int $sourceId): array * @return array * * @throws \Doctrine\DBAL\Exception - * @throws \Doctrine\DBAL\Driver\Exception */ public function getSubtreeChildrenDraftContentIds(int $sourceId): array { @@ -271,17 +273,18 @@ public function getSubtreeChildrenDraftContentIds(int $sourceId): array ->innerJoin('n', 'ezcontentobject', 'c', 'n.contentobject_id = c.id') ->andWhere('n.parent_node = :parentNode') ->andWhere('c.status = :status') - ->setParameter(':parentNode', $sourceId, ParameterType::INTEGER) - ->setParameter(':status', ContentInfo::STATUS_DRAFT, ParameterType::INTEGER); + ->setParameter('parentNode', $sourceId, ParameterType::INTEGER) + ->setParameter('status', ContentInfo::STATUS_DRAFT, ParameterType::INTEGER); - $statement = $query->execute(); - - return $statement->fetchFirstColumn(); + return $query->executeQuery()->fetchFirstColumn(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getSubtreeSize(string $path): int { - $query = $this->createNodeQueryBuilder([$this->dbPlatform->getCountExpression('node_id')]); + $query = $this->createNodeQueryBuilder(['COUNT(node_id)']); $query->andWhere( $query->expr()->like( 't.path_string', @@ -291,7 +294,7 @@ public function getSubtreeSize(string $path): int ) ); - return (int) $query->execute()->fetchOne(); + return (int) $query->executeQuery()->fetchOne(); } /** @@ -304,12 +307,14 @@ private function getSubtreeLimitationExpression( return $query->expr()->like( 't.path_string', $query->createPositionalParameter( - '%/' . ((string)$rootLocationId) . '/%', - ParameterType::STRING + '%/' . ((string)$rootLocationId) . '/%' ) ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getChildren(int $locationId): array { $query = $this->connection->createQueryBuilder(); @@ -321,11 +326,15 @@ public function getChildren(int $locationId): array $query->createPositionalParameter($locationId, ParameterType::INTEGER) ) ); - $statement = $query->execute(); - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + * + * @phpstan-return list> + */ private function getSubtreeNodesData(string $pathString): array { $query = $this->connection->createQueryBuilder(); @@ -341,7 +350,7 @@ private function getSubtreeNodesData(string $pathString): array ->where( $query->expr()->like( 'path_string', - $query->createPositionalParameter($pathString . '%', ParameterType::STRING) + $query->createPositionalParameter($pathString . '%') ) ); @@ -350,7 +359,6 @@ private function getSubtreeNodesData(string $pathString): array /** * @throws \Doctrine\DBAL\Exception - * @throws \Doctrine\DBAL\Driver\Exception */ public function moveSubtreeNodes(array $sourceNodeData, array $destinationNodeData): void { @@ -404,7 +412,6 @@ public function moveSubtreeNodes(array $sourceNodeData, array $destinationNodeDa * * @return int[] * - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ private function getHiddenNodeIds(int $contentObjectId): array @@ -421,9 +428,7 @@ private function getHiddenNodeIds(int $contentObjectId): array ) ) ); - $statement = $query->execute(); - - $result = $statement->fetchFirstColumn(); + $result = $query->executeQuery()->fetchFirstColumn(); return array_map('intval', $result); } @@ -444,9 +449,11 @@ private function isHiddenByParentOrSelf(string $pathString, array $hiddenNodeIds } /** - * @param array $sourceNodeData - * @param array $destinationNodeData + * @param array $sourceNodeData + * @param array $destinationNodeData * @param int[] $hiddenNodeIds + * + * @throws \Doctrine\DBAL\Exception */ private function moveSingleSubtreeNode( int $nodeId, @@ -462,13 +469,12 @@ private function moveSingleSubtreeNode( ->update(self::CONTENT_TREE_TABLE) ->set( 'path_string', - $query->createPositionalParameter($newPathString, ParameterType::STRING) + $query->createPositionalParameter($newPathString) ) ->set( 'path_identification_string', $query->createPositionalParameter( - $newPathIdentificationString, - ParameterType::STRING + $newPathIdentificationString ) ) ->set( @@ -506,15 +512,21 @@ private function moveSingleSubtreeNode( $query->createPositionalParameter($nodeId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function hideSubtree(string $pathString): void { $this->setNodeWithChildrenInvisible($pathString); $this->setNodeHidden($pathString); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setNodeWithChildrenInvisible(string $pathString): void { $query = $this->connection->createQueryBuilder(); @@ -531,18 +543,24 @@ public function setNodeWithChildrenInvisible(string $pathString): void ->where( $query->expr()->like( 'path_string', - $query->createPositionalParameter($pathString . '%', ParameterType::STRING) + $query->createPositionalParameter($pathString . '%') ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setNodeHidden(string $pathString): void { $this->setNodeHiddenStatus($pathString, true); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function setNodeHiddenStatus(string $pathString, bool $isHidden): void { $query = $this->connection->createQueryBuilder(); @@ -555,19 +573,25 @@ private function setNodeHiddenStatus(string $pathString, bool $isHidden): void ->where( $query->expr()->eq( 'path_string', - $query->createPositionalParameter($pathString, ParameterType::STRING) + $query->createPositionalParameter($pathString) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function unHideSubtree(string $pathString): void { $this->setNodeUnhidden($pathString); $this->setNodeWithChildrenVisible($pathString); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setNodeWithChildrenVisible(string $pathString): void { // Check if any parent nodes are explicitly hidden @@ -599,7 +623,7 @@ public function setNodeWithChildrenVisible(string $pathString): void ->where( $expr->like( 'path_string', - $query->createPositionalParameter($pathString . '%', ParameterType::STRING) + $query->createPositionalParameter($pathString . '%') ) ); if (count($hiddenSubtrees) > 0) { @@ -609,21 +633,23 @@ public function setNodeWithChildrenVisible(string $pathString): void $expr->notLike( 'path_string', $query->createPositionalParameter( - $subtreePathString . '%', - ParameterType::STRING + $subtreePathString . '%' ) ) ); } } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function isAnyNodeInPathExplicitlyHidden(string $pathString): bool { $query = $this->buildHiddenSubtreeQuery( - $this->dbPlatform->getCountExpression('path_string') + 'COUNT(path_string)' ); $expr = $query->expr(); $query @@ -632,17 +658,19 @@ private function isAnyNodeInPathExplicitlyHidden(string $pathString): bool 't.node_id', $query->createPositionalParameter( array_filter(explode('/', $pathString)), - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); - $count = (int)$query->execute()->fetchColumn(); + $count = (int)$query->executeQuery()->fetchOne(); return $count > 0; } /** - * @return array list of path strings + * @return string[] list of path strings + * + * @throws \Doctrine\DBAL\Exception */ private function loadHiddenSubtreesByPath(string $pathString): array { @@ -652,10 +680,7 @@ private function loadHiddenSubtreesByPath(string $pathString): array ->andWhere( $expr->like( 'path_string', - $query->createPositionalParameter( - $pathString . '%', - ParameterType::STRING - ) + $query->createPositionalParameter($pathString . '%') ) ); @@ -686,11 +711,17 @@ private function buildHiddenSubtreeQuery(string $selectExpr): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setNodeUnhidden(string $pathString): void { $this->setNodeHiddenStatus($pathString, false); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function swap(int $locationId1, int $locationId2): bool { $queryBuilder = $this->connection->createQueryBuilder(); @@ -704,9 +735,9 @@ public function swap(int $locationId1, int $locationId2): bool ':locationIds' ) ) - ->setParameter('locationIds', [$locationId1, $locationId2], Connection::PARAM_INT_ARRAY) + ->setParameter('locationIds', [$locationId1, $locationId2], ArrayParameterType::INTEGER) ; - $statement = $queryBuilder->execute(); + $statement = $queryBuilder->executeQuery(); $contentObjects = []; foreach ($statement->fetchAllAssociative() as $row) { $row['is_main_node'] = (int)$row['main_node_id'] === (int)$row['node_id']; @@ -729,18 +760,18 @@ public function swap(int $locationId1, int $locationId2): bool $queryBuilder = $this->connection->createQueryBuilder(); $queryBuilder ->update(self::CONTENT_TREE_TABLE) - ->set('contentobject_id', self::CONTENT_ID_PARAM_NAME) - ->set('contentobject_version', self::VERSION_NO_PARAM_NAME) - ->set('main_node_id', self::MAIN_NODE_ID_PARAM_NAME) + ->set('contentobject_id', ':' . self::CONTENT_ID_PARAM_NAME) + ->set('contentobject_version', ':' . self::VERSION_NO_PARAM_NAME) + ->set('main_node_id', ':' . self::MAIN_NODE_ID_PARAM_NAME) ->where( $expr->eq('node_id', ':locationId') ); $queryBuilder - ->setParameter(self::CONTENT_ID_PARAM_NAME, $content2data['contentobject_id']) - ->setParameter(self::VERSION_NO_PARAM_NAME, $content2data['contentobject_version']) + ->setParameter('contentId', $content2data['contentobject_id']) + ->setParameter('versionNo', $content2data['contentobject_version']) ->setParameter( - self::MAIN_NODE_ID_PARAM_NAME, + 'mainNodeId', // make main Location main again, preserve main Location id of non-main one $content2data['is_main_node'] ? $content1data['node_id'] @@ -749,13 +780,13 @@ public function swap(int $locationId1, int $locationId2): bool ->setParameter('locationId', $locationId1); // update Location 1 entry - $queryBuilder->execute(); + $queryBuilder->executeStatement(); $queryBuilder - ->setParameter(self::CONTENT_ID_PARAM_NAME, $content1data['contentobject_id']) - ->setParameter(self::VERSION_NO_PARAM_NAME, $content1data['contentobject_version']) + ->setParameter('contentId', $content1data['contentobject_id']) + ->setParameter('versionNo', $content1data['contentobject_version']) ->setParameter( - self::MAIN_NODE_ID_PARAM_NAME, + 'mainNodeId', $content1data['is_main_node'] // make main Location main again, preserve main Location id of non-main one ? $content2data['node_id'] @@ -764,11 +795,14 @@ public function swap(int $locationId1, int $locationId2): bool ->setParameter('locationId', $locationId2); // update Location 2 entry - $queryBuilder->execute(); + $queryBuilder->executeStatement(); return true; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function create(CreateStruct $createStruct, array $parentNode): Location { $location = $this->insertLocationIntoContentTree($createStruct, $parentNode); @@ -780,7 +814,7 @@ public function create(CreateStruct $createStruct, array $parentNode): Location ->update(self::CONTENT_TREE_TABLE) ->set( 'path_string', - $query->createPositionalParameter($location->pathString, ParameterType::STRING) + $query->createPositionalParameter($location->pathString) ) ->set( 'main_node_id', @@ -793,11 +827,14 @@ public function create(CreateStruct $createStruct, array $parentNode): Location ) ); - $query->execute(); + $query->executeStatement(); return $location; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function createNodeAssignment( CreateStruct $createStruct, int $parentNodeId, @@ -860,9 +897,12 @@ public function createNodeAssignment( 'is_hidden' => ParameterType::INTEGER, ] ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteNodeAssignment(int $contentId, ?int $versionNo = null): void { $query = $this->connection->createQueryBuilder(); @@ -882,9 +922,12 @@ public function deleteNodeAssignment(int $contentId, ?int $versionNo = null): vo ) ); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateNodeAssignment( int $contentObjectId, int $oldParent, @@ -920,9 +963,13 @@ public function updateNodeAssignment( ) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function createLocationsFromNodeAssignments(int $contentId, int $versionNo): void { // select all node assignments with OP_CODE_CREATE (3) for this content @@ -952,11 +999,11 @@ public function createLocationsFromNodeAssignments(int $contentId, int $versionN ) ) ->orderBy('id'); - $statement = $query->execute(); + $statement = $query->executeQuery(); // convert all these assignments to nodes - while ($row = $statement->fetch(FetchMode::ASSOCIATIVE)) { + while ($row = $statement->fetchAssociative()) { $isMain = (bool)$row['is_main']; // set null for main to indicate that new Location ID is required $mainLocationId = $isMain ? null : $this->getMainNodeId($contentId); @@ -990,6 +1037,9 @@ public function createLocationsFromNodeAssignments(int $contentId, int $versionN } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateLocationsContentVersionNo(int $contentId, int $versionNo): void { $query = $this->connection->createQueryBuilder(); @@ -1004,11 +1054,13 @@ public function updateLocationsContentVersionNo(int $contentId, int $versionNo): $contentId ) ); - $query->execute(); + $query->executeStatement(); } /** * Search for the main nodeId of $contentId. + * + * @throws \Doctrine\DBAL\Exception */ private function getMainNodeId(int $contentId): ?int { @@ -1028,22 +1080,15 @@ private function getMainNodeId(int $contentId): ?int ) ) ); - $statement = $query->execute(); - - $result = $statement->fetchColumn(); + $result = $query->executeQuery()->fetchOne(); return false !== $result ? (int)$result : null; } /** - * Updates an existing location. - * - * Will not throw anything if location id is invalid or no entries are affected. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\Location\UpdateStruct $location - * @param int $locationId + * @throws \Doctrine\DBAL\Exception */ - public function update(UpdateStruct $location, $locationId): void + public function update(UpdateStruct $location, int $locationId): void { $query = $this->connection->createQueryBuilder(); @@ -1055,7 +1100,7 @@ public function update(UpdateStruct $location, $locationId): void ) ->set( 'remote_id', - $query->createPositionalParameter($location->remoteId, ParameterType::STRING) + $query->createPositionalParameter($location->remoteId) ) ->set( 'sort_order', @@ -1071,10 +1116,14 @@ public function update(UpdateStruct $location, $locationId): void $locationId ) ); - $query->execute(); + $query->executeStatement(); } - public function updatePathIdentificationString($locationId, $parentLocationId, $text): void + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ + public function updatePathIdentificationString(int $locationId, int $parentLocationId, string $text): void { $parentData = $this->getBasicNodeData($parentLocationId); @@ -1087,22 +1136,20 @@ public function updatePathIdentificationString($locationId, $parentLocationId, $ self::CONTENT_TREE_TABLE )->set( 'path_identification_string', - $query->createPositionalParameter($newPathIdentificationString, ParameterType::STRING) + $query->createPositionalParameter($newPathIdentificationString) )->where( $query->expr()->eq( 'node_id', $query->createPositionalParameter($locationId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** - * Deletes ezcontentobject_tree row for given $locationId (node_id). - * - * @param mixed $locationId + * @throws \Doctrine\DBAL\Exception */ - public function removeLocation($locationId): void + public function removeLocation(int $locationId): void { $query = $this->connection->createQueryBuilder(); $query->delete( @@ -1113,22 +1160,13 @@ public function removeLocation($locationId): void $query->createPositionalParameter($locationId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** - * Return data of the next in line node to be set as a new main node. - * - * This returns lowest node id for content identified by $contentId, and not of - * the node identified by given $locationId (current main node). - * Assumes that content has more than one location. - * - * @param mixed $contentId - * @param mixed $locationId - * - * @return array + * @throws \Doctrine\DBAL\Exception */ - public function getFallbackMainNodeData($contentId, $locationId): array + public function getFallbackMainNodeData(int $contentId, int $locationId): array { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); @@ -1160,11 +1198,15 @@ public function getFallbackMainNodeData($contentId, $locationId): array ->orderBy('node_id', 'ASC') ->setMaxResults(1); - $statement = $query->execute(); + $mainNodeData = $query->executeQuery()->fetchAssociative(); - return $statement->fetch(FetchMode::ASSOCIATIVE); + return false !== $mainNodeData ? $mainNodeData : []; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function trashLocation(int $locationId): void { $locationRow = $this->getBasicNodeData($locationId); @@ -1178,12 +1220,16 @@ public function trashLocation(int $locationId): void $query->setValue($key, $query->createPositionalParameter($value)); } - $query->execute(); + $query->executeStatement(); $this->removeLocation($locationRow['node_id']); $this->setContentStatus((int)$locationRow['contentobject_id'], ContentInfo::STATUS_TRASHED); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function untrashLocation(int $locationId, ?int $newParentId = null): Location { $row = $this->loadTrashByLocation($locationId); @@ -1211,6 +1257,9 @@ public function untrashLocation(int $locationId, ?int $newParentId = null): Loca return $newLocation; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function setContentStatus(int $contentId, int $status): void { $query = $this->connection->createQueryBuilder(); @@ -1225,9 +1274,13 @@ private function setContentStatus(int $contentId, int $status): void $query->createPositionalParameter($contentId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Ibexa\Core\Base\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function loadTrashByLocation(int $locationId): array { $query = $this->connection->createQueryBuilder(); @@ -1240,15 +1293,19 @@ public function loadTrashByLocation(int $locationId): array $query->createPositionalParameter($locationId, ParameterType::INTEGER) ) ); - $statement = $query->execute(); + $statement = $query->executeQuery(); - if ($row = $statement->fetch(FetchMode::ASSOCIATIVE)) { + if ($row = $statement->fetchAssociative()) { return $row; } throw new NotFound('trash', $locationId); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function listTrashed( int $offset, ?int $limit, @@ -1269,36 +1326,38 @@ public function listTrashed( $query->setFirstResult($offset); } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function countTrashed(?CriterionInterface $criterion = null): int { $query = $this->connection->createQueryBuilder() - ->select($this->dbPlatform->getCountExpression(1)) + ->select('COUNT(1)') ->from(self::TRASH_TABLE, 't') ->innerJoin('t', ContentGateway::CONTENT_ITEM_TABLE, 'c', self::CONTENT_ITEM_TO_TREE_JOIN_EXPRESSION); $this->addConditionsByCriterion($criterion, $query); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** - * Removes every entries in the trash. - * Will NOT remove associated content objects nor attributes. - * - * Basically truncates ezcontentobject_trash table. + * @throws \Doctrine\DBAL\Exception */ public function cleanupTrash(): void { $query = $this->connection->createQueryBuilder(); $query->delete('ezcontentobject_trash'); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeElementFromTrash(int $id): void { $query = $this->connection->createQueryBuilder(); @@ -1310,9 +1369,12 @@ public function removeElementFromTrash(int $id): void $query->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setSectionForSubtree(string $pathString, int $sectionId): bool { $selectContentIdsQuery = $this->connection->createQueryBuilder(); @@ -1322,7 +1384,7 @@ public function setSectionForSubtree(string $pathString, int $sectionId): bool ->where( $selectContentIdsQuery->expr()->like( 't.path_string', - $selectContentIdsQuery->createPositionalParameter("{$pathString}%") + $selectContentIdsQuery->createPositionalParameter("$pathString%") ) ); @@ -1345,20 +1407,23 @@ public function setSectionForSubtree(string $pathString, int $sectionId): bool ->where( $updateSectionQuery->expr()->in( 'id', - $contentIds + $updateSectionQuery->createPositionalParameter($contentIds, ArrayParameterType::INTEGER) ) ); - $affectedRows = $updateSectionQuery->execute(); + $affectedRows = $updateSectionQuery->executeStatement(); return $affectedRows > 0; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countLocationsByContentId(int $contentId): int { $query = $this->connection->createQueryBuilder(); $query ->select( - $this->dbPlatform->getCountExpression('*') + 'COUNT(*)' ) ->from(self::CONTENT_TREE_TABLE) ->where( @@ -1367,11 +1432,14 @@ public function countLocationsByContentId(int $contentId): int $query->createPositionalParameter($contentId, ParameterType::INTEGER) ) ); - $stmt = $query->execute(); + $stmt = $query->executeQuery(); - return (int)$stmt->fetchColumn(); + return (int)$stmt->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function changeMainLocation( int $contentId, int $locationId, @@ -1393,7 +1461,7 @@ public function changeMainLocation( ) ) ; - $query->execute(); + $query->executeStatement(); // Update is_main in eznode_assignment table $this->setIsMainForContentVersionParentNodeAssignment( @@ -1403,17 +1471,23 @@ public function changeMainLocation( ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countAllLocations(): int { $query = $this->createNodeQueryBuilder(['count(node_id)']); // exclude absolute Root Location (not to be confused with SiteAccess Tree Root) $query->where($query->expr()->neq('node_id', 'parent_node_id')); - $statement = $query->execute(); + $statement = $query->executeQuery(); - return (int) $statement->fetch(FetchMode::COLUMN); + return (int) $statement->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAllLocationsData(int $offset, int $limit): array { $query = $this @@ -1442,19 +1516,17 @@ public function loadAllLocationsData(int $offset, int $limit): array ->addOrderBy('node_id', 'ASC') ; - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** * Create QueryBuilder for selecting Location (node) data. * - * @param array $columns column or expression list - * @param array|null $translations Filters on language mask of content if provided. + * @param string[] $columns column or expression list + * @param string[]|null $translations list of language codes - filters on language mask of content if provided. * @param bool $useAlwaysAvailable Respect always available flag on content when filtering on $translations. * - * @return \Doctrine\DBAL\Query\QueryBuilder + * @throws \Doctrine\DBAL\Exception */ private function createNodeQueryBuilder( array $columns, @@ -1474,6 +1546,11 @@ private function createNodeQueryBuilder( return $queryBuilder; } + /** + * @param string[] $translations + * + * @throws \Doctrine\DBAL\Exception + */ private function appendContentItemTranslationsConstraint( QueryBuilder $queryBuilder, array $translations, @@ -1485,7 +1562,7 @@ private function appendContentItemTranslationsConstraint( $translations, $useAlwaysAvailable ); - } catch (NotFoundException $e) { + } catch (NotFoundException) { return; } @@ -1496,10 +1573,15 @@ private function appendContentItemTranslationsConstraint( $expr->eq('t.contentobject_id', 'c.id') ); + $dbPlatform = $this->connection->getDatabasePlatform(); + if (null === $dbPlatform) { + throw new LogicException('Unable to determine database platform'); + } + $queryBuilder->andWhere( $expr->or( $expr->gt( - $this->dbPlatform->getBitAndComparisonExpression('c.language_mask', $mask), + $dbPlatform->getBitAndComparisonExpression('c.language_mask', (string)$mask), 0 ), // Root location doesn't have language mask @@ -1516,6 +1598,8 @@ private function appendContentItemTranslationsConstraint( * parent Location ID. * * **NOTE**: The method erases is_main from the other entries related to Content and Version IDs + * + * @throws \Doctrine\DBAL\Exception */ private function setIsMainForContentVersionParentNodeAssignment( int $contentId, @@ -1536,11 +1620,13 @@ private function setIsMainForContentVersionParentNodeAssignment( ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('version_no', $versionNo, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** - * @param array $parentNode raw Location data + * @param array $parentNode raw Location data + * + * @throws \Doctrine\DBAL\Exception */ private function insertLocationIntoContentTree( CreateStruct $createStruct, @@ -1599,7 +1685,7 @@ private function insertLocationIntoContentTree( 'sort_order' => ParameterType::INTEGER, ] ); - $query->execute(); + $query->executeStatement(); $location->id = (int)$this->connection->lastInsertId(self::CONTENT_TREE_SEQ); @@ -1622,14 +1708,17 @@ private function addConditionsByCriterion(?CriterionInterface $criterion, QueryB ); } - private function addSort(?array $sort, QueryBuilder $query, array $languageSettings = []): void + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[]|null $sort + */ + private function addSort(?array $sort, QueryBuilder $query): void { if (empty($sort)) { return; } $this->trashSortClauseConverter->applySelect($query, $sort); - $this->trashSortClauseConverter->applyJoin($query, $sort, $languageSettings); + $this->trashSortClauseConverter->applyJoin($query, $sort, []); $this->trashSortClauseConverter->applyOrderBy($query); } } diff --git a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php index 6677c21c43..b4a74b4afe 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -14,7 +14,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. @@ -43,7 +42,7 @@ public function getBasicNodeData( ): array { try { return $this->innerGateway->getBasicNodeData($nodeId, $translations, $useAlwaysAvailable); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -52,19 +51,19 @@ public function getNodeDataList(array $locationIds, array $translations = null, { try { return $this->innerGateway->getNodeDataList($locationIds, $translations, $useAlwaysAvailable); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } public function getBasicNodeDataByRemoteId( string $remoteId, - array $translations = null, + ?array $translations = null, bool $useAlwaysAvailable = true ): array { try { return $this->innerGateway->getBasicNodeDataByRemoteId($remoteId, $translations, $useAlwaysAvailable); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -73,7 +72,7 @@ public function loadLocationDataByContent(int $contentId, ?int $rootLocationId = { try { return $this->innerGateway->loadLocationDataByContent($contentId, $rootLocationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -82,7 +81,7 @@ public function loadLocationDataByTrashContent(int $contentId, ?int $rootLocatio { try { return $this->innerGateway->loadLocationDataByTrashContent($contentId, $rootLocationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -91,7 +90,7 @@ public function loadParentLocationsDataForDraftContent(int $contentId): array { try { return $this->innerGateway->loadParentLocationsDataForDraftContent($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -100,7 +99,7 @@ public function getSubtreeContent(int $sourceId): array { try { return $this->innerGateway->getSubtreeContent($sourceId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -109,7 +108,7 @@ public function getSubtreeNodeIdToContentIdMap(int $sourceId): array { try { return $this->innerGateway->getSubtreeNodeIdToContentIdMap($sourceId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -121,7 +120,7 @@ public function getSubtreeChildrenDraftContentIds(int $sourceId): array { try { return $this->innerGateway->getSubtreeChildrenDraftContentIds($sourceId); - } catch (PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -130,7 +129,7 @@ public function getSubtreeSize(string $path): int { try { return $this->innerGateway->getSubtreeSize($path); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -139,7 +138,7 @@ public function getChildren(int $locationId): array { try { return $this->innerGateway->getChildren($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -148,7 +147,7 @@ public function moveSubtreeNodes(array $fromPathString, array $toPathString): vo { try { $this->innerGateway->moveSubtreeNodes($fromPathString, $toPathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -161,7 +160,7 @@ public function updateNodeAssignment( ): void { try { $this->innerGateway->updateNodeAssignment($contentObjectId, $oldParent, $newParent, $opcode); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -170,7 +169,7 @@ public function createLocationsFromNodeAssignments(int $contentId, int $versionN { try { $this->innerGateway->createLocationsFromNodeAssignments($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -179,7 +178,7 @@ public function updateLocationsContentVersionNo(int $contentId, int $versionNo): { try { $this->innerGateway->updateLocationsContentVersionNo($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -188,7 +187,7 @@ public function hideSubtree(string $pathString): void { try { $this->innerGateway->hideSubtree($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -197,7 +196,7 @@ public function unHideSubtree(string $pathString): void { try { $this->innerGateway->unHideSubtree($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -206,7 +205,7 @@ public function setNodeWithChildrenInvisible(string $pathString): void { try { $this->innerGateway->setNodeWithChildrenInvisible($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -215,7 +214,7 @@ public function setNodeHidden(string $pathString): void { try { $this->innerGateway->setNodeHidden($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -224,7 +223,7 @@ public function setNodeWithChildrenVisible(string $pathString): void { try { $this->innerGateway->setNodeWithChildrenVisible($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -233,7 +232,7 @@ public function setNodeUnhidden(string $pathString): void { try { $this->innerGateway->setNodeUnhidden($pathString); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -242,7 +241,7 @@ public function swap(int $locationId1, int $locationId2): bool { try { return $this->innerGateway->swap($locationId1, $locationId2); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -251,7 +250,7 @@ public function create(CreateStruct $createStruct, array $parentNode): Location { try { return $this->innerGateway->create($createStruct, $parentNode); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -263,7 +262,7 @@ public function createNodeAssignment( ): void { try { $this->innerGateway->createNodeAssignment($createStruct, $parentNodeId, $type); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -272,7 +271,7 @@ public function deleteNodeAssignment(int $contentId, ?int $versionNo = null): vo { try { $this->innerGateway->deleteNodeAssignment($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -281,7 +280,7 @@ public function update(UpdateStruct $location, int $locationId): void { try { $this->innerGateway->update($location, $locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -293,7 +292,7 @@ public function updatePathIdentificationString( ): void { try { $this->innerGateway->updatePathIdentificationString($locationId, $parentLocationId, $text); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -302,7 +301,7 @@ public function removeLocation(int $locationId): void { try { $this->innerGateway->removeLocation($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -311,7 +310,7 @@ public function getFallbackMainNodeData(int $contentId, int $locationId): array { try { return $this->innerGateway->getFallbackMainNodeData($contentId, $locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -320,7 +319,7 @@ public function trashLocation(int $locationId): void { try { $this->innerGateway->trashLocation($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -329,7 +328,7 @@ public function untrashLocation(int $locationId, ?int $newParentId = null): Loca { try { return $this->innerGateway->untrashLocation($locationId, $newParentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -338,7 +337,7 @@ public function loadTrashByLocation(int $locationId): array { try { return $this->innerGateway->loadTrashByLocation($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -347,7 +346,7 @@ public function cleanupTrash(): void { try { $this->innerGateway->cleanupTrash(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -360,7 +359,7 @@ public function listTrashed( ): array { try { return $this->innerGateway->listTrashed($offset, $limit, $sort, $criterion); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -369,7 +368,7 @@ public function countTrashed(?CriterionInterface $criterion = null): int { try { return $this->innerGateway->countTrashed($criterion); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -378,7 +377,7 @@ public function removeElementFromTrash(int $id): void { try { $this->innerGateway->removeElementFromTrash($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -387,7 +386,7 @@ public function setSectionForSubtree(string $pathString, int $sectionId): bool { try { return $this->innerGateway->setSectionForSubtree($pathString, $sectionId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -396,7 +395,7 @@ public function countLocationsByContentId(int $contentId): int { try { return $this->innerGateway->countLocationsByContentId($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -409,7 +408,7 @@ public function changeMainLocation( ): void { try { $this->innerGateway->changeMainLocation($contentId, $locationId, $versionNo, $parentLocationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -418,7 +417,7 @@ public function countAllLocations(): int { try { return $this->innerGateway->countAllLocations(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -427,7 +426,7 @@ public function loadAllLocationsData(int $offset, int $limit): array { try { return $this->innerGateway->loadAllLocationsData($offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From b6fa78609e31dcb6a1c381a5f25afeb440f9d9b4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 1 Apr 2025 15:12:00 +0200 Subject: [PATCH 017/185] IBX-9727: Improved quality of Persistence Location\Handler::move method implementations --- .../Persistence/Content/Location/Handler.php | 7 +------ src/lib/Persistence/Cache/LocationHandler.php | 9 ++++----- .../Persistence/Legacy/Content/Location/Handler.php | 13 ++----------- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/contracts/Persistence/Content/Location/Handler.php b/src/contracts/Persistence/Content/Location/Handler.php index 4039969036..152a4a8674 100644 --- a/src/contracts/Persistence/Content/Location/Handler.php +++ b/src/contracts/Persistence/Content/Location/Handler.php @@ -119,13 +119,8 @@ public function getSubtreeSize(string $path): int; * Performs a full move of the location identified by $sourceId to a new * destination, identified by $destinationParentId. Relations do not need * to be updated, since they refer to Content. URLs are not touched. - * - * @param mixed $sourceId - * @param mixed $destinationParentId - * - * @return bool */ - public function move($sourceId, $destinationParentId); + public function move(int $sourceId, int $destinationParentId): void; /** * Sets a location to be hidden, and it self + all children to invisible. diff --git a/src/lib/Persistence/Cache/LocationHandler.php b/src/lib/Persistence/Cache/LocationHandler.php index 9707bcfb97..9ae91330a4 100644 --- a/src/lib/Persistence/Cache/LocationHandler.php +++ b/src/lib/Persistence/Cache/LocationHandler.php @@ -267,18 +267,17 @@ public function getSubtreeSize(string $path): int } /** - * {@inheritdoc} + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Psr\Cache\InvalidArgumentException */ - public function move($sourceId, $destinationParentId) + public function move(int $sourceId, int $destinationParentId): void { $this->logger->logCall(__METHOD__, ['source' => $sourceId, 'destination' => $destinationParentId]); - $return = $this->persistenceHandler->locationHandler()->move($sourceId, $destinationParentId); + $this->persistenceHandler->locationHandler()->move($sourceId, $destinationParentId); $this->cache->invalidateTags([ $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$sourceId]), ]); - - return $return; } /** diff --git a/src/lib/Persistence/Legacy/Content/Location/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Handler.php index 60a72ecd91..7b39fd6b98 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Handler.php @@ -370,18 +370,9 @@ private function isMainLocation(Location $location): bool } /** - * Moves location identified by $sourceId into new parent identified by $destinationParentId. - * - * Performs a full move of the location identified by $sourceId to a new - * destination, identified by $destinationParentId. Relations do not need - * to be updated, since they refer to Content. URLs are not touched. - * - * @param mixed $sourceId - * @param mixed $destinationParentId - * - * @return bool + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function move($sourceId, $destinationParentId): void + public function move(int $sourceId, int $destinationParentId): void { $sourceNodeData = $this->locationGateway->getBasicNodeData($sourceId); $destinationNodeData = $this->locationGateway->getBasicNodeData($destinationParentId); From 5dfcc3d628e698ffde9190f5106890d51eb0106f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 13:23:44 +0200 Subject: [PATCH 018/185] IBX-9811: Dropped obsolete Indexer::getContentDbFieldsStmt method --- src/lib/Search/Common/Indexer.php | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/lib/Search/Common/Indexer.php b/src/lib/Search/Common/Indexer.php index 48317de863..a21ea74e02 100644 --- a/src/lib/Search/Common/Indexer.php +++ b/src/lib/Search/Common/Indexer.php @@ -8,12 +8,9 @@ namespace Ibexa\Core\Search\Common; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\Statement; -use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Search\Handler as SearchHandler; -use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Psr\Log\LoggerInterface; /** @@ -41,20 +38,4 @@ public function __construct( $this->connection = $connection; $this->searchHandler = $searchHandler; } - - /** - * Get DB Statement to fetch metadata about content objects to be indexed. - * - * @param array $fields fields to select - */ - protected function getContentDbFieldsStmt(array $fields): Statement - { - $query = $this->connection->createQueryBuilder(); - $query - ->select($fields) - ->from(ContentGateway::CONTENT_ITEM_TABLE) - ->where($query->expr()->eq('status', ContentInfo::STATUS_PUBLISHED)); - - return $query->execute(); - } } From 7a6835ae3ff86b72713ee0bbc5647ca125ed3a0a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 14:56:45 +0200 Subject: [PATCH 019/185] IBX-9811: Upgraded Search IndexerGateway to doctrine/dbal v3 and improved quality --- .../Search/Legacy/Content/IndexerGateway.php | 56 ++++++------------- 1 file changed, 18 insertions(+), 38 deletions(-) diff --git a/src/lib/Search/Legacy/Content/IndexerGateway.php b/src/lib/Search/Legacy/Content/IndexerGateway.php index 9aa1bbaf84..1de8f23a9f 100644 --- a/src/lib/Search/Legacy/Content/IndexerGateway.php +++ b/src/lib/Search/Legacy/Content/IndexerGateway.php @@ -10,9 +10,9 @@ use DateTimeInterface; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; +use Doctrine\DBAL\Result; use Generator; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Search\Content\IndexerGateway as SPIIndexerGateway; @@ -34,64 +34,58 @@ public function getContentSince(DateTimeInterface $since, int $iterationCount): $query = $this->buildQueryForContentSince($since); $query->orderBy('c.modified'); - yield from $this->fetchIteration($query->execute(), $iterationCount); + yield from $this->fetchIteration($query->executeQuery(), $iterationCount); } public function countContentSince(DateTimeInterface $since): int { - $query = $this->buildCountingQuery( - $this->buildQueryForContentSince($since) - ); + $query = $this->buildQueryForContentSince($since, true); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } public function getContentInSubtree(string $locationPath, int $iterationCount): Generator { $query = $this->buildQueryForContentInSubtree($locationPath); - yield from $this->fetchIteration($query->execute(), $iterationCount); + yield from $this->fetchIteration($query->executeQuery(), $iterationCount); } public function countContentInSubtree(string $locationPath): int { - $query = $this->buildCountingQuery( - $this->buildQueryForContentInSubtree($locationPath) - ); + $query = $this->buildQueryForContentInSubtree($locationPath, true); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } public function getAllContent(int $iterationCount): Generator { $query = $this->buildQueryForAllContent(); - yield from $this->fetchIteration($query->execute(), $iterationCount); + yield from $this->fetchIteration($query->executeQuery(), $iterationCount); } public function countAllContent(): int { - $query = $this->buildCountingQuery( - $this->buildQueryForAllContent() - ); + $query = $this->buildQueryForAllContent(true); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } - private function buildQueryForContentSince(DateTimeInterface $since): QueryBuilder + private function buildQueryForContentSince(DateTimeInterface $since, bool $count = false): QueryBuilder { return $this->connection->createQueryBuilder() - ->select('c.id') + ->select($count ? 'COUNT(c.id)' : 'c.id') ->from('ezcontentobject', 'c') ->where('c.status = :status')->andWhere('c.modified >= :since') ->setParameter('status', ContentInfo::STATUS_PUBLISHED, ParameterType::INTEGER) ->setParameter('since', $since->getTimestamp(), ParameterType::INTEGER); } - private function buildQueryForContentInSubtree(string $locationPath): QueryBuilder + private function buildQueryForContentInSubtree(string $locationPath, bool $count = false): QueryBuilder { return $this->connection->createQueryBuilder() - ->select('DISTINCT c.id') + ->select($count ? 'COUNT(DISTINCT c.id)' : 'DISTINCT c.id') ->from('ezcontentobject', 'c') ->innerJoin('c', 'ezcontentobject_tree', 't', 't.contentobject_id = c.id') ->where('c.status = :status') @@ -100,10 +94,10 @@ private function buildQueryForContentInSubtree(string $locationPath): QueryBuild ->setParameter('path', $locationPath . '%', ParameterType::STRING); } - private function buildQueryForAllContent(): QueryBuilder + private function buildQueryForAllContent(bool $count = false): QueryBuilder { return $this->connection->createQueryBuilder() - ->select('c.id') + ->select($count ? 'COUNT(c.id)' : 'c.id') ->from('ezcontentobject', 'c') ->where('c.status = :status') ->setParameter('status', ContentInfo::STATUS_PUBLISHED, ParameterType::INTEGER); @@ -112,26 +106,12 @@ private function buildQueryForAllContent(): QueryBuilder /** * @throws \Doctrine\DBAL\Exception */ - private function buildCountingQuery(QueryBuilder $query): QueryBuilder - { - $databasePlatform = $this->connection->getDatabasePlatform(); - - // wrap existing select part in count expression - $query->select( - $databasePlatform->getCountExpression( - $query->getQueryPart('select')[0] - ) - ); - - return $query; - } - - private function fetchIteration(ResultStatement $statement, int $iterationCount): Generator + private function fetchIteration(Result $statement, int $iterationCount): Generator { do { $contentIds = []; for ($i = 0; $i < $iterationCount; ++$i) { - if ($contentId = $statement->fetchOne()) { + if (false !== ($contentId = $statement->fetchOne())) { $contentIds[] = $contentId; } elseif (empty($contentIds)) { return; From 752d22f272203c134d26a54dbe1a28396c260c02 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 14:58:58 +0200 Subject: [PATCH 020/185] IBX-9811: Upgraded Symfony Commands codebase to doctrine/dbal v3 --- src/bundle/Core/Command/CleanupVersionsCommand.php | 3 ++- .../Core/Command/UpdateTimestampsToUTCCommand.php | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/bundle/Core/Command/CleanupVersionsCommand.php b/src/bundle/Core/Command/CleanupVersionsCommand.php index 1a16f9c28e..bd3d777d4e 100644 --- a/src/bundle/Core/Command/CleanupVersionsCommand.php +++ b/src/bundle/Core/Command/CleanupVersionsCommand.php @@ -7,6 +7,7 @@ namespace Ibexa\Bundle\Core\Command; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Exception; use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; @@ -271,7 +272,7 @@ protected function getObjectsIds($keep, $status, $excludedContentTypes = []): ar 'cl.identifier', ':contentTypes' ) - )->setParameter(':contentTypes', $excludedContentTypes, Connection::PARAM_STR_ARRAY); + )->setParameter('contentTypes', $excludedContentTypes, ArrayParameterType::STRING); } return $query->executeQuery()->fetchFirstColumn(); diff --git a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php index 2de98e376e..c6ddd78588 100644 --- a/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php +++ b/src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php @@ -10,6 +10,7 @@ use DateTime; use DateTimeZone; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use RuntimeException; use Symfony\Component\Console\Attribute\AsCommand; @@ -289,7 +290,7 @@ protected function getTimestampBasedFields(int $offset, int $limit): array ->where( $query->expr()->in( 'a.data_type_string', - $query->createNamedParameter(self::MODES[$this->mode], Connection::PARAM_STR_ARRAY) + $query->createNamedParameter(self::MODES[$this->mode], ArrayParameterType::STRING) ) ) ->andWhere('a.data_int is not null') @@ -327,7 +328,7 @@ protected function countTimestampBasedFields(): int ->where( $query->expr()->in( 'a.data_type_string', - $query->createNamedParameter(self::MODES[$this->mode], Connection::PARAM_STR_ARRAY) + $query->createNamedParameter(self::MODES[$this->mode], ArrayParameterType::STRING) ) ) ->andWhere('a.data_int is not null') @@ -426,9 +427,9 @@ protected function updateTimestampToUTC( ->set('a.sort_key_int', ':new_timestamp') ->where('a.id = :id') ->andWhere('a.version = :version') - ->setParameter(':new_timestamp', $newTimestamp) - ->setParameter(':id', $contentAttributeId) - ->setParameter(':version', $contentAttributeVersion); + ->setParameter('new_timestamp', $newTimestamp) + ->setParameter('id', $contentAttributeId) + ->setParameter('version', $contentAttributeVersion); $query->executeStatement(); } From 7051e7fc848229d34867eff299844dad408ac602 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 15:13:16 +0200 Subject: [PATCH 021/185] IBX-9727: Improved quality of `ibexa:install` Symfony command --- .../Command/InstallPlatformCommand.php | 76 +++++++------------ .../Compiler/InstallerTagPass.php | 2 +- 2 files changed, 30 insertions(+), 48 deletions(-) diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index 8e2ac9ebb4..06d4879827 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -8,10 +8,12 @@ namespace Ibexa\Bundle\RepositoryInstaller\Command; use Doctrine\DBAL\Connection; +use Ibexa\Bundle\RepositoryInstaller\Installer\Installer; use Ibexa\Contracts\Core\Container\ApiLoader\RepositoryConfigurationProviderInterface; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -25,8 +27,6 @@ final class InstallPlatformCommand extends Command { public const int EXIT_GENERAL_DATABASE_ERROR = 4; - public const int EXIT_PARAMETERS_NOT_FOUND = 5; - public const int EXIT_UNKNOWN_INSTALL_TYPE = 6; public const int EXIT_MISSING_PERMISSIONS = 7; private Connection $connection; @@ -42,6 +42,9 @@ final class InstallPlatformCommand extends Command private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider; + /** + * @param array $installers + */ public function __construct( Connection $connection, array $installers, @@ -73,14 +76,16 @@ protected function configure(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function execute(InputInterface $input, OutputInterface $output): int { $this->output = $output; $this->checkPermissions(); - $this->checkParameters(); $this->checkCreateDatabase($output); - $schemaManager = $this->connection->getSchemaManager(); + $schemaManager = $this->connection->createSchemaManager(); if (!empty($schemaManager->listTables())) { $io = new SymfonyStyle($input, $output); if (!$io->confirm('Running this command will delete data in all Ibexa generated tables. Continue?')) { @@ -89,15 +94,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $type = $input->getArgument('type'); - $siteaccess = $input->getOption('siteaccess'); + $siteAccess = $input->getOption('siteaccess'); $installer = $this->getInstaller($type); - if ($installer === false) { - $output->writeln( - "Unknown install type '$type', available options in currently installed Ibexa package: " . - implode(', ', array_keys($this->installers)) - ); - exit(self::EXIT_UNKNOWN_INSTALL_TYPE); - } $installer->setOutput($output); @@ -107,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->cacheClear($output); if (!$input->getOption('skip-indexing')) { - $this->indexData($output, $siteaccess); + $this->indexData($output, $siteAccess); } return self::SUCCESS; @@ -117,22 +115,11 @@ private function checkPermissions(): void { // @todo should take var-dir etc. from composer config or fallback to flex directory scheme if (!is_writable('public') && !is_writable('public/var')) { - $this->output->writeln('[public/ | public/var] is not writable'); + $this->output?->writeln('[public/ | public/var] is not writable'); exit(self::EXIT_MISSING_PERMISSIONS); } } - private function checkParameters(): void - { - // @todo doesn't make sense to check for parameters.yml in sf4 and flex - return; - $parametersFile = 'app/config/parameters.yml'; - if (!is_file($parametersFile)) { - $this->output->writeln("Required configuration file '$parametersFile' not found"); - exit(self::EXIT_PARAMETERS_NOT_FOUND); - } - } - private function checkCreateDatabase(OutputInterface $output): void { $output->writeln( @@ -148,14 +135,14 @@ private function checkCreateDatabase(OutputInterface $output): void $this->executeCommand($bufferedOutput, $command); $output->writeln($bufferedOutput->fetch()); } catch (\RuntimeException $exception) { - $this->output->writeln( + $this->output?->writeln( sprintf( "The configured database '%s' does not exist or cannot be created (%s).", $this->connection->getDatabase(), $exception->getMessage() ) ); - $this->output->writeln("Please check the database configuration in 'app/config/parameters.yml'"); + $this->output?->writeln("Please check the database configuration in 'app/config/parameters.yml'"); exit(self::EXIT_GENERAL_DATABASE_ERROR); } } @@ -177,34 +164,27 @@ private function cacheClear(OutputInterface $output): void * So temporary measure until it is not raw SQL based for the data itself (as opposed to the schema). * This is done after cache clearing to make sure no cached data from before sql import is used. * - * IMPORTANT: This is done using a command because config has change, so container and all services are different. - * - * @param \Symfony\Component\Console\Output\OutputInterface $output - * @param string|null $siteaccess + * IMPORTANT: This is done using a command because config has changed, so container and all services are different. */ - private function indexData(OutputInterface $output, $siteaccess = null): void + private function indexData(OutputInterface $output, ?string $siteAccess = null): void { - $output->writeln( - sprintf('Search engine re-indexing, executing command ibexa:reindex') - ); + $output->writeln('Search engine re-indexing, executing command ibexa:reindex'); $command = 'ibexa:reindex'; - if ($siteaccess) { - $command .= sprintf(' --siteaccess=%s', $siteaccess); + if ($siteAccess) { + $command .= sprintf(' --siteaccess=%s', $siteAccess); } $this->executeCommand($output, $command); } - /** - * @param $type - * - * @return \Ibexa\Bundle\RepositoryInstaller\Installer\Installer - */ - private function getInstaller($type) + private function getInstaller(string $type): Installer { if (!isset($this->installers[$type])) { - return false; + throw new InvalidArgumentException( + "Unknown install type '$type', available options in currently installed Ibexa package: " . + implode(', ', array_keys($this->installers)) + ); } return $this->installers[$type]; @@ -218,11 +198,11 @@ private function getInstaller($type) * Based on {@see \Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::executeCommand}. * * @param \Symfony\Component\Console\Output\OutputInterface $output - * @param string $cmd Ibexa command to execute, like 'ezplatform:solr_create_index' + * @param string $cmd Ibexa command to execute, like 'ibexa:reindex' * Escape any user provided arguments, like: 'assets:install '.escapeshellarg($webDir) * @param int $timeout */ - private function executeCommand(OutputInterface $output, string $cmd, $timeout = 300): void + private function executeCommand(OutputInterface $output, string $cmd, int $timeout = 300): void { $phpFinder = new PhpExecutableFinder(); if (!$phpPath = $phpFinder->find(false)) { @@ -264,7 +244,9 @@ private function executeCommand(OutputInterface $output, string $cmd, $timeout = ); $process->run(static function ($type, $buffer) use ($output): void { $output->write($buffer, false); }); - if (!$process->getExitCode() === 1) { + // treating null exit code (process that hasn't terminated yet) as success due to lack of information at this point + $exitCode = $process->getExitCode() ?? 0; + if ($exitCode !== 1) { throw new \RuntimeException(sprintf('An error occurred when executing the "%s" command.', escapeshellarg($cmd))); } } diff --git a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php index 673c033dfb..cd4ba36215 100644 --- a/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php +++ b/src/bundle/RepositoryInstaller/DependencyInjection/Compiler/InstallerTagPass.php @@ -19,7 +19,7 @@ */ class InstallerTagPass implements CompilerPassInterface { - public const INSTALLER_TAG = 'ibexa.installer'; + public const string INSTALLER_TAG = 'ibexa.installer'; public function process(ContainerBuilder $container): void { From f8cf3d13af5818d9dc1929934eb920c6d7fb058c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 15:48:12 +0200 Subject: [PATCH 022/185] IBX-9811: Upgraded CoreInstaller to doctrine/dbal v3 --- src/bundle/RepositoryInstaller/Installer/CoreInstaller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php index b5ce73340f..34cc969870 100644 --- a/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php +++ b/src/bundle/RepositoryInstaller/Installer/CoreInstaller.php @@ -96,7 +96,7 @@ protected function getDropSqlStatementsForExistingSchema( Schema $newSchema, AbstractPlatform $databasePlatform ): array { - $existingSchema = $this->db->getSchemaManager()->createSchema(); + $existingSchema = $this->db->createSchemaManager()->createSchema(); $statements = []; // reverse table order for clean-up (due to FKs) $tables = array_reverse($newSchema->getTables()); From 8f2e50762fefd63642ce5e51df11e3ece34f774c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 2 Apr 2025 16:16:02 +0200 Subject: [PATCH 023/185] IBX-9811: Upgraded Content Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Persistence/Legacy/Content/Gateway.php | 61 ++- .../Content/Gateway/DoctrineDatabase.php | 410 +++++++++++------- .../Content/Gateway/ExceptionConversion.php | 143 +++--- 3 files changed, 362 insertions(+), 252 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway.php b/src/lib/Persistence/Legacy/Content/Gateway.php index c4ebcadbc5..ee1788844b 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Gateway.php @@ -14,7 +14,6 @@ use Ibexa\Contracts\Core\Persistence\Content\Relation\CreateStruct as RelationCreateStruct; use Ibexa\Contracts\Core\Persistence\Content\UpdateStruct; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; -use Ibexa\Contracts\Core\Repository\Values\Content\Relation; /** * Base class for content gateways. @@ -23,16 +22,16 @@ */ abstract class Gateway { - public const CONTENT_ITEM_TABLE = 'ezcontentobject'; - public const CONTENT_NAME_TABLE = 'ezcontentobject_name'; - public const CONTENT_FIELD_TABLE = 'ezcontentobject_attribute'; - public const CONTENT_VERSION_TABLE = 'ezcontentobject_version'; - public const CONTENT_RELATION_TABLE = 'ezcontentobject_link'; + public const string CONTENT_ITEM_TABLE = 'ezcontentobject'; + public const string CONTENT_NAME_TABLE = 'ezcontentobject_name'; + public const string CONTENT_FIELD_TABLE = 'ezcontentobject_attribute'; + public const string CONTENT_VERSION_TABLE = 'ezcontentobject_version'; + public const string CONTENT_RELATION_TABLE = 'ezcontentobject_link'; - public const CONTENT_ITEM_SEQ = 'ezcontentobject_id_seq'; - public const CONTENT_VERSION_SEQ = 'ezcontentobject_version_id_seq'; - public const CONTENT_FIELD_SEQ = 'ezcontentobject_attribute_id_seq'; - public const CONTENT_RELATION_SEQ = 'ezcontentobject_link_id_seq'; + public const string CONTENT_ITEM_SEQ = 'ezcontentobject_id_seq'; + public const string CONTENT_VERSION_SEQ = 'ezcontentobject_version_id_seq'; + public const string CONTENT_FIELD_SEQ = 'ezcontentobject_attribute_id_seq'; + public const string CONTENT_RELATION_SEQ = 'ezcontentobject_link_id_seq'; /** * Insert a new Content item. @@ -66,6 +65,8 @@ abstract public function updateContent( /** * Updates version $versionNo for content identified by $contentId, in respect to $struct. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function updateVersion(int $contentId, int $versionNo, UpdateStruct $struct): void; @@ -106,6 +107,8 @@ abstract public function setPublishedStatus(int $contentId, int $status): void; * Only used when a new field is created (i.e. a new object or a field in a * new language!). After that, field IDs need to stay the same, only the * version number changes. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function insertNewField( Content $content, @@ -147,6 +150,8 @@ abstract public function updateNonTranslatableField( * * @param int|null $version Current version on null value. * @param string[]|null $translations + * + * @phpstan-return list> */ abstract public function load( int $contentId, @@ -160,7 +165,7 @@ abstract public function load( * @param int[] $contentIds * @param string[]|null $translations If languages is not set, ALL will be loaded. * - * @return array[] + * @phpstan-return list> */ abstract public function loadContentList(array $contentIds, ?array $translations = null): array; @@ -169,6 +174,8 @@ abstract public function loadContentList(array $contentIds, ?array $translations * * Returns an array with the relevant data. * + * @phpstan-return array + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function loadContentInfoByRemoteId(string $remoteId): array; @@ -178,6 +185,8 @@ abstract public function loadContentInfoByRemoteId(string $remoteId): array; * * Returns an array with the relevant data. * + * @return array + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function loadContentInfoByLocationId(int $locationId): array; @@ -188,6 +197,8 @@ abstract public function loadContentInfoByLocationId(int $locationId): array; * - always_available => Boolean indicating if content's language mask contains alwaysAvailable bit field * - main_language_code => Language code for main (initial) language. E.g. "eng-GB". * + * @return array + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ abstract public function loadContentInfo(int $contentId): array; @@ -199,6 +210,8 @@ abstract public function loadContentInfo(int $contentId): array; * @see \Ibexa\Contracts\Core\Persistence\Content\Handler::loadContentInfoList For how this will only return items found and not throw. * * @param int[] $contentIds + * + * @phpstan-return list> */ abstract public function loadContentInfoList(array $contentIds): array; @@ -210,6 +223,8 @@ abstract public function loadContentInfoList(array $contentIds): array; * - initial_language_code => Language code for initial language in this version. * * @param int|null $versionNo Load current version if null. + * + * @phpstan-return list> */ abstract public function loadVersionInfo(int $contentId, ?int $versionNo = null): array; @@ -229,17 +244,19 @@ abstract public function countVersionsForUser( /** * Returns data for all versions with given status created by the given $userId. * - * @return string[][] + * @phpstan-return list> */ abstract public function listVersionsForUser( int $userId, int $status = VersionInfo::STATUS_DRAFT - ); + ): array; /** * Return data for all versions with given status created by the given $userId when content is not in the trash. * * The list is sorted by modification date. + * + * @phpstan-return list> */ abstract public function loadVersionsForUser( int $userId, @@ -358,7 +375,7 @@ abstract public function deleteContent(int $contentId): void; /** * Load data of related to/from $contentId. * - * @return array Content data, array structured like {@see \Ibexa\Core\Persistence\Legacy\Content\Gateway::load} + * @phpstan-return list> Content relations data */ abstract public function loadRelations( int $contentId, @@ -396,15 +413,17 @@ abstract public function countReverseRelations(int $contentId, ?int $relationTyp /** * Load data of related to/from $contentId. * - * @return array Content data, array structured like {@see \Ibexa\Core\Persistence\Legacy\Content\Gateway::load} + * @phpstan-return list> Content data, array structured like {@see \Ibexa\Core\Persistence\Legacy\Content\Gateway::load} */ abstract public function loadReverseRelations(int $contentId, ?int $relationType = null): array; /** * Load paginated data of related to/from $contentId. + * + * @phpstan-return list> */ abstract public function listReverseRelations( - int $contentId, + int $toContentId, int $offset = 0, int $limit = -1, ?int $relationType = null @@ -428,6 +447,8 @@ abstract public function insertRelation(RelationCreateStruct $createStruct): int * Load Relation object. * * @see \Ibexa\Contracts\Core\Persistence\Content\Relation + * + * @return array */ abstract public function loadRelation(int $relationId): array; @@ -441,12 +462,14 @@ abstract public function getContentIdsByContentTypeId(int $contentTypeId): array /** * Load name data for set of content id's and corresponding version number. * - * @param array[] $rows array of hashes with 'id' and 'version' to load names for + * @phpstan-param list> $rows array of hashes with 'id' and 'version' to load names for + * + * @phpstan-return list> */ abstract public function loadVersionedNameData(array $rows): array; /** - * Bulk-copy all relations meta data for a copied Content item. + * Bulk-copy all relations metadata for a copied Content item. * * Is meant to be used during content copy, so assumes the following: * - version number is the same @@ -499,6 +522,8 @@ abstract public function deleteTranslationFromVersion( /** * @param array $contentIds * + * @phpstan-return list> + * * @throws \Ibexa\Core\Base\Exceptions\DatabaseException */ abstract public function loadVersionInfoList(array $contentIds): array; diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 52cdfc8244..a351303122 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\ParameterType; @@ -24,7 +25,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Relation\CreateStruct as RelationCreateStruct; use Ibexa\Contracts\Core\Persistence\Content\UpdateStruct; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; -use Ibexa\Contracts\Core\Repository\Values\Content\Relation; +use Ibexa\Contracts\Core\Repository\Values\Content\RelationType; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Core\Base\Exceptions\BadStateException; use Ibexa\Core\Base\Exceptions\NotFoundException; @@ -38,7 +39,7 @@ use LogicException; /** - * Doctrine database based content gateway. + * Doctrine-database-based content gateway. * * @internal Gateway implementation is considered internal. Use Persistence Content Handler instead. * @@ -48,30 +49,30 @@ final class DoctrineDatabase extends Gateway { /** * Pre-computed integer constant which, when combined with proper bit-wise operator, - * removes always available flag from the mask. + * removes an always available flag from the mask. */ private const int REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND = -2; - private const string CONTENT_ID_PARAM_NAME = ':contentId'; - private const string LANGUAGE_MASK_PARAM_NAME = ':languageMask'; + private const string CONTENT_ID_PARAM_NAME = 'content_id'; + private const string LANGUAGE_MASK_PARAM_NAME = 'languageMask'; private const string CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON = 'contentobject_id = :content_id'; private const string VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON = 'version = :version_no'; - private const string VERSION_NO_PARAM_NAME = ':version_no'; - private const string LANGUAGE_MASK_OPERAND_PARAM_NAME = ':languageMaskOperand'; - private const string STATUS_PARAM_NAME = ':status'; - private const string FIELD_DEFINITION_ID_PARAM_NAME = ':field_definition_id'; - private const string DATA_TYPE_STRING_PARAM_NAME = ':data_type_string'; - private const string LANGUAGE_CODE_PARAM_NAME = ':language_code'; - private const string DATA_FLOAT_PARAM_NAME = ':data_float'; - private const string DATA_INT_PARAM_NAME = ':data_int'; - private const string DATA_TEXT_PARAM_NAME = ':data_text'; - private const string SORT_KEY_INT_PARAM_NAME = ':sort_key_int'; - private const string SORT_KEY_STRING_PARAM_NAME = ':sort_key_string'; - private const string LANGUAGE_ID_PARAM_NAME = ':language_id'; - private const string USER_ID_PARAM_NAME = ':user_id'; - private const string CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON = 'contentobject_id = :contentId'; - private const string RELATION_TYPE_PARAM_NAME = ':relation_type'; + private const string VERSION_NO_PARAM_NAME = 'version_no'; + private const string LANGUAGE_MASK_OPERAND_PARAM_NAME = 'languageMaskOperand'; + private const string STATUS_PARAM_NAME = 'status'; + private const string FIELD_DEFINITION_ID_PARAM_NAME = 'field_definition_id'; + private const string DATA_TYPE_STRING_PARAM_NAME = 'data_type_string'; + private const string LANGUAGE_CODE_PARAM_NAME = 'language_code'; + private const string DATA_FLOAT_PARAM_NAME = 'data_float'; + private const string DATA_INT_PARAM_NAME = 'data_int'; + private const string DATA_TEXT_PARAM_NAME = 'data_text'; + private const string SORT_KEY_INT_PARAM_NAME = 'sort_key_int'; + private const string SORT_KEY_STRING_PARAM_NAME = 'sort_key_string'; + private const string LANGUAGE_ID_PARAM_NAME = 'language_id'; + private const string USER_ID_PARAM_NAME = 'user_id'; + private const string RELATION_TYPE_PARAM_NAME = 'relation_type'; private const string CONTENT_VERSION_VERSION_NO_PARAM_NAME = 'content_version = :version_no'; private const string ID_RELATION_ID_PARAM_COMPARISON = 'id = :relation_id'; + private const string RELATION_ID_PARAM_NAME = 'relation_id'; /** * The native Doctrine connection. @@ -286,7 +287,7 @@ public function updateContent( ); $query->set( 'language_mask', - $query->createNamedParameter($mask, ParameterType::INTEGER, self::LANGUAGE_MASK_PARAM_NAME) + $query->createNamedParameter($mask, ParameterType::INTEGER, ':' . self::LANGUAGE_MASK_PARAM_NAME) ); $updated = true; } @@ -294,7 +295,7 @@ public function updateContent( $query->where( $query->expr()->eq( 'id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) + $query->createNamedParameter($contentId, ParameterType::INTEGER, ':' . self::CONTENT_ID_PARAM_NAME) ) ); @@ -354,7 +355,11 @@ public function updateVersion(int $contentId, int $versionNo, UpdateStruct $stru $query->executeStatement(); } - public function updateAlwaysAvailableFlag(int $contentId, ?bool $alwaysAvailable = null): void + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ + public function updateAlwaysAvailableFlag(int $contentId, ?bool $newAlwaysAvailable = null): void { // We will need to know some info on the current language mask to update the flag // everywhere needed @@ -362,25 +367,28 @@ public function updateAlwaysAvailableFlag(int $contentId, ?bool $alwaysAvailable $versionNo = (int)$contentInfoRow['current_version']; $languageMask = (int)$contentInfoRow['language_mask']; $initialLanguageId = (int)$contentInfoRow['initial_language_id']; - if (!isset($alwaysAvailable)) { - $alwaysAvailable = 1 === ($languageMask & 1); + if (null === $newAlwaysAvailable) { + $newAlwaysAvailable = 1 === ($languageMask & 1); } - $this->updateContentItemAlwaysAvailableFlag($contentId, $alwaysAvailable); + $this->updateContentItemAlwaysAvailableFlag($contentId, $newAlwaysAvailable); $this->updateContentNameAlwaysAvailableFlag( $contentId, $versionNo, - $alwaysAvailable + $newAlwaysAvailable ); $this->updateContentFieldsAlwaysAvailableFlag( $contentId, $versionNo, - $alwaysAvailable, + $newAlwaysAvailable, $languageMask, $initialLanguageId ); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function updateContentItemAlwaysAvailableFlag( int $contentId, bool $alwaysAvailable @@ -394,12 +402,15 @@ private function updateContentItemAlwaysAvailableFlag( ->where( $expr->eq( 'id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) + $query->createNamedParameter($contentId, ParameterType::INTEGER, ':' . self::CONTENT_ID_PARAM_NAME) ) ); $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function updateContentNameAlwaysAvailableFlag( int $contentId, int $versionNo, @@ -414,13 +425,13 @@ private function updateContentNameAlwaysAvailableFlag( ->where( $expr->eq( 'contentobject_id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) + $query->createNamedParameter($contentId, ParameterType::INTEGER, ':' . self::CONTENT_ID_PARAM_NAME) ) ) ->andWhere( $expr->eq( 'content_version', - $query->createNamedParameter($versionNo, ParameterType::INTEGER, self::VERSION_NO_PARAM_NAME) + $query->createNamedParameter($versionNo, ParameterType::INTEGER, ':' . self::VERSION_NO_PARAM_NAME) ) ); $query->executeStatement(); @@ -443,13 +454,13 @@ private function updateContentFieldsAlwaysAvailableFlag( ->where( $expr->eq( 'contentobject_id', - $query->createNamedParameter($contentId, ParameterType::INTEGER, self::CONTENT_ID_PARAM_NAME) + $query->createNamedParameter($contentId, ParameterType::INTEGER, ':' . self::CONTENT_ID_PARAM_NAME) ) ) ->andWhere( $expr->eq( 'version', - $query->createNamedParameter($versionNo, ParameterType::INTEGER, self::VERSION_NO_PARAM_NAME) + $query->createNamedParameter($versionNo, ParameterType::INTEGER, ':' . self::VERSION_NO_PARAM_NAME) ) ); @@ -469,10 +480,10 @@ private function updateContentFieldsAlwaysAvailableFlag( 'language_id', $this->getDatabasePlatform()->getBitAndComparisonExpression( 'language_id', - self::LANGUAGE_MASK_OPERAND_PARAM_NAME + ':' . self::LANGUAGE_MASK_OPERAND_PARAM_NAME ) ) - ->setParameter('languageMaskOperand', self::REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND) + ->setParameter(self::LANGUAGE_MASK_OPERAND_PARAM_NAME, self::REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND) ; $query->executeStatement(); @@ -483,13 +494,10 @@ private function updateContentFieldsAlwaysAvailableFlag( 'language_id', $this->getDatabasePlatform()->getBitOrComparisonExpression( 'language_id', - self::LANGUAGE_MASK_OPERAND_PARAM_NAME + ':' . self::LANGUAGE_MASK_OPERAND_PARAM_NAME ) ) - ->setParameter( - 'languageMaskOperand', - $alwaysAvailable ? 1 : self::REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND - ); + ->setParameter(self::LANGUAGE_MASK_OPERAND_PARAM_NAME, 1); $query->andWhere( $expr->gt( @@ -524,7 +532,7 @@ public function setStatus(int $contentId, int $version, int $status): bool } /** - * @throws \Ibexa\Core\Base\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException * @throws \Doctrine\DBAL\Exception */ public function setPublishedStatus(int $contentId, int $versionNo): void @@ -555,23 +563,27 @@ public function setPublishedStatus(int $contentId, int $versionNo): void $this->markContentAsPublished($contentId, $versionNo); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function markContentAsPublished(int $contentId, int $versionNo): void { $query = $this->connection->createQueryBuilder(); $query ->update('ezcontentobject') - ->set('status', self::STATUS_PARAM_NAME) - ->set('current_version', self::VERSION_NO_PARAM_NAME) - ->where('id =:contentId') - ->setParameter('status', ContentInfo::STATUS_PUBLISHED, ParameterType::INTEGER) - ->setParameter('versionNo', $versionNo, ParameterType::INTEGER) - ->setParameter('contentId', $contentId, ParameterType::INTEGER); + ->set('status', ':' . self::STATUS_PARAM_NAME) + ->set('current_version', ':' . self::VERSION_NO_PARAM_NAME) + ->where($query->expr()->eq('id', ':' . self::CONTENT_ID_PARAM_NAME)) + ->setParameter(self::STATUS_PARAM_NAME, ContentInfo::STATUS_PUBLISHED, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId, ParameterType::INTEGER); $query->executeStatement(); } /** * @return int ID * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function insertNewField(Content $content, Field $field, StorageFieldValue $value): int @@ -595,7 +607,7 @@ public function insertNewField(Content $content, Field $field, StorageFieldValue $query->executeStatement(); - return (int)$this->sharedGateway->getLastInsertedId(self::CONTENT_FIELD_SEQ); + return $this->sharedGateway->getLastInsertedId(self::CONTENT_FIELD_SEQ); } /** @@ -633,36 +645,35 @@ private function setInsertFieldValues( ->insert(self::CONTENT_FIELD_TABLE) ->values( [ - 'contentobject_id' => self::CONTENT_ID_PARAM_NAME, - 'contentclassattribute_id' => self::FIELD_DEFINITION_ID_PARAM_NAME, - 'data_type_string' => self::DATA_TYPE_STRING_PARAM_NAME, - 'language_code' => self::LANGUAGE_CODE_PARAM_NAME, - 'version' => self::VERSION_NO_PARAM_NAME, - 'data_float' => self::DATA_FLOAT_PARAM_NAME, - 'data_int' => self::DATA_INT_PARAM_NAME, - 'data_text' => self::DATA_TEXT_PARAM_NAME, - 'sort_key_int' => self::SORT_KEY_INT_PARAM_NAME, - 'sort_key_string' => self::SORT_KEY_STRING_PARAM_NAME, - 'language_id' => self::LANGUAGE_ID_PARAM_NAME, + 'contentobject_id' => ':' . self::CONTENT_ID_PARAM_NAME, + 'contentclassattribute_id' => ':' . self::FIELD_DEFINITION_ID_PARAM_NAME, + 'data_type_string' => ':' . self::DATA_TYPE_STRING_PARAM_NAME, + 'language_code' => ':' . self::LANGUAGE_CODE_PARAM_NAME, + 'version' => ':' . self::VERSION_NO_PARAM_NAME, + 'data_float' => ':' . self::DATA_FLOAT_PARAM_NAME, + 'data_int' => ':' . self::DATA_INT_PARAM_NAME, + 'data_text' => ':' . self::DATA_TEXT_PARAM_NAME, + 'sort_key_int' => ':' . self::SORT_KEY_INT_PARAM_NAME, + 'sort_key_string' => ':' . self::SORT_KEY_STRING_PARAM_NAME, + 'language_id' => ':' . self::LANGUAGE_ID_PARAM_NAME, ] ) ->setParameter( - 'content_id', + self::CONTENT_ID_PARAM_NAME, $content->versionInfo->contentInfo->id, ParameterType::INTEGER ) - ->setParameter('field_definition_id', $field->fieldDefinitionId, ParameterType::INTEGER) - ->setParameter('data_type_string', $field->type) - ->setParameter('language_code', $field->languageCode) - ->setParameter('version_no', $field->versionNo, ParameterType::INTEGER) - ->setParameter('data_float', $value->dataFloat) - ->setParameter('data_int', $value->dataInt, ParameterType::INTEGER) - ->setParameter('data_text', $value->dataText) - ->setParameter('sort_key_int', $value->sortKeyInt, ParameterType::INTEGER) + ->setParameter(self::FIELD_DEFINITION_ID_PARAM_NAME, $field->fieldDefinitionId, ParameterType::INTEGER) + ->setParameter(self::DATA_TYPE_STRING_PARAM_NAME, $field->type) + ->setParameter(self::LANGUAGE_CODE_PARAM_NAME, $field->languageCode) + ->setParameter(self::VERSION_NO_PARAM_NAME, $field->versionNo, ParameterType::INTEGER) + ->setParameter(self::DATA_FLOAT_PARAM_NAME, $value->dataFloat) + ->setParameter(self::DATA_INT_PARAM_NAME, $value->dataInt, ParameterType::INTEGER) + ->setParameter(self::DATA_TEXT_PARAM_NAME, $value->dataText) + ->setParameter(self::SORT_KEY_INT_PARAM_NAME, $value->sortKeyInt, ParameterType::INTEGER) ->setParameter( 'sort_key_string', - mb_substr((string)$value->sortKeyString, 0, 255), - ParameterType::STRING + mb_substr($value->sortKeyString, 0, 255) ) ->setParameter( 'language_id', @@ -685,6 +696,9 @@ private function isLanguageAlwaysAvailable(Content $content, string $languageCod ; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateField(Field $field, StorageFieldValue $value): void { // Note, no need to care for language_id here, since Content->$alwaysAvailable @@ -709,21 +723,23 @@ private function setFieldUpdateValues( ): void { $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_float', self::DATA_FLOAT_PARAM_NAME) - ->set('data_int', self::DATA_INT_PARAM_NAME) - ->set('data_text', self::DATA_TEXT_PARAM_NAME) - ->set('sort_key_int', self::SORT_KEY_INT_PARAM_NAME) - ->set('sort_key_string', self::SORT_KEY_STRING_PARAM_NAME) + ->set('data_float', ':' . self::DATA_FLOAT_PARAM_NAME) + ->set('data_int', ':' . self::DATA_INT_PARAM_NAME) + ->set('data_text', ':' . self::DATA_TEXT_PARAM_NAME) + ->set('sort_key_int', ':' . self::SORT_KEY_INT_PARAM_NAME) + ->set('sort_key_string', ':' . self::SORT_KEY_STRING_PARAM_NAME) ->setParameter('data_float', $value->dataFloat) ->setParameter('data_int', $value->dataInt, ParameterType::INTEGER) - ->setParameter('data_text', $value->dataText, ParameterType::STRING) + ->setParameter('data_text', $value->dataText) ->setParameter('sort_key_int', $value->sortKeyInt, ParameterType::INTEGER) - ->setParameter('sort_key_string', mb_substr((string)$value->sortKeyString, 0, 255)) + ->setParameter('sort_key_string', mb_substr($value->sortKeyString, 0, 255)) ; } /** * Update an existing, non-translatable field. + * + * @throws \Doctrine\DBAL\Exception */ public function updateNonTranslatableField( Field $field, @@ -745,11 +761,17 @@ public function updateNonTranslatableField( $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function load(int $contentId, ?int $version = null, ?array $translations = null): array { return $this->internalLoadContent([$contentId], $version, $translations); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadContentList(array $contentIds, ?array $translations = null): array { return $this->internalLoadContent($contentIds, null, $translations); @@ -761,6 +783,10 @@ public function loadContentList(array $contentIds, ?array $translations = null): * @param int[] $contentIds * @param string[]|null $translations a list of language codes * + * @throws \Doctrine\DBAL\Exception + * + * @phpstan-return list> + * * @see load(), loadContentList() */ private function internalLoadContent( @@ -837,7 +863,7 @@ private function internalLoadContent( $queryBuilder->where( $expr->in( 'c.id', - $queryBuilder->createNamedParameter($contentIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($contentIds, ArrayParameterType::INTEGER) ) ); @@ -845,7 +871,7 @@ private function internalLoadContent( $queryBuilder->andWhere( $expr->in( 'a.language_code', - $queryBuilder->createNamedParameter($translations, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($translations, ArrayParameterType::STRING) ) ); } @@ -853,6 +879,10 @@ private function internalLoadContent( return $queryBuilder->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function loadContentInfo(int $contentId): array { $queryBuilder = $this->queryBuilder->createLoadContentInfoQueryBuilder(); @@ -860,39 +890,50 @@ public function loadContentInfo(int $contentId): array ->where('c.id = :id') ->setParameter('id', $contentId, ParameterType::INTEGER); - $results = $queryBuilder->executeQuery()->fetchAllAssociative(); - if (empty($results)) { + $result = $queryBuilder->executeQuery()->fetchAssociative(); + if (false === $result) { throw new NotFound('content', "id: $contentId"); } - return $results[0]; + return $result; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadContentInfoList(array $contentIds): array { $queryBuilder = $this->queryBuilder->createLoadContentInfoQueryBuilder(); $queryBuilder ->where('c.id IN (:ids)') - ->setParameter('ids', $contentIds, Connection::PARAM_INT_ARRAY); + ->setParameter('ids', $contentIds, ArrayParameterType::INTEGER); return $queryBuilder->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function loadContentInfoByRemoteId(string $remoteId): array { $queryBuilder = $this->queryBuilder->createLoadContentInfoQueryBuilder(); $queryBuilder ->where('c.remote_id = :id') - ->setParameter('id', $remoteId, ParameterType::STRING); + ->setParameter('id', $remoteId); - $results = $queryBuilder->executeQuery()->fetchAllAssociative(); - if (empty($results)) { + $result = $queryBuilder->executeQuery()->fetchAssociative(); + if (false === $result) { throw new NotFound('content', "remote_id: $remoteId"); } - return $results[0]; + return $result; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function loadContentInfoByLocationId(int $locationId): array { $queryBuilder = $this->queryBuilder->createLoadContentInfoQueryBuilder(false); @@ -900,12 +941,12 @@ public function loadContentInfoByLocationId(int $locationId): array ->where('t.node_id = :id') ->setParameter('id', $locationId, ParameterType::INTEGER); - $results = $queryBuilder->executeQuery()->fetchAllAssociative(); - if (empty($results)) { + $result = $queryBuilder->executeQuery()->fetchAssociative(); + if (false === $result) { throw new NotFound('content', "node_id: $locationId"); } - return $results[0]; + return $result; } /** @@ -923,7 +964,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array $queryBuilder->createNamedParameter( $contentId, ParameterType::INTEGER, - self::CONTENT_ID_PARAM_NAME + ':' . self::CONTENT_ID_PARAM_NAME ) ) ); @@ -936,7 +977,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array $queryBuilder->createNamedParameter( $versionNo, ParameterType::INTEGER, - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ); @@ -949,6 +990,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array /** * @throws \Doctrine\DBAL\Exception + * * @return array> */ public function loadVersionNoArchivedWithin(int $contentId, int $seconds): array @@ -990,7 +1032,7 @@ public function loadVersionNoArchivedWithin(int $contentId, int $seconds): array ) )->orderBy('v.modified', 'DESC'); - return $queryBuilder->execute()->fetchAllAssociative(); + return $queryBuilder->executeQuery()->fetchAllAssociative(); } public function countVersionsForUser(int $userId, int $status = VersionInfo::STATUS_DRAFT): int @@ -1011,8 +1053,8 @@ public function countVersionsForUser(int $userId, int $status = VersionInfo::STA ) ->where( $query->expr()->and( - $query->expr()->eq('v.status', self::STATUS_PARAM_NAME), - $query->expr()->eq('v.creator_id', self::USER_ID_PARAM_NAME) + $query->expr()->eq('v.status', ':' . self::STATUS_PARAM_NAME), + $query->expr()->eq('v.creator_id', ':' . self::USER_ID_PARAM_NAME) ) ) ->setParameter(self::STATUS_PARAM_NAME, $status, ParameterType::INTEGER) @@ -1022,9 +1064,7 @@ public function countVersionsForUser(int $userId, int $status = VersionInfo::STA } /** - * Return data for all versions with the given status created by the given $userId. - * - * @return string[][] + * @throws \Doctrine\DBAL\Exception */ public function listVersionsForUser(int $userId, int $status = VersionInfo::STATUS_DRAFT): array { @@ -1039,6 +1079,9 @@ public function listVersionsForUser(int $userId, int $status = VersionInfo::STAT return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadVersionsForUser( int $userId, int $status = VersionInfo::STATUS_DRAFT, @@ -1049,8 +1092,8 @@ public function loadVersionsForUser( $expr = $query->expr(); $query->where( $expr->and( - $expr->eq('v.status', self::STATUS_PARAM_NAME), - $expr->eq('v.creator_id', self::USER_ID_PARAM_NAME), + $expr->eq('v.status', ':' . self::STATUS_PARAM_NAME), + $expr->eq('v.creator_id', ':' . self::USER_ID_PARAM_NAME), $expr->neq('c.status', ContentInfo::STATUS_TRASHED) ) ) @@ -1068,6 +1111,9 @@ public function loadVersionsForUser( return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function listVersions(int $contentId, ?int $status = null, int $limit = -1): array { $query = $this->queryBuilder->createVersionInfoFindQueryBuilder(); @@ -1092,6 +1138,8 @@ public function listVersions(int $contentId, ?int $status = null, int $limit = - /** * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ public function listVersionNumbers(int $contentId): array { @@ -1099,9 +1147,9 @@ public function listVersionNumbers(int $contentId): array $query ->select('version') ->from(self::CONTENT_VERSION_TABLE) - ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->groupBy('version') - ->setParameter('contentId', $contentId, ParameterType::INTEGER); + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId, ParameterType::INTEGER); return array_map('intval', $query->executeQuery()->fetchFirstColumn()); } @@ -1142,6 +1190,8 @@ public function getAllLocationIds(int $contentId): array /** * @return int[][] + * + * @throws \Doctrine\DBAL\Exception */ public function getFieldIdsByType( int $contentId, @@ -1164,7 +1214,7 @@ public function getFieldIdsByType( if (!empty($languageCode)) { $query ->andWhere('language_code = :language_code') - ->setParameter('language_code', $languageCode, ParameterType::STRING); + ->setParameter('language_code', $languageCode); } $statement = $query->executeQuery(); @@ -1226,17 +1276,18 @@ public function removeReverseFieldRelations(int $contentId): void $expr->gt( $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - self::RELATION_TYPE_PARAM_NAME + ':' . self::RELATION_TYPE_PARAM_NAME ), 0 ) ) - ->setParameter('content_id', $contentId, ParameterType::INTEGER) - ->setParameter('relation_type', Relation::FIELD | Relation::ASSET, ParameterType::INTEGER); + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId, ParameterType::INTEGER) + ->setParameter(self::RELATION_TYPE_PARAM_NAME, RelationType::FIELD->value | RelationType::ASSET->value, ParameterType::INTEGER); $statement = $query->executeQuery(); while ($row = $statement->fetchAssociative()) { + /** @var array{id: int|string, version: int|string, data_type_string: string, data_text: string|null} $row */ if ($row['data_type_string'] === 'ezobjectrelation') { $this->removeRelationFromRelationField($row); } @@ -1268,7 +1319,9 @@ public function removeRelationsByFieldDefinitionId(int $fieldDefinitionId): void * Update field value of RelationList field type identified by given $row data, * removing relations toward given $contentId. * - * @param array $row + * @param array $row + * + * @throws \Doctrine\DBAL\Exception */ private function removeRelationFromRelationListField(int $contentId, array $row): void { @@ -1279,15 +1332,18 @@ private function removeRelationFromRelationListField(int $contentId, array $row) $xpathExpression = "//related-objects/relation-list/relation-item[@contentobject-id='{$contentId}']"; $relationItems = $xpath->query($xpathExpression); + if (false === $relationItems) { + return; + } foreach ($relationItems as $relationItem) { - $relationItem->parentNode->removeChild($relationItem); + $relationItem->parentNode?->removeChild($relationItem); } $query = $this->connection->createQueryBuilder(); $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_text', self::DATA_TEXT_PARAM_NAME) - ->setParameter('data_text', $document->saveXML(), ParameterType::STRING) + ->set('data_text', ':' . self::DATA_TEXT_PARAM_NAME) + ->setParameter('data_text', $document->saveXML()) ->where('id = :attribute_id') ->andWhere(self::VERSION_NO_EQ_VERSION_NO_PARAM_COMPARISON) ->setParameter('attribute_id', (int)$row['id'], ParameterType::INTEGER) @@ -1300,7 +1356,7 @@ private function removeRelationFromRelationListField(int $contentId, array $row) * Update field value of Relation field type identified by given $row data, * removing relation data. * - * @param array $row + * @param array $row * * @throws \Doctrine\DBAL\Exception */ @@ -1309,8 +1365,8 @@ private function removeRelationFromRelationField(array $row): void $query = $this->connection->createQueryBuilder(); $query ->update(self::CONTENT_FIELD_TABLE) - ->set('data_int', self::DATA_INT_PARAM_NAME) - ->set('sort_key_int', self::SORT_KEY_INT_PARAM_NAME) + ->set('data_int', ':' . self::DATA_INT_PARAM_NAME) + ->set('sort_key_int', ':' . self::SORT_KEY_INT_PARAM_NAME) ->setParameter('data_int', null, ParameterType::NULL) ->setParameter('sort_key_int', 0, ParameterType::INTEGER) ->where('id = :attribute_id') @@ -1328,6 +1384,8 @@ private function removeRelationFromRelationField(array $row): void * data_type_string: string, * data_text: string|null * } $row + * + * @throws \Doctrine\DBAL\Exception */ private function removeRelationFromAssetField(array $row): void { @@ -1439,13 +1497,17 @@ private function contentNameExists(int $contentId, int $version, string $languag ->andWhere('content_translation = :language_code') ->setParameter('content_id', $contentId, ParameterType::INTEGER) ->setParameter('version_no', $version, ParameterType::INTEGER) - ->setParameter('language_code', $languageCode, ParameterType::STRING); + ->setParameter('language_code', $languageCode); $stmt = $query->executeQuery(); - return ((int)$stmt->fetchFirstColumn()) > 0; + return ((int)$stmt->fetchOne()) > 0; } + /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function setName(int $contentId, int $version, string $name, string $languageCode): void { $language = $this->languageHandler->loadByLanguageCode($languageCode); @@ -1454,11 +1516,11 @@ public function setName(int $contentId, int $version, string $name, string $lang // prepare parameters $query - ->setParameter('name', $name, ParameterType::STRING) - ->setParameter('content_id', $contentId, ParameterType::INTEGER) - ->setParameter('version_no', $version, ParameterType::INTEGER) + ->setParameter('name', $name) + ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $version, ParameterType::INTEGER) ->setParameter('language_id', $language->id, ParameterType::INTEGER) - ->setParameter('language_code', $language->languageCode, ParameterType::STRING) + ->setParameter(self::LANGUAGE_CODE_PARAM_NAME, $language->languageCode) ; if (!$this->contentNameExists($contentId, $version, $language->languageCode)) { @@ -1466,12 +1528,12 @@ public function setName(int $contentId, int $version, string $name, string $lang ->insert(self::CONTENT_NAME_TABLE) ->values( [ - 'contentobject_id' => self::CONTENT_ID_PARAM_NAME, - 'content_version' => self::VERSION_NO_PARAM_NAME, - 'content_translation' => self::LANGUAGE_CODE_PARAM_NAME, + 'contentobject_id' => ':' . self::CONTENT_ID_PARAM_NAME, + 'content_version' => ':' . self::VERSION_NO_PARAM_NAME, + 'content_translation' => ':' . self::LANGUAGE_CODE_PARAM_NAME, 'name' => ':name', 'language_id' => $this->getSetNameLanguageMaskSubQuery(), - 'real_translation' => self::LANGUAGE_CODE_PARAM_NAME, + 'real_translation' => ':' . self::LANGUAGE_CODE_PARAM_NAME, ] ); } else { @@ -1479,7 +1541,7 @@ public function setName(int $contentId, int $version, string $name, string $lang ->update(self::CONTENT_NAME_TABLE) ->set('name', ':name') ->set('language_id', $this->getSetNameLanguageMaskSubQuery()) - ->set('real_translation', self::LANGUAGE_CODE_PARAM_NAME) + ->set('real_translation', ':' . self::LANGUAGE_CODE_PARAM_NAME) ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->andWhere(self::CONTENT_VERSION_VERSION_NO_PARAM_NAME) ->andWhere('content_translation = :language_code'); @@ -1501,6 +1563,9 @@ private function getSetNameLanguageMaskSubQuery(): string return $this->sharedGateway->getSetNameLanguageMaskSubQuery(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteContent(int $contentId): void { $query = $this->connection->createQueryBuilder(); @@ -1513,6 +1578,9 @@ public function deleteContent(int $contentId): void $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRelations( int $contentId, ?int $contentVersionNo = null, @@ -1562,6 +1630,9 @@ public function listRelations( return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function prepareRelationQuery( DoctrineQueryBuilder $query, int $contentId, @@ -1615,17 +1686,20 @@ private function prepareRelationQuery( $expr->gt( $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - self::RELATION_TYPE_PARAM_NAME + ':' . self::RELATION_TYPE_PARAM_NAME ), 0 ) ) - ->setParameter('relation_type', $relationType, ParameterType::INTEGER); + ->setParameter(self::RELATION_TYPE_PARAM_NAME, $relationType, ParameterType::INTEGER); } return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countReverseRelations(int $toContentId, ?int $relationType = null): int { $query = $this->connection->createQueryBuilder(); @@ -1640,7 +1714,7 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul $expr->and( $expr->eq('l.from_contentobject_id', 'c.id'), $expr->eq('l.from_contentobject_version', 'c.current_version'), - $expr->eq('c.status', self::STATUS_PARAM_NAME) + $expr->eq('c.status', ':' . self::STATUS_PARAM_NAME) ) ) ->where( @@ -1656,7 +1730,7 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul $expr->gt( $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - $relationType + (string)$relationType ), 0 ) @@ -1666,6 +1740,9 @@ public function countReverseRelations(int $toContentId, ?int $relationType = nul return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadReverseRelations(int $toContentId, ?int $relationType = null): array { $query = $this->queryBuilder->createRelationFindQueryBuilder(); @@ -1695,17 +1772,20 @@ public function loadReverseRelations(int $toContentId, ?int $relationType = null $expr->gt( $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - self::RELATION_TYPE_PARAM_NAME + ':' . self::RELATION_TYPE_PARAM_NAME ), 0 ) ) - ->setParameter('relation_type', $relationType, ParameterType::INTEGER); + ->setParameter(self::RELATION_TYPE_PARAM_NAME, $relationType, ParameterType::INTEGER); } return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function listReverseRelations( int $toContentId, int $offset = 0, @@ -1728,7 +1808,7 @@ public function listReverseRelations( ->where( $expr->eq('l.to_contentobject_id', ':toContentId') ) - ->setParameter(':toContentId', $toContentId, ParameterType::INTEGER); + ->setParameter('toContentId', $toContentId, ParameterType::INTEGER); // relation type if ($relationType !== null) { @@ -1736,7 +1816,7 @@ public function listReverseRelations( $expr->gt( $this->getDatabasePlatform()->getBitAndComparisonExpression( 'l.relation_type', - $relationType + (string)$relationType ), 0 ) @@ -1761,10 +1841,10 @@ public function insertRelation(RelationCreateStruct $createStruct): int ->insert(self::CONTENT_RELATION_TABLE) ->values( [ - 'contentclassattribute_id' => self::FIELD_DEFINITION_ID_PARAM_NAME, + 'contentclassattribute_id' => ':' . self::FIELD_DEFINITION_ID_PARAM_NAME, 'from_contentobject_id' => ':from_content_id', 'from_contentobject_version' => ':from_version_no', - 'relation_type' => self::RELATION_TYPE_PARAM_NAME, + 'relation_type' => ':' . self::RELATION_TYPE_PARAM_NAME, 'to_contentobject_id' => ':to_content_id', ] ) @@ -1783,7 +1863,7 @@ public function insertRelation(RelationCreateStruct $createStruct): int $createStruct->sourceContentVersionNo, ParameterType::INTEGER ) - ->setParameter('relation_type', $createStruct->type, ParameterType::INTEGER) + ->setParameter(self::RELATION_TYPE_PARAM_NAME, $createStruct->type, ParameterType::INTEGER) ->setParameter( 'to_content_id', $createStruct->destinationContentId, @@ -1828,29 +1908,29 @@ public function loadRelation(int $relationId): array */ public function deleteRelation(int $relationId, int $type): void { - // Legacy Storage stores COMMON, LINK and EMBED types using bitmask, therefore first load - // existing relation type by given $relationId for comparison + // Legacy Storage stores COMMON, LINK and EMBED types using bitmask, therefore, first load + // an existing relation type by given $relationId for comparison $query = $this->connection->createQueryBuilder(); $query ->select('relation_type') ->from(self::CONTENT_RELATION_TABLE) ->where(self::ID_RELATION_ID_PARAM_COMPARISON) - ->setParameter('relation_id', $relationId, ParameterType::INTEGER) + ->setParameter(self::RELATION_ID_PARAM_NAME, $relationId, ParameterType::INTEGER) ; - $loadedRelationType = (int)$query->executeQuery()->fetchFirstColumn(); + $loadedRelationType = (int)$query->executeQuery()->fetchOne(); if ($loadedRelationType <= 0) { return; } $query = $this->connection->createQueryBuilder(); - // If relation type matches then delete + // If a relation type matches then delete if ($loadedRelationType === $type) { $query ->delete(self::CONTENT_RELATION_TABLE) ->where(self::ID_RELATION_ID_PARAM_COMPARISON) - ->setParameter('relation_id', $relationId, ParameterType::INTEGER) + ->setParameter(self::RELATION_ID_PARAM_NAME, $relationId, ParameterType::INTEGER) ; $query->executeStatement(); @@ -1864,13 +1944,13 @@ public function deleteRelation(int $relationId, int $type): void // make & operation removing given $type from the bitmask $this->getDatabasePlatform()->getBitAndComparisonExpression( 'relation_type', - self::RELATION_TYPE_PARAM_NAME + ':' . self::RELATION_TYPE_PARAM_NAME ) ) // set the relation type as needed for the above & expression - ->setParameter('relation_type', ~$type, ParameterType::INTEGER) + ->setParameter(self::RELATION_TYPE_PARAM_NAME, ~$type, ParameterType::INTEGER) ->where(self::ID_RELATION_ID_PARAM_COMPARISON) - ->setParameter('relation_id', $relationId, ParameterType::INTEGER) + ->setParameter(self::RELATION_ID_PARAM_NAME, $relationId, ParameterType::INTEGER) ; $query->executeStatement(); @@ -1879,6 +1959,8 @@ public function deleteRelation(int $relationId, int $type): void /** * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ public function getContentIdsByContentTypeId(int $contentTypeId): array { @@ -1894,6 +1976,9 @@ public function getContentIdsByContentTypeId(int $contentTypeId): array return array_map('intval', $statement->fetchFirstColumn()); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadVersionedNameData(array $rows): array { $query = $this->queryBuilder->createNamesQuery(); @@ -1942,7 +2027,7 @@ public function copyRelations( if ($versionNo) { $selectQuery ->andWhere('l.from_contentobject_version = :version') - ->setParameter(':version', $versionNo, ParameterType::INTEGER); + ->setParameter('version', $versionNo, ParameterType::INTEGER); } // Given we can retain all columns, we just create copies with new `from_contentobject_id` using INSERT INTO SELECT $insertQuery = <<connection->createQueryBuilder(); $query ->delete('ezcontentobject_attribute') - ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->andWhere('language_code = :languageCode') ->setParameters( [ @@ -2008,7 +2094,7 @@ public function deleteTranslatedFields( if (null !== $versionNo) { $query - ->andWhere($query->expr()->and('version', self::VERSION_NO_PARAM_NAME)) + ->andWhere($query->expr()->and('version', ':' . self::VERSION_NO_PARAM_NAME)) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } @@ -2017,9 +2103,9 @@ public function deleteTranslatedFields( } /** - * {@inheritdoc} - * * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function deleteTranslationFromVersion( int $contentId, @@ -2067,7 +2153,7 @@ private function deleteTranslationFromContentNames( if (null !== $versionNo) { $query - ->andWhere($query->expr()->and('content_version', self::VERSION_NO_PARAM_NAME)) + ->andWhere($query->expr()->and('content_version', ':' . self::VERSION_NO_PARAM_NAME)) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } @@ -2079,7 +2165,7 @@ private function deleteTranslationFromContentNames( * Remove language from language_mask of ezcontentobject. * * @throws \Doctrine\DBAL\Exception - * @throws \Ibexa\Core\Base\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ private function deleteTranslationFromContentObject(int $contentId, int $languageId): void { @@ -2096,7 +2182,7 @@ private function deleteTranslationFromContentObject(int $contentId, int $languag $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 1' ) ) - ->setParameter(':now', time()) + ->setParameter('now', time()) ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId) ; @@ -2137,7 +2223,7 @@ private function deleteTranslationFromContentVersions( 'THEN (SELECT initial_language_id AS main_language_id FROM ezcontentobject c WHERE c.id = :contentId) ' . 'ELSE initial_language_id END' ) - ->where(self::CONTENT_ITEM_ID_CONTENT_ID_PARAM_COMPARISON) + ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) ->andWhere( // make sure removed translation is not the last one (incl. alwaysAvailable) $query->expr()->and( @@ -2145,14 +2231,14 @@ private function deleteTranslationFromContentVersions( $this->getLanguageRemovalFromLanguageMaskExpression($languageId) . ' <> 1' ) ) - ->setParameter(':now', time()) + ->setParameter('now', time()) ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId) - ->setParameter(':languageId', $languageId) + ->setParameter('languageId', $languageId) ; if (null !== $versionNo) { $query - ->andWhere($query->expr()->and('version', self::VERSION_NO_PARAM_NAME)) + ->andWhere($query->expr()->and('version', ':' . self::VERSION_NO_PARAM_NAME)) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo) ; } @@ -2172,6 +2258,8 @@ private function deleteTranslationFromContentVersions( * Compute language mask and append it to a QueryBuilder (both column and parameter). * * **Can be used on UPDATE queries only!** + * + * @throws \Doctrine\DBAL\Exception */ private function setLanguageMaskForUpdateQuery( bool $alwaysAvailable, @@ -2181,19 +2269,19 @@ private function setLanguageMaskForUpdateQuery( if ($alwaysAvailable) { $languageMaskExpr = $this->getDatabasePlatform()->getBitOrComparisonExpression( $languageMaskColumnName, - self::LANGUAGE_MASK_OPERAND_PARAM_NAME + ':' . self::LANGUAGE_MASK_OPERAND_PARAM_NAME ); } else { $languageMaskExpr = $this->getDatabasePlatform()->getBitAndComparisonExpression( $languageMaskColumnName, - self::LANGUAGE_MASK_OPERAND_PARAM_NAME + ':' . self::LANGUAGE_MASK_OPERAND_PARAM_NAME ); } $query ->set($languageMaskColumnName, $languageMaskExpr) ->setParameter( - 'languageMaskOperand', + self::LANGUAGE_MASK_OPERAND_PARAM_NAME, $alwaysAvailable ? 1 : self::REMOVE_ALWAYS_AVAILABLE_LANG_MASK_OPERAND ); @@ -2212,7 +2300,7 @@ public function loadVersionInfoList(array $contentIds): array ->andWhere( $expr->in( 'c.id', - $queryBuilder->createNamedParameter($contentIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($contentIds, ArrayParameterType::INTEGER) ) ) ->andWhere( diff --git a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php index fcd79127f7..c26f22b10b 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php @@ -17,25 +17,20 @@ use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Gateway; +use Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase as DoctrineGateway; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - protected Gateway $innerGateway; + protected DoctrineGateway $innerGateway; /** * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\Gateway $innerGateway */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineGateway $innerGateway) { $this->innerGateway = $innerGateway; } @@ -44,7 +39,7 @@ public function insertContentObject(CreateStruct $struct, int $currentVersionNo { try { return $this->innerGateway->insertContentObject($struct, $currentVersionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -53,7 +48,7 @@ public function insertVersion(VersionInfo $versionInfo, array $fields): int { try { return $this->innerGateway->insertVersion($versionInfo, $fields); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -65,19 +60,21 @@ public function updateContent( ): void { try { $this->innerGateway->updateContent($contentId, $struct, $prePublishVersionInfo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } /** * Updates version $versionNo for content identified by $contentId, in respect to $struct. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function updateVersion(int $contentId, int $versionNo, UpdateStruct $struct): void { try { $this->innerGateway->updateVersion($contentId, $versionNo, $struct); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -88,7 +85,7 @@ public function updateAlwaysAvailableFlag( ): void { try { $this->innerGateway->updateAlwaysAvailableFlag($contentId, $newAlwaysAvailable); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -97,16 +94,16 @@ public function setStatus(int $contentId, int $version, int $status): bool { try { return $this->innerGateway->setStatus($contentId, $version, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function setPublishedStatus(int $contentId, int $status): void + public function setPublishedStatus(int $contentId, int $versionNo): void { try { - $this->innerGateway->setPublishedStatus($contentId, $status); - } catch (DBALException | PDOException $e) { + $this->innerGateway->setPublishedStatus($contentId, $versionNo); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -115,7 +112,7 @@ public function insertNewField(Content $content, Field $field, StorageFieldValue { try { return $this->innerGateway->insertNewField($content, $field, $value); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -127,7 +124,7 @@ public function insertExistingField( ): void { try { $this->innerGateway->insertExistingField($content, $field, $value); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -136,7 +133,7 @@ public function updateField(Field $field, StorageFieldValue $value): void { try { $this->innerGateway->updateField($field, $value); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -148,7 +145,7 @@ public function updateNonTranslatableField( ): void { try { $this->innerGateway->updateNonTranslatableField($field, $value, $contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -157,7 +154,7 @@ public function load(int $contentId, ?int $version = null, ?array $translations { try { return $this->innerGateway->load($contentId, $version, $translations); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -166,7 +163,7 @@ public function loadContentList(array $contentIds, ?array $translations = null): { try { return $this->innerGateway->loadContentList($contentIds, $translations); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -175,7 +172,7 @@ public function loadContentInfoByRemoteId(string $remoteId): array { try { return $this->innerGateway->loadContentInfoByRemoteId($remoteId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -184,7 +181,7 @@ public function loadContentInfoByLocationId(int $locationId): array { try { return $this->innerGateway->loadContentInfoByLocationId($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -193,7 +190,7 @@ public function loadContentInfo(int $contentId): array { try { return $this->innerGateway->loadContentInfo($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -202,7 +199,7 @@ public function loadContentInfoList(array $contentIds): array { try { return $this->innerGateway->loadContentInfoList($contentIds); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -211,7 +208,7 @@ public function loadVersionInfo(int $contentId, ?int $versionNo = null): array { try { return $this->innerGateway->loadVersionInfo($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -232,19 +229,16 @@ public function countVersionsForUser(int $userId, int $status = VersionInfo::STA { try { return $this->innerGateway->countVersionsForUser($userId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - /** - * @return string[][] - */ public function listVersionsForUser(int $userId, int $status = VersionInfo::STATUS_DRAFT): array { try { return $this->innerGateway->listVersionsForUser($userId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -257,7 +251,7 @@ public function loadVersionsForUser( ): array { try { return $this->innerGateway->loadVersionsForUser($userId, $status, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -266,7 +260,7 @@ public function listVersions(int $contentId, ?int $status = null, int $limit = - { try { return $this->innerGateway->listVersions($contentId, $status, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -275,7 +269,7 @@ public function listVersionNumbers(int $contentId): array { try { return $this->innerGateway->listVersionNumbers($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -284,7 +278,7 @@ public function getLastVersionNumber(int $contentId): int { try { return $this->innerGateway->getLastVersionNumber($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -293,7 +287,7 @@ public function getAllLocationIds(int $contentId): array { try { return $this->innerGateway->getAllLocationIds($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -305,7 +299,7 @@ public function getFieldIdsByType( ): array { try { return $this->innerGateway->getFieldIdsByType($contentId, $versionNo, $languageCode); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -314,7 +308,7 @@ public function deleteRelations(int $contentId, ?int $versionNo = null): void { try { $this->innerGateway->deleteRelations($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -323,7 +317,7 @@ public function removeReverseFieldRelations(int $contentId): void { try { $this->innerGateway->removeReverseFieldRelations($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -332,7 +326,7 @@ public function removeRelationsByFieldDefinitionId(int $fieldDefinitionId): void { try { $this->innerGateway->removeRelationsByFieldDefinitionId($fieldDefinitionId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -341,7 +335,7 @@ public function deleteField(int $fieldId): void { try { $this->innerGateway->deleteField($fieldId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -350,7 +344,7 @@ public function deleteFields(int $contentId, ?int $versionNo = null): void { try { $this->innerGateway->deleteFields($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -359,7 +353,7 @@ public function deleteVersions(int $contentId, ?int $versionNo = null): void { try { $this->innerGateway->deleteVersions($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -368,7 +362,7 @@ public function deleteNames(int $contentId, ?int $versionNo = null): void { try { $this->innerGateway->deleteNames($contentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -377,7 +371,7 @@ public function setName(int $contentId, int $version, string $name, string $lang { try { $this->innerGateway->setName($contentId, $version, $name, $languageCode); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -386,7 +380,7 @@ public function deleteContent(int $contentId): void { try { $this->innerGateway->deleteContent($contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -398,7 +392,7 @@ public function loadRelations( ): array { try { return $this->innerGateway->loadRelations($contentId, $contentVersionNo, $relationType); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -410,7 +404,7 @@ public function countRelations( ): int { try { return $this->innerGateway->countRelations($contentId, $contentVersionNo, $relationType); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -430,43 +424,43 @@ public function listRelations( $contentVersionNo, $relationType ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function countReverseRelations(int $contentId, ?int $relationType = null): int + public function countReverseRelations(int $toContentId, ?int $relationType = null): int { try { - return $this->innerGateway->countReverseRelations($contentId, $relationType); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->countReverseRelations($toContentId, $relationType); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function loadReverseRelations(int $contentId, ?int $relationType = null): array + public function loadReverseRelations(int $toContentId, ?int $relationType = null): array { try { - return $this->innerGateway->loadReverseRelations($contentId, $relationType); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->loadReverseRelations($toContentId, $relationType); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } public function listReverseRelations( - int $contentId, + int $toContentId, int $offset = 0, int $limit = -1, ?int $relationType = null ): array { try { return $this->innerGateway->listReverseRelations( - $contentId, + $toContentId, $offset, $limit, $relationType ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -475,34 +469,37 @@ public function deleteRelation(int $relationId, int $type): void { try { $this->innerGateway->deleteRelation($relationId, $type); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function insertRelation(RelationCreateStruct $struct): int + public function insertRelation(RelationCreateStruct $createStruct): int { try { - return $this->innerGateway->insertRelation($struct); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->insertRelation($createStruct); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function loadRelation(int $relationId): array { try { return $this->innerGateway->loadRelation($relationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function getContentIdsByContentTypeId($contentTypeId): array + public function getContentIdsByContentTypeId(int $contentTypeId): array { try { return $this->innerGateway->getContentIdsByContentTypeId($contentTypeId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -511,7 +508,7 @@ public function loadVersionedNameData(array $rows): array { try { return $this->innerGateway->loadVersionedNameData($rows); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -523,7 +520,7 @@ public function copyRelations( ): void { try { $this->innerGateway->copyRelations($originalContentId, $copiedContentId, $versionNo); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -532,7 +529,7 @@ public function deleteTranslationFromContent(int $contentId, string $languageCod { try { $this->innerGateway->deleteTranslationFromContent($contentId, $languageCode); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -548,7 +545,7 @@ public function deleteTranslatedFields( $contentId, $versionNo ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -564,7 +561,7 @@ public function deleteTranslationFromVersion( $versionNo, $languageCode ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -573,7 +570,7 @@ public function loadVersionInfoList(array $contentIds): array { try { return $this->innerGateway->loadVersionInfoList($contentIds); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 05d74a14fc42bb3fb16422ed0456e73250bf5e97 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 3 Apr 2025 12:38:00 +0200 Subject: [PATCH 024/185] IBX-9811: Upgraded Bookmark Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Persistence/Legacy/Bookmark/Gateway.php | 6 +- .../Bookmark/Gateway/DoctrineDatabase.php | 62 ++++++++++--------- .../Bookmark/Gateway/ExceptionConversion.php | 26 ++++---- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway.php b/src/lib/Persistence/Legacy/Bookmark/Gateway.php index c8f1b30763..b82dc2133b 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway.php @@ -36,9 +36,9 @@ abstract public function deleteBookmark(int $id): void; * Load data for an bookmark with the given $userId and $locationId. * * @param int $userId ID of user - * @param array $locationIds ID of location + * @param int[] $locationIds ID of location * - * @return array + * @phpstan-return list> */ abstract public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locationIds): array; @@ -56,7 +56,7 @@ abstract public function loadUserIdsByLocation(Location $location): array; * @param int $offset Offset to start listing from, 0 by default * @param int $limit Limit for the listing. -1 by default (no limit) * - * @return array + * @phpstan-return list> */ abstract public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1): array; diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php index fc1fdfc81e..2d09cdfcfc 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php @@ -8,23 +8,23 @@ namespace Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\Bookmark\Bookmark; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; -use PDO; class DoctrineDatabase extends Gateway { - public const TABLE_BOOKMARKS = 'ezcontentbrowsebookmark'; + public const string TABLE_BOOKMARKS = 'ezcontentbrowsebookmark'; - public const COLUMN_ID = 'id'; - public const COLUMN_USER_ID = 'user_id'; - public const COLUMN_LOCATION_ID = 'node_id'; - public const COLUMN_NAME = 'name'; - private const string USER_ID_PARAM_NAME = ':user_id'; - private const string LOCATION_ID_PARAM_NAME = ':location_id'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_USER_ID = 'user_id'; + public const string COLUMN_LOCATION_ID = 'node_id'; + public const string COLUMN_NAME = 'name'; + private const string USER_ID_PARAM_NAME = 'user_id'; + private const string LOCATION_ID_PARAM_NAME = 'location_id'; protected Connection $connection; @@ -42,11 +42,11 @@ public function insertBookmark(Bookmark $bookmark): int $query ->insert(self::TABLE_BOOKMARKS) ->values([ - self::COLUMN_USER_ID => self::USER_ID_PARAM_NAME, - self::COLUMN_LOCATION_ID => self::LOCATION_ID_PARAM_NAME, + self::COLUMN_USER_ID => ':' . self::USER_ID_PARAM_NAME, + self::COLUMN_LOCATION_ID => ':' . self::LOCATION_ID_PARAM_NAME, ]) - ->setParameter(self::USER_ID_PARAM_NAME, $bookmark->userId, PDO::PARAM_INT) - ->setParameter(self::LOCATION_ID_PARAM_NAME, $bookmark->locationId, PDO::PARAM_INT); + ->setParameter(self::USER_ID_PARAM_NAME, $bookmark->userId, ParameterType::INTEGER) + ->setParameter(self::LOCATION_ID_PARAM_NAME, $bookmark->locationId, ParameterType::INTEGER); $query->executeStatement(); @@ -62,13 +62,15 @@ public function deleteBookmark(int $id): void $query ->delete(self::TABLE_BOOKMARKS) ->where($query->expr()->eq(self::COLUMN_ID, ':id')) - ->setParameter(':id', $id, PDO::PARAM_INT); + ->setParameter('id', $id, ParameterType::INTEGER); $query->executeStatement(); } /** * @throws \Doctrine\DBAL\Exception + * + * @phpstan-return list> */ public function loadBookmarkDataById(int $id): array { @@ -77,7 +79,7 @@ public function loadBookmarkDataById(int $id): array ->select(...$this->getColumns()) ->from(self::TABLE_BOOKMARKS) ->where($query->expr()->eq(self::COLUMN_ID, ':id')) - ->setParameter(':id', $id, PDO::PARAM_INT); + ->setParameter('id', $id, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } @@ -92,11 +94,11 @@ public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locati ->select(...$this->getColumns()) ->from(self::TABLE_BOOKMARKS) ->where($query->expr()->and( - $query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME), - $query->expr()->in(self::COLUMN_LOCATION_ID, self::LOCATION_ID_PARAM_NAME) + $query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME), + $query->expr()->in(self::COLUMN_LOCATION_ID, ':' . self::LOCATION_ID_PARAM_NAME) )) - ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) - ->setParameter(self::LOCATION_ID_PARAM_NAME, $locationIds, Connection::PARAM_INT_ARRAY); + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER) + ->setParameter(self::LOCATION_ID_PARAM_NAME, $locationIds, ArrayParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } @@ -134,7 +136,7 @@ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1) $query ->select(...$this->getColumns()) ->from(self::TABLE_BOOKMARKS) - ->where($query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME)) + ->where($query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME)) ->setFirstResult($offset); if ($limit > 0) { @@ -142,7 +144,7 @@ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1) } $query->orderBy(self::COLUMN_ID, 'DESC'); - $query->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT); + $query->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } @@ -156,14 +158,14 @@ public function countUserBookmarks(int $userId): int $query ->select('COUNT(' . self::COLUMN_ID . ')') ->from(self::TABLE_BOOKMARKS) - ->where($query->expr()->eq(self::COLUMN_USER_ID, self::USER_ID_PARAM_NAME)) - ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT); + ->where($query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME)) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); - return (int) $query->executeQuery()->fetchFirstColumn(); + return (int) $query->executeQuery()->fetchOne(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function locationSwapped(int $location1Id, int $location2Id): void { @@ -174,14 +176,16 @@ public function locationSwapped(int $location1Id, int $location2Id): void ->where($query->expr()->or( $query->expr()->eq(self::COLUMN_LOCATION_ID, ':source_id'), $query->expr()->eq(self::COLUMN_LOCATION_ID, ':target_id') - )); + )) + ->setParameter('source_id', $location1Id, ParameterType::INTEGER) + ->setParameter('target_id', $location2Id, ParameterType::INTEGER); - $stmt = $this->connection->prepare($query->getSQL()); - $stmt->bindValue('source_id', $location1Id, PDO::PARAM_INT); - $stmt->bindValue('target_id', $location2Id, PDO::PARAM_INT); - $stmt->execute(); + $query->executeStatement(); } + /** + * @return string[] + */ private function getColumns(): array { return [ diff --git a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php index f7e5d1f7e1..a39a51c0ca 100644 --- a/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php @@ -13,16 +13,12 @@ use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Bookmark\Gateway; -use PDOException; class ExceptionConversion extends Gateway { - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - /** - * @param \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -31,7 +27,7 @@ public function insertBookmark(Bookmark $bookmark): int { try { return $this->innerGateway->insertBookmark($bookmark); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -40,16 +36,16 @@ public function deleteBookmark(int $id): void { try { $this->innerGateway->deleteBookmark($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locationId): array + public function loadBookmarkDataByUserIdAndLocationId(int $userId, array $locationIds): array { try { - return $this->innerGateway->loadBookmarkDataByUserIdAndLocationId($userId, $locationId); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->loadBookmarkDataByUserIdAndLocationId($userId, $locationIds); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -58,7 +54,7 @@ public function loadUserBookmarks(int $userId, int $offset = 0, int $limit = -1) { try { return $this->innerGateway->loadUserBookmarks($userId, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -67,7 +63,7 @@ public function countUserBookmarks(int $userId): int { try { return $this->innerGateway->countUserBookmarks($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -76,7 +72,7 @@ public function locationSwapped(int $location1Id, int $location2Id): void { try { $this->innerGateway->locationSwapped($location1Id, $location2Id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -85,7 +81,7 @@ public function loadUserIdsByLocation(Location $location): array { try { return $this->innerGateway->loadUserIdsByLocation($location); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 3217de17c8ca80aead7a2da8e95484830c436b2c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 3 Apr 2025 12:51:44 +0200 Subject: [PATCH 025/185] IBX-9811: Upgraded Language Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Persistence/Legacy/Content/Gateway.php | 8 +-- .../Legacy/Content/Language/Gateway.php | 14 ++-- .../Language/Gateway/DoctrineDatabase.php | 72 +++++++++++++------ .../Language/Gateway/ExceptionConversion.php | 24 +++---- 4 files changed, 72 insertions(+), 46 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway.php b/src/lib/Persistence/Legacy/Content/Gateway.php index ee1788844b..26e0ff6608 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Gateway.php @@ -95,11 +95,11 @@ abstract public function setStatus(int $contentId, int $version, int $status): b * * IMPORTANT: This method expects prior published version to have been set to another status then published before called, otherwise you'll get a BadStateException. * - * @see setStatus + * @see setStatus() * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException if other operation affected publishing process */ - abstract public function setPublishedStatus(int $contentId, int $status): void; + abstract public function setPublishedStatus(int $contentId, int $versionNo): void; /** * Insert a new field. @@ -408,14 +408,14 @@ abstract public function listRelations( /** * Counts number of related to/from $contentId. */ - abstract public function countReverseRelations(int $contentId, ?int $relationType = null): int; + abstract public function countReverseRelations(int $toContentId, ?int $relationType = null): int; /** * Load data of related to/from $contentId. * * @phpstan-return list> Content data, array structured like {@see \Ibexa\Core\Persistence\Legacy\Content\Gateway::load} */ - abstract public function loadReverseRelations(int $contentId, ?int $relationType = null): array; + abstract public function loadReverseRelations(int $toContentId, ?int $relationType = null): array; /** * Load paginated data of related to/from $contentId. diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway.php b/src/lib/Persistence/Legacy/Content/Language/Gateway.php index c27500bc39..479ad9d0a2 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway.php @@ -17,18 +17,20 @@ */ abstract class Gateway { - public const CONTENT_LANGUAGE_TABLE = 'ezcontent_language'; + public const string CONTENT_LANGUAGE_TABLE = 'ezcontent_language'; /** - * A map of language-related table name to its language column. + * A map of language-related table name to its language columns. * * The first column is considered to be a language bitmask. * The second, optional, column is an explicit language id. * * It depends on the schema defined in * ./src/bundle/Core/Resources/config/storage/legacy/schema.yaml + * + * @var array */ - public const MULTILINGUAL_TABLES_COLUMNS = [ + public const array MULTILINGUAL_TABLES_COLUMNS = [ 'ezcobj_state' => ['language_mask', 'default_language_id'], 'ezcobj_state_group_language' => ['language_id'], 'ezcobj_state_group' => ['language_mask', 'default_language_id'], @@ -58,7 +60,7 @@ abstract public function updateLanguage(Language $language): void; * * @param int[] $ids * - * @return string[][]|iterable + * @phpstan-return list> */ abstract public function loadLanguageListData(array $ids): iterable; @@ -67,12 +69,14 @@ abstract public function loadLanguageListData(array $ids): iterable; * * @param string[] $languageCodes * - * @return string[][]|iterable + * @phpstan-return list> */ abstract public function loadLanguageListDataByLanguageCode(array $languageCodes): iterable; /** * Load the data for all languages. + * + * @phpstan-return list> */ abstract public function loadAllLanguagesData(): array; diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php index 55978272bc..4d882c26f9 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php @@ -8,10 +8,13 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Language\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Language; +use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Language\Gateway; use RuntimeException; @@ -29,35 +32,31 @@ final class DoctrineDatabase extends Gateway */ private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct(Connection $connection) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertLanguage(Language $language): int { $query = $this->connection->createQueryBuilder(); $query ->select( - $this->dbPlatform->getMaxExpression('id') + 'MAX(id)' ) ->from(self::CONTENT_LANGUAGE_TABLE); - $statement = $query->execute(); + $statement = $query->executeQuery(); - $lastId = (int)$statement->fetchColumn(); + $lastId = (int)$statement->fetchOne(); // Legacy only supports 8 * PHP_INT_SIZE - 2 languages: // One bit cannot be used because PHP uses signed integers and a second one is reserved for the // "always available flag". - if ($lastId == (2 ** (8 * PHP_INT_SIZE - 2))) { + if ($lastId === (2 ** (8 * PHP_INT_SIZE - 2))) { throw new RuntimeException('Maximum number of languages reached.'); } // Next power of 2 for bit masks @@ -78,7 +77,7 @@ public function insertLanguage(Language $language): int $this->setLanguageQueryParameters($query, $language); - $query->execute(); + $query->executeStatement(); return $nextId; } @@ -89,11 +88,14 @@ public function insertLanguage(Language $language): int private function setLanguageQueryParameters(QueryBuilder $query, Language $language): void { $query - ->setParameter('language_code', $language->languageCode, ParameterType::STRING) - ->setParameter('name', $language->name, ParameterType::STRING) + ->setParameter('language_code', $language->languageCode) + ->setParameter('name', $language->name) ->setParameter('disabled', (int)!$language->isEnabled, ParameterType::INTEGER); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateLanguage(Language $language): void { $query = $this->connection->createQueryBuilder(); @@ -112,25 +114,31 @@ public function updateLanguage(Language $language): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadLanguageListData(array $ids): iterable { $query = $this->createFindQuery(); $query ->where('id IN (:ids)') - ->setParameter('ids', $ids, Connection::PARAM_INT_ARRAY); + ->setParameter('ids', $ids, ArrayParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadLanguageListDataByLanguageCode(array $languageCodes): iterable { $query = $this->createFindQuery(); $query ->where('locale IN (:locale)') - ->setParameter('locale', $languageCodes, Connection::PARAM_STR_ARRAY); + ->setParameter('locale', $languageCodes, ArrayParameterType::STRING); return $query->executeQuery()->fetchAllAssociative(); } @@ -148,11 +156,17 @@ private function createFindQuery(): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAllLanguagesData(): array { return $this->createFindQuery()->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteLanguage(int $id): void { $query = $this->connection->createQueryBuilder(); @@ -165,9 +179,12 @@ public function deleteLanguage(int $id): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function canDeleteLanguage(int $id): bool { // note: at some point this should be delegated to specific gateways @@ -188,6 +205,8 @@ public function canDeleteLanguage(int $id): bool * Count table data rows related to the given language. * * @param string|null $languageIdColumn optional column name containing explicit language id + * + * @throws \Doctrine\DBAL\Exception */ private function countTableData( int $languageId, @@ -197,12 +216,11 @@ private function countTableData( ): int { $query = $this->connection->createQueryBuilder(); $query - // avoiding using "*" as count argument, but don't specify column name because it varies - ->select($this->dbPlatform->getCountExpression(1)) + ->select('COUNT(1)') ->from($tableName) ->where( $query->expr()->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( $languageMaskColumn, $query->createPositionalParameter($languageId, ParameterType::INTEGER) ), @@ -219,6 +237,16 @@ private function countTableData( ); } - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); + } + + /** + * @throws \Doctrine\DBAL\Exception + */ + private function getDatabasePlatform(): AbstractPlatform + { + $databasePlatform = $this->connection->getDatabasePlatform(); + + return $databasePlatform ?? throw new DatabaseException('Failed to get database platform'); } } diff --git a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php index 185ddaa85a..1463c4c698 100644 --- a/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php @@ -12,21 +12,15 @@ use Ibexa\Contracts\Core\Persistence\Content\Language; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Language\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\Language\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -35,7 +29,7 @@ public function insertLanguage(Language $language): int { try { return $this->innerGateway->insertLanguage($language); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -44,7 +38,7 @@ public function updateLanguage(Language $language): void { try { $this->innerGateway->updateLanguage($language); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -53,7 +47,7 @@ public function loadLanguageListData(array $ids): iterable { try { return $this->innerGateway->loadLanguageListData($ids); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -62,7 +56,7 @@ public function loadLanguageListDataByLanguageCode(array $languageCodes): iterab { try { return $this->innerGateway->loadLanguageListDataByLanguageCode($languageCodes); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -71,7 +65,7 @@ public function loadAllLanguagesData(): array { try { return $this->innerGateway->loadAllLanguagesData(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -80,7 +74,7 @@ public function deleteLanguage(int $id): void { try { $this->innerGateway->deleteLanguage($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -89,7 +83,7 @@ public function canDeleteLanguage(int $id): bool { try { return $this->innerGateway->canDeleteLanguage($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 607323702f37798c35fbaa6be43df2244379b461 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 3 Apr 2025 16:31:42 +0200 Subject: [PATCH 026/185] IBX-9811: [Test contracts] Upgraded FixtureImporter to doctrine/dbal v3 --- .../Test/Persistence/Fixture/FixtureImporter.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index 0828a0234c..2a1810ac9c 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -73,9 +73,9 @@ private function truncateTables(array $tables): void $this->connection->executeStatement( $dbPlatform->getTruncateTableSql($this->connection->quoteIdentifier($table)) ); - } catch (DBALException $e) { + } catch (DBALException) { // Fallback to DELETE if TRUNCATE failed (because of FKs for instance) - $this->connection->createQueryBuilder()->delete($table)->execute(); + $this->connection->createQueryBuilder()->delete($table)->executeStatement(); } } } @@ -103,6 +103,8 @@ private function resetSequences(array $affectedTables): void * @param string[] $affectedTables the list of tables which need their sequences reset * * @return iterable list of SQL statements + * + * @throws \Doctrine\DBAL\Exception */ private function getSequenceResetStatements(array $affectedTables): iterable { @@ -110,8 +112,7 @@ private function getSequenceResetStatements(array $affectedTables): iterable $queryTemplate = 'SELECT setval(\'%s\', %s) FROM %s'; $unvisitedTables = array_diff($affectedTables, array_keys(self::$resetSequenceStatements)); - $schemaManager = $this->connection->getSchemaManager(); - $databasePlatform = $this->connection->getDatabasePlatform(); + $schemaManager = $this->connection->createSchemaManager(); foreach ($unvisitedTables as $tableName) { $columns = $schemaManager->listTableColumns($tableName); @@ -129,7 +130,7 @@ private function getSequenceResetStatements(array $affectedTables): iterable self::$resetSequenceStatements[$tableName] = sprintf( $queryTemplate, $sequenceName, - $databasePlatform->getMaxExpression($this->connection->quoteIdentifier($columnName)), + sprintf('MAX(%s),', $this->connection->quoteIdentifier($columnName)), $this->connection->quoteIdentifier($tableName) ); } From e6627e9c7822df35402b07107c477bbda13a94f9 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 3 Apr 2025 16:35:25 +0200 Subject: [PATCH 027/185] IBX-9811: [Test contracts] Upgraded Legacy SetupFactory to doctrine/dbal v3 --- src/contracts/Test/Repository/SetupFactory.php | 3 ++- .../Test/Repository/SetupFactory/Legacy.php | 18 ++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/contracts/Test/Repository/SetupFactory.php b/src/contracts/Test/Repository/SetupFactory.php index 703eaaefe0..a4ea93f4c3 100644 --- a/src/contracts/Test/Repository/SetupFactory.php +++ b/src/contracts/Test/Repository/SetupFactory.php @@ -19,7 +19,8 @@ abstract class SetupFactory * @param bool $initializeFromScratch if the back end should be initialized * from scratch or re-used * - * @return \Ibexa\Contracts\Core\Repository\Repository + * @throws \Exception + * @throws \Doctrine\DBAL\Exception */ abstract public function getRepository($initializeFromScratch = true); diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index 962d1dea72..3af249c7ca 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -122,17 +122,6 @@ private function createTemporaryDirectory(): string return $tmpFile; } - /** - * Returns a configured repository for testing. - * - * @param bool $initializeFromScratch if the back end should be initialized - * from scratch or re-used - * - * @return \Ibexa\Contracts\Core\Repository\Repository - * - * @throws \Doctrine\DBAL\ConnectionException - * @throws \Doctrine\DBAL\Exception - */ public function getRepository($initializeFromScratch = true): Repository { if ($initializeFromScratch || !self::$schemaInitialized) { @@ -166,6 +155,7 @@ public function getIdManager(): Php * Insert the database data. * * @throws \Doctrine\DBAL\Exception + * @throws \Exception */ public function insertData(): void { @@ -194,6 +184,8 @@ protected function cleanupVarDir(string $sourceDir): void /** * Clears internal in memory caches after inserting data circumventing the API. + * + * @throws \Exception */ protected function clearInternalCaches(): void { @@ -230,8 +222,8 @@ protected function getInitialDataFixture(): Fixture /** * Initializes the database schema. * - * @throws \Doctrine\DBAL\ConnectionException * @throws \Doctrine\DBAL\Exception + * @throws \Exception */ protected function initializeSchema(): void { @@ -250,6 +242,8 @@ protected function initializeSchema(): void * Returns the raw database connection from the service container. * * @return \Doctrine\DBAL\Connection + * + * @throws \Exception */ private function getDatabaseConnection(): Connection { From 7a60fad2f7318f96f456f29774bf064f8fcc6893 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 4 Apr 2025 10:59:28 +0200 Subject: [PATCH 028/185] IBX-9727: [Tests] Added Case suffix for abstract: BaseFieldTypeTest, BinaryBaseTest, BinaryFileTest Abstract test case classes with Test suffix (instead of TestCase) are deprecated. --- tests/lib/FieldType/AuthorTest.php | 2 +- .../{BaseFieldTypeTest.php => BaseFieldTypeTestCase.php} | 2 +- .../FieldType/{BinaryBaseTest.php => BinaryBaseTestCase.php} | 2 +- tests/lib/FieldType/BinaryFileTest.php | 2 +- tests/lib/FieldType/CheckboxTest.php | 2 +- tests/lib/FieldType/CountryTest.php | 2 +- tests/lib/FieldType/DateAndTimeTest.php | 2 +- tests/lib/FieldType/DateTest.php | 2 +- tests/lib/FieldType/EmailAddressTest.php | 2 +- .../FieldType/{FieldTypeTest.php => FieldTypeTestCase.php} | 3 +-- tests/lib/FieldType/FloatTest.php | 2 +- tests/lib/FieldType/Generic/GenericTest.php | 4 ++-- tests/lib/FieldType/ISBNTest.php | 2 +- tests/lib/FieldType/ImageAssetTest.php | 2 +- tests/lib/FieldType/ImageTest.php | 2 +- tests/lib/FieldType/IntegerTest.php | 2 +- tests/lib/FieldType/KeywordTest.php | 2 +- tests/lib/FieldType/MapLocationTest.php | 2 +- tests/lib/FieldType/MediaTest.php | 2 +- tests/lib/FieldType/RelationListTest.php | 2 +- tests/lib/FieldType/RelationTest.php | 2 +- tests/lib/FieldType/SelectionTest.php | 2 +- tests/lib/FieldType/TextBlockTest.php | 2 +- tests/lib/FieldType/TextLineTest.php | 2 +- tests/lib/FieldType/TimeTest.php | 2 +- tests/lib/FieldType/UrlTest.php | 2 +- tests/lib/FieldType/UserTest.php | 2 +- 27 files changed, 28 insertions(+), 29 deletions(-) rename tests/lib/FieldType/{BaseFieldTypeTest.php => BaseFieldTypeTestCase.php} (99%) rename tests/lib/FieldType/{BinaryBaseTest.php => BinaryBaseTestCase.php} (98%) rename tests/lib/FieldType/{FieldTypeTest.php => FieldTypeTestCase.php} (91%) diff --git a/tests/lib/FieldType/AuthorTest.php b/tests/lib/FieldType/AuthorTest.php index 588c719cb3..091c6ae47a 100644 --- a/tests/lib/FieldType/AuthorTest.php +++ b/tests/lib/FieldType/AuthorTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezauthor */ -class AuthorTest extends FieldTypeTest +class AuthorTest extends FieldTypeTestCase { /** @var \Ibexa\Core\FieldType\Author\Author[] */ private array $authors; diff --git a/tests/lib/FieldType/BaseFieldTypeTest.php b/tests/lib/FieldType/BaseFieldTypeTestCase.php similarity index 99% rename from tests/lib/FieldType/BaseFieldTypeTest.php rename to tests/lib/FieldType/BaseFieldTypeTestCase.php index e96bf8fc98..f349604b35 100644 --- a/tests/lib/FieldType/BaseFieldTypeTest.php +++ b/tests/lib/FieldType/BaseFieldTypeTestCase.php @@ -15,7 +15,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -abstract class BaseFieldTypeTest extends TestCase +abstract class BaseFieldTypeTestCase extends TestCase { /** * Generic cache for the getFieldTypeUnderTest() method. diff --git a/tests/lib/FieldType/BinaryBaseTest.php b/tests/lib/FieldType/BinaryBaseTestCase.php similarity index 98% rename from tests/lib/FieldType/BinaryBaseTest.php rename to tests/lib/FieldType/BinaryBaseTestCase.php index 7a9fa0c8a4..0cc9d7ef18 100644 --- a/tests/lib/FieldType/BinaryBaseTest.php +++ b/tests/lib/FieldType/BinaryBaseTestCase.php @@ -17,7 +17,7 @@ * * @group fieldType */ -abstract class BinaryBaseTest extends FieldTypeTest +abstract class BinaryBaseTestCase extends FieldTypeTestCase { protected $blackListedExtensions = [ 'php', diff --git a/tests/lib/FieldType/BinaryFileTest.php b/tests/lib/FieldType/BinaryFileTest.php index e51db9b544..928bf581ab 100644 --- a/tests/lib/FieldType/BinaryFileTest.php +++ b/tests/lib/FieldType/BinaryFileTest.php @@ -21,7 +21,7 @@ * * @covers \Ibexa\Core\FieldType\BinaryFile\Type */ -class BinaryFileTest extends BinaryBaseTest +class BinaryFileTest extends BinaryBaseTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/CheckboxTest.php b/tests/lib/FieldType/CheckboxTest.php index 0747408150..1da284ed45 100644 --- a/tests/lib/FieldType/CheckboxTest.php +++ b/tests/lib/FieldType/CheckboxTest.php @@ -17,7 +17,7 @@ * @group fieldType * @group ezboolean */ -class CheckboxTest extends FieldTypeTest +class CheckboxTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/CountryTest.php b/tests/lib/FieldType/CountryTest.php index 48c1efaa77..6824e15dc4 100644 --- a/tests/lib/FieldType/CountryTest.php +++ b/tests/lib/FieldType/CountryTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezcountry */ -class CountryTest extends FieldTypeTest +class CountryTest extends FieldTypeTestCase { protected function provideFieldTypeIdentifier(): string { diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index 4c948aeb53..0dc1d14c8b 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezdatetime */ -class DateAndTimeTest extends FieldTypeTest +class DateAndTimeTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/DateTest.php b/tests/lib/FieldType/DateTest.php index e62da66988..eca88a3b06 100644 --- a/tests/lib/FieldType/DateTest.php +++ b/tests/lib/FieldType/DateTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezdate */ -class DateTest extends FieldTypeTest +class DateTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/EmailAddressTest.php b/tests/lib/FieldType/EmailAddressTest.php index 328031befd..47cfaf3f17 100644 --- a/tests/lib/FieldType/EmailAddressTest.php +++ b/tests/lib/FieldType/EmailAddressTest.php @@ -18,7 +18,7 @@ * @group fieldType * @group ezemail */ -class EmailAddressTest extends FieldTypeTest +class EmailAddressTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/FieldTypeTest.php b/tests/lib/FieldType/FieldTypeTestCase.php similarity index 91% rename from tests/lib/FieldType/FieldTypeTest.php rename to tests/lib/FieldType/FieldTypeTestCase.php index 567fee071d..726a8c5516 100644 --- a/tests/lib/FieldType/FieldTypeTest.php +++ b/tests/lib/FieldType/FieldTypeTestCase.php @@ -9,9 +9,8 @@ use Ibexa\Contracts\Core\FieldType\Value as SPIValue; use Ibexa\Core\Persistence\TransformationProcessor; -use Ibexa\Tests\Core\FieldType\BaseFieldTypeTest as BaseFieldTypeTest; -abstract class FieldTypeTest extends BaseFieldTypeTest +abstract class FieldTypeTestCase extends BaseFieldTypeTestCase { /** * @return \Ibexa\Core\Persistence\TransformationProcessor|\PHPUnit\Framework\MockObject\MockObject diff --git a/tests/lib/FieldType/FloatTest.php b/tests/lib/FieldType/FloatTest.php index 0b1f0636f0..e926071e4c 100644 --- a/tests/lib/FieldType/FloatTest.php +++ b/tests/lib/FieldType/FloatTest.php @@ -18,7 +18,7 @@ * @group fieldType * @group ezfloat */ -class FloatTest extends FieldTypeTest +class FloatTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/Generic/GenericTest.php b/tests/lib/FieldType/Generic/GenericTest.php index fa46ad8d8a..37385ce126 100644 --- a/tests/lib/FieldType/Generic/GenericTest.php +++ b/tests/lib/FieldType/Generic/GenericTest.php @@ -11,7 +11,7 @@ use Ibexa\Contracts\Core\FieldType\ValidationError; use Ibexa\Contracts\Core\FieldType\ValueSerializerInterface; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; -use Ibexa\Tests\Core\FieldType\BaseFieldTypeTest; +use Ibexa\Tests\Core\FieldType\BaseFieldTypeTestCase; use Ibexa\Tests\Core\FieldType\Generic\Stubs\Type; use Ibexa\Tests\Core\FieldType\Generic\Stubs\Type as GenericFieldTypeStub; use Ibexa\Tests\Core\FieldType\Generic\Stubs\Value; @@ -22,7 +22,7 @@ use Symfony\Component\Validator\ConstraintViolationListInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; -class GenericTest extends BaseFieldTypeTest +class GenericTest extends BaseFieldTypeTestCase { /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface|\PHPUnit\Framework\MockObject\MockObject */ private ValueSerializerInterface $serializer; diff --git a/tests/lib/FieldType/ISBNTest.php b/tests/lib/FieldType/ISBNTest.php index f636d6ebf9..488dfb5db0 100644 --- a/tests/lib/FieldType/ISBNTest.php +++ b/tests/lib/FieldType/ISBNTest.php @@ -17,7 +17,7 @@ * @group fieldType * @group ezisbn */ -class ISBNTest extends FieldTypeTest +class ISBNTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/ImageAssetTest.php b/tests/lib/FieldType/ImageAssetTest.php index 4f26b0f266..3340c0d941 100644 --- a/tests/lib/FieldType/ImageAssetTest.php +++ b/tests/lib/FieldType/ImageAssetTest.php @@ -28,7 +28,7 @@ * @group fieldType * @group ezimageasset */ -class ImageAssetTest extends FieldTypeTest +class ImageAssetTest extends FieldTypeTestCase { private const DESTINATION_CONTENT_ID = 14; diff --git a/tests/lib/FieldType/ImageTest.php b/tests/lib/FieldType/ImageTest.php index ffbcf50099..0845ea80a6 100644 --- a/tests/lib/FieldType/ImageTest.php +++ b/tests/lib/FieldType/ImageTest.php @@ -23,7 +23,7 @@ * @group fieldType * @group ezfloat */ -class ImageTest extends FieldTypeTest +class ImageTest extends FieldTypeTestCase { private const MIME_TYPES = [ 'image/png', diff --git a/tests/lib/FieldType/IntegerTest.php b/tests/lib/FieldType/IntegerTest.php index 4fa979132a..ccfc96627e 100644 --- a/tests/lib/FieldType/IntegerTest.php +++ b/tests/lib/FieldType/IntegerTest.php @@ -18,7 +18,7 @@ * @group fieldType * @group ezinteger */ -class IntegerTest extends FieldTypeTest +class IntegerTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/KeywordTest.php b/tests/lib/FieldType/KeywordTest.php index 95eee21529..d0e88bf315 100644 --- a/tests/lib/FieldType/KeywordTest.php +++ b/tests/lib/FieldType/KeywordTest.php @@ -17,7 +17,7 @@ * @group fieldType * @group ezinteger */ -class KeywordTest extends FieldTypeTest +class KeywordTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/MapLocationTest.php b/tests/lib/FieldType/MapLocationTest.php index 4ef9c9abe2..00def63e0f 100644 --- a/tests/lib/FieldType/MapLocationTest.php +++ b/tests/lib/FieldType/MapLocationTest.php @@ -11,7 +11,7 @@ use Ibexa\Core\FieldType\MapLocation\Type; use Ibexa\Core\FieldType\MapLocation\Value; -class MapLocationTest extends FieldTypeTest +class MapLocationTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/MediaTest.php b/tests/lib/FieldType/MediaTest.php index b029c8e5a7..b5efbe74e3 100644 --- a/tests/lib/FieldType/MediaTest.php +++ b/tests/lib/FieldType/MediaTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezbinaryfile */ -class MediaTest extends BinaryBaseTest +class MediaTest extends BinaryBaseTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index 879fadd0da..dcbec9aa29 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -19,7 +19,7 @@ use Ibexa\Core\Repository\Validator\TargetContentValidatorInterface; use PHPUnit\Framework\MockObject\MockObject; -class RelationListTest extends FieldTypeTest +class RelationListTest extends FieldTypeTestCase { private const DESTINATION_CONTENT_ID_14 = 14; private const DESTINATION_CONTENT_ID_22 = 22; diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index 78761a860d..ec5e0b8102 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -21,7 +21,7 @@ use Ibexa\Core\Repository\Validator\TargetContentValidatorInterface; use PHPUnit\Framework\MockObject\MockObject; -class RelationTest extends FieldTypeTest +class RelationTest extends FieldTypeTestCase { private const DESTINATION_CONTENT_ID = 14; diff --git a/tests/lib/FieldType/SelectionTest.php b/tests/lib/FieldType/SelectionTest.php index ffdd78faaf..f2ebe50119 100644 --- a/tests/lib/FieldType/SelectionTest.php +++ b/tests/lib/FieldType/SelectionTest.php @@ -19,7 +19,7 @@ * @group fieldType * @group ezselection */ -class SelectionTest extends FieldTypeTest +class SelectionTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/TextBlockTest.php b/tests/lib/FieldType/TextBlockTest.php index 8bc10e2c72..0fbcc28ea1 100644 --- a/tests/lib/FieldType/TextBlockTest.php +++ b/tests/lib/FieldType/TextBlockTest.php @@ -16,7 +16,7 @@ * @group fieldType * @group eztext */ -final class TextBlockTest extends FieldTypeTest +final class TextBlockTest extends FieldTypeTestCase { private const string SAMPLE_TEXT_LINE_VALUE = ' sindelfingen '; diff --git a/tests/lib/FieldType/TextLineTest.php b/tests/lib/FieldType/TextLineTest.php index c105184f20..135e0b0f4e 100644 --- a/tests/lib/FieldType/TextLineTest.php +++ b/tests/lib/FieldType/TextLineTest.php @@ -17,7 +17,7 @@ * @group fieldType * @group ezstring */ -final class TextLineTest extends FieldTypeTest +final class TextLineTest extends FieldTypeTestCase { private const string STRING_TOO_SHORT_EXPECTED_SINGULAR_MESSAGE = 'The string cannot be shorter than %size% character.'; private const string STRING_TOO_SHORT_EXPECTED_PLURAL_MESSAGE = 'The string cannot be shorter than %size% characters.'; diff --git a/tests/lib/FieldType/TimeTest.php b/tests/lib/FieldType/TimeTest.php index 615de5fdf9..b7540d3732 100644 --- a/tests/lib/FieldType/TimeTest.php +++ b/tests/lib/FieldType/TimeTest.php @@ -18,7 +18,7 @@ * @group fieldType * @group eztime */ -class TimeTest extends FieldTypeTest +class TimeTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/UrlTest.php b/tests/lib/FieldType/UrlTest.php index 8021af715d..7075d7646a 100644 --- a/tests/lib/FieldType/UrlTest.php +++ b/tests/lib/FieldType/UrlTest.php @@ -17,7 +17,7 @@ * @group fieldType * @group ezurl */ -class UrlTest extends FieldTypeTest +class UrlTest extends FieldTypeTestCase { /** * Returns the field type under test. diff --git a/tests/lib/FieldType/UserTest.php b/tests/lib/FieldType/UserTest.php index 1737511d7d..2c6215e67b 100644 --- a/tests/lib/FieldType/UserTest.php +++ b/tests/lib/FieldType/UserTest.php @@ -30,7 +30,7 @@ * @group fieldType * @group ezurl */ -class UserTest extends FieldTypeTest +class UserTest extends FieldTypeTestCase { private const UNSUPPORTED_HASH_TYPE = 0xDEADBEEF; From bd6761ded3f2580716ab44b495db5185337e61f5 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 4 Apr 2025 13:41:44 +0200 Subject: [PATCH 029/185] IBX-9727: [Tests] Fixed incorrect type hints added by Rector --- tests/lib/FieldType/BaseFieldTypeTestCase.php | 21 ++++++++----------- tests/lib/FieldType/DateAndTimeTest.php | 16 ++++++-------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/tests/lib/FieldType/BaseFieldTypeTestCase.php b/tests/lib/FieldType/BaseFieldTypeTestCase.php index f349604b35..2da21a7baa 100644 --- a/tests/lib/FieldType/BaseFieldTypeTestCase.php +++ b/tests/lib/FieldType/BaseFieldTypeTestCase.php @@ -7,12 +7,10 @@ namespace Ibexa\Tests\Core\FieldType; -use Ibexa\Contracts\Core\FieldType\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError; use Ibexa\Contracts\Core\FieldType\Value; -use Ibexa\Contracts\Core\FieldType\Value as SPIValue; +use Ibexa\Contracts\Core\FieldType\Value as FieldTypeValue; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition as APIFieldDefinition; -use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class BaseFieldTypeTestCase extends TestCase @@ -417,7 +415,7 @@ public function provideValidDataForValidate() return [ [ [], - $this->createMock(SPIValue::class), + $this->createMock(FieldTypeValue::class), ], ]; } @@ -491,7 +489,7 @@ public function provideInvalidDataForValidate() return [ [ [], - $this->createMock(SPIValue::class), + $this->createMock(FieldTypeValue::class), [], ], ]; @@ -526,7 +524,7 @@ public function testGetFieldTypeIdentifier(): void * @dataProvider provideDataForGetName */ public function testGetName( - SPIValue $value, + FieldTypeValue $value, string $expected, array $fieldSettings = [], string $languageCode = 'en_GB' @@ -654,12 +652,11 @@ public function testToHash(Value $inputValue, $expectedResult): void } /** - * @param mixed $inputValue - * @param array $expectedResult - * * @dataProvider provideInputForFromHash + * + * @param array|null $inputHash */ - public function testFromHash($inputHash, $expectedResult): void + public function testFromHash(mixed $inputHash, FieldTypeValue $expectedResult): void { $this->assertIsValidHashValue($inputHash); @@ -897,7 +894,7 @@ protected function assertIsValidHashValue($actualHash, $keyChain = []) /** * @dataProvider provideValidDataForValidate */ - public function testValidateValid(array $fieldDefinitionData, MockObject&Value $value): void + public function testValidateValid(array $fieldDefinitionData, Value $value): void { $validationErrors = $this->doValidate($fieldDefinitionData, $value); @@ -908,7 +905,7 @@ public function testValidateValid(array $fieldDefinitionData, MockObject&Value $ /** * @dataProvider provideInvalidDataForValidate */ - public function testValidateInvalid(array $fieldDefinitionData, MockObject&Value $value, array $errors): void + public function testValidateInvalid(array $fieldDefinitionData, Value $value, array $errors): void { $validationErrors = $this->doValidate($fieldDefinitionData, $value); diff --git a/tests/lib/FieldType/DateAndTimeTest.php b/tests/lib/FieldType/DateAndTimeTest.php index 0dc1d14c8b..a5c37caf1f 100644 --- a/tests/lib/FieldType/DateAndTimeTest.php +++ b/tests/lib/FieldType/DateAndTimeTest.php @@ -8,10 +8,9 @@ namespace Ibexa\Tests\Core\FieldType; use DateInterval; +use Ibexa\Contracts\Core\FieldType\Value as FieldTypeValue; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; -use Ibexa\Core\FieldType\DateAndTime\Type; use Ibexa\Core\FieldType\DateAndTime\Type as DateAndTime; -use Ibexa\Core\FieldType\DateAndTime\Value; use Ibexa\Core\FieldType\DateAndTime\Value as DateAndTimeValue; use stdClass; @@ -29,10 +28,8 @@ class DateAndTimeTest extends FieldTypeTestCase * get*Mock() methods and/or custom get*Mock() implementations. You MUST * NOT take care for test case wide caching of the field type, just return * a new instance from this method! - * - * @return \Ibexa\Core\FieldType\FieldType */ - protected function createFieldTypeUnderTest(): Type + protected function createFieldTypeUnderTest(): DateAndTime { $fieldType = new DateAndTime(); $fieldType->setTransformationProcessor($this->getTransformationProcessorMock()); @@ -76,7 +73,7 @@ protected function getSettingsSchemaExpectation(): array /** * Returns the empty value expected from the field type. */ - protected function getEmptyValueExpectation(): Value + protected function getEmptyValueExpectation(): DateAndTimeValue { return new DateAndTimeValue(); } @@ -195,12 +192,11 @@ public function provideInputForToHash(): array } /** - * @param mixed $inputValue - * @param array $expectedResult - * * @dataProvider provideInputForFromHash + * + * @param \Ibexa\Core\FieldType\DateAndTime\Value $expectedResult */ - public function testFromHash(?array $inputHash, Value $expectedResult): void + public function testFromHash(mixed $inputHash, FieldTypeValue $expectedResult): void { $this->assertIsValidHashValue($inputHash); From e94cd6f16e3aa6884bca69110163eec25b132da3 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 4 Apr 2025 15:11:51 +0200 Subject: [PATCH 030/185] IBX-9811: Upgraded Content Type Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/Type/Gateway.php | 46 +++- .../Content/Type/Gateway/DoctrineDatabase.php | 260 ++++++++++++------ .../Type/Gateway/ExceptionConversion.php | 69 +++-- 3 files changed, 251 insertions(+), 124 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway.php b/src/lib/Persistence/Legacy/Content/Type/Gateway.php index ebfa1754c5..8a4b69c098 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway.php @@ -21,16 +21,16 @@ */ abstract class Gateway { - public const CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE = 'ezcontentclass_classgroup'; - public const CONTENT_TYPE_GROUP_TABLE = 'ezcontentclassgroup'; - public const CONTENT_TYPE_TABLE = 'ezcontentclass'; - public const CONTENT_TYPE_NAME_TABLE = 'ezcontentclass_name'; - public const FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute'; - public const MULTILINGUAL_FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute_ml'; + public const string CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE = 'ezcontentclass_classgroup'; + public const string CONTENT_TYPE_GROUP_TABLE = 'ezcontentclassgroup'; + public const string CONTENT_TYPE_TABLE = 'ezcontentclass'; + public const string CONTENT_TYPE_NAME_TABLE = 'ezcontentclass_name'; + public const string FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute'; + public const string MULTILINGUAL_FIELD_DEFINITION_TABLE = 'ezcontentclass_attribute_ml'; - public const CONTENT_TYPE_GROUP_SEQ = 'ezcontentclassgroup_id_seq'; - public const CONTENT_TYPE_SEQ = 'ezcontentclass_id_seq'; - public const FIELD_DEFINITION_SEQ = 'ezcontentclass_attribute_id_seq'; + public const string CONTENT_TYPE_GROUP_SEQ = 'ezcontentclassgroup_id_seq'; + public const string CONTENT_TYPE_SEQ = 'ezcontentclass_id_seq'; + public const string FIELD_DEFINITION_SEQ = 'ezcontentclass_attribute_id_seq'; abstract public function insertGroup(Group $group): int; @@ -44,15 +44,25 @@ abstract public function deleteGroup(int $groupId): void; /** * @param int[] $groupIds + * + * @phpstan-return list> */ abstract public function loadGroupData(array $groupIds): array; + /** + * @phpstan-return list> + */ abstract public function loadGroupDataByIdentifier(string $identifier): array; + /** + * @phpstan-return list> + */ abstract public function loadAllGroupsData(): array; /** * Load data for all content types of the given status, belonging to the given Group. + * + * @phpstan-return list> */ abstract public function loadTypesDataForGroup(int $groupId, int $status): array; @@ -76,6 +86,8 @@ abstract public function deleteGroupAssignment(int $groupId, int $typeId, int $s /** * @param int $id Field Definition ID * @param int $status One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED + * + * @phpstan-return list> */ abstract public function loadFieldDefinition(int $id, int $status): array; @@ -113,18 +125,31 @@ abstract public function updateType(int $typeId, int $status, Type $type): void; * Bulk-load an array with data about the given content types. * * @param int[] $typeIds + * + * @phpstan-return list> */ abstract public function loadTypesListData(array $typeIds): array; /** * @return array + * + * @phpstan-return list> */ abstract public function loadTypesDataByFieldDefinitionIdentifier(string $identifier): array; + /** + * @phpstan-return list> + */ abstract public function loadTypeData(int $typeId, int $status): array; + /** + * @phpstan-return list> + */ abstract public function loadTypeDataByIdentifier(string $identifier, int $status): array; + /** + * @phpstan-return list> + */ abstract public function loadTypeDataByRemoteId(string $remoteId, int $status): array; abstract public function countInstancesOfType(int $typeId): int; @@ -154,6 +179,9 @@ abstract public function publishTypeAndFields( int $targetStatus ): void; + /** + * @phpstan-return list> + */ abstract public function getSearchableFieldMapData(): array; /** diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php index 5af1f2adaf..5b5c704f68 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\Type\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\ParameterType; @@ -33,16 +34,18 @@ */ final class DoctrineDatabase extends Gateway { - private const string STATUS_PARAM_NAME = ':status'; - private const string CREATED_PARAM_NAME = ':created'; - private const string CREATOR_ID_PARAM_NAME = ':creator_id'; - private const string GROUP_ID_PARAM_NAME = ':gid'; - private const string VERSION_PARAM_NAME = ':version'; + private const string STATUS_PARAM_NAME = 'status'; + private const string CREATED_PARAM_NAME = 'created'; + private const string CREATOR_ID_PARAM_NAME = 'creator_id'; + private const string GROUP_ID_PARAM_NAME = 'gid'; + private const string VERSION_PARAM_NAME = 'version'; private const string CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON = 'contentclass_attribute_id = :field_definition_id'; private const string STATUS_PARAM_COMPARISON = 'version = :status'; /** * Columns of database tables. + * + * @var array */ private array $columns = [ 'ezcontentclass' => [ @@ -103,9 +106,6 @@ final class DoctrineDatabase extends Gateway */ private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - private SharedGateway $sharedGateway; /** @@ -113,20 +113,19 @@ final class DoctrineDatabase extends Gateway */ private MaskGenerator $languageMaskGenerator; - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct( Connection $connection, SharedGateway $sharedGateway, MaskGenerator $languageMaskGenerator ) { $this->connection = $connection; - $this->dbPlatform = $connection->getDatabasePlatform(); $this->sharedGateway = $sharedGateway; $this->languageMaskGenerator = $languageMaskGenerator; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertGroup(Group $group): int { $query = $this->connection->createQueryBuilder(); @@ -151,8 +150,7 @@ public function insertGroup(Group $group): int ParameterType::INTEGER ), 'name' => $query->createPositionalParameter( - $group->identifier, - ParameterType::STRING + $group->identifier ), 'is_system' => $query->createPositionalParameter( $group->isSystem ?? false, @@ -160,11 +158,14 @@ public function insertGroup(Group $group): int ), ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::CONTENT_TYPE_GROUP_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateGroup(GroupUpdateStruct $group): void { $query = $this->connection->createQueryBuilder(); @@ -180,7 +181,7 @@ public function updateGroup(GroupUpdateStruct $group): void ) ->set( 'name', - $query->createPositionalParameter($group->identifier, ParameterType::STRING) + $query->createPositionalParameter($group->identifier) ) ->set( 'is_system', @@ -192,14 +193,17 @@ public function updateGroup(GroupUpdateStruct $group): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countTypesInGroup(int $groupId): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->dbPlatform->getCountExpression('contentclass_id')) + ->select('COUNT(contentclass_id)') ->from(self::CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE) ->where( $query->expr()->eq( @@ -208,15 +212,18 @@ public function countTypesInGroup(int $groupId): int ) ); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countGroupsForType(int $typeId, int $status): int { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); $query - ->select($this->dbPlatform->getCountExpression('group_id')) + ->select('COUNT(group_id)') ->from(self::CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE) ->where( $expr->eq( @@ -231,9 +238,12 @@ public function countGroupsForType(int $typeId, int $status): int ) ); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteGroup(int $groupId): void { $query = $this->connection->createQueryBuilder(); @@ -244,12 +254,13 @@ public function deleteGroup(int $groupId): void $query->createPositionalParameter($groupId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** * @param string[] $languages * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if at least one of the used languages does not exist */ private function insertTypeNameData(int $typeId, int $typeStatus, array $languages): void @@ -284,13 +295,12 @@ private function insertTypeNameData(int $typeId, int $typeStatus, array $languag ParameterType::INTEGER ), 'language_locale' => $query->createPositionalParameter( - $language, - ParameterType::STRING + $language ), - 'name' => $query->createPositionalParameter($name, ParameterType::STRING), + 'name' => $query->createPositionalParameter($name), ] ); - $query->execute(); + $query->executeStatement(); } } @@ -322,6 +332,10 @@ private function setNextAutoIncrementedValueIfAvailable( } } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertType(Type $type, ?int $typeId = null): int { $query = $this->connection->createQueryBuilder(); @@ -333,17 +347,17 @@ public function insertType(Type $type, ?int $typeId = null): int 'version' => $query->createNamedParameter( $type->status, ParameterType::INTEGER, - self::STATUS_PARAM_NAME + ':' . self::STATUS_PARAM_NAME ), 'created' => $query->createNamedParameter( $type->created, ParameterType::INTEGER, - self::CREATED_PARAM_NAME + ':' . self::CREATED_PARAM_NAME ), 'creator_id' => $query->createNamedParameter( $type->creatorId, ParameterType::INTEGER, - self::CREATOR_ID_PARAM_NAME + ':' . self::CREATOR_ID_PARAM_NAME ), ] ); @@ -371,9 +385,9 @@ public function insertType(Type $type, ?int $typeId = null): int $query->setParameter('created', $type->created, ParameterType::INTEGER); $query->setParameter('creator_id', $type->creatorId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); - if (empty($typeId)) { + if ($typeId === null) { $typeId = $this->sharedGateway->getLastInsertedId(self::CONTENT_TYPE_SEQ); } @@ -387,6 +401,10 @@ public function insertType(Type $type, ?int $typeId = null): int * Get a map of content type storage column name to its value and parameter type. * * Key value of the map is represented as a two-elements array with column value and its type. + * + * @phpstan-return array + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ private function mapCommonContentTypeColumnsToQueryValuesAndTypes(Type $type): array { @@ -414,6 +432,10 @@ private function mapCommonContentTypeColumnsToQueryValuesAndTypes(Type $type): a ]; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertGroupAssignment(int $groupId, int $typeId, int $status): void { $groups = $this->loadGroupData([$groupId]); @@ -440,15 +462,17 @@ public function insertGroupAssignment(int $groupId, int $typeId, int $status): v ParameterType::INTEGER ), 'group_name' => $query->createPositionalParameter( - $group['name'], - ParameterType::STRING + $group['name'] ), ] ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteGroupAssignment(int $groupId, int $typeId, int $status): void { $query = $this->connection->createQueryBuilder(); @@ -473,32 +497,41 @@ public function deleteGroupAssignment(int $groupId, int $typeId, int $status): v $query->createPositionalParameter($groupId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadGroupData(array $groupIds): array { $query = $this->createGroupLoadQuery(); $query ->where($query->expr()->in('id', ':ids')) - ->setParameter('ids', $groupIds, Connection::PARAM_INT_ARRAY); + ->setParameter('ids', $groupIds, ArrayParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadGroupDataByIdentifier(string $identifier): array { $query = $this->createGroupLoadQuery(); $query->where( $query->expr()->eq( 'name', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAllGroupsData(): array { $query = $this->createGroupLoadQuery(); @@ -532,13 +565,16 @@ private function createGroupLoadQuery(): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypesDataForGroup(int $groupId, int $status): array { $query = $this->getLoadTypeQueryBuilder(); $expr = $query->expr(); $query - ->where($expr->eq('g.group_id', self::GROUP_ID_PARAM_NAME)) - ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) + ->where($expr->eq('g.group_id', ':' . self::GROUP_ID_PARAM_NAME)) + ->andWhere($expr->eq('c.version', ':' . self::VERSION_PARAM_NAME)) ->addOrderBy('c.identifier') ->setParameter('gid', $groupId, ParameterType::INTEGER) ->setParameter('version', $status, ParameterType::INTEGER); @@ -546,6 +582,9 @@ public function loadTypesDataForGroup(int $groupId, int $status): array return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertFieldDefinition( int $typeId, int $status, @@ -565,7 +604,7 @@ public function insertFieldDefinition( 'version' => $query->createNamedParameter( $status, ParameterType::INTEGER, - self::STATUS_PARAM_NAME + ':' . self::STATUS_PARAM_NAME ), ] ); @@ -587,7 +626,7 @@ public function insertFieldDefinition( ->setParameter($columnName, $columnValue, $parameterType); } - $query->execute(); + $query->executeStatement(); $fieldDefinitionId = $fieldDefinition->id ?? $this->sharedGateway->getLastInsertedId( self::FIELD_DEFINITION_SEQ @@ -604,6 +643,9 @@ public function insertFieldDefinition( return $fieldDefinitionId; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function insertFieldDefinitionMultilingualData( int $fieldDefinitionId, MultilingualStorageFieldDefinition $multilingualData, @@ -619,7 +661,7 @@ private function insertFieldDefinitionMultilingualData( 'name' => ':name', 'description' => ':description', 'contentclass_attribute_id' => ':field_definition_id', - 'version' => self::STATUS_PARAM_NAME, + 'version' => ':' . self::STATUS_PARAM_NAME, 'language_id' => ':language_id', ] ) @@ -631,13 +673,15 @@ private function insertFieldDefinitionMultilingualData( ->setParameter('status', $status, ParameterType::INTEGER) ->setParameter('language_id', $multilingualData->languageId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** * Get a map of Field Definition storage column name to its value and parameter type. * * Key value of the map is represented as a two-elements array with column value and its type. + * + * @phpstan-return array */ private function mapCommonFieldDefinitionColumnsToQueryValuesAndTypes( FieldDefinition $fieldDefinition, @@ -681,6 +725,9 @@ private function mapCommonFieldDefinitionColumnsToQueryValuesAndTypes( ]; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadFieldDefinition(int $id, int $status): array { $query = $this->connection->createQueryBuilder(); @@ -700,7 +747,7 @@ public function loadFieldDefinition(int $id, int $status): array 'f_def', self::CONTENT_TYPE_TABLE, 'ct', - $expr->and( + (string)$expr->and( $expr->eq('f_def.contentclass_id', 'ct.id'), $expr->eq('f_def.version', 'ct.version') ) @@ -709,7 +756,7 @@ public function loadFieldDefinition(int $id, int $status): array 'f_def', self::MULTILINGUAL_FIELD_DEFINITION_TABLE, 'transl_f_def', - $expr->and( + (string)$expr->and( $expr->eq( 'f_def.id', 'transl_f_def.contentclass_attribute_id' @@ -733,11 +780,12 @@ public function loadFieldDefinition(int $id, int $status): array ) ); - $stmt = $query->execute(); - - return $stmt->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteFieldDefinition( int $typeId, int $status, @@ -773,9 +821,12 @@ public function deleteFieldDefinition( ) ; - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateFieldDefinition( int $typeId, int $status, @@ -803,7 +854,7 @@ public function updateFieldDefinition( ); } - $query->execute(); + $query->executeStatement(); foreach ($storageFieldDef->multilingualData as $data) { $dataExists = $this->fieldDefinitionMultilingualDataExist( @@ -829,6 +880,9 @@ public function updateFieldDefinition( } } + /** + * @throws \Doctrine\DBAL\Exception + */ private function fieldDefinitionMultilingualDataExist( FieldDefinition $fieldDefinition, int $languageId, @@ -836,7 +890,7 @@ private function fieldDefinitionMultilingualDataExist( ): bool { $existQuery = $this->connection->createQueryBuilder(); $existQuery - ->select($this->dbPlatform->getCountExpression('1')) + ->select('COUNT(1)') ->from(self::MULTILINGUAL_FIELD_DEFINITION_TABLE) ->where(self::CONTENT_FIELD_ID_FIELD_DEFINITION_ID_PARAM_COMPARISON) ->andWhere(self::STATUS_PARAM_COMPARISON) @@ -845,9 +899,12 @@ private function fieldDefinitionMultilingualDataExist( ->setParameter('status', $status, ParameterType::INTEGER) ->setParameter('language_id', $languageId, ParameterType::INTEGER); - return 0 < (int)$existQuery->execute()->fetchColumn(); + return 0 < (int)$existQuery->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function updateFieldDefinitionMultilingualData( int $fieldDefinitionId, MultilingualStorageFieldDefinition $multilingualData, @@ -871,11 +928,13 @@ private function updateFieldDefinitionMultilingualData( ->setParameter('status', $status, ParameterType::INTEGER) ->setParameter('languageId', $multilingualData->languageId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** * Delete entire name data for the given content type of the given status. + * + * @throws \Doctrine\DBAL\Exception */ private function deleteTypeNameData(int $typeId, int $typeStatus): void { @@ -895,9 +954,13 @@ private function deleteTypeNameData(int $typeId, int $typeStatus): void $query->createPositionalParameter($typeStatus, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function updateType(int $typeId, int $status, Type $type): void { $query = $this->connection->createQueryBuilder(); @@ -925,16 +988,19 @@ public function updateType(int $typeId, int $status, Type $type): void ->andWhere( $expr->eq( 'version', - $query->createNamedParameter($status, ParameterType::INTEGER, self::STATUS_PARAM_NAME) + $query->createNamedParameter($status, ParameterType::INTEGER, ':' . self::STATUS_PARAM_NAME) ) ); - $query->execute(); + $query->executeStatement(); $this->deleteTypeNameData($typeId, $status); $this->insertTypeNameData($typeId, $status, $type->name); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypesListData(array $typeIds): array { $query = $this->getLoadTypeQueryBuilder(); @@ -942,11 +1008,14 @@ public function loadTypesListData(array $typeIds): array $query ->where($query->expr()->in('c.id', ':ids')) ->andWhere($query->expr()->eq('c.version', Type::STATUS_DEFINED)) - ->setParameter('ids', $typeIds, Connection::PARAM_INT_ARRAY); + ->setParameter('ids', $typeIds, ArrayParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypesDataByFieldDefinitionIdentifier(string $identifier): array { $query = $this->getLoadTypeQueryBuilder(); @@ -958,42 +1027,51 @@ public function loadTypesDataByFieldDefinitionIdentifier(string $identifier): ar ) ); - return $query->execute()->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypeData(int $typeId, int $status): array { $query = $this->getLoadTypeQueryBuilder(); $expr = $query->expr(); $query ->where($expr->eq('c.id', ':id')) - ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) + ->andWhere($expr->eq('c.version', ':' . self::VERSION_PARAM_NAME)) ->setParameter('id', $typeId, ParameterType::INTEGER) ->setParameter('version', $status, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypeDataByIdentifier(string $identifier, int $status): array { $query = $this->getLoadTypeQueryBuilder(); $expr = $query->expr(); $query ->where($expr->eq('c.identifier', ':identifier')) - ->andWhere($expr->eq('c.version', self::VERSION_PARAM_NAME)) - ->setParameter('identifier', $identifier, ParameterType::STRING) + ->andWhere($expr->eq('c.version', ':' . self::VERSION_PARAM_NAME)) + ->setParameter('identifier', $identifier) ->setParameter('version', $status, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadTypeDataByRemoteId(string $remoteId, int $status): array { $query = $this->getLoadTypeQueryBuilder(); $query ->where($query->expr()->eq('c.remote_id', ':remote')) - ->andWhere($query->expr()->eq('c.version', self::VERSION_PARAM_NAME)) - ->setParameter('remote', $remoteId, ParameterType::STRING) + ->andWhere($query->expr()->eq('c.version', ':' . self::VERSION_PARAM_NAME)) + ->setParameter('remote', $remoteId) ->setParameter('version', $status, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); @@ -1064,7 +1142,7 @@ private function getLoadTypeQueryBuilder(): QueryBuilder 'c', self::FIELD_DEFINITION_TABLE, 'a', - $expr->and( + (string)$expr->and( $expr->eq('c.id', 'a.contentclass_id'), $expr->eq('c.version', 'a.version') ) @@ -1073,7 +1151,7 @@ private function getLoadTypeQueryBuilder(): QueryBuilder 'c', self::CONTENT_TYPE_TO_GROUP_ASSIGNMENT_TABLE, 'g', - $expr->and( + (string)$expr->and( $expr->eq('c.id', 'g.contentclass_id'), $expr->eq('c.version', 'g.contentclass_version') ) @@ -1082,7 +1160,7 @@ private function getLoadTypeQueryBuilder(): QueryBuilder 'a', self::MULTILINGUAL_FIELD_DEFINITION_TABLE, 'ml', - $expr->and( + (string)$expr->and( $expr->eq('a.id', 'ml.contentclass_attribute_id'), $expr->eq('a.version', 'ml.version') ) @@ -1092,11 +1170,14 @@ private function getLoadTypeQueryBuilder(): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countInstancesOfType(int $typeId): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->dbPlatform->getCountExpression('id')) + ->select('COUNT(id)') ->from('ezcontentobject') ->where( $query->expr()->eq( @@ -1105,11 +1186,12 @@ public function countInstancesOfType(int $typeId): int ) ); - $stmt = $query->execute(); - - return (int)$stmt->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteFieldDefinitionsForType(int $typeId, int $status): void { $subQuery = $this->connection->createQueryBuilder(); @@ -1149,9 +1231,12 @@ public function deleteFieldDefinitionsForType(int $typeId, int $status): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function delete(int $typeId, int $status): void { $this->deleteGroupAssignmentsForType($typeId, $status); @@ -1160,6 +1245,9 @@ public function delete(int $typeId, int $status): void $this->deleteType($typeId, $status); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteType(int $typeId, int $status): void { $query = $this->connection->createQueryBuilder(); @@ -1177,9 +1265,12 @@ public function deleteType(int $typeId, int $status): void ) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteGroupAssignmentsForType(int $typeId, int $status): void { $query = $this->connection->createQueryBuilder(); @@ -1196,7 +1287,7 @@ public function deleteGroupAssignmentsForType(int $typeId, int $status): void $query->createPositionalParameter($status, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** @@ -1232,6 +1323,9 @@ function (string $columnName) use ($tableName, $tableAlias): string { return $queryBuilder; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function internalChangeContentTypeStatus( int $typeId, int $sourceStatus, @@ -1259,9 +1353,12 @@ public function internalChangeContentTypeStatus( ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function publishTypeAndFields(int $typeId, int $sourceStatus, int $targetStatus): void { $this->internalChangeContentTypeStatus( @@ -1322,9 +1419,12 @@ public function publishTypeAndFields(int $typeId, int $sourceStatus, int $target ->setParameter('target_status', $targetStatus, ParameterType::INTEGER) ->setParameter('source_status', $sourceStatus, ParameterType::INTEGER); - $mlDataPublishQuery->execute(); + $mlDataPublishQuery->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getSearchableFieldMapData(): array { $query = $this->connection->createQueryBuilder(); @@ -1344,11 +1444,13 @@ public function getSearchableFieldMapData(): array ) ); - $statement = $query->execute($query); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function removeFieldDefinitionTranslation( int $fieldDefinitionId, string $languageCode, @@ -1387,7 +1489,7 @@ public function removeByUserAndVersion(int $userId, int $version): void try { $this->connection->beginTransaction(); - $queryBuilder->execute(); + $queryBuilder->executeStatement(); $this->cleanupAssociations(); $this->connection->commit(); diff --git a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php index bfa5545bd9..19518d1c3d 100644 --- a/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php @@ -16,7 +16,6 @@ use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; use Ibexa\Core\Persistence\Legacy\Content\Type\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. @@ -26,14 +25,12 @@ final class ExceptionConversion extends Gateway /** * The wrapped gateway. */ - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; /** * Create a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway $innerGateway */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -42,7 +39,7 @@ public function insertGroup(Group $group): int { try { return $this->innerGateway->insertGroup($group); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -51,7 +48,7 @@ public function updateGroup(GroupUpdateStruct $group): void { try { $this->innerGateway->updateGroup($group); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -60,7 +57,7 @@ public function countTypesInGroup(int $groupId): int { try { return $this->innerGateway->countTypesInGroup($groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -69,7 +66,7 @@ public function countGroupsForType(int $typeId, int $status): int { try { return $this->innerGateway->countGroupsForType($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -78,7 +75,7 @@ public function deleteGroup(int $groupId): void { try { $this->innerGateway->deleteGroup($groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -87,7 +84,7 @@ public function loadGroupData(array $groupIds): array { try { return $this->innerGateway->loadGroupData($groupIds); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -96,7 +93,7 @@ public function loadGroupDataByIdentifier(string $identifier): array { try { return $this->innerGateway->loadGroupDataByIdentifier($identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -105,7 +102,7 @@ public function loadAllGroupsData(): array { try { return $this->innerGateway->loadAllGroupsData(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -114,7 +111,7 @@ public function loadTypesDataForGroup(int $groupId, int $status): array { try { return $this->innerGateway->loadTypesDataForGroup($groupId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -123,7 +120,7 @@ public function insertType(Type $type, ?int $typeId = null): int { try { return $this->innerGateway->insertType($type, $typeId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -132,7 +129,7 @@ public function insertGroupAssignment(int $groupId, int $typeId, int $status): v { try { $this->innerGateway->insertGroupAssignment($groupId, $typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -141,7 +138,7 @@ public function deleteGroupAssignment(int $groupId, int $typeId, int $status): v { try { $this->innerGateway->deleteGroupAssignment($groupId, $typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -150,7 +147,7 @@ public function loadFieldDefinition(int $id, int $status): array { try { return $this->innerGateway->loadFieldDefinition($id, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -168,7 +165,7 @@ public function insertFieldDefinition( $fieldDefinition, $storageFieldDef ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -180,7 +177,7 @@ public function deleteFieldDefinition( ): void { try { $this->innerGateway->deleteFieldDefinition($typeId, $status, $fieldDefinitionId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -193,7 +190,7 @@ public function updateFieldDefinition( ): void { try { $this->innerGateway->updateFieldDefinition($typeId, $status, $fieldDefinition, $storageFieldDef); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -202,7 +199,7 @@ public function updateType(int $typeId, int $status, Type $type): void { try { $this->innerGateway->updateType($typeId, $status, $type); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -211,7 +208,7 @@ public function loadTypesListData(array $typeIds): array { try { return $this->innerGateway->loadTypesListData($typeIds); - } catch (PDOException | DBALException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -220,7 +217,7 @@ public function loadTypeData(int $typeId, int $status): array { try { return $this->innerGateway->loadTypeData($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -229,7 +226,7 @@ public function loadTypeDataByIdentifier(string $identifier, int $status): array { try { return $this->innerGateway->loadTypeDataByIdentifier($identifier, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -238,7 +235,7 @@ public function loadTypeDataByRemoteId(string $remoteId, int $status): array { try { return $this->innerGateway->loadTypeDataByRemoteId($remoteId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -247,7 +244,7 @@ public function loadTypesDataByFieldDefinitionIdentifier(string $identifier): ar { try { return $this->innerGateway->loadTypesDataByFieldDefinitionIdentifier($identifier); - } catch (PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -256,7 +253,7 @@ public function countInstancesOfType(int $typeId): int { try { return $this->innerGateway->countInstancesOfType($typeId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -265,7 +262,7 @@ public function delete(int $typeId, int $status): void { try { $this->innerGateway->delete($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -274,7 +271,7 @@ public function deleteFieldDefinitionsForType(int $typeId, int $status): void { try { $this->innerGateway->deleteFieldDefinitionsForType($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -283,7 +280,7 @@ public function deleteType(int $typeId, int $status): void { try { $this->innerGateway->deleteType($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -292,7 +289,7 @@ public function deleteGroupAssignmentsForType(int $typeId, int $status): void { try { $this->innerGateway->deleteGroupAssignmentsForType($typeId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -301,7 +298,7 @@ public function publishTypeAndFields(int $typeId, int $sourceStatus, int $target { try { $this->innerGateway->publishTypeAndFields($typeId, $sourceStatus, $targetStatus); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -310,7 +307,7 @@ public function getSearchableFieldMapData(): array { try { return $this->innerGateway->getSearchableFieldMapData(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -326,7 +323,7 @@ public function removeFieldDefinitionTranslation( $languageCode, $status ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -335,7 +332,7 @@ public function removeByUserAndVersion(int $userId, int $version): void { try { $this->innerGateway->removeByUserAndVersion($userId, $version); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 6bc0129b1ba14ede276f6142a98faa40648ecdd1 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 4 Apr 2025 15:32:33 +0200 Subject: [PATCH 031/185] IBX-9811: Upgraded LSE WordIndexer Doctrine Gateways to doctrine/dbal v3 and improved code quality --- .../WordIndexer/Gateway/DoctrineDatabase.php | 26 ++++++++++- .../WordIndexer/Repository/SearchIndex.php | 43 +++++++++++++------ 2 files changed, 55 insertions(+), 14 deletions(-) diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 9044dd2939..eb394b1316 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -18,6 +18,12 @@ /** * WordIndexer gateway implementation using the Doctrine database. + * + * @phpstan-type TLegacyFullTextConfiguration array{ + * stopWordThresholdFactor: float, + * enableWildcards: bool, + * commands: string[] + * } */ class DoctrineDatabase extends Gateway { @@ -26,7 +32,7 @@ class DoctrineDatabase extends Gateway * * Note: 2^31-1 seems to be the most reasonable value that should work in any setup. */ - public const DB_INT_MAX = 2147483647; + public const int DB_INT_MAX = 2147483647; protected Connection $connection; @@ -55,9 +61,14 @@ class DoctrineDatabase extends Gateway /** * Full text search configuration options. + * + * @phpstan-var TLegacyFullTextConfiguration */ protected array $fullTextSearchConfiguration; + /** + * @phpstan-param TLegacyFullTextConfiguration $fullTextSearchConfiguration + */ public function __construct( Connection $connection, SPITypeHandler $typeHandler, @@ -81,6 +92,8 @@ public function __construct( * * @see https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L45 * + * @throws \Doctrine\DBAL\Exception + * * @param \Ibexa\Core\Search\Legacy\Content\FullTextData $fullTextData */ public function index(FullTextData $fullTextData): void @@ -167,6 +180,8 @@ public function index(FullTextData $fullTextData): void * of FullTextData objects & PHP version. * * @param \Ibexa\Core\Search\Legacy\Content\FullTextData[] $fullTextBulkData + * + * @throws \Doctrine\DBAL\Exception */ public function bulkIndex(array $fullTextBulkData): void { @@ -182,6 +197,8 @@ public function bulkIndex(array $fullTextBulkData): void * * @see https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L386 * + * @throws \Doctrine\DBAL\Exception + * * @param mixed $contentId * @param mixed|null $versionId * @@ -208,6 +225,8 @@ public function remove($contentId, $versionId = null): bool /** * Remove entire search index. + * + * @throws \Doctrine\DBAL\Exception */ public function purgeIndex(): void { @@ -234,7 +253,8 @@ private function indexWords(FullTextData $fullTextData, array $indexArray, array $prevWordId = 0; - for ($i = 0; $i < count($indexArray); ++$i) { + $indexArrayCount = count($indexArray); + for ($i = 0; $i < $indexArrayCount; ++$i) { $indexWord = $indexArray[$i]['Word']; $indexWord = $this->transformationProcessor->transformByGroup($indexWord, 'lowercase'); $contentFieldId = $indexArray[$i]['ContentClassAttributeID']; @@ -285,6 +305,8 @@ private function indexWords(FullTextData $fullTextData, array $indexArray, array * * @see https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L155 * + * @throws \Doctrine\DBAL\Exception + * * @param array $indexArrayOnlyWords words for object to add * * @return array wordIDArray diff --git a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php index dd620bec23..de1e68a271 100644 --- a/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php +++ b/src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\WordIndexer\Repository; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; @@ -16,8 +17,8 @@ */ class SearchIndex { - public const SEARCH_WORD_TABLE = 'ezsearch_word'; - public const SEARCH_OBJECT_WORD_LINK_TABLE = 'ezsearch_object_word_link'; + public const string SEARCH_WORD_TABLE = 'ezsearch_word'; + public const string SEARCH_OBJECT_WORD_LINK_TABLE = 'ezsearch_object_word_link'; protected Connection $connection; @@ -30,6 +31,8 @@ public function __construct(Connection $connection) * Fetch already indexed words from database (legacy db table: ezsearch_word). * * @param string[] $words + * + * @throws \Doctrine\DBAL\Exception */ public function getWords(array $words): array { @@ -40,7 +43,7 @@ public function getWords(array $words): array ->from(self::SEARCH_WORD_TABLE) ->where($query->expr()->in('word', ':words')) // use array_map as some DBMS-es do not cast integers to strings by default - ->setParameter('words', array_map('strval', $words), Connection::PARAM_STR_ARRAY); + ->setParameter('words', array_map('strval', $words), ArrayParameterType::STRING); return $query->executeQuery()->fetchAllAssociative(); } @@ -49,32 +52,38 @@ public function getWords(array $words): array * Increase the object count of the given words by one. * * @param int[] $wordId + * + * @throws \Doctrine\DBAL\Exception */ public function incrementWordObjectCount(array $wordId): void { $this ->getWordUpdateQuery($wordId) ->set('object_count', 'object_count + 1') - ->execute(); + ->executeStatement(); } /** * Decrease the object count of the given words by one. * * @param int[] $wordId + * + * @throws \Doctrine\DBAL\Exception */ public function decrementWordObjectCount(array $wordId): void { $this ->getWordUpdateQuery($wordId) ->set('object_count', 'object_count - 1') - ->execute(); + ->executeStatement(); } /** * Insert new words (legacy db table: ezsearch_word). * * @param string[] $words + * + * @throws \Doctrine\DBAL\Exception */ public function addWords(array $words): void { @@ -87,16 +96,18 @@ public function addWords(array $words): void 'object_count' => ':one', ] ) - ->setParameter(':one', 1, ParameterType::INTEGER); + ->setParameter('one', 1, ParameterType::INTEGER); foreach ($words as $word) { $query->setParameter('word', $word); - $query->execute(); + $query->executeStatement(); } } /** * Remove entire search index. + * + * @throws \Doctrine\DBAL\Exception */ public function purge(): void { @@ -109,13 +120,15 @@ public function purge(): void $this->connection ->createQueryBuilder() ->delete($tableName) - ->execute(); + ->executeStatement(); } $this->connection->commit(); } /** * Link word with specific content object (legacy db table: ezsearch_object_word_link). + * + * @throws \Doctrine\DBAL\Exception */ public function addObjectWordLink( int $wordId, @@ -186,11 +199,13 @@ public function addObjectWordLink( ] ); - $query->execute(); + $query->executeStatement(); } /** * Get all words related to the content object (legacy db table: ezsearch_object_word_link). + * + * @throws \Doctrine\DBAL\Exception */ public function getContentObjectWords(int $contentId): array { @@ -210,6 +225,8 @@ public function getContentObjectWords(int $contentId): array /** * Delete words not related to any content object. + * + * @throws \Doctrine\DBAL\Exception */ public function deleteWordsWithoutObjects(): int { @@ -223,11 +240,13 @@ public function deleteWordsWithoutObjects(): int ) ); - return $query->execute(); + return $query->executeStatement(); } /** * Delete relation between a word and a content object. + * + * @throws \Doctrine\DBAL\Exception */ public function deleteObjectWordsLink(int $contentId): int { @@ -241,7 +260,7 @@ public function deleteObjectWordsLink(int $contentId): int ) ); - return $query->execute(); + return $query->executeStatement(); } /** @@ -257,7 +276,7 @@ private function getWordUpdateQuery(array $wordIds): QueryBuilder ->where( $query->expr()->in( 'id', - $query->createPositionalParameter($wordIds, Connection::PARAM_INT_ARRAY) + $query->createPositionalParameter($wordIds, ArrayParameterType::INTEGER) ) ); From f98eb09a10734bf51bb21a5d997af53d776e5031 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 7 Apr 2025 10:12:55 +0200 Subject: [PATCH 032/185] IBX-9811: Upgraded ObjectState Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/ObjectState/Gateway.php | 28 ++- .../ObjectState/Gateway/DoctrineDatabase.php | 183 +++++++++++------- .../Gateway/ExceptionConversion.php | 51 ++--- 3 files changed, 153 insertions(+), 109 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php index 469385ce4e..20ab12577f 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php @@ -18,22 +18,26 @@ */ abstract class Gateway { - public const OBJECT_STATE_TABLE = 'ezcobj_state'; - public const OBJECT_STATE_LANGUAGE_TABLE = 'ezcobj_state_language'; - public const OBJECT_STATE_GROUP_TABLE = 'ezcobj_state_group'; - public const OBJECT_STATE_GROUP_LANGUAGE_TABLE = 'ezcobj_state_group_language'; - public const OBJECT_STATE_LINK_TABLE = 'ezcobj_state_link'; + public const string OBJECT_STATE_TABLE = 'ezcobj_state'; + public const string OBJECT_STATE_LANGUAGE_TABLE = 'ezcobj_state_language'; + public const string OBJECT_STATE_GROUP_TABLE = 'ezcobj_state_group'; + public const string OBJECT_STATE_GROUP_LANGUAGE_TABLE = 'ezcobj_state_group_language'; + public const string OBJECT_STATE_LINK_TABLE = 'ezcobj_state_link'; - public const OBJECT_STATE_TABLE_SEQ = 'ezcobj_state_id_seq'; - public const OBJECT_STATE_GROUP_TABLE_SEQ = 'ezcobj_state_group_id_seq'; + public const string OBJECT_STATE_TABLE_SEQ = 'ezcobj_state_id_seq'; + public const string OBJECT_STATE_GROUP_TABLE_SEQ = 'ezcobj_state_group_id_seq'; /** * Load data for an object state. + * + * @phpstan-return list> */ abstract public function loadObjectStateData(int $stateId): array; /** * Load data for an object state by identifier. + * + * @phpstan-return list> */ abstract public function loadObjectStateDataByIdentifier( string $identifier, @@ -42,21 +46,29 @@ abstract public function loadObjectStateDataByIdentifier( /** * Load data for all object states belonging to group with $groupId ID. + * + * @phpstan-return list>> */ abstract public function loadObjectStateListData(int $groupId): array; /** * Load data for an object state group. + * + * @phpstan-return list> */ abstract public function loadObjectStateGroupData(int $groupId): array; /** * Load data for an object state group by identifier. + * + * @phpstan-return list> */ abstract public function loadObjectStateGroupDataByIdentifier(string $identifier): array; /** * Load data for all object state groups, filtered by $offset and $limit. + * + * @phpstan-return list>> */ abstract public function loadObjectStateGroupListData(int $offset, int $limit): array; @@ -115,6 +127,8 @@ abstract public function setContentState(int $contentId, int $groupId, int $stat /** * Load object state data for $contentId content from $stateGroupId state group. + * + * @phpstan-return list> */ abstract public function loadObjectStateDataForContent( int $contentId, diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php index e02ff99978..af702676c3 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\ObjectState; @@ -33,19 +32,15 @@ final class DoctrineDatabase extends Gateway private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct(Connection $connection, MaskGenerator $maskGenerator) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); $this->maskGenerator = $maskGenerator; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateData(int $stateId): array { $query = $this->createObjectStateFindQuery(); @@ -56,11 +51,12 @@ public function loadObjectStateData(int $stateId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateDataByIdentifier(string $identifier, int $groupId): array { $query = $this->createObjectStateFindQuery(); @@ -68,7 +64,7 @@ public function loadObjectStateDataByIdentifier(string $identifier, int $groupId $query->expr()->and( $query->expr()->eq( 'state.identifier', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ), $query->expr()->eq( 'state.group_id', @@ -77,11 +73,12 @@ public function loadObjectStateDataByIdentifier(string $identifier, int $groupId ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateListData(int $groupId): array { $query = $this->createObjectStateFindQuery(); @@ -92,16 +89,19 @@ public function loadObjectStateListData(int $groupId): array ) )->orderBy('state.priority', 'ASC'); - $statement = $query->execute(); + $statement = $query->executeQuery(); $rows = []; - while ($row = $statement->fetch(FetchMode::ASSOCIATIVE)) { + while ($row = $statement->fetchAssociative()) { $rows[$row['ezcobj_state_id']][] = $row; } return array_values($rows); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateGroupData(int $groupId): array { $query = $this->createObjectStateGroupFindQuery(); @@ -112,26 +112,28 @@ public function loadObjectStateGroupData(int $groupId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateGroupDataByIdentifier(string $identifier): array { $query = $this->createObjectStateGroupFindQuery(); $query->where( $query->expr()->eq( 'state_group.identifier', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateGroupListData(int $offset, int $limit): array { $query = $this->createObjectStateGroupFindQuery(); @@ -140,10 +142,10 @@ public function loadObjectStateGroupListData(int $offset, int $limit): array $query->setFirstResult($offset); } - $statement = $query->execute(); + $statement = $query->executeQuery(); $rows = []; - while ($row = $statement->fetch(FetchMode::ASSOCIATIVE)) { + while ($row = $statement->fetchAssociative()) { $rows[$row['ezcobj_state_group_id']][] = $row; } @@ -158,8 +160,8 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void { $maxPriority = $this->getMaxPriorityForObjectStatesInGroup($groupId); - $objectState->priority = $maxPriority === null ? 0 : (int)$maxPriority + 1; - $objectState->groupId = (int)$groupId; + $objectState->priority = $maxPriority === null ? 0 : $maxPriority + 1; + $objectState->groupId = $groupId; $query = $this->connection->createQueryBuilder(); $query @@ -178,8 +180,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void ParameterType::INTEGER ), 'identifier' => $query->createPositionalParameter( - $objectState->identifier, - ParameterType::STRING + $objectState->identifier ), 'language_mask' => $query->createPositionalParameter( $this->maskGenerator->generateLanguageMaskFromLanguageCodes( @@ -195,7 +196,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void ] ); - $query->execute(); + $query->executeStatement(); $objectState->id = (int)$this->connection->lastInsertId(self::OBJECT_STATE_TABLE_SEQ); @@ -205,7 +206,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void if ($maxPriority === null) { $this->connection->executeStatement( 'INSERT INTO ezcobj_state_link (contentobject_id, contentobject_state_id) ' . - "SELECT id, {$objectState->id} FROM ezcontentobject" + "SELECT id, $objectState->id FROM ezcontentobject" ); } } @@ -213,6 +214,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void /** * @param string[] $languageCodes * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ private function updateObjectStateCommonFields( @@ -237,10 +239,7 @@ private function updateObjectStateCommonFields( ) ->set( 'identifier', - $query->createPositionalParameter( - $identifier, - ParameterType::STRING - ) + $query->createPositionalParameter($identifier) ) ->set( 'language_mask', @@ -259,9 +258,13 @@ private function updateObjectStateCommonFields( ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function updateObjectState(ObjectState $objectState): void { // First update the state @@ -279,6 +282,9 @@ public function updateObjectState(ObjectState $objectState): void $this->insertObjectStateTranslations($objectState); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteObjectState(int $stateId): void { $this->deleteObjectStateTranslations($stateId); @@ -293,9 +299,12 @@ public function deleteObjectState(int $stateId): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateObjectStateLinks(int $oldStateId, int $newStateId): void { $query = $this->connection->createQueryBuilder(); @@ -313,11 +322,13 @@ public function updateObjectStateLinks(int $oldStateId, int $newStateId): void ) ; - $query->execute(); + $query->executeStatement(); } /** * Change Content to object state assignment. + * + * @throws \Doctrine\DBAL\Exception */ private function updateContentStateAssignment( int $contentId, @@ -350,9 +361,12 @@ private function updateContentStateAssignment( ) ; - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteObjectStateLinks(int $stateId): void { $query = $this->connection->createQueryBuilder(); @@ -365,9 +379,13 @@ public function deleteObjectStateLinks(int $stateId): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function insertObjectStateGroup(Group $objectStateGroup): void { $query = $this->connection->createQueryBuilder(); @@ -383,8 +401,7 @@ public function insertObjectStateGroup(Group $objectStateGroup): void ParameterType::INTEGER ), 'identifier' => $query->createPositionalParameter( - $objectStateGroup->identifier, - ParameterType::STRING + $objectStateGroup->identifier ), 'language_mask' => $query->createPositionalParameter( $this->maskGenerator->generateLanguageMaskFromLanguageCodes( @@ -397,7 +414,7 @@ public function insertObjectStateGroup(Group $objectStateGroup): void ) ; - $query->execute(); + $query->executeStatement(); $objectStateGroup->id = (int)$this->connection->lastInsertId( self::OBJECT_STATE_GROUP_TABLE_SEQ @@ -406,6 +423,10 @@ public function insertObjectStateGroup(Group $objectStateGroup): void $this->insertObjectStateGroupTranslations($objectStateGroup); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function updateObjectStateGroup(Group $objectStateGroup): void { // First update the group @@ -423,6 +444,9 @@ public function updateObjectStateGroup(Group $objectStateGroup): void $this->insertObjectStateGroupTranslations($objectStateGroup); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteObjectStateGroup(int $groupId): void { $this->deleteObjectStateGroupTranslations($groupId); @@ -438,9 +462,12 @@ public function deleteObjectStateGroup(int $groupId): void ) ; - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function setContentState(int $contentId, int $groupId, int $stateId): void { // First find out if $contentId is related to existing states in $groupId @@ -455,6 +482,9 @@ public function setContentState(int $contentId, int $groupId, int $stateId): voi } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadObjectStateDataForContent(int $contentId, int $stateGroupId): array { $query = $this->createObjectStateFindQuery(); @@ -479,17 +509,18 @@ public function loadObjectStateDataForContent(int $contentId, int $stateGroupId) ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getContentCount(int $stateId): int { $query = $this->connection->createQueryBuilder(); $query ->select( - $this->dbPlatform->getCountExpression('contentobject_id') + 'COUNT(contentobject_id)' ) ->from(self::OBJECT_STATE_LINK_TABLE) ->where( @@ -499,9 +530,12 @@ public function getContentCount(int $stateId): int ) ); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateObjectStatePriority(int $stateId, int $priority): void { $query = $this->connection->createQueryBuilder(); @@ -516,7 +550,7 @@ public function updateObjectStatePriority(int $stateId, int $priority): void ) ; - $query->execute(); + $query->executeStatement(); } /** @@ -584,6 +618,7 @@ private function createObjectStateGroupFindQuery(): QueryBuilder * Insert object state group translations into database. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if Object State language does not exist + * @throws \Doctrine\DBAL\Exception */ private function insertObjectStateTranslations(ObjectState $objectState): void { @@ -597,14 +632,8 @@ private function insertObjectStateTranslations(ObjectState $objectState): void $objectState->id, ParameterType::INTEGER ), - 'description' => $query->createPositionalParameter( - $objectState->description[$languageCode], - ParameterType::STRING - ), - 'name' => $query->createPositionalParameter( - $objectState->name[$languageCode], - ParameterType::STRING - ), + 'description' => $query->createPositionalParameter($objectState->description[$languageCode]), + 'name' => $query->createPositionalParameter($objectState->name[$languageCode]), 'language_id' => $query->createPositionalParameter( $this->maskGenerator->generateLanguageIndicator( $languageCode, @@ -615,14 +644,14 @@ private function insertObjectStateTranslations(ObjectState $objectState): void ] ); - $query->execute(); + $query->executeStatement(); } } /** * Deletes all translations of the $stateId state. * - * @param mixed $stateId + * @throws \Doctrine\DBAL\Exception */ private function deleteObjectStateTranslations(int $stateId): void { @@ -636,13 +665,14 @@ private function deleteObjectStateTranslations(int $stateId): void ) ); - $query->execute(); + $query->executeStatement(); } /** * Insert object state group translations into database. * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if Object State Group language does not exist + * @throws \Doctrine\DBAL\Exception */ private function insertObjectStateGroupTranslations(Group $objectStateGroup): void { @@ -666,17 +696,19 @@ private function insertObjectStateGroupTranslations(Group $objectStateGroup): vo ); $query ->setParameter('contentobject_state_group_id', $objectStateGroup->id, ParameterType::INTEGER) - ->setParameter('description', $objectStateGroup->description[$languageCode], ParameterType::STRING) - ->setParameter('name', $objectStateGroup->name[$languageCode], ParameterType::STRING) + ->setParameter('description', $objectStateGroup->description[$languageCode]) + ->setParameter('name', $objectStateGroup->name[$languageCode]) ->setParameter('language_id', $languageId, ParameterType::INTEGER) ->setParameter('real_language_id', $languageId & ~1, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } } /** * Delete all translations of the $groupId state group. + * + * @throws \Doctrine\DBAL\Exception */ private function deleteObjectStateGroupTranslations(int $groupId): void { @@ -690,16 +722,17 @@ private function deleteObjectStateGroupTranslations(int $groupId): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function getMaxPriorityForObjectStatesInGroup(int $groupId): ?int { $query = $this->connection->createQueryBuilder(); $query - ->select( - $this->dbPlatform->getMaxExpression('priority') - ) + ->select('MAX(priority)') ->from(self::OBJECT_STATE_TABLE) ->where( $query->expr()->eq( @@ -708,11 +741,14 @@ private function getMaxPriorityForObjectStatesInGroup(int $groupId): ?int ) ); - $priority = $query->execute()->fetchColumn(); + $priority = $query->executeQuery()->fetchOne(); return null !== $priority ? (int)$priority : null; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function getContentStateId(int $contentId, int $groupId): ?int { $query = $this->connection->createQueryBuilder(); @@ -738,11 +774,14 @@ private function getContentStateId(int $contentId, int $groupId): ?int ) ); - $stateId = $query->execute()->fetch(FetchMode::COLUMN); + $stateId = $query->executeQuery()->fetchOne(); return false !== $stateId ? (int)$stateId : null; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function insertContentStateAssignment(int $contentId, int $stateId): void { $query = $this->connection->createQueryBuilder(); @@ -761,6 +800,6 @@ private function insertContentStateAssignment(int $contentId, int $stateId): voi ] ); - $query->execute(); + $query->executeStatement(); } } diff --git a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php index 7c96832c72..c5017a6591 100644 --- a/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php @@ -13,24 +13,15 @@ use Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; - - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + private DoctrineDatabase $innerGateway; + + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -39,7 +30,7 @@ public function loadObjectStateData(int $stateId): array { try { return $this->innerGateway->loadObjectStateData($stateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -48,7 +39,7 @@ public function loadObjectStateDataByIdentifier(string $identifier, int $groupId { try { return $this->innerGateway->loadObjectStateDataByIdentifier($identifier, $groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -57,7 +48,7 @@ public function loadObjectStateListData(int $groupId): array { try { return $this->innerGateway->loadObjectStateListData($groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -66,7 +57,7 @@ public function loadObjectStateGroupData(int $groupId): array { try { return $this->innerGateway->loadObjectStateGroupData($groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -75,7 +66,7 @@ public function loadObjectStateGroupDataByIdentifier(string $identifier): array { try { return $this->innerGateway->loadObjectStateGroupDataByIdentifier($identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -84,7 +75,7 @@ public function loadObjectStateGroupListData(int $offset, int $limit): array { try { return $this->innerGateway->loadObjectStateGroupListData($offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -93,7 +84,7 @@ public function insertObjectState(ObjectState $objectState, int $groupId): void { try { $this->innerGateway->insertObjectState($objectState, $groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -102,7 +93,7 @@ public function updateObjectState(ObjectState $objectState): void { try { $this->innerGateway->updateObjectState($objectState); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -111,7 +102,7 @@ public function deleteObjectState(int $stateId): void { try { $this->innerGateway->deleteObjectState($stateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -120,7 +111,7 @@ public function updateObjectStateLinks(int $oldStateId, int $newStateId): void { try { $this->innerGateway->updateObjectStateLinks($oldStateId, $newStateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -129,7 +120,7 @@ public function deleteObjectStateLinks(int $stateId): void { try { $this->innerGateway->deleteObjectStateLinks($stateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -138,7 +129,7 @@ public function insertObjectStateGroup(Group $objectStateGroup): void { try { $this->innerGateway->insertObjectStateGroup($objectStateGroup); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -147,7 +138,7 @@ public function updateObjectStateGroup(Group $objectStateGroup): void { try { $this->innerGateway->updateObjectStateGroup($objectStateGroup); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -156,7 +147,7 @@ public function deleteObjectStateGroup(int $groupId): void { try { $this->innerGateway->deleteObjectStateGroup($groupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -165,7 +156,7 @@ public function setContentState(int $contentId, int $groupId, int $stateId): voi { try { $this->innerGateway->setContentState($contentId, $groupId, $stateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -174,7 +165,7 @@ public function loadObjectStateDataForContent(int $contentId, int $stateGroupId) { try { return $this->innerGateway->loadObjectStateDataForContent($contentId, $stateGroupId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -183,7 +174,7 @@ public function getContentCount(int $stateId): int { try { return $this->innerGateway->getContentCount($stateId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -192,7 +183,7 @@ public function updateObjectStatePriority(int $stateId, int $priority): void { try { $this->innerGateway->updateObjectStatePriority($stateId, $priority); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 43cf864c93753adcd7d8c90f87bb996a05788343 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 7 Apr 2025 10:56:36 +0200 Subject: [PATCH 033/185] IBX-9811: Upgraded Section Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/Section/Gateway.php | 10 ++- .../Section/Gateway/DoctrineDatabase.php | 70 ++++++++++++------- .../Section/Gateway/ExceptionConversion.php | 33 ++++----- 3 files changed, 63 insertions(+), 50 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway.php b/src/lib/Persistence/Legacy/Content/Section/Gateway.php index e520ea1fea..e0815d0cd6 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway.php @@ -15,8 +15,8 @@ */ abstract class Gateway { - public const CONTENT_SECTION_SEQ = 'ezsection_id_seq'; - public const CONTENT_SECTION_TABLE = 'ezsection'; + public const string CONTENT_SECTION_SEQ = 'ezsection_id_seq'; + public const string CONTENT_SECTION_TABLE = 'ezsection'; /** * Inserts a new section with $name and $identifier. @@ -32,16 +32,22 @@ abstract public function updateSection(int $id, string $name, string $identifier /** * Loads data for section with $id. + * + * @phpstan-return list> */ abstract public function loadSectionData(int $id): array; /** * Loads data for all sections. + * + * @phpstan-return list> */ abstract public function loadAllSectionData(): array; /** * Loads data for section with $identifier. + * + * @phpstan-return list> */ abstract public function loadSectionDataByIdentifier(string $identifier): array; diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php index 6c7b519986..36dc5ede96 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php @@ -21,20 +21,17 @@ final class DoctrineDatabase extends Gateway { private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; - /** * Creates a new DoctrineDatabase Section Gateway. - * - * @throws \Doctrine\DBAL\Exception */ public function __construct(Connection $connection) { $this->connection = $connection; - $this->dbPlatform = $this->connection->getDatabasePlatform(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertSection(string $name, string $identifier): int { $query = $this->connection->createQueryBuilder(); @@ -47,11 +44,14 @@ public function insertSection(string $name, string $identifier): int ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(Gateway::CONTENT_SECTION_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateSection(int $id, string $name, string $identifier): void { $query = $this->connection->createQueryBuilder(); @@ -66,9 +66,12 @@ public function updateSection(int $id, string $name, string $identifier): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadSectionData(int $id): array { $query = $this->connection->createQueryBuilder(); @@ -81,22 +84,24 @@ public function loadSectionData(int $id): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAllSectionData(): array { $query = $this->connection->createQueryBuilder(); $query->select('id', 'identifier', 'name') ->from(self::CONTENT_SECTION_TABLE); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadSectionDataByIdentifier(string $identifier): array { $query = $this->connection->createQueryBuilder(); @@ -113,16 +118,17 @@ public function loadSectionDataByIdentifier(string $identifier): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countContentObjectsInSection(int $id): int { $query = $this->connection->createQueryBuilder(); $query->select( - $this->dbPlatform->getCountExpression('id') + 'COUNT(id)' )->from( 'ezcontentobject' )->where( @@ -132,17 +138,18 @@ public function countContentObjectsInSection(int $id): int ) ); - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countPoliciesUsingSection(int $id): int { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); $query - ->select($this->dbPlatform->getCountExpression('l.id')) + ->select('COUNT(l.id)') ->from('ezpolicy_limitation', 'l') ->join( 'l', @@ -167,15 +174,18 @@ public function countPoliciesUsingSection(int $id): int ) ; - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countRoleAssignmentsUsingSection(int $id): int { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); $query - ->select($this->dbPlatform->getCountExpression('ur.id')) + ->select('COUNT(ur.id)') ->from('ezuser_role', 'ur') ->where( $expr->eq( @@ -191,9 +201,12 @@ public function countRoleAssignmentsUsingSection(int $id): int ) ; - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteSection(int $id): void { $query = $this->connection->createQueryBuilder(); @@ -206,9 +219,12 @@ public function deleteSection(int $id): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function assignSectionToContent(int $sectionId, int $contentId): void { $query = $this->connection->createQueryBuilder(); @@ -225,6 +241,6 @@ public function assignSectionToContent(int $sectionId, int $contentId): void ) ); - $query->execute(); + $query->executeStatement(); } } diff --git a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php index 78b8abf5db..d524f3e14b 100644 --- a/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php @@ -11,24 +11,15 @@ use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\Section\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -37,7 +28,7 @@ public function insertSection(string $name, string $identifier): int { try { return $this->innerGateway->insertSection($name, $identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -46,7 +37,7 @@ public function updateSection(int $id, string $name, string $identifier): void { try { $this->innerGateway->updateSection($id, $name, $identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -55,7 +46,7 @@ public function loadSectionData(int $id): array { try { return $this->innerGateway->loadSectionData($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -64,7 +55,7 @@ public function loadAllSectionData(): array { try { return $this->innerGateway->loadAllSectionData(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -73,7 +64,7 @@ public function loadSectionDataByIdentifier(string $identifier): array { try { return $this->innerGateway->loadSectionDataByIdentifier($identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -82,7 +73,7 @@ public function countContentObjectsInSection(int $id): int { try { return $this->innerGateway->countContentObjectsInSection($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -91,7 +82,7 @@ public function countPoliciesUsingSection(int $id): int { try { return $this->innerGateway->countPoliciesUsingSection($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -100,7 +91,7 @@ public function countRoleAssignmentsUsingSection(int $id): int { try { return $this->innerGateway->countRoleAssignmentsUsingSection($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -109,7 +100,7 @@ public function deleteSection(int $id): void { try { $this->innerGateway->deleteSection($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -118,7 +109,7 @@ public function assignSectionToContent(int $sectionId, int $contentId): void { try { $this->innerGateway->assignSectionToContent($sectionId, $contentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From ed4ceaf11cd114d05a8f3dd9845917211c3c1153 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 7 Apr 2025 15:52:03 +0200 Subject: [PATCH 034/185] IBX-9811: Upgraded URL Alias Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/UrlAlias/Gateway.php | 40 ++- .../UrlAlias/Gateway/DoctrineDatabase.php | 332 +++++++++++------- .../UrlAlias/Gateway/ExceptionConversion.php | 77 ++-- 3 files changed, 271 insertions(+), 178 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php index ed9503de28..3c981403f3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php @@ -18,13 +18,13 @@ abstract class Gateway /** * Default database table. */ - public const TABLE = 'ezurlalias_ml'; + public const string TABLE = 'ezurlalias_ml'; - public const INCR_TABLE = 'ezurlalias_ml_incr'; - public const INCR_TABLE_SEQ = 'ezurlalias_ml_incr_id_seq'; + public const string INCR_TABLE = 'ezurlalias_ml_incr'; + public const string INCR_TABLE_SEQ = 'ezurlalias_ml_incr_id_seq'; - public const NOP = 'nop'; - public const NOP_ACTION = self::NOP . ':'; + public const string NOP = 'nop'; + public const string NOP_ACTION = self::NOP . ':'; /** * Changes the gateway database table. @@ -37,11 +37,15 @@ abstract public function setTable(string $name): void; /** * Loads all list of aliases by given $locationId. + * + * @phpstan-return list> */ abstract public function loadAllLocationEntries(int $locationId): array; /** * Load list of aliases by given $locationId. + * + * @phpstan-return list> */ abstract public function loadLocationEntries( int $locationId, @@ -52,6 +56,8 @@ abstract public function loadLocationEntries( /** * Load paged list of global aliases. * + * @phpstan-return list> + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if the given language doesn't exist */ abstract public function listGlobalEntries( @@ -63,7 +69,7 @@ abstract public function listGlobalEntries( /** * Return boolean indicating if the row with given $id is special root entry. * - * Special root entry entry will have parentId=0 and text=''. + * Special root entry will have parentId=0 and text=''. * In standard installation this entry will point to location with id=2. */ abstract public function isRootEntry(int $id): bool; @@ -71,19 +77,21 @@ abstract public function isRootEntry(int $id): bool; /** * Update single row data matched by composite primary key. * - * @param array $values associative array with column names as keys and column values as values + * @param array $values associative array with column names as keys and column values as values */ abstract public function updateRow(int $parentId, string $textMD5, array $values): void; /** * Insert new row into urlalias_ml table. * - * @param array $values + * @param array $values */ abstract public function insertRow(array $values): int; /** * Load single row matched by composite primary key. + * + * @return array */ abstract public function loadRow(int $parentId, string $textMD5): array; @@ -92,7 +100,7 @@ abstract public function loadRow(int $parentId, string $textMD5): array; * composite primary key. * * If language mask of the found entry is composite (meaning it consists of multiple language ids) given - * $languageId will be removed from mask. Otherwise entry will be marked as history. + * $languageId will be removed from mask. Otherwise, entry will be marked as history. */ abstract public function cleanupAfterPublish( string $action, @@ -128,6 +136,8 @@ abstract public function reparent(int $oldParentId, int $newParentId): void; /** * Load path data identified by given $id. * + * @phpstan-return list>> + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ abstract public function loadPathData(int $id): array; @@ -140,7 +150,9 @@ abstract public function loadPathData(int $id): array; * This method is faster than self::getPath() since it can fetch all elements using only one query, but can be used * only for autogenerated paths. * - * @param array $hierarchyData hierarchy-ordered URL alias entries data + * @phpstan-param list $hierarchyData hierarchy-ordered URL alias entries data + * + * @phpstan-return list>> */ abstract public function loadPathDataByHierarchy(array $hierarchyData): array; @@ -148,11 +160,15 @@ abstract public function loadPathDataByHierarchy(array $hierarchyData): array; * Load complete URL alias data by given array of path hashes. * * @param string[] $urlHashes URL string hashes + * + * @return array */ abstract public function loadUrlAliasData(array $urlHashes): array; /** * Load autogenerated entry id by given $action and optionally $parentId. + * + * @return array */ abstract public function loadAutogeneratedEntry(string $action, ?int $parentId = null): array; @@ -170,6 +186,8 @@ abstract public function remove(string $action, ?int $id = null): void; /** * Load all autogenerated entries with given $parentId with optionally included history entries. + * + * @phpstan-return list> */ abstract public function loadAutogeneratedEntries( int $parentId, @@ -235,6 +253,8 @@ abstract public function deleteUrlNopAliasesWithoutChildren(): int; /** * Return aliases which are connected with provided parentId. + * + * @phpstan-return list> */ abstract public function getAllChildrenAliases(int $parentId): array; diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index 214e4c67b3..cfeea77b6f 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -8,14 +8,17 @@ namespace Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Ibexa\Core\Base\Exceptions\BadStateException; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator as LanguageMaskGenerator; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; +use LogicException; use RuntimeException; /** @@ -28,12 +31,12 @@ final class DoctrineDatabase extends Gateway { /** - * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run - * on 64 bit systems. + * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run on 64-bit systems. */ - public const MAX_LIMIT = 1073741824; + public const int MAX_LIMIT = 1073741824; - private const URL_ALIAS_DATA_COLUMN_TYPE_MAP = [ + /** @var array */ + private const array URL_ALIAS_DATA_COLUMN_TYPE_MAP = [ 'id' => ParameterType::INTEGER, 'link' => ParameterType::INTEGER, 'is_alias' => ParameterType::INTEGER, @@ -58,20 +61,15 @@ final class DoctrineDatabase extends Gateway private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; + private AbstractPlatform $dbPlatform; - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct( Connection $connection, LanguageMaskGenerator $languageMaskGenerator ) { $this->connection = $connection; $this->languageMaskGenerator = $languageMaskGenerator; - $this->table = static::TABLE; - $this->dbPlatform = $this->connection->getDatabasePlatform(); + $this->table = self::TABLE; } public function setTable(string $name): void @@ -81,6 +79,8 @@ public function setTable(string $name): void /** * Loads all list of aliases by given $locationId. + * + * @throws \Doctrine\DBAL\Exception */ public function loadAllLocationEntries(int $locationId): array { @@ -90,12 +90,15 @@ public function loadAllLocationEntries(int $locationId): array ->from($this->connection->quoteIdentifier($this->table)) ->where('action = :action') ->andWhere('is_original = :is_original') - ->setParameter('action', "eznode:{$locationId}", ParameterType::STRING) + ->setParameter('action', "eznode:$locationId") ->setParameter('is_original', 1, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadLocationEntries( int $locationId, bool $custom = false, @@ -121,8 +124,7 @@ public function loadLocationEntries( $expr->eq( 'action', $query->createPositionalParameter( - "eznode:{$locationId}", - ParameterType::STRING + "eznode:$locationId" ) ) ) @@ -143,7 +145,7 @@ public function loadLocationEntries( if (null !== $languageId) { $query->andWhere( $expr->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'lang_mask', $query->createPositionalParameter($languageId, ParameterType::INTEGER) ), @@ -152,11 +154,13 @@ public function loadLocationEntries( ); } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function listGlobalEntries( ?string $languageCode = null, int $offset = 0, @@ -183,8 +187,7 @@ public function listGlobalEntries( $expr->eq( 'action_type', $query->createPositionalParameter( - 'module', - ParameterType::STRING + 'module' ) ) ) @@ -208,7 +211,7 @@ public function listGlobalEntries( if (isset($languageCode)) { $query->andWhere( $expr->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'lang_mask', $query->createPositionalParameter( $this->languageMaskGenerator->generateLanguageIndicator( @@ -222,11 +225,13 @@ public function listGlobalEntries( ) ); } - $statement = $query->execute(); - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function isRootEntry(int $id): bool { $query = $this->connection->createQueryBuilder(); @@ -242,13 +247,14 @@ public function isRootEntry(int $id): bool $query->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $statement = $query->execute(); + $row = $query->executeQuery()->fetchAssociative(); - $row = $statement->fetch(FetchMode::ASSOCIATIVE); - - return strlen($row['text']) == 0 && $row['parent'] == 0; + return $row !== false && $row['text'] === '' && ((int)$row['parent']) === 0; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function cleanupAfterPublish( string $action, int $languageId, @@ -269,7 +275,7 @@ public function cleanupAfterPublish( ->where( $expr->eq( 'action', - $query->createPositionalParameter($action, ParameterType::STRING) + $query->createPositionalParameter($action) ) ) ->andWhere( @@ -286,7 +292,7 @@ public function cleanupAfterPublish( ) ->andWhere( $expr->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'lang_mask', $query->createPositionalParameter($languageId, ParameterType::INTEGER) ), @@ -304,23 +310,21 @@ public function cleanupAfterPublish( ), $expr->eq( 'text_md5', - $query->createPositionalParameter($textMD5, ParameterType::STRING) + $query->createPositionalParameter($textMD5) ) ) ) ); - $statement = $query->execute(); - - $row = $statement->fetch(FetchMode::ASSOCIATIVE); + $row = $query->executeQuery()->fetchAssociative(); if (!empty($row)) { $this->archiveUrlAliasForDeletedTranslation( (int)$row['lang_mask'], - (int)$languageId, + $languageId, (int)$row['parent'], $row['text_md5'], - (int)$newId + $newId ); } } @@ -331,6 +335,8 @@ public function cleanupAfterPublish( * @param int $languageMask all languages bit mask * @param int $languageId removed language Id * @param string $textMD5 checksum + * + * @throws \Doctrine\DBAL\Exception */ private function archiveUrlAliasForDeletedTranslation( int $languageMask, @@ -348,6 +354,9 @@ private function archiveUrlAliasForDeletedTranslation( } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function historizeBeforeSwap(string $action, int $languageMask): void { $query = $this->connection->createQueryBuilder(); @@ -368,14 +377,14 @@ public function historizeBeforeSwap(string $action, int $languageMask): void $query->expr()->and( $query->expr()->eq( 'action', - $query->createPositionalParameter($action, ParameterType::STRING) + $query->createPositionalParameter($action) ), $query->expr()->eq( 'is_original', $query->createPositionalParameter(1, ParameterType::INTEGER) ), $query->expr()->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'lang_mask', $query->createPositionalParameter( $languageMask & ~1, @@ -387,7 +396,7 @@ public function historizeBeforeSwap(string $action, int $languageMask): void ) ); - $query->execute(); + $query->executeStatement(); } /** @@ -401,6 +410,8 @@ public function historizeBeforeSwap(string $action, int $languageMask): void * with the same action and language, update their "link" column with id of the published entry. * History entry "id" column is moved to next id value so that all active (non-history) entries are kept * under the same id. + * + * @throws \Doctrine\DBAL\Exception */ private function historize(int $parentId, string $textMD5, int $newId): void { @@ -430,17 +441,19 @@ private function historize(int $parentId, string $textMD5, int $newId): void ), $query->expr()->eq( 'text_md5', - $query->createPositionalParameter($textMD5, ParameterType::STRING) + $query->createPositionalParameter($textMD5) ) ) ); - $query->execute(); + $query->executeStatement(); } /** * Update single row data matched by composite primary key. * * Removes given $languageId from entry's language mask + * + * @throws \Doctrine\DBAL\Exception */ private function removeTranslation(int $parentId, string $textMD5, int $languageId): void { @@ -449,7 +462,7 @@ private function removeTranslation(int $parentId, string $textMD5, int $language ->update($this->connection->quoteIdentifier($this->table)) ->set( 'lang_mask', - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'lang_mask', $query->createPositionalParameter( ~$languageId, @@ -470,15 +483,17 @@ private function removeTranslation(int $parentId, string $textMD5, int $language $query->expr()->eq( 'text_md5', $query->createPositionalParameter( - $textMD5, - ParameterType::STRING + $textMD5 ) ) ) ; - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function historizeId(int $id, int $link): void { if ($id === $link) { @@ -504,8 +519,7 @@ public function historizeId(int $id, int $link): void $query->expr()->eq( 'action_type', $query->createPositionalParameter( - 'eznode', - ParameterType::STRING + 'eznode' ) ), $query->expr()->eq( @@ -515,15 +529,16 @@ public function historizeId(int $id, int $link): void ) ); - $statement = $query->execute(); - - $rows = $statement->fetchAllAssociative(); + $rows = $query->executeQuery()->fetchAllAssociative(); foreach ($rows as $row) { $this->historize((int)$row['parent'], $row['text_md5'], $link); } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function reparent(int $oldParentId, int $newParentId): void { $query = $this->connection->createQueryBuilder(); @@ -542,9 +557,12 @@ public function reparent(int $oldParentId, int $newParentId): void ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateRow(int $parentId, string $textMD5, array $values): void { $query = $this->connection->createQueryBuilder(); @@ -555,7 +573,7 @@ public function updateRow(int $parentId, string $textMD5, array $values): void $query->createNamedParameter( $value, self::URL_ALIAS_DATA_COLUMN_TYPE_MAP[$columnName], - ":{$columnName}" + ":$columnName" ) ); } @@ -572,9 +590,12 @@ public function updateRow(int $parentId, string $textMD5, array $values): void $query->createNamedParameter($textMD5, ParameterType::STRING, ':text_md5') ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertRow(array $values): int { if (!isset($values['id'])) { @@ -584,7 +605,7 @@ public function insertRow(array $values): int $values['link'] = $values['id']; } if (!isset($values['is_original'])) { - $values['is_original'] = ($values['id'] == $values['link'] ? 1 : 0); + $values['is_original'] = ((int)$values['id'] === (int)$values['link'] ? 1 : 0); } if (!isset($values['is_alias'])) { $values['is_alias'] = 0; @@ -613,15 +634,18 @@ public function insertRow(array $values): int $query->createNamedParameter( $value, self::URL_ALIAS_DATA_COLUMN_TYPE_MAP[$columnName], - ":{$columnName}" + ":$columnName" ) ); } - $query->execute(); + $query->executeStatement(); return (int)$values['id']; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getNextId(): int { $query = $this->connection->createQueryBuilder(); @@ -629,17 +653,20 @@ public function getNextId(): int ->insert(self::INCR_TABLE) ->values( [ - 'id' => $this->dbPlatform->supportsSequences() + 'id' => $this->getDatabasePlatform()->supportsSequences() ? sprintf('NEXTVAL(\'%s\')', self::INCR_TABLE_SEQ) : $query->createPositionalParameter(null, ParameterType::NULL), ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::INCR_TABLE_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRow(int $parentId, string $textMD5): array { $query = $this->connection->createQueryBuilder(); @@ -657,18 +684,20 @@ public function loadRow(int $parentId, string $textMD5): array $query->expr()->eq( 'text_md5', $query->createPositionalParameter( - $textMD5, - ParameterType::STRING + $textMD5 ) ) ) ); - $result = $query->execute()->fetch(FetchMode::ASSOCIATIVE); + $result = $query->executeQuery()->fetchAssociative(); return false !== $result ? $result : []; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUrlAliasData(array $urlHashes): array { $query = $this->connection->createQueryBuilder(); @@ -684,10 +713,10 @@ static function (string $columnName) use ($tableAlias): string { // do not alias data for top level url part $columnAlias = 'u' === $tableAlias ? $columnName - : "{$tableAlias}_{$columnName}"; - $columnName = "{$tableAlias}.{$columnName}"; + : "{$tableAlias}_$columnName"; + $columnName = "$tableAlias.$columnName"; - return "{$columnName} AS {$columnAlias}"; + return "$columnName AS $columnAlias"; }, array_keys(self::URL_ALIAS_DATA_COLUMN_TYPE_MAP) ) @@ -697,13 +726,13 @@ static function (string $columnName) use ($tableAlias): string { $query ->andWhere( $expr->eq( - "{$tableAlias}.text_md5", - $query->createPositionalParameter($urlPartHash, ParameterType::STRING) + "$tableAlias.text_md5", + $query->createPositionalParameter($urlPartHash) ) ) ->andWhere( $expr->eq( - "{$tableAlias}.parent", + "$tableAlias.parent", // root entry has parent column set to 0 isset($previousTableName) ? $previousTableName . '.link' : $query->createPositionalParameter( 0, @@ -716,11 +745,14 @@ static function (string $columnName) use ($tableAlias): string { } $query->setMaxResults(1); - $result = $query->execute()->fetch(FetchMode::ASSOCIATIVE); + $result = $query->executeQuery()->fetchAssociative(); return false !== $result ? $result : []; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAutogeneratedEntry(string $action, ?int $parentId = null): array { $query = $this->connection->createQueryBuilder(); @@ -732,7 +764,7 @@ public function loadAutogeneratedEntry(string $action, ?int $parentId = null): a $query->expr()->and( $query->expr()->eq( 'action', - $query->createPositionalParameter($action, ParameterType::STRING) + $query->createPositionalParameter($action) ), $query->expr()->eq( 'is_original', @@ -757,16 +789,20 @@ public function loadAutogeneratedEntry(string $action, ?int $parentId = null): a ); } - $entry = $query->execute()->fetch(FetchMode::ASSOCIATIVE); + $entry = $query->executeQuery()->fetchAssociative(); return false !== $entry ? $entry : []; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Doctrine\DBAL\Exception + */ public function loadPathData(int $id): array { $pathData = []; - while ($id != 0) { + while ($id !== 0) { $query = $this->connection->createQueryBuilder(); $query->select( 'parent', @@ -781,9 +817,7 @@ public function loadPathData(int $id): array ) ); - $statement = $query->execute(); - - $rows = $statement->fetchAllAssociative(); + $rows = $query->executeQuery()->fetchAllAssociative(); if (empty($rows)) { // Normally this should never happen $pathDataArray = []; @@ -798,18 +832,21 @@ public function loadPathData(int $id): array $path = implode('/', $pathDataArray); throw new BadStateException( 'id', - "Unable to load path data, path '{$path}' is broken, alias with ID '{$id}' not found. " . - 'To fix all broken paths run the ezplatform:urls:regenerate-aliases command' + "Unable to load path data, path '$path' is broken, alias with ID '$id' not found. " . + 'To fix all broken paths run the ibexa:urls:regenerate-aliases command' ); } - $id = $rows[0]['parent']; + $id = (int)$rows[0]['parent']; array_unshift($pathData, $rows); } return $pathData; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadPathDataByHierarchy(array $hierarchyData): array { $query = $this->connection->createQueryBuilder(); @@ -827,8 +864,7 @@ public function loadPathDataByHierarchy(array $hierarchyData): array $query->expr()->eq( 'action', $query->createPositionalParameter( - $levelData['action'], - ParameterType::STRING + $levelData['action'] ) ), $query->expr()->eq( @@ -851,9 +887,7 @@ public function loadPathDataByHierarchy(array $hierarchyData): array $query->expr()->or(...$hierarchyConditions) ); - $statement = $query->execute(); - - $rows = $statement->fetchAllAssociative(); + $rows = $query->executeQuery()->fetchAllAssociative(); $rowsMap = []; foreach ($rows as $row) { $rowsMap[$row['action']][] = $row; @@ -871,6 +905,9 @@ public function loadPathDataByHierarchy(array $hierarchyData): array return $data; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removeCustomAlias(int $parentId, string $textMD5): bool { $query = $this->connection->createQueryBuilder(); @@ -888,8 +925,7 @@ public function removeCustomAlias(int $parentId, string $textMD5): bool $query->expr()->eq( 'text_md5', $query->createPositionalParameter( - $textMD5, - ParameterType::STRING + $textMD5 ) ), $query->expr()->eq( @@ -899,9 +935,12 @@ public function removeCustomAlias(int $parentId, string $textMD5): bool ) ); - return $query->execute() === 1; + return $query->executeStatement() === 1; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function remove(string $action, ?int $id = null): void { $query = $this->connection->createQueryBuilder(); @@ -911,7 +950,7 @@ public function remove(string $action, ?int $id = null): void ->where( $expr->eq( 'action', - $query->createPositionalParameter($action, ParameterType::STRING) + $query->createPositionalParameter($action) ) ); @@ -934,9 +973,12 @@ public function remove(string $action, ?int $id = null): void ); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadAutogeneratedEntries(int $parentId, bool $includeHistory = false): array { $query = $this->connection->createQueryBuilder(); @@ -957,8 +999,7 @@ public function loadAutogeneratedEntries(int $parentId, bool $includeHistory = f $expr->eq( 'action_type', $query->createPositionalParameter( - 'eznode', - ParameterType::STRING + 'eznode' ) ) ) @@ -978,11 +1019,12 @@ public function loadAutogeneratedEntries(int $parentId, bool $includeHistory = f ); } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getLocationContentMainLanguageId(int $locationId): int { $queryBuilder = $this->connection->createQueryBuilder(); @@ -996,16 +1038,19 @@ public function getLocationContentMainLanguageId(int $locationId): int ) ->setParameter('locationId', $locationId, ParameterType::INTEGER); - $statement = $queryBuilder->execute(); - $languageId = $statement->fetchColumn(); + $statement = $queryBuilder->executeQuery(); + $languageId = $statement->fetchOne(); if ($languageId === false) { - throw new RuntimeException("Could not find Content for Location #{$locationId}"); + throw new RuntimeException("Could not find Content for Location #$locationId"); } return (int)$languageId; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function bulkRemoveTranslation(int $languageId, array $actions): void { $query = $this->connection->createQueryBuilder(); @@ -1014,8 +1059,8 @@ public function bulkRemoveTranslation(int $languageId, array $actions): void // parameter for bitwise operation has to be placed verbatim (w/o binding) for this to work cross-DBMS ->set('lang_mask', 'lang_mask & ~ ' . $languageId) ->where('action IN (:actions)') - ->setParameter(':actions', $actions, Connection::PARAM_STR_ARRAY); - $query->execute(); + ->setParameter('actions', $actions, ArrayParameterType::STRING); + $query->executeStatement(); // cleanup: delete single language rows (including alwaysAvailable) $query = $this->connection->createQueryBuilder(); @@ -1023,10 +1068,13 @@ public function bulkRemoveTranslation(int $languageId, array $actions): void ->delete($this->connection->quoteIdentifier($this->table)) ->where('action IN (:actions)') ->andWhere('lang_mask IN (0, 1)') - ->setParameter(':actions', $actions, Connection::PARAM_STR_ARRAY); - $query->execute(); + ->setParameter('actions', $actions, ArrayParameterType::STRING); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function archiveUrlAliasesForDeletedTranslations( int $locationId, int $parentId, @@ -1050,8 +1098,8 @@ public function archiveUrlAliasesForDeletedTranslations( $rowLanguageMask = (int)$row['lang_mask']; $languageIdsToBeRemoved = array_filter( $languageIds, - static function ($languageId) use ($rowLanguageMask): int { - return $languageId & $rowLanguageMask; + static function (int $languageId) use ($rowLanguageMask): bool { + return ($languageId & $rowLanguageMask) !== 0; } ); @@ -1079,6 +1127,10 @@ static function ($languageId) use ($rowLanguageMask): int { * Load list of aliases for given $locationId matching any of the specified Languages. * * @param int[] $languageIds + * + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception */ private function loadLocationEntriesMatchingMultipleLanguages( int $locationId, @@ -1090,7 +1142,6 @@ private function loadLocationEntriesMatchingMultipleLanguages( false ); - /** @var \Doctrine\DBAL\Connection $connection */ $query = $this->connection->createQueryBuilder(); $query ->select('id', 'lang_mask', 'parent', 'text_md5') @@ -1101,9 +1152,7 @@ private function loadLocationEntriesMatchingMultipleLanguages( ->setParameter(self::ACTION_PARAMETER_NAME, 'eznode:' . $locationId) ->setParameter(self::LANGUAGE_MASK_PARAMETER_NAME, $languageMask); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** @@ -1112,6 +1161,9 @@ private function loadLocationEntriesMatchingMultipleLanguages( public function deleteUrlAliasesWithoutLocation(): int { $dbPlatform = $this->connection->getDatabasePlatform(); + if ($dbPlatform === null) { + throw new LogicException('Unable to determine database platform'); + } $subQuery = $this->connection->createQueryBuilder(); $subQuery @@ -1147,6 +1199,9 @@ public function deleteUrlAliasesWithoutLocation(): int return $deleteQuery->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteUrlAliasesWithoutParent(): int { $existingAliasesQuery = $this->getAllUrlAliasesQuery(); @@ -1167,9 +1222,12 @@ public function deleteUrlAliasesWithoutParent(): int ) ); - return $query->execute(); + return $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteUrlAliasesWithBrokenLink(): int { $existingAliasesQuery = $this->getAllUrlAliasesQuery(); @@ -1187,9 +1245,12 @@ public function deleteUrlAliasesWithBrokenLink(): int ) ); - return (int)$query->execute(); + return $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function repairBrokenUrlAliasesForLocation(int $locationId): void { $urlAliasesData = $this->getUrlAliasesForLocation($locationId); @@ -1222,7 +1283,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void ->andWhere( $expr->eq('text_md5', ':textMD5') ) - ->setParameter(self::ACTION_PARAMETER_NAME, "eznode:{$locationId}"); + ->setParameter(self::ACTION_PARAMETER_NAME, "eznode:$locationId"); foreach ($urlAliasesData as $urlAliasData) { if ($urlAliasData['is_original'] === 1 || !isset($originalUrlAliases[$urlAliasData['lang_mask']])) { @@ -1238,19 +1299,19 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void } $updateQueryBuilder - ->setParameter(':linkId', $originalUrlAlias['link'], ParameterType::INTEGER) + ->setParameter('linkId', $originalUrlAlias['link'], ParameterType::INTEGER) // attempt to fix missing parent case ->setParameter( - ':newParentId', + 'newParentId', $urlAliasData['existing_parent'] ?? $originalUrlAlias['parent'], ParameterType::INTEGER ) - ->setParameter(':oldParentId', $urlAliasData['parent'], ParameterType::INTEGER) - ->setParameter(':textMD5', $urlAliasData['text_md5']); + ->setParameter('oldParentId', $urlAliasData['parent'], ParameterType::INTEGER) + ->setParameter('textMD5', $urlAliasData['text_md5']); try { - $updateQueryBuilder->execute(); - } catch (UniqueConstraintViolationException $e) { + $updateQueryBuilder->executeStatement(); + } catch (UniqueConstraintViolationException) { // edge case: if such row already exists, there's no way to restore history $this->deleteRow((int) $urlAliasData['parent'], $urlAliasData['text_md5']); } @@ -1262,7 +1323,6 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void */ public function deleteUrlNopAliasesWithoutChildren(): int { - $platform = $this->connection->getDatabasePlatform(); $queryBuilder = $this->connection->createQueryBuilder(); // The wrapper select is needed for SQL "Derived Table Merge" issue for deleting @@ -1287,7 +1347,7 @@ public function deleteUrlNopAliasesWithoutChildren(): int ) ->groupBy('u_parent.id') ->having( - $expressionBuilder->eq($platform->getCountExpression('u.id'), 0) + $expressionBuilder->eq('COUNT(u.id)', 0) ); $wrapperQueryBuilder @@ -1305,7 +1365,7 @@ public function deleteUrlNopAliasesWithoutChildren(): int ) ->setParameter('actionType', self::NOP); - return $queryBuilder->execute(); + return $queryBuilder->executeStatement(); } /** @@ -1339,7 +1399,9 @@ public function getAllChildrenAliases(int $parentId): array * * Note: each language_mask can have one URL Alias. * - * @param array $urlAliasesData + * @param list> $urlAliasesData + * + * @phpstan-return array> */ private function filterOriginalAliases(array $urlAliasesData): array { @@ -1347,7 +1409,7 @@ private function filterOriginalAliases(array $urlAliasesData): array $urlAliasesData, static function (array $urlAliasData): bool { // filter is_original=true ignoring broken parent records (cleaned up elsewhere) - return (bool)$urlAliasData['is_original'] && $urlAliasData['existing_parent'] !== null; + return $urlAliasData['is_original'] && $urlAliasData['existing_parent'] !== null; } ); @@ -1380,14 +1442,20 @@ private function getAllUrlAliasesQuery(): string /** * Get DBMS-specific integer type. + * + * @throws \Doctrine\DBAL\Exception */ private function getIntegerType(): string { - return $this->dbPlatform->getName() === 'mysql' ? 'signed' : 'integer'; + return $this->getDatabasePlatform() instanceof AbstractMySQLPlatform ? 'signed' : 'integer'; } /** * Get all URL aliases for the given Location (including archived ones). + * + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception */ private function getUrlAliasesForLocation(int $locationId): array { @@ -1414,7 +1482,7 @@ private function getUrlAliasesForLocation(int $locationId): array ->where( $queryBuilder->expr()->eq( 't1.action', - $queryBuilder->createPositionalParameter("eznode:{$locationId}") + $queryBuilder->createPositionalParameter("eznode:$locationId") ) ); @@ -1423,8 +1491,10 @@ private function getUrlAliasesForLocation(int $locationId): array /** * Delete URL alias row by its primary composite key. + * + * @throws \Doctrine\DBAL\Exception */ - private function deleteRow(int $parentId, string $textMD5): int + private function deleteRow(int $parentId, string $textMD5): void { $queryBuilder = $this->connection->createQueryBuilder(); $expr = $queryBuilder->expr(); @@ -1444,6 +1514,22 @@ private function deleteRow(int $parentId, string $textMD5): int ) ; - return $queryBuilder->execute(); + $queryBuilder->executeStatement(); + } + + /** + * @throws \Doctrine\DBAL\Exception + */ + private function getDatabasePlatform(): AbstractPlatform + { + if (!isset($this->dbPlatform)) { + $databasePlatform = $this->connection->getDatabasePlatform(); + if (null === $databasePlatform) { + throw new LogicException('Unable to fetch database platform'); + } + $this->dbPlatform = $databasePlatform; + } + + return $this->dbPlatform; } } diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php index 50a750121d..dff8741cc1 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php @@ -11,42 +11,29 @@ use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; - - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + private DoctrineDatabase $innerGateway; + + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } public function setTable(string $name): void { - try { - $this->innerGateway->setTable($name); - } catch (DBALException | PDOException $e) { - throw DatabaseException::wrap($e); - } + $this->innerGateway->setTable($name); } public function loadAllLocationEntries(int $locationId): array { try { return $this->innerGateway->loadAllLocationEntries($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -58,7 +45,7 @@ public function loadLocationEntries( ): array { try { return $this->innerGateway->loadLocationEntries($locationId, $custom); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -67,7 +54,7 @@ public function isRootEntry(int $id): bool { try { return $this->innerGateway->isRootEntry($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -81,7 +68,7 @@ public function cleanupAfterPublish( ): void { try { $this->innerGateway->cleanupAfterPublish($action, $languageId, $newId, $parentId, $textMD5); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -90,7 +77,7 @@ public function historizeBeforeSwap(string $action, int $languageMask): void { try { $this->innerGateway->historizeBeforeSwap($action, $languageMask); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -99,7 +86,7 @@ public function historizeId(int $id, int $link): void { try { $this->innerGateway->historizeId($id, $link); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -108,7 +95,7 @@ public function reparent(int $oldParentId, int $newParentId): void { try { $this->innerGateway->reparent($oldParentId, $newParentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -117,7 +104,7 @@ public function updateRow(int $parentId, string $textMD5, array $values): void { try { $this->innerGateway->updateRow($parentId, $textMD5, $values); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -126,7 +113,7 @@ public function insertRow(array $values): int { try { return $this->innerGateway->insertRow($values); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -135,7 +122,7 @@ public function loadRow(int $parentId, string $textMD5): array { try { return $this->innerGateway->loadRow($parentId, $textMD5); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -144,7 +131,7 @@ public function loadAutogeneratedEntry(string $action, ?int $parentId = null): a { try { return $this->innerGateway->loadAutogeneratedEntry($action, $parentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -153,7 +140,7 @@ public function remove(string $action, ?int $id = null): void { try { $this->innerGateway->remove($action, $id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -165,7 +152,7 @@ public function listGlobalEntries( ): array { try { return $this->innerGateway->listGlobalEntries($languageCode, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -174,7 +161,7 @@ public function removeCustomAlias(int $parentId, string $textMD5): bool { try { return $this->innerGateway->removeCustomAlias($parentId, $textMD5); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -183,7 +170,7 @@ public function loadUrlAliasData(array $urlHashes): array { try { return $this->innerGateway->loadUrlAliasData($urlHashes); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -192,7 +179,7 @@ public function loadPathData(int $id): array { try { return $this->innerGateway->loadPathData($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -201,7 +188,7 @@ public function loadPathDataByHierarchy(array $hierarchyData): array { try { return $this->innerGateway->loadPathDataByHierarchy($hierarchyData); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -210,7 +197,7 @@ public function loadAutogeneratedEntries(int $parentId, bool $includeHistory = f { try { return $this->innerGateway->loadAutogeneratedEntries($parentId, $includeHistory); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -219,7 +206,7 @@ public function getNextId(): int { try { return $this->innerGateway->getNextId(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -228,7 +215,7 @@ public function getLocationContentMainLanguageId(int $locationId): int { try { return $this->innerGateway->getLocationContentMainLanguageId($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -237,7 +224,7 @@ public function bulkRemoveTranslation(int $languageId, array $actions): void { try { $this->innerGateway->bulkRemoveTranslation($languageId, $actions); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -249,7 +236,7 @@ public function archiveUrlAliasesForDeletedTranslations( ): void { try { $this->innerGateway->archiveUrlAliasesForDeletedTranslations($locationId, $parentId, $languageIds); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -258,7 +245,7 @@ public function deleteUrlAliasesWithoutLocation(): int { try { return $this->innerGateway->deleteUrlAliasesWithoutLocation(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -267,7 +254,7 @@ public function deleteUrlAliasesWithoutParent(): int { try { return $this->innerGateway->deleteUrlAliasesWithoutParent(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -276,7 +263,7 @@ public function deleteUrlAliasesWithBrokenLink(): int { try { return $this->innerGateway->deleteUrlAliasesWithBrokenLink(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -285,7 +272,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void { try { $this->innerGateway->repairBrokenUrlAliasesForLocation($locationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -294,7 +281,7 @@ public function deleteUrlNopAliasesWithoutChildren(): int { try { return $this->innerGateway->deleteUrlNopAliasesWithoutChildren(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -303,7 +290,7 @@ public function getAllChildrenAliases(int $parentId): array { try { return $this->innerGateway->getAllChildrenAliases($parentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From add2844a9ecf6403b0c00ecc104921dcbf58b0b9 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 9 Apr 2025 15:30:01 +0200 Subject: [PATCH 035/185] IBX-9811: Upgraded URLWildcard Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/UrlWildcard/Gateway.php | 12 ++- .../UrlWildcard/Gateway/DoctrineDatabase.php | 79 +++++++++++-------- .../Gateway/ExceptionConversion.php | 29 +++---- 3 files changed, 65 insertions(+), 55 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php index f7a055ffb7..8f8a08c1a3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php @@ -18,8 +18,8 @@ */ abstract class Gateway { - public const URL_WILDCARD_TABLE = 'ezurlwildcard'; - public const URL_WILDCARD_SEQ = 'ezurlwildcard_id_seq'; + public const string URL_WILDCARD_TABLE = 'ezurlwildcard'; + public const string URL_WILDCARD_SEQ = 'ezurlwildcard_id_seq'; /** * Insert the given UrlWildcard. @@ -43,17 +43,23 @@ abstract public function deleteUrlWildcard(int $id): void; /** * Load an array with data about UrlWildcard with $id. + * + * @phpstan-return list> */ abstract public function loadUrlWildcardData(int $id): array; /** * Load an array with data about UrlWildcards (paged). + * + * @phpstan-return list> */ abstract public function loadUrlWildcardsData(int $offset = 0, int $limit = -1): array; /** * Selects URLWildcards matching specified criteria. * + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[] $sortClauses + * * @return array{ * "rows": mixed, * "count": int|null, @@ -72,6 +78,8 @@ abstract public function find( /** * Load the UrlWildcard by source url $sourceUrl. + * + * @phpstan-return list> */ abstract public function loadUrlWildcardBySourceUrl(string $sourceUrl): array; diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 4c0480bfd8..37741060d3 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -9,7 +9,6 @@ namespace Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; @@ -30,16 +29,16 @@ final class DoctrineDatabase extends Gateway { /** - * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run - * on 64 bit systems. + * 2^30, since PHP_INT_MAX can cause overflows in DB systems, if PHP is run on 64-bit systems. */ - private const MAX_LIMIT = 1073741824; + private const int MAX_LIMIT = 1073741824; private Connection $connection; protected CriteriaConverter $criteriaConverter; - public const SORT_DIRECTION_MAP = [ + /** @phpstan-var array<\Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard\Query\SortClause::SORT_*, 'ASC'|'DESC'> */ + public const array SORT_DIRECTION_MAP = [ SortClause::SORT_ASC => 'ASC', SortClause::SORT_DESC => 'DESC', ]; @@ -50,6 +49,9 @@ public function __construct(Connection $connection, CriteriaConverter $criteriaC $this->criteriaConverter = $criteriaConverter; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertUrlWildcard(UrlWildcard $urlWildcard): int { $query = $this->connection->createQueryBuilder(); @@ -58,12 +60,10 @@ public function insertUrlWildcard(UrlWildcard $urlWildcard): int ->values( [ 'destination_url' => $query->createPositionalParameter( - $this->trimUrl($urlWildcard->destinationUrl), - ParameterType::STRING + $this->trimUrl($urlWildcard->destinationUrl) ), 'source_url' => $query->createPositionalParameter( - $this->trimUrl($urlWildcard->sourceUrl), - ParameterType::STRING + $this->trimUrl($urlWildcard->sourceUrl) ), 'type' => $query->createPositionalParameter( $urlWildcard->forward ? 1 : 2, @@ -72,11 +72,14 @@ public function insertUrlWildcard(UrlWildcard $urlWildcard): int ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(self::URL_WILDCARD_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateUrlWildcard( int $id, string $sourceUrl, @@ -90,14 +93,12 @@ public function updateUrlWildcard( ->set( 'destination_url', $query->createPositionalParameter( - $this->trimUrl($destinationUrl), - ParameterType::STRING + $this->trimUrl($destinationUrl) ), )->set( 'source_url', $query->createPositionalParameter( - $this->trimUrl($sourceUrl), - ParameterType::STRING + $this->trimUrl($sourceUrl) ), )->set( 'type', @@ -117,9 +118,12 @@ public function updateUrlWildcard( ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteUrlWildcard(int $id): void { $query = $this->connection->createQueryBuilder(); @@ -131,7 +135,7 @@ public function deleteUrlWildcard(int $id): void $query->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } private function buildLoadUrlWildcardDataQuery(): QueryBuilder @@ -144,6 +148,9 @@ private function buildLoadUrlWildcardDataQuery(): QueryBuilder return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUrlWildcardData(int $id): array { $query = $this->buildLoadUrlWildcardDataQuery(); @@ -154,11 +161,13 @@ public function loadUrlWildcardData(int $id): array $query->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $result = $query->execute()->fetch(FetchMode::ASSOCIATIVE); - return false !== $result ? $result : []; + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUrlWildcardsData(int $offset = 0, int $limit = -1): array { $query = $this->buildLoadUrlWildcardDataQuery(); @@ -166,11 +175,14 @@ public function loadUrlWildcardsData(int $offset = 0, int $limit = -1): array ->setMaxResults($limit > 0 ? $limit : self::MAX_LIMIT) ->setFirstResult($offset); - $stmt = $query->execute(); - - return $stmt->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function find( Criterion $criterion, int $offset, @@ -204,14 +216,15 @@ public function find( $query->addOrderBy($sortClause->target, $this->getQuerySortingDirection($sortClause->direction)); } - $statement = $query->execute(); - return [ 'count' => $count, - 'rows' => $statement->fetchAllAssociative(), + 'rows' => $query->executeQuery()->fetchAllAssociative(), ]; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadUrlWildcardBySourceUrl(string $sourceUrl): array { $query = $this->buildLoadUrlWildcardDataQuery(); @@ -224,25 +237,23 @@ public function loadUrlWildcardBySourceUrl(string $sourceUrl): array ) ); - $result = $query->execute()->fetch(FetchMode::ASSOCIATIVE); - - return false !== $result ? $result : []; + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countAll(): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->connection->getDatabasePlatform()->getCountExpression('id')) + ->select('COUNT(id)') ->from(self::URL_WILDCARD_TABLE); - return (int) $query->execute()->fetchColumn(); + return (int) $query->executeQuery()->fetchOne(); } /** - * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard\Query\Criterion $criterion - * - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ @@ -250,11 +261,11 @@ protected function doCount(Criterion $criterion): int { $query = $this->connection->createQueryBuilder(); $query - ->select($this->connection->getDatabasePlatform()->getCountExpression('url_wildcard.id')) + ->select('COUNT(url_wildcard.id)') ->from(self::URL_WILDCARD_TABLE, 'url_wildcard') ->where($this->criteriaConverter->convertCriteria($query, $criterion)); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } /** diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php index 5fcc8e1db9..76562b1e87 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php @@ -13,24 +13,15 @@ use Ibexa\Contracts\Core\Repository\Values\Content\URLWildcard\Query\Criterion; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; - /** - * Create a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\Content\UrlWildcard\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -39,7 +30,7 @@ public function insertUrlWildcard(UrlWildcard $urlWildcard): int { try { return $this->innerGateway->insertUrlWildcard($urlWildcard); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -57,7 +48,7 @@ public function updateUrlWildcard( $destinationUrl, $forward ); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -66,7 +57,7 @@ public function deleteUrlWildcard(int $id): void { try { $this->innerGateway->deleteUrlWildcard($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -75,7 +66,7 @@ public function loadUrlWildcardData(int $id): array { try { return $this->innerGateway->loadUrlWildcardData($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -84,7 +75,7 @@ public function loadUrlWildcardsData(int $offset = 0, int $limit = -1): array { try { return $this->innerGateway->loadUrlWildcardsData($offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -98,7 +89,7 @@ public function find( ): array { try { return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $doCount); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -107,7 +98,7 @@ public function loadUrlWildcardBySourceUrl(string $sourceUrl): array { try { return $this->innerGateway->loadUrlWildcardBySourceUrl($sourceUrl); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -116,7 +107,7 @@ public function countAll(): int { try { return $this->innerGateway->countAll(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 100a9f98d83a99cab59b3ab2b5c5f3ce24259427 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 12:16:58 +0200 Subject: [PATCH 036/185] IBX-9811: Upgraded Notification Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Notification/Gateway.php | 8 +- .../Notification/Gateway/DoctrineDatabase.php | 100 ++++++++++-------- .../Gateway/ExceptionConversion.php | 30 +++--- 3 files changed, 71 insertions(+), 67 deletions(-) diff --git a/src/lib/Persistence/Legacy/Notification/Gateway.php b/src/lib/Persistence/Legacy/Notification/Gateway.php index 0069e58d0a..1d55a3e8c1 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway.php @@ -25,15 +25,13 @@ abstract public function insert(CreateStruct $notification): int; /** * Get Notification by its id. * - * @param int $notificationId - * - * @return array + * @phpstan-return list> */ abstract public function getNotificationById(int $notificationId): array; /** * Update Notification ValueObject in persistent storage. - * There's no edit feature but it's essential to mark Notification as read. + * There's no edit feature, but it's essential to mark Notification as read. * * @param \Ibexa\Contracts\Core\Persistence\Notification\Notification $notification * @@ -62,7 +60,7 @@ abstract public function countUserPendingNotifications(int $userId): int; * @param int $offset * @param int $limit * - * @return array + * @phpstan-return list> */ abstract public function loadUserNotifications(int $userId, int $offset = 0, int $limit = -1): array; diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index b2bd28a9ce..0eb0b9a9ac 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -9,21 +9,26 @@ namespace Ibexa\Core\Persistence\Legacy\Notification\Gateway; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Persistence\Notification\CreateStruct; use Ibexa\Contracts\Core\Persistence\Notification\Notification; use Ibexa\Core\Base\Exceptions\InvalidArgumentException; use Ibexa\Core\Persistence\Legacy\Notification\Gateway; -use PDO; class DoctrineDatabase extends Gateway { - public const TABLE_NOTIFICATION = 'eznotification'; - public const COLUMN_ID = 'id'; - public const COLUMN_OWNER_ID = 'owner_id'; - public const COLUMN_IS_PENDING = 'is_pending'; - public const COLUMN_TYPE = 'type'; - public const COLUMN_CREATED = 'created'; - public const COLUMN_DATA = 'data'; + public const string TABLE_NOTIFICATION = 'eznotification'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_OWNER_ID = 'owner_id'; + public const string COLUMN_IS_PENDING = 'is_pending'; + public const string COLUMN_TYPE = 'type'; + public const string COLUMN_CREATED = 'created'; + public const string COLUMN_DATA = 'data'; + private const string IS_PENDING_PARAM_NAME = 'is_pending'; + private const string USER_ID_PARAM_NAME = 'user_id'; + private const string CREATED_PARAM_NAME = 'created'; + private const string TYPE_PARAM_NAME = 'type'; + private const string DATA_PARAM_NAME = 'data'; private Connection $connection; @@ -36,33 +41,36 @@ public function __construct(Connection $connection) } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception + * @throws \JsonException */ - public function insert(CreateStruct $createStruct): int + public function insert(CreateStruct $notification): int { $query = $this->connection->createQueryBuilder(); $query ->insert(self::TABLE_NOTIFICATION) ->values([ - self::COLUMN_IS_PENDING => ':is_pending', - self::COLUMN_OWNER_ID => ':user_id', - self::COLUMN_CREATED => ':created', - self::COLUMN_TYPE => ':type', - self::COLUMN_DATA => ':data', + self::COLUMN_IS_PENDING => ':' . self::IS_PENDING_PARAM_NAME, + self::COLUMN_OWNER_ID => ':' . self::USER_ID_PARAM_NAME, + self::COLUMN_CREATED => ':' . self::CREATED_PARAM_NAME, + self::COLUMN_TYPE => ':' . self::TYPE_PARAM_NAME, + self::COLUMN_DATA => ':' . self::DATA_PARAM_NAME, ]) - ->setParameter(':is_pending', $createStruct->isPending, PDO::PARAM_BOOL) - ->setParameter(':user_id', $createStruct->ownerId, PDO::PARAM_INT) - ->setParameter(':created', $createStruct->created, PDO::PARAM_INT) - ->setParameter(':type', $createStruct->type, PDO::PARAM_STR) - ->setParameter(':data', json_encode($createStruct->data), PDO::PARAM_STR); + ->setParameter(self::IS_PENDING_PARAM_NAME, $notification->isPending, ParameterType::BOOLEAN) + ->setParameter(self::USER_ID_PARAM_NAME, $notification->ownerId, ParameterType::INTEGER) + ->setParameter(self::CREATED_PARAM_NAME, $notification->created, ParameterType::INTEGER) + ->setParameter(self::TYPE_PARAM_NAME, $notification->type) + ->setParameter(self::DATA_PARAM_NAME, json_encode($notification->data, JSON_THROW_ON_ERROR)); - $query->execute(); + $query->executeStatement(); return (int) $this->connection->lastInsertId(); } /** - * {@inheritdoc} + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception */ public function getNotificationById(int $notificationId): array { @@ -72,13 +80,14 @@ public function getNotificationById(int $notificationId): array ->from(self::TABLE_NOTIFICATION) ->where($query->expr()->eq(self::COLUMN_ID, ':id')); - $query->setParameter(':id', $notificationId, PDO::PARAM_INT); + $query->setParameter('id', $notificationId, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function updateNotification(Notification $notification): void { @@ -90,29 +99,32 @@ public function updateNotification(Notification $notification): void $query ->update(self::TABLE_NOTIFICATION) - ->set(self::COLUMN_IS_PENDING, ':is_pending') + ->set(self::COLUMN_IS_PENDING, ':' . self::IS_PENDING_PARAM_NAME) ->where($query->expr()->eq(self::COLUMN_ID, ':id')) - ->setParameter(':is_pending', $notification->isPending, PDO::PARAM_BOOL) - ->setParameter(':id', $notification->id, PDO::PARAM_INT); + ->setParameter(self::IS_PENDING_PARAM_NAME, $notification->isPending, ParameterType::BOOLEAN) + ->setParameter('id', $notification->id, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countUserNotifications(int $userId): int { $query = $this->connection->createQueryBuilder(); $query ->select('COUNT(' . self::COLUMN_ID . ')') ->from(self::TABLE_NOTIFICATION) - ->where($query->expr()->eq(self::COLUMN_OWNER_ID, ':user_id')) - ->setParameter(':user_id', $userId, PDO::PARAM_INT); + ->where($query->expr()->eq(self::COLUMN_OWNER_ID, ':' . self::USER_ID_PARAM_NAME)) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); /** @phpstan-var int<0, max> */ - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function countUserPendingNotifications(int $userId): int { @@ -121,16 +133,16 @@ public function countUserPendingNotifications(int $userId): int $query ->select('COUNT(' . self::COLUMN_ID . ')') ->from(self::TABLE_NOTIFICATION) - ->where($expr->eq(self::COLUMN_OWNER_ID, ':user_id')) - ->andWhere($expr->eq(self::COLUMN_IS_PENDING, ':is_pending')) - ->setParameter(':is_pending', true, PDO::PARAM_BOOL) - ->setParameter(':user_id', $userId, PDO::PARAM_INT); + ->where($expr->eq(self::COLUMN_OWNER_ID, ':' . self::USER_ID_PARAM_NAME)) + ->andWhere($expr->eq(self::COLUMN_IS_PENDING, self::IS_PENDING_PARAM_NAME)) + ->setParameter(self::IS_PENDING_PARAM_NAME, true, ParameterType::BOOLEAN) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = -1): array { @@ -138,7 +150,7 @@ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = $query ->select(...$this->getColumns()) ->from(self::TABLE_NOTIFICATION) - ->where($query->expr()->eq(self::COLUMN_OWNER_ID, ':user_id')) + ->where($query->expr()->eq(self::COLUMN_OWNER_ID, self::USER_ID_PARAM_NAME)) ->setFirstResult($offset); if ($limit > 0) { @@ -146,13 +158,13 @@ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = } $query->orderBy(self::COLUMN_ID, 'DESC'); - $query->setParameter(':user_id', $userId, PDO::PARAM_INT); + $query->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function delete(int $notificationId): void { @@ -160,13 +172,13 @@ public function delete(int $notificationId): void $query ->delete(self::TABLE_NOTIFICATION) ->where($query->expr()->eq(self::COLUMN_ID, ':id')) - ->setParameter(':id', $notificationId, PDO::PARAM_INT); + ->setParameter('id', $notificationId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** - * @return array + * @return string[] */ private function getColumns(): array { diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php index 78e37c3e96..51e3ab8ca1 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php @@ -13,21 +13,12 @@ use Ibexa\Contracts\Core\Persistence\Notification\Notification; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Notification\Gateway; -use PDOException; class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - /** - * ExceptionConversion constructor. - * - * @param \Ibexa\Core\Persistence\Legacy\Notification\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -36,16 +27,19 @@ public function getNotificationById(int $notificationId): array { try { return $this->innerGateway->getNotificationById($notificationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ public function updateNotification(Notification $notification): void { try { $this->innerGateway->updateNotification($notification); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -54,7 +48,7 @@ public function countUserNotifications(int $userId): int { try { return $this->innerGateway->countUserNotifications($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -63,7 +57,7 @@ public function countUserPendingNotifications(int $userId): int { try { return $this->innerGateway->countUserPendingNotifications($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -72,7 +66,7 @@ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = { try { return $this->innerGateway->loadUserNotifications($userId, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -81,7 +75,7 @@ public function insert(CreateStruct $notification): int { try { return $this->innerGateway->insert($notification); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -90,7 +84,7 @@ public function delete(int $notificationId): void { try { $this->innerGateway->delete($notificationId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 2cea5d59300c11444dccbf7de3c7754e3b16717e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 12:20:10 +0200 Subject: [PATCH 037/185] IBX-9811: Upgraded Setting Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Persistence/Legacy/Setting/Gateway.php | 17 ++------ .../Setting/Gateway/DoctrineDatabase.php | 39 ++++++++++++------- .../Setting/Gateway/ExceptionConversion.php | 15 ++++--- 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/lib/Persistence/Legacy/Setting/Gateway.php b/src/lib/Persistence/Legacy/Setting/Gateway.php index 9a1f043958..f84b12eecf 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway.php @@ -13,21 +13,15 @@ */ abstract class Gateway { - public const SETTING_SEQ = 'ibexa_setting_id_seq'; - public const SETTING_TABLE = 'ibexa_setting'; + public const string SETTING_SEQ = 'ibexa_setting_id_seq'; + public const string SETTING_TABLE = 'ibexa_setting'; - /** - * @throws \Doctrine\DBAL\Exception - */ abstract public function insertSetting( string $group, string $identifier, string $serializedValue ): int; - /** - * @throws \Doctrine\DBAL\Exception - */ abstract public function updateSetting( string $group, string $identifier, @@ -35,7 +29,7 @@ abstract public function updateSetting( ): void; /** - * @throws \Doctrine\DBAL\Exception + * @return array|null */ abstract public function loadSetting( string $group, @@ -43,15 +37,12 @@ abstract public function loadSetting( ): ?array; /** - * @throws \Doctrine\DBAL\Exception + * @return array|null */ abstract public function loadSettingById( int $id ): ?array; - /** - * @throws \Doctrine\DBAL\Exception - */ abstract public function deleteSetting( string $group, string $identifier diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php index 7023aff599..c1b601df4e 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php @@ -26,6 +26,9 @@ public function __construct(Connection $connection) $this->connection = $connection; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function insertSetting(string $group, string $identifier, string $serializedValue): int { $query = $this->connection->createQueryBuilder(); @@ -39,11 +42,14 @@ public function insertSetting(string $group, string $identifier, string $seriali ] ); - $query->execute(); + $query->executeStatement(); return (int)$this->connection->lastInsertId(Gateway::SETTING_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateSetting(string $group, string $identifier, string $serializedValue): void { $query = $this->connection->createQueryBuilder(); @@ -53,17 +59,20 @@ public function updateSetting(string $group, string $identifier, string $seriali ->where( $query->expr()->eq( $this->connection->quoteIdentifier('group'), - $query->createPositionalParameter($group, ParameterType::STRING) + $query->createPositionalParameter($group) ), $query->expr()->eq( 'identifier', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadSetting(string $group, string $identifier): ?array { $query = $this->connection->createQueryBuilder(); @@ -77,16 +86,15 @@ public function loadSetting(string $group, string $identifier): ?array ->where( $query->expr()->eq( $this->connection->quoteIdentifier('group'), - $query->createPositionalParameter($group, ParameterType::STRING) + $query->createPositionalParameter($group) ), $query->expr()->eq( 'identifier', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ); - $statement = $query->execute(); - $result = $statement->fetchAssociative(); + $result = $query->executeQuery()->fetchAssociative(); if (false === $result) { return null; @@ -95,6 +103,9 @@ public function loadSetting(string $group, string $identifier): ?array return $result; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadSettingById(int $id): ?array { $query = $this->connection->createQueryBuilder(); @@ -112,8 +123,7 @@ public function loadSettingById(int $id): ?array ) ); - $statement = $query->execute(); - $result = $statement->fetchAssociative(); + $result = $query->executeQuery()->fetchAssociative(); if (false === $result) { return null; @@ -122,6 +132,9 @@ public function loadSettingById(int $id): ?array return $result; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteSetting(string $group, string $identifier): void { $query = $this->connection->createQueryBuilder(); @@ -130,14 +143,14 @@ public function deleteSetting(string $group, string $identifier): void ->where( $query->expr()->eq( $this->connection->quoteIdentifier('group'), - $query->createPositionalParameter($group, ParameterType::STRING) + $query->createPositionalParameter($group) ), $query->expr()->eq( 'identifier', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ); - $query->execute(); + $query->executeStatement(); } } diff --git a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php index 6e65523359..6fe594da7b 100644 --- a/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php @@ -11,16 +11,15 @@ use Doctrine\DBAL\Exception as DBALException; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Setting\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -32,7 +31,7 @@ public function insertSetting(string $group, string $identifier, string $seriali { try { return $this->innerGateway->insertSetting($group, $identifier, $serializedValue); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -44,7 +43,7 @@ public function updateSetting(string $group, string $identifier, string $seriali { try { $this->innerGateway->updateSetting($group, $identifier, $serializedValue); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -56,7 +55,7 @@ public function loadSetting(string $group, string $identifier): ?array { try { return $this->innerGateway->loadSetting($group, $identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -68,7 +67,7 @@ public function loadSettingById(int $id): ?array { try { return $this->innerGateway->loadSettingById($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -80,7 +79,7 @@ public function deleteSetting(string $group, string $identifier): void { try { $this->innerGateway->deleteSetting($group, $identifier); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 681763aa69b4a906bf18a2dedee8cd491ca57226 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 12:23:00 +0200 Subject: [PATCH 038/185] IBX-9811: Upgraded URL Doctrine Gateway to doctrine/dbal v3 and improved code quality --- src/lib/Persistence/Legacy/URL/Gateway.php | 37 ++++++-------- .../Legacy/URL/Gateway/DoctrineDatabase.php | 51 +++++++++++-------- .../URL/Gateway/ExceptionConversion.php | 42 +++++++-------- 3 files changed, 64 insertions(+), 66 deletions(-) diff --git a/src/lib/Persistence/Legacy/URL/Gateway.php b/src/lib/Persistence/Legacy/URL/Gateway.php index 7cfd585413..66ec533888 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway.php +++ b/src/lib/Persistence/Legacy/URL/Gateway.php @@ -14,54 +14,47 @@ abstract class Gateway { /** * Update the URL. - * - * @param \Ibexa\Contracts\Core\Persistence\URL\URL $url */ - abstract public function updateUrl(URL $url); + abstract public function updateUrl(URL $url): void; /** * Selects URLs matching specified criteria. * - * @param \Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion $criterion - * @param int $offset - * @param int $limit * @param \Ibexa\Contracts\Core\Repository\Values\URL\Query\SortClause[] $sortClauses - * @param bool $doCount * - * @return array{ - * "rows": mixed, - * "count": int|null, - * } + * @return array{count: int|null, rows: list>} * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException if Criterion is not applicable to its target */ - abstract public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true); + abstract public function find( + Criterion $criterion, + int $offset, + int $limit, + array $sortClauses = [], + bool $doCount = true + ): array; /** * Returns IDs of Content Objects using URL identified by $id. * * @param int $id * - * @return array + * @return int[] */ - abstract public function findUsages($id); + abstract public function findUsages(int $id): array; /** * Loads URL with url id. * - * @param int $id - * - * @return array + * @phpstan-return list> */ - abstract public function loadUrlData($id); + abstract public function loadUrlData(int $id): array; /** * Loads URL with url address. * - * @param int $url - * - * @return array + * @phpstan-return list> */ - abstract public function loadUrlDataByUrl($url); + abstract public function loadUrlDataByUrl(string $url): array; } diff --git a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php index 0f12da446e..a483a42269 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php @@ -61,10 +61,17 @@ public function __construct(Connection $connection, CriteriaConverter $criteriaC } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true): array - { + public function find( + Criterion $criterion, + int $offset, + int $limit, + array $sortClauses = [], + bool $doCount = true + ): array { $count = $doCount ? $this->doCount($criterion) : null; if (!$doCount && $limit === 0) { throw new RuntimeException('Invalid query. Cannot disable count and request 0 items at the same time'); @@ -88,18 +95,16 @@ public function find(Criterion $criterion, $offset, $limit, array $sortClauses = $query->addOrderBy($column, $this->getQuerySortingDirection($sortClause->direction)); } - $statement = $query->execute(); - return [ 'count' => $count, - 'rows' => $statement->fetchAllAssociative(), + 'rows' => $query->executeQuery()->fetchAllAssociative(), ]; } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ - public function findUsages($id): array + public function findUsages(int $id): array { $query = $this->connection->createQueryBuilder(); $expr = $query->expr(); @@ -131,11 +136,11 @@ public function findUsages($id): array ) ); - return $query->executeQuery()->fetchFirstColumn(); + return array_map('intval', $query->executeQuery()->fetchFirstColumn()); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function updateUrl(URL $url): void { @@ -144,10 +149,10 @@ public function updateUrl(URL $url): void ->update(self::URL_TABLE) ->set( self::COLUMN_URL, - $query->createPositionalParameter($url->url, ParameterType::STRING) + $query->createPositionalParameter($url->url) )->set( self::COLUMN_ORIGINAL_URL_MD5, - $query->createPositionalParameter($url->originalUrlMd5, ParameterType::STRING) + $query->createPositionalParameter($url->originalUrlMd5) ) ->set( self::COLUMN_MODIFIED, @@ -168,13 +173,13 @@ public function updateUrl(URL $url): void ) ); - $query->execute(); + $query->executeStatement(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ - public function loadUrlData($id): array + public function loadUrlData(int $id): array { $query = $this->createSelectQuery(); $query->where( @@ -188,15 +193,15 @@ public function loadUrlData($id): array } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ - public function loadUrlDataByUrl($url): array + public function loadUrlDataByUrl(string $url): array { $query = $this->createSelectQuery(); $query->where( $query->expr()->eq( self::COLUMN_URL, - $query->createPositionalParameter($url, ParameterType::STRING) + $query->createPositionalParameter($url) ) ); @@ -205,6 +210,7 @@ public function loadUrlDataByUrl($url): array /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception */ protected function doCount(Criterion $criterion): int { @@ -212,11 +218,11 @@ protected function doCount(Criterion $criterion): int $query = $this->connection->createQueryBuilder(); $query - ->select("COUNT(DISTINCT url.{$columnName})") + ->select("COUNT(DISTINCT url.$columnName)") ->from(self::URL_TABLE, 'url') ->where($this->criteriaConverter->convertCriteria($query, $criterion)); - return (int)$query->execute()->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** @@ -238,6 +244,9 @@ private function createSelectDistinctQuery(): QueryBuilder ->from(self::URL_TABLE, 'url'); } + /** + * @return string[] + */ private function getSelectColumns(): array { return [ @@ -252,7 +261,7 @@ private function getSelectColumns(): array } /** - * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ private function getQuerySortingDirection(string $direction): string { diff --git a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php index 474af8ef99..ebf821fe24 100644 --- a/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php @@ -12,66 +12,62 @@ use Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\URL\Gateway; -use PDOException; class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - /** - * ExceptionConversion constructor. - * - * @param \Ibexa\Core\Persistence\Legacy\URL\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } - public function updateUrl(URL $url) + public function updateUrl(URL $url): void { try { - return $this->innerGateway->updateUrl($url); - } catch (DBALException | PDOException $e) { + $this->innerGateway->updateUrl($url); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function find(Criterion $criterion, $offset, $limit, array $sortClauses = [], $doCount = true) - { + public function find( + Criterion $criterion, + int $offset, + int $limit, + array $sortClauses = [], + bool $doCount = true + ): array { try { return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $doCount); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function findUsages($id) + public function findUsages(int $id): array { try { return $this->innerGateway->findUsages($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function loadUrlData($id) + public function loadUrlData(int $id): array { try { return $this->innerGateway->loadUrlData($id); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - public function loadUrlDataByUrl($url) + public function loadUrlDataByUrl(string $url): array { try { return $this->innerGateway->loadUrlDataByUrl($url); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From a385d8605f0da08c426e1759927b6642e85d6c7f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 12:27:53 +0200 Subject: [PATCH 039/185] IBX-9811: Upgraded User Doctrine Gateway to doctrine/dbal v3 and improved code quality --- src/lib/Persistence/Legacy/User/Gateway.php | 10 +++++- .../Legacy/User/Gateway/DoctrineDatabase.php | 13 ++++---- .../User/Gateway/ExceptionConversion.php | 33 +++++++------------ 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/lib/Persistence/Legacy/User/Gateway.php b/src/lib/Persistence/Legacy/User/Gateway.php index ebe8b40224..6e088bd643 100644 --- a/src/lib/Persistence/Legacy/User/Gateway.php +++ b/src/lib/Persistence/Legacy/User/Gateway.php @@ -18,25 +18,33 @@ */ abstract class Gateway { - public const USER_TABLE = 'ezuser'; + public const string USER_TABLE = 'ezuser'; /** * Load a User by User ID. + * + * @phpstan-return list> */ abstract public function load(int $userId): array; /** * Load a User by User login. + * + * @phpstan-return list> */ abstract public function loadByLogin(string $login): array; /** * Load a User by User e-mail. + * + * @phpstan-return list> */ abstract public function loadByEmail(string $email): array; /** * Load a User by User token. + * + * @phpstan-return list> */ abstract public function loadUserByToken(string $hash): array; diff --git a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php index a6b465939d..41942f0658 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php @@ -62,8 +62,7 @@ public function loadByLogin(string $login): array 'LOWER(u.login)', // Index is case in-sensitive, on some db's lowercase, so we lowercase $login $query->createPositionalParameter( - mb_strtolower($login, 'UTF-8'), - ParameterType::STRING + mb_strtolower($login, 'UTF-8') ) ) ); @@ -80,7 +79,7 @@ public function loadByEmail(string $email): array $query->where( $query->expr()->eq( 'u.email', - $query->createPositionalParameter($email, ParameterType::STRING) + $query->createPositionalParameter($email) ) ); @@ -131,16 +130,16 @@ public function updateUserPassword(User $user): void ->set('password_hash', ':passwordHash') ->set('password_hash_type', ':passwordHashType') ->set('password_updated_at', ':passwordUpdatedAt') - ->setParameter(':passwordHash', $user->passwordHash, ParameterType::STRING) - ->setParameter(':passwordHashType', $user->hashAlgorithm, ParameterType::INTEGER) - ->setParameter(':passwordUpdatedAt', $user->passwordUpdatedAt) + ->setParameter('passwordHash', $user->passwordHash, ParameterType::STRING) + ->setParameter('passwordHashType', $user->hashAlgorithm, ParameterType::INTEGER) + ->setParameter('passwordUpdatedAt', $user->passwordUpdatedAt) ->where( $queryBuilder->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), ':userId' ) ) - ->setParameter(':userId', $user->id, ParameterType::INTEGER); + ->setParameter('userId', $user->id, ParameterType::INTEGER); $queryBuilder->executeStatement(); } diff --git a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php index bde6d7fd1e..91c159e71b 100644 --- a/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php @@ -13,24 +13,15 @@ use Ibexa\Contracts\Core\Persistence\User\UserTokenUpdateStruct; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\User\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; + private DoctrineDatabase $innerGateway; - /** - * Create a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\User\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -39,7 +30,7 @@ public function load(int $userId): array { try { return $this->innerGateway->load($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -48,7 +39,7 @@ public function loadByLogin(string $login): array { try { return $this->innerGateway->loadByLogin($login); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -57,7 +48,7 @@ public function loadByEmail(string $email): array { try { return $this->innerGateway->loadByEmail($email); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -66,7 +57,7 @@ public function loadUserByToken(string $hash): array { try { return $this->innerGateway->loadUserByToken($hash); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -75,7 +66,7 @@ public function updateUserPassword(User $user): void { try { $this->innerGateway->updateUserPassword($user); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -84,7 +75,7 @@ public function updateUserToken(UserTokenUpdateStruct $userTokenUpdateStruct): v { try { $this->innerGateway->updateUserToken($userTokenUpdateStruct); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -93,7 +84,7 @@ public function expireUserToken(string $hash): void { try { $this->innerGateway->expireUserToken($hash); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -102,7 +93,7 @@ public function assignRole(int $contentId, int $roleId, array $limitation): void { try { $this->innerGateway->assignRole($contentId, $roleId, $limitation); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -111,7 +102,7 @@ public function removeRole(int $contentId, int $roleId): void { try { $this->innerGateway->removeRole($contentId, $roleId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -120,7 +111,7 @@ public function removeRoleAssignmentById(int $roleAssignmentId): void { try { $this->innerGateway->removeRoleAssignmentById($roleAssignmentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 307ebbb613445a8eed464c1bd94965c161dcafcc Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 13:24:59 +0200 Subject: [PATCH 040/185] IBX-9811: Upgraded Role Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Persistence/Legacy/User/Role/Gateway.php | 49 +++-- .../User/Role/Gateway/DoctrineDatabase.php | 182 +++++++++++------- .../User/Role/Gateway/ExceptionConversion.php | 55 +++--- 3 files changed, 169 insertions(+), 117 deletions(-) diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway.php b/src/lib/Persistence/Legacy/User/Role/Gateway.php index dd80c82c0b..d7b79f2f95 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway.php @@ -19,14 +19,14 @@ */ abstract class Gateway { - public const ROLE_TABLE = 'ezrole'; - public const POLICY_TABLE = 'ezpolicy'; - public const POLICY_LIMITATION_TABLE = 'ezpolicy_limitation'; - public const POLICY_LIMITATION_VALUE_TABLE = 'ezpolicy_limitation_value'; - public const USER_ROLE_TABLE = 'ezuser_role'; - public const ROLE_SEQ = 'ezrole_id_seq'; - public const POLICY_SEQ = 'ezpolicy_id_seq'; - public const POLICY_LIMITATION_SEQ = 'ezpolicy_limitation_id_seq'; + public const string ROLE_TABLE = 'ezrole'; + public const string POLICY_TABLE = 'ezpolicy'; + public const string POLICY_LIMITATION_TABLE = 'ezpolicy_limitation'; + public const string POLICY_LIMITATION_VALUE_TABLE = 'ezpolicy_limitation_value'; + public const string USER_ROLE_TABLE = 'ezuser_role'; + public const string ROLE_SEQ = 'ezrole_id_seq'; + public const string POLICY_SEQ = 'ezpolicy_id_seq'; + public const string POLICY_LIMITATION_SEQ = 'ezpolicy_limitation_id_seq'; /** * Create a new role. @@ -41,16 +41,18 @@ abstract public function copyRole(Role $role): Role; /** * Load a specified role by $roleId. * - * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT + * @phpstan-param int $status int * - * @return array + * @phpstan-return list> */ abstract public function loadRole(int $roleId, int $status = Role::STATUS_DEFINED): array; /** * Load a specified role by $identifier. * - * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT + * @phpstan-param int $status int + * + * @phpstan-return list> */ abstract public function loadRoleByIdentifier( string $identifier, @@ -61,13 +63,17 @@ abstract public function loadRoleByIdentifier( * Load a role draft by the original role ID. * * @param int $roleId ID of the role the draft was created from. + * + * @phpstan-return list> */ abstract public function loadRoleDraftByRoleId(int $roleId): array; /** * Load all roles. * - * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT + * @phpstan-param int $status int + * + * @phpstan-return list> */ abstract public function loadRoles(int $status = Role::STATUS_DEFINED): array; @@ -75,7 +81,10 @@ abstract public function loadRoles(int $status = Role::STATUS_DEFINED): array; * Load all roles associated with the given Content items. * * @param int[] $contentIds - * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT + * + * @phpstan-param int $status int + * + * @phpstan-return list> */ abstract public function loadRolesForContentObjects( array $contentIds, @@ -84,11 +93,15 @@ abstract public function loadRolesForContentObjects( /** * Load a role assignment for specified assignment ID. + * + * @phpstan-return list> */ abstract public function loadRoleAssignment(int $roleAssignmentId): array; /** * Load role assignment for specified User Group Content ID. + * + * @phpstan-return list> */ abstract public function loadRoleAssignmentsByGroupId( int $groupId, @@ -97,11 +110,15 @@ abstract public function loadRoleAssignmentsByGroupId( /** * Load a Role assignments for given Role ID. + * + * @phpstan-return list> */ abstract public function loadRoleAssignmentsByRoleId(int $roleId): array; /** * Load a Role assignments for given Role ID with provided $offset and $limit arguments. + * + * @phpstan-return list> */ abstract public function loadRoleAssignmentsByRoleIdWithOffsetAndLimit( int $roleId, @@ -117,7 +134,7 @@ abstract public function countRoleAssignments(int $roleId): int; /** * Return User Policies data associated with User. * - * @return array + * @phpstan-return list> */ abstract public function loadPoliciesByUserId(int $userId): array; @@ -132,7 +149,7 @@ abstract public function updateRole(RoleUpdateStruct $role): void; * Delete the specified role (draft). * If it's not a draft, the role assignments will also be deleted. * - * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT + * @phpstan-param int $status int */ abstract public function deleteRole(int $roleId, int $status = Role::STATUS_DEFINED): void; @@ -153,7 +170,7 @@ abstract public function addPolicy(int $roleId, Policy $policy): Policy; /** * Add Limitations to an existing Policy. * - * @param array $limitations a map of Limitation identifiers to their raw values + * @param array $limitations a map of Limitation identifiers to their raw values */ abstract public function addPolicyLimitations(int $policyId, array $limitations): void; diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php index 03f10aaf24..69513756a6 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\User\Role\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; @@ -36,6 +37,9 @@ public function __construct(Connection $connection) $this->connection = $connection; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function createRole(Role $role): Role { // Role original ID is set when creating a draft from an existing role @@ -57,18 +61,16 @@ public function createRole(Role $role): Role [ 'is_new' => $query->createPositionalParameter(0, ParameterType::INTEGER), 'name' => $query->createPositionalParameter( - $role->identifier, - ParameterType::STRING + $role->identifier ), 'value' => $query->createPositionalParameter(0, ParameterType::INTEGER), // BC: "version" stores originalId when creating a draft from an existing role 'version' => $query->createPositionalParameter( - $roleOriginalId, - ParameterType::STRING + $roleOriginalId ), ] ); - $query->execute(); + $query->executeStatement(); if (!isset($role->id) || (int)$role->id < 1 || $role->status === Role::STATUS_DRAFT) { $role->id = (int)$this->connection->lastInsertId(self::ROLE_SEQ); @@ -79,6 +81,9 @@ public function createRole(Role $role): Role return $role; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function copyRole(Role $role): Role { $status = $role->status; @@ -90,18 +95,16 @@ public function copyRole(Role $role): Role [ 'is_new' => $query->createPositionalParameter(0, ParameterType::INTEGER), 'name' => $query->createPositionalParameter( - $role->identifier, - ParameterType::STRING + $role->identifier ), 'value' => $query->createPositionalParameter(0, ParameterType::INTEGER), // BC: "version" stores originalId when creating a draft from an existing role 'version' => $query->createPositionalParameter( - $status, - ParameterType::STRING + $status ), ] ); - $query->execute(); + $query->executeStatement(); $role->id = (int)$this->connection->lastInsertId(self::ROLE_SEQ); @@ -133,7 +136,6 @@ private function getLoadRoleQueryBuilder(): QueryBuilder /** * @throws \Doctrine\DBAL\Exception - * @throws \Doctrine\DBAL\Driver\Exception */ public function loadRole(int $roleId, int $status = Role::STATUS_DEFINED): array { @@ -152,12 +154,11 @@ public function loadRole(int $roleId, int $status = Role::STATUS_DEFINED): array ->addOrderBy('l.identifier', 'ASC') ->addOrderBy('v.value', 'ASC'); - return $query->execute()->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** * @throws \Doctrine\DBAL\Exception - * @throws \Doctrine\DBAL\Driver\Exception */ public function loadRoleByIdentifier( string $identifier, @@ -168,7 +169,7 @@ public function loadRoleByIdentifier( ->where( $query->expr()->eq( 'r.name', - $query->createPositionalParameter($identifier, ParameterType::STRING) + $query->createPositionalParameter($identifier) ) ) ->andWhere( @@ -178,9 +179,12 @@ public function loadRoleByIdentifier( ->addOrderBy('l.identifier', 'ASC') ->addOrderBy('v.value', 'ASC'); - return $query->execute()->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRoleDraftByRoleId(int $roleId): array { $query = $this->getLoadRoleQueryBuilder(); @@ -189,16 +193,17 @@ public function loadRoleDraftByRoleId(int $roleId): array ->where( $query->expr()->eq( 'r.version', - $query->createPositionalParameter($roleId, ParameterType::STRING) + $query->createPositionalParameter($roleId) ) ) ->orderBy('p.id', 'ASC'); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRoles(int $status = Role::STATUS_DEFINED): array { $query = $this->getLoadRoleQueryBuilder(); @@ -206,11 +211,12 @@ public function loadRoles(int $status = Role::STATUS_DEFINED): array $this->buildRoleDraftQueryConstraint($status, $query) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRolesForContentObjects( array $contentIds, int $status = Role::STATUS_DEFINED @@ -248,13 +254,16 @@ public function loadRolesForContentObjects( ->where( $expr->in( 'urs.contentobject_id', - $query->createPositionalParameter($contentIds, Connection::PARAM_INT_ARRAY) + $query->createPositionalParameter($contentIds, ArrayParameterType::INTEGER) ) ); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRoleAssignment(int $roleAssignmentId): array { $query = $this->connection->createQueryBuilder(); @@ -273,11 +282,12 @@ public function loadRoleAssignment(int $roleAssignmentId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = false): array { $query = $this->connection->createQueryBuilder(); @@ -297,7 +307,7 @@ public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = fal $query->where( $query->expr()->in( 'contentobject_id', - $groupIds + $query->createPositionalParameter($groupIds, ArrayParameterType::INTEGER) ) ); } else { @@ -309,11 +319,12 @@ public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = fal ); } - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadRoleAssignmentsByRoleId(int $roleId): array { $query = $this->connection->createQueryBuilder(); @@ -332,13 +343,10 @@ public function loadRoleAssignmentsByRoleId(int $roleId): array ) ); - $statement = $query->execute(); - - return $statement->fetchAllAssociative(); + return $query->executeQuery()->fetchAllAssociative(); } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ public function loadRoleAssignmentsByRoleIdWithOffsetAndLimit(int $roleId, int $offset, ?int $limit): array @@ -361,22 +369,21 @@ public function loadRoleAssignmentsByRoleIdWithOffsetAndLimit(int $roleId, int $ } return $query - ->execute() + ->executeQuery() ->fetchAllAssociative(); } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception */ public function countRoleAssignments(int $roleId): int { $query = $this->buildLoadRoleAssignmentsQuery( - [$this->connection->getDatabasePlatform()->getCountExpression('user_role.id')], + ['COUNT(user_role.id)'], $roleId ); - return (int)$query->execute()->fetchOne(); + return (int)$query->executeQuery()->fetchOne(); } /** @@ -403,6 +410,9 @@ private function buildLoadRoleAssignmentsQuery(array $columns, int $roleId): Que return $query; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function loadPoliciesByUserId(int $userId): array { $groupIds = $this->fetchUserGroups($userId); @@ -418,9 +428,9 @@ public function loadPoliciesByUserId(int $userId): array * Note that not all of these might be used as user groups, * but we will need to check all of them. * - * @param int $userId + * @return int[] * - * @return array + * @throws \Doctrine\DBAL\Exception */ private function fetchUserGroups(int $userId): array { @@ -438,13 +448,16 @@ private function fetchUserGroups(int $userId): array ->where( $query->expr()->in( 't.node_id', - $nodeIDs + $query->createNamedParameter($nodeIDs, ArrayParameterType::INTEGER, ':node_ids') ) ); - return $query->executeQuery()->fetchFirstColumn(); + return array_map('intval', $query->executeQuery()->fetchFirstColumn()); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateRole(RoleUpdateStruct $role): void { $query = $this->connection->createQueryBuilder(); @@ -452,7 +465,7 @@ public function updateRole(RoleUpdateStruct $role): void ->update(self::ROLE_TABLE) ->set( 'name', - $query->createPositionalParameter($role->identifier, ParameterType::STRING) + $query->createPositionalParameter($role->identifier) ) ->where( $query->expr()->eq( @@ -460,9 +473,12 @@ public function updateRole(RoleUpdateStruct $role): void $query->createPositionalParameter($role->id, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function deleteRole(int $roleId, int $status = Role::STATUS_DEFINED): void { $query = $this->connection->createQueryBuilder(); @@ -482,15 +498,21 @@ public function deleteRole(int $roleId, int $status = Role::STATUS_DEFINED): voi if ($status !== Role::STATUS_DRAFT) { $this->deleteRoleAssignments($roleId); } - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function publishRoleDraft(int $roleDraftId, ?int $originalRoleId = null): void { $this->markRoleAsPublished($roleDraftId, $originalRoleId); $this->publishRolePolicies($roleDraftId, $originalRoleId); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function addPolicy(int $roleId, Policy $policy): Policy { $query = $this->connection->createQueryBuilder(); @@ -499,12 +521,10 @@ public function addPolicy(int $roleId, Policy $policy): Policy ->values( [ 'function_name' => $query->createPositionalParameter( - $policy->function, - ParameterType::STRING + $policy->function ), 'module_name' => $query->createPositionalParameter( - $policy->module, - ParameterType::STRING + $policy->module ), 'original_id' => $query->createPositionalParameter( $policy->originalId ?? 0, @@ -513,7 +533,7 @@ public function addPolicy(int $roleId, Policy $policy): Policy 'role_id' => $query->createPositionalParameter($roleId, ParameterType::INTEGER), ] ); - $query->execute(); + $query->executeStatement(); $policy->id = (int)$this->connection->lastInsertId(self::POLICY_SEQ); $policy->roleId = $roleId; @@ -528,6 +548,9 @@ public function addPolicy(int $roleId, Policy $policy): Policy return $policy; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function addPolicyLimitations(int $policyId, array $limitations): void { foreach ($limitations as $identifier => $values) { @@ -537,8 +560,7 @@ public function addPolicyLimitations(int $policyId, array $limitations): void ->values( [ 'identifier' => $query->createPositionalParameter( - $identifier, - ParameterType::STRING + $identifier ), 'policy_id' => $query->createPositionalParameter( $policyId, @@ -546,7 +568,7 @@ public function addPolicyLimitations(int $policyId, array $limitations): void ), ] ); - $query->execute(); + $query->executeStatement(); $limitationId = (int)$this->connection->lastInsertId(self::POLICY_LIMITATION_SEQ); @@ -557,8 +579,7 @@ public function addPolicyLimitations(int $policyId, array $limitations): void ->values( [ 'value' => $query->createPositionalParameter( - $value, - ParameterType::STRING + $value ), 'limitation_id' => $query->createPositionalParameter( $limitationId, @@ -566,11 +587,14 @@ public function addPolicyLimitations(int $policyId, array $limitations): void ), ] ); - $query->execute(); + $query->executeStatement(); } } } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removePolicy(int $policyId): void { $this->removePolicyLimitations($policyId); @@ -584,11 +608,13 @@ public function removePolicy(int $policyId): void $query->createPositionalParameter($policyId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** * @param int[] $limitationIds + * + * @throws \Doctrine\DBAL\Exception */ private function deletePolicyLimitations(array $limitationIds): void { @@ -600,15 +626,17 @@ private function deletePolicyLimitations(array $limitationIds): void 'id', $query->createPositionalParameter( $limitationIds, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); - $query->execute(); + $query->executeStatement(); } /** * @param int[] $limitationValueIds + * + * @throws \Doctrine\DBAL\Exception */ private function deletePolicyLimitationValues(array $limitationValueIds): void { @@ -620,13 +648,18 @@ private function deletePolicyLimitationValues(array $limitationValueIds): void 'id', $query->createPositionalParameter( $limitationValueIds, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception + */ private function loadPolicyLimitationValues(int $policyId): array { $query = $this->connection->createQueryBuilder(); @@ -648,6 +681,9 @@ private function loadPolicyLimitationValues(int $policyId): array return $query->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function removePolicyLimitations(int $policyId): void { $limitationValues = $this->loadPolicyLimitationValues($policyId); @@ -672,6 +708,8 @@ public function removePolicyLimitations(int $policyId): void /** * Delete Role assignments to Users. + * + * @throws \Doctrine\DBAL\Exception */ private function deleteRoleAssignments(int $roleId): void { @@ -684,15 +722,15 @@ private function deleteRoleAssignments(int $roleId): void $query->createPositionalParameter($roleId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } /** * Load all Ancestor Location IDs of the given User Location. * - * @param int $userId - * * @return int[] + * + * @throws \Doctrine\DBAL\Exception */ private function getAncestorLocationIdsForUser(int $userId): array { @@ -703,7 +741,7 @@ private function getAncestorLocationIdsForUser(int $userId): array ->where( $query->expr()->eq( 't.contentobject_id', - $query->createPositionalParameter($userId, ParameterType::STRING) + $query->createPositionalParameter($userId) ) ); @@ -731,13 +769,13 @@ private function buildRoleDraftQueryConstraint( ): string { if ($status === Role::STATUS_DEFINED) { $draftCondition = $query->expr()->eq( - "{$columnAlias}.version", + "$columnAlias.version", $query->createPositionalParameter($status, ParameterType::INTEGER) ); } else { // version stores original Role ID when Role is a draft... $draftCondition = $query->expr()->neq( - "{$columnAlias}.version", + "$columnAlias.version", $query->createPositionalParameter(Role::STATUS_DEFINED, ParameterType::INTEGER) ); } @@ -745,6 +783,9 @@ private function buildRoleDraftQueryConstraint( return $draftCondition; } + /** + * @throws \Doctrine\DBAL\Exception + */ private function markRoleAsPublished(int $roleDraftId, ?int $originalRoleId): void { $query = $this->connection->createQueryBuilder(); @@ -768,9 +809,12 @@ private function markRoleAsPublished(int $roleDraftId, ?int $originalRoleId): vo $query->createPositionalParameter($roleDraftId, ParameterType::INTEGER) ) ); - $query->execute(); + $query->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ private function publishRolePolicies(int $roleDraftId, ?int $originalRoleId): void { $policyQuery = $this->connection->createQueryBuilder(); @@ -794,6 +838,6 @@ private function publishRolePolicies(int $roleDraftId, ?int $originalRoleId): vo $policyQuery->createPositionalParameter($roleDraftId, ParameterType::INTEGER) ) ); - $policyQuery->execute(); + $policyQuery->executeStatement(); } } diff --git a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php index 9612956d50..27337a7900 100644 --- a/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php @@ -14,24 +14,15 @@ use Ibexa\Contracts\Core\Persistence\User\RoleUpdateStruct; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\User\Role\Gateway; -use PDOException; /** * @internal Internal exception conversion layer. */ final class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - private Gateway $innerGateway; - - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Persistence\Legacy\User\Role\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + private DoctrineDatabase $innerGateway; + + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } @@ -40,7 +31,7 @@ public function createRole(Role $role): Role { try { return $this->innerGateway->createRole($role); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -49,7 +40,7 @@ public function copyRole(Role $role): Role { try { return $this->innerGateway->copyRole($role); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -58,7 +49,7 @@ public function loadRole(int $roleId, int $status = Role::STATUS_DEFINED): array { try { return $this->innerGateway->loadRole($roleId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -69,7 +60,7 @@ public function loadRoleByIdentifier( ): array { try { return $this->innerGateway->loadRoleByIdentifier($identifier, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -78,7 +69,7 @@ public function loadRoleDraftByRoleId(int $roleId): array { try { return $this->innerGateway->loadRoleDraftByRoleId($roleId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -87,7 +78,7 @@ public function loadRoles(int $status = Role::STATUS_DEFINED): array { try { return $this->innerGateway->loadRoles(); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -98,7 +89,7 @@ public function loadRolesForContentObjects( ): array { try { return $this->innerGateway->loadRolesForContentObjects($contentIds); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -107,7 +98,7 @@ public function loadRoleAssignment(int $roleAssignmentId): array { try { return $this->innerGateway->loadRoleAssignment($roleAssignmentId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -116,7 +107,7 @@ public function loadRoleAssignmentsByGroupId(int $groupId, bool $inherited = fal { try { return $this->innerGateway->loadRoleAssignmentsByGroupId($groupId, $inherited); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -125,7 +116,7 @@ public function loadRoleAssignmentsByRoleId(int $roleId): array { try { return $this->innerGateway->loadRoleAssignmentsByRoleId($roleId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -134,7 +125,7 @@ public function loadRoleAssignmentsByRoleIdWithOffsetAndLimit(int $roleId, int $ { try { return $this->innerGateway->loadRoleAssignmentsByRoleIdWithOffsetAndLimit($roleId, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -143,7 +134,7 @@ public function countRoleAssignments(int $roleId): int { try { return $this->innerGateway->countRoleAssignments($roleId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -152,7 +143,7 @@ public function loadPoliciesByUserId(int $userId): array { try { return $this->innerGateway->loadPoliciesByUserId($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -161,7 +152,7 @@ public function updateRole(RoleUpdateStruct $role): void { try { $this->innerGateway->updateRole($role); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -170,7 +161,7 @@ public function deleteRole(int $roleId, int $status = Role::STATUS_DEFINED): voi { try { $this->innerGateway->deleteRole($roleId, $status); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -179,7 +170,7 @@ public function publishRoleDraft(int $roleDraftId, ?int $originalRoleId = null): { try { $this->innerGateway->publishRoleDraft($roleDraftId, $originalRoleId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -188,7 +179,7 @@ public function addPolicy(int $roleId, Policy $policy): Policy { try { return $this->innerGateway->addPolicy($roleId, $policy); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -197,7 +188,7 @@ public function addPolicyLimitations(int $policyId, array $limitations): void { try { $this->innerGateway->addPolicyLimitations($policyId, $limitations); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -206,7 +197,7 @@ public function removePolicy(int $policyId): void { try { $this->innerGateway->removePolicy($policyId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } @@ -215,7 +206,7 @@ public function removePolicyLimitations(int $policyId): void { try { $this->innerGateway->removePolicyLimitations($policyId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From e47dbbccd08eefeed94f696f66031861c2bf664f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 14:19:08 +0200 Subject: [PATCH 041/185] IBX-9811: Upgraded UserPreference Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/UserPreference/Gateway.php | 21 +----- .../Gateway/DoctrineDatabase.php | 75 +++++++++++-------- .../Gateway/ExceptionConversion.php | 37 ++------- 3 files changed, 55 insertions(+), 78 deletions(-) diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway.php b/src/lib/Persistence/Legacy/UserPreference/Gateway.php index edab39b992..214c9b7547 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway.php @@ -14,36 +14,21 @@ abstract class Gateway { /** * Store UserPreference ValueObject in persistent storage. - * - * @param \Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct $userPreference - * - * @return int */ - abstract public function setUserPreference(UserPreferenceSetStruct $userPreference): int; + abstract public function setUserPreference(UserPreferenceSetStruct $userPreferenceSetStruct): int; /** * Get UserPreference by its user ID and name. * - * @param int $userId - * @param string $name * - * @return array + * @phpstan-return list> */ abstract public function getUserPreferenceByUserIdAndName(int $userId, string $name): array; - /** - * @param int $userId - * - * @return int - */ abstract public function countUserPreferences(int $userId): int; /** - * @param int $userId - * @param int $offset - * @param int $limit - * - * @return array + * @phpstan-return list> */ abstract public function loadUserPreferences(int $userId, int $offset = 0, int $limit = -1): array; } diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php index 2c59e1f04a..e901305edd 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php @@ -15,12 +15,16 @@ class DoctrineDatabase extends Gateway { - public const TABLE_USER_PREFERENCES = 'ezpreferences'; + public const string TABLE_USER_PREFERENCES = 'ezpreferences'; - public const COLUMN_ID = 'id'; - public const COLUMN_NAME = 'name'; - public const COLUMN_USER_ID = 'user_id'; - public const COLUMN_VALUE = 'value'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_NAME = 'name'; + public const string COLUMN_USER_ID = 'user_id'; + public const string COLUMN_VALUE = 'value'; + private const string VALUE_PARAM_NAME = 'value'; + private const string ID_PARAM_NAME = 'id'; + private const string NAME_PARAM_NAME = 'name'; + private const string USER_ID_PARAM_NAME = 'user_id'; protected Connection $connection; @@ -30,13 +34,16 @@ public function __construct(Connection $connection) } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ - public function setUserPreference(UserPreferenceSetStruct $userPreference): int + public function setUserPreference(UserPreferenceSetStruct $userPreferenceSetStruct): int { $query = $this->connection->createQueryBuilder(); - $userPreferences = $this->getUserPreferenceByUserIdAndName($userPreference->userId, $userPreference->name); + $userPreferences = $this->getUserPreferenceByUserIdAndName( + $userPreferenceSetStruct->userId, + $userPreferenceSetStruct->name + ); if (0 < count($userPreferences)) { $currentUserPreference = reset($userPreferences); @@ -44,12 +51,12 @@ public function setUserPreference(UserPreferenceSetStruct $userPreference): int $query ->update(self::TABLE_USER_PREFERENCES) - ->set(self::COLUMN_VALUE, ':value') - ->where($query->expr()->eq(self::COLUMN_ID, ':id')) - ->setParameter(':id', $currentUserPreferenceId, ParameterType::INTEGER) - ->setParameter(':value', $userPreference->value, ParameterType::STRING); + ->set(self::COLUMN_VALUE, ':' . self::VALUE_PARAM_NAME) + ->where($query->expr()->eq(self::COLUMN_ID, ':' . self::ID_PARAM_NAME)) + ->setParameter(self::ID_PARAM_NAME, $currentUserPreferenceId, ParameterType::INTEGER) + ->setParameter(self::VALUE_PARAM_NAME, $userPreferenceSetStruct->value); - $query->execute(); + $query->executeStatement(); return $currentUserPreferenceId; } @@ -57,19 +64,22 @@ public function setUserPreference(UserPreferenceSetStruct $userPreference): int $query ->insert(self::TABLE_USER_PREFERENCES) ->values([ - self::COLUMN_NAME => ':name', - self::COLUMN_USER_ID => ':user_id', - self::COLUMN_VALUE => ':value', + self::COLUMN_NAME => ':' . self::NAME_PARAM_NAME, + self::COLUMN_USER_ID => ':' . self::USER_ID_PARAM_NAME, + self::COLUMN_VALUE => ':' . self::VALUE_PARAM_NAME, ]) - ->setParameter(':name', $userPreference->name, ParameterType::STRING) - ->setParameter(':user_id', $userPreference->userId, ParameterType::INTEGER) - ->setParameter(':value', $userPreference->value, ParameterType::STRING); + ->setParameter(self::NAME_PARAM_NAME, $userPreferenceSetStruct->name) + ->setParameter(self::USER_ID_PARAM_NAME, $userPreferenceSetStruct->userId, ParameterType::INTEGER) + ->setParameter(self::VALUE_PARAM_NAME, $userPreferenceSetStruct->value); - $query->execute(); + $query->executeStatement(); return (int) $this->connection->lastInsertId(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getUserPreferenceByUserIdAndName(int $userId, string $name): array { $query = $this->connection->createQueryBuilder(); @@ -77,16 +87,16 @@ public function getUserPreferenceByUserIdAndName(int $userId, string $name): arr ->select(...$this->getColumns()) ->from(self::TABLE_USER_PREFERENCES) ->where($query->expr()->eq(self::COLUMN_USER_ID, ':userId')) - ->andWhere($query->expr()->eq(self::COLUMN_NAME, ':name')); + ->andWhere($query->expr()->eq(self::COLUMN_NAME, ':' . self::NAME_PARAM_NAME)); - $query->setParameter(':userId', $userId, ParameterType::INTEGER); - $query->setParameter(':name', $name, ParameterType::STRING); + $query->setParameter('userId', $userId, ParameterType::INTEGER); + $query->setParameter(self::NAME_PARAM_NAME, $name); return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = -1): array { @@ -94,7 +104,7 @@ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = - $query ->select(...$this->getColumns()) ->from(self::TABLE_USER_PREFERENCES) - ->where($query->expr()->eq(self::COLUMN_USER_ID, ':user_id')) + ->where($query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME)) ->setFirstResult($offset); if ($limit > 0) { @@ -102,28 +112,31 @@ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = - } $query->orderBy(self::COLUMN_ID, 'ASC'); - $query->setParameter(':user_id', $userId, ParameterType::INTEGER); + $query->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); return $query->executeQuery()->fetchAllAssociative(); } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ public function countUserPreferences(int $userId): int { $query = $this->connection->createQueryBuilder(); $query ->select( - $this->connection->getDatabasePlatform()->getCountExpression(self::COLUMN_ID) + 'COUNT(self::COLUMN_ID)' ) ->from(self::TABLE_USER_PREFERENCES) - ->where($query->expr()->eq(self::COLUMN_USER_ID, ':user_id')) - ->setParameter(':user_id', $userId, ParameterType::INTEGER); + ->where($query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME)) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); - return (int) $query->execute()->fetchColumn(); + return (int) $query->executeQuery()->fetchOne(); } + /** + * @return string[] + */ private function getColumns(): array { return [ diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php index e2ea588055..c4d95f345f 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php @@ -12,69 +12,48 @@ use Ibexa\Contracts\Core\Persistence\UserPreference\UserPreferenceSetStruct; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; -use PDOException; class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - /** - * ExceptionConversion constructor. - * - * @param \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } - /** - * {@inheritdoc} - */ public function getUserPreferenceByUserIdAndName(int $userId, string $name): array { try { return $this->innerGateway->getUserPreferenceByUserIdAndName($userId, $name); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - /** - * {@inheritdoc} - */ public function countUserPreferences(int $userId): int { try { return $this->innerGateway->countUserPreferences($userId); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - /** - * {@inheritdoc} - */ public function loadUserPreferences(int $userId, int $offset = 0, int $limit = -1): array { try { return $this->innerGateway->loadUserPreferences($userId, $offset, $limit); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } - /** - * {@inheritdoc} - */ - public function setUserPreference(UserPreferenceSetStruct $setStruct): int + public function setUserPreference(UserPreferenceSetStruct $userPreferenceSetStruct): int { try { - return $this->innerGateway->setUserPreference($setStruct); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->setUserPreference($userPreferenceSetStruct); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 84f901d5dfcdb161baa92a2771b050dc18d14bd1 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 14:42:04 +0200 Subject: [PATCH 042/185] IBX-9811: Upgraded LSE Doctrine Gateway to doctrine/dbal v3 and improved code quality --- src/lib/Search/Legacy/Content/Gateway.php | 17 ++-- .../Content/Gateway/DoctrineDatabase.php | 85 ++++++++++++------- .../Content/Gateway/ExceptionConversion.php | 19 +++-- 3 files changed, 72 insertions(+), 49 deletions(-) diff --git a/src/lib/Search/Legacy/Content/Gateway.php b/src/lib/Search/Legacy/Content/Gateway.php index 78b0f5bb1d..fd09a33d4e 100644 --- a/src/lib/Search/Legacy/Content/Gateway.php +++ b/src/lib/Search/Legacy/Content/Gateway.php @@ -12,30 +12,29 @@ /** * The Content Search Gateway provides the implementation for one database to * retrieve the desired content objects. + * + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ abstract class Gateway { /** * Returns a list of object satisfying the $criterion. * - * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface $criterion - * @param int $offset - * @param int $limit * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[] $sort - * @param array $languageFilter - * @param bool $doCount * - * @return mixed[][] + * @phpstan-param TSearchLanguageFilter $languageFilter + * + * @phpstan-return array{count: int|null, rows: list> } * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if Criterion is not applicable to its target * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException if a given Criterion Handler or Sort Clause is not implemented */ abstract public function find( CriterionInterface $criterion, - $offset, - $limit, + int $offset, + int $limit, array $sort = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array; } diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 794bfb8424..1dc33ef82a 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -9,6 +9,8 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\ContentInfo; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler; @@ -20,17 +22,19 @@ use Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter; use Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseConverter; use Ibexa\Core\Search\Legacy\Content\Gateway; +use LogicException; use RuntimeException; /** * Content locator gateway implementation using the Doctrine database. + * + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ final class DoctrineDatabase extends Gateway { private Connection $connection; - /** @var \Doctrine\DBAL\Platforms\AbstractPlatform */ - private $dbPlatform; + private AbstractPlatform $dbPlatform; /** * Criteria converter. @@ -47,9 +51,6 @@ final class DoctrineDatabase extends Gateway */ private Handler $languageHandler; - /** - * @throws \Doctrine\DBAL\Exception - */ public function __construct( Connection $connection, CriteriaConverter $criteriaConverter, @@ -57,19 +58,23 @@ public function __construct( LanguageHandler $languageHandler ) { $this->connection = $connection; - $this->dbPlatform = $connection->getDatabasePlatform(); $this->criteriaConverter = $criteriaConverter; $this->sortClauseConverter = $sortClauseConverter; $this->languageHandler = $languageHandler; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function find( CriterionInterface $criterion, - $offset, - $limit, + int $offset, + int $limit, array $sort = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array { $count = $doCount ? $this->getResultCount($criterion, $languageFilter) : null; @@ -92,20 +97,18 @@ public function find( /** * Generates a language mask from the given $languageSettings. * - * @param array $languageSettings - * - * @return int + * @phpstan-param TSearchLanguageFilter $languageSettings * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ private function getLanguageMask(array $languageSettings): int { $mask = 0; - if ($languageSettings['useAlwaysAvailable']) { + if ($languageSettings['useAlwaysAvailable'] ?? false) { $mask |= 1; } - foreach ($languageSettings['languages'] as $languageCode) { + foreach ($languageSettings['languages'] ?? [] as $languageCode) { $mask |= $this->languageHandler->loadByLanguageCode($languageCode)->id; } @@ -113,17 +116,17 @@ private function getLanguageMask(array $languageSettings): int } /** - * @param array $languageFilter - * - * @return string + * @phpstan-param TSearchLanguageFilter $languageFilter * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ private function getQueryCondition( CriterionInterface $filter, QueryBuilder $query, array $languageFilter - ) { + ): CompositeExpression { $expr = $query->expr(); $condition = $expr->and( $this->criteriaConverter->convertCriteria($query, $filter, $languageFilter), @@ -142,7 +145,7 @@ private function getQueryCondition( $condition = $expr->and( $condition, $expr->gt( - $this->dbPlatform->getBitAndComparisonExpression( + $this->getDatabasePlatform()->getBitAndComparisonExpression( 'c.language_mask', $query->createNamedParameter( $this->getLanguageMask($languageFilter), @@ -159,9 +162,11 @@ private function getQueryCondition( } /** - * @param array $languageFilter + * @phpstan-param TSearchLanguageFilter $languageFilter * - * @return int + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception */ private function getResultCount(CriterionInterface $filter, array $languageFilter): int { @@ -182,21 +187,20 @@ private function getResultCount(CriterionInterface $filter, array $languageFilte $this->getQueryCondition($filter, $query, $languageFilter) ); - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** * Get sorted arrays of content IDs, which should be returned. * - * @param array $sort - * @param mixed $offset - * @param mixed $limit - * @param array $languageFilter + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause[] $sort * - * @return int[] + * @phpstan-param TSearchLanguageFilter $languageFilter * + * @phpstan-return list> + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ private function getContentInfoList( @@ -246,10 +250,27 @@ private function getContentInfoList( } $query->setMaxResults($limit); - $query->setFirstResult($offset); + if (null !== $offset) { + $query->setFirstResult($offset); + } + + return $query->executeQuery()->fetchAllAssociative(); + } - $statement = $query->execute(); + /** + * @throws \Doctrine\DBAL\Exception + */ + private function getDatabasePlatform(): AbstractPlatform + { + if (!isset($this->dbPlatform)) { + $dbPlatform = $this->connection->getDatabasePlatform(); + if (null === $dbPlatform) { + throw new LogicException('Unable to get database platform'); + } + + $this->dbPlatform = $dbPlatform; + } - return $statement->fetchAllAssociative(); + return $this->dbPlatform; } } diff --git a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php index e360378853..27d994aa4d 100644 --- a/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php @@ -11,7 +11,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Search\Legacy\Content\Gateway; -use PDOException; /** * The Content Search Gateway provides the implementation for one database to @@ -19,24 +18,28 @@ */ class ExceptionConversion extends Gateway { - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function find( CriterionInterface $criterion, - $offset = 0, - $limit = null, + int $offset = 0, + int $limit = null, array $sort = null, array $languageFilter = [], - $doCount = true + bool $doCount = true ): array { try { - return $this->innerGateway->find($criterion, $offset, $limit, $sort, $languageFilter, $doCount); - } catch (DBALException | PDOException $e) { + return $this->innerGateway->find($criterion, $offset, $limit ?? 0, $sort, $languageFilter, $doCount); + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From faa89b581c0cdc119b8355cd7dee8f9bd351b5a0 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 10 Apr 2025 16:46:45 +0200 Subject: [PATCH 043/185] IBX-9811: [Tests] Upgraded Doctrine gateways tests to doctrine/dbal v3 and improved code quality --- .../Content/Gateway/DoctrineDatabaseTest.php | 207 ++++----- .../Location/Gateway/DoctrineDatabaseTest.php | 407 +++++++++++++----- .../Gateway/DoctrineDatabaseTrashTest.php | 144 ++++++- .../Type/Gateway/DoctrineDatabaseTest.php | 241 +++++++---- .../Update/Handler/DoctrineDatabaseTest.php | 36 +- .../UrlAlias/Gateway/DoctrineDatabaseTest.php | 126 +++--- .../Gateway/DoctrineDatabaseTest.php | 37 +- .../URL/Gateway/DoctrineDatabaseTest.php | 33 +- .../Gateway/DoctrineDatabaseTest.php | 24 +- 9 files changed, 820 insertions(+), 435 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index ed5df55ebb..91e4e237ff 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -18,23 +18,24 @@ use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Values\Content\Relation as RelationValue; +use Ibexa\Contracts\Core\Repository\Values\Content\RelationType; use Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldValue; use Ibexa\Tests\Core\Persistence\Legacy\Content\LanguageAwareTestCase; /** - * @covers \Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::insertContentObject + * @covers \Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase */ class DoctrineDatabaseTest extends LanguageAwareTestCase { - /** - * Database gateway to test. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase - */ - protected $databaseGateway; + private const string COUNT_ID_SQL_EXPRESSION = 'COUNT(id)'; + + protected DoctrineDatabase $databaseGateway; /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * * @todo Fix not available fields */ public function testInsertContentObject(): void @@ -79,11 +80,6 @@ public function testInsertContentObject(): void ); } - /** - * Returns a Content fixture. - * - * @return \Ibexa\Contracts\Core\Persistence\Content\CreateStruct - */ protected function getCreateStructFixture(): CreateStruct { $struct = new CreateStruct(); @@ -106,11 +102,6 @@ protected function getCreateStructFixture(): CreateStruct return $struct; } - /** - * Returns a Content fixture. - * - * @return \Ibexa\Contracts\Core\Persistence\Content - */ protected function getContentFixture(): Content { $content = new Content(); @@ -136,11 +127,6 @@ protected function getContentFixture(): Content return $content; } - /** - * Returns a Version fixture. - * - * @return \Ibexa\Contracts\Core\Persistence\Content\VersionInfo - */ protected function getVersionFixture(): VersionInfo { $version = new VersionInfo(); @@ -162,6 +148,10 @@ protected function getVersionFixture(): VersionInfo return $version; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testInsertVersion(): void { $version = $this->getVersionFixture(); @@ -200,30 +190,15 @@ public function testInsertVersion(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testSetStatus(): void { - $gateway = $this->getDatabaseGateway(); - - // insert content - $struct = $this->getCreateStructFixture(); - $contentId = $gateway->insertContentObject($struct); - - // insert version - $version = $this->getVersionFixture(); - $version->contentInfo->id = $contentId; - $gateway->insertVersion($version, []); - - self::assertTrue( - $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PENDING) - ); - - self::assertQueryResult( - [[VersionInfo::STATUS_PENDING]], - $this->getDatabaseConnection() - ->createQueryBuilder() - ->select('status') - ->from('ezcontentobject_version') - ); + $status = VersionInfo::STATUS_PENDING; + $this->createContentVersionWithStatus($status); // check that content status has not been set to published self::assertQueryResult( @@ -235,30 +210,15 @@ public function testSetStatus(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testSetStatusPublished(): void { - $gateway = $this->getDatabaseGateway(); - - // insert content - $struct = $this->getCreateStructFixture(); - $contentId = $gateway->insertContentObject($struct); - - // insert version - $version = $this->getVersionFixture(); - $version->contentInfo->id = $contentId; - $gateway->insertVersion($version, []); - - self::assertTrue( - $gateway->setStatus($version->contentInfo->id, $version->versionNo, VersionInfo::STATUS_PUBLISHED) - ); - - self::assertQueryResult( - [[VersionInfo::STATUS_PUBLISHED]], - $this->getDatabaseConnection() - ->createQueryBuilder() - ->select('status') - ->from('ezcontentobject_version') - ); + $status = VersionInfo::STATUS_PUBLISHED; + $this->createContentVersionWithStatus($status); // check that content status has been set to published self::assertQueryResult( @@ -279,6 +239,10 @@ public function testSetStatusUnknownVersion(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateContent(): void { $gateway = $this->getDatabaseGateway(); @@ -349,6 +313,10 @@ protected function getMetadataUpdateStructFixture(): MetadataUpdateStruct return $struct; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateVersion(): void { $gateway = $this->getDatabaseGateway(); @@ -756,7 +724,7 @@ public function testLoadNonExistentTranslation(): void * @param string[] $expectedValues * @param string[][] $actualRows */ - protected function assertValuesInRows($columnKey, array $expectedValues, array $actualRows) + protected function assertValuesInRows($columnKey, array $expectedValues, array $actualRows): void { $expectedValues = array_fill_keys( array_values($expectedValues), @@ -1076,7 +1044,7 @@ public function testSetName(): void ->andWhere('content_translation = :language_code') ->setParameter('content_id', 14, ParameterType::INTEGER) ->setParameter('version_no', 2, ParameterType::INTEGER) - ->setParameter('language_code', self::ENG_GB, ParameterType::STRING) + ->setParameter('language_code', self::ENG_GB) ); } @@ -1218,13 +1186,13 @@ public function testLoadRelationsByType(): void $gateway = $this->getDatabaseGateway(); - $relations = $gateway->loadRelations(57, null, RelationValue::COMMON); + $relations = $gateway->loadRelations(57, null, RelationType::COMMON->value); self::assertCount(1, $relations, 'Expecting one relation to be loaded'); $this->assertValuesInRows( 'ezcontentobject_link_relation_type', - [RelationValue::COMMON], + [RelationType::COMMON->value], $relations ); @@ -1286,7 +1254,7 @@ public function testLoadReverseRelationsWithType(): void $gateway = $this->getDatabaseGateway(); - $relations = $gateway->loadReverseRelations(58, RelationValue::COMMON); + $relations = $gateway->loadReverseRelations(58, RelationType::COMMON->value); self::assertCount(1, $relations); @@ -1298,7 +1266,7 @@ public function testLoadReverseRelationsWithType(): void $this->assertValuesInRows( 'ezcontentobject_link_relation_type', - [RelationValue::COMMON], + [RelationType::COMMON->value], $relations ); } @@ -1306,7 +1274,7 @@ public function testLoadReverseRelationsWithType(): void /** * Inserts the relation database fixture from relation_data.php. */ - protected function insertRelationFixture() + protected function insertRelationFixture(): void { $this->insertDatabaseFixture( __DIR__ . '/../_fixtures/relations_data.php' @@ -1367,7 +1335,7 @@ public function testDeleteRelation(): void self::assertEquals(4, $this->countContentRelations(57)); $gateway = $this->getDatabaseGateway(); - $gateway->deleteRelation(2, RelationValue::COMMON); + $gateway->deleteRelation(2, RelationType::COMMON->value); self::assertEquals(3, $this->countContentRelations(57)); } @@ -1380,11 +1348,11 @@ public function testDeleteRelationWithCompositeBitmask(): void $this->insertRelationFixture(); $gateway = $this->getDatabaseGateway(); - $gateway->deleteRelation(11, RelationValue::COMMON); + $gateway->deleteRelation(11, RelationType::COMMON->value); $query = $this->getDatabaseConnection()->createQueryBuilder(); self::assertQueryResult( - [['relation_type' => RelationValue::LINK]], + [['relation_type' => RelationType::LINK->value]], $query ->select('relation_type') ->from('ezcontentobject_link') @@ -1664,10 +1632,9 @@ public function testLoadVersionInfo(): void protected function countContentRelations(?int $fromId = null, ?int $toId = null): int { $connection = $this->getDatabaseConnection(); - $dbPlatform = $connection->getDatabasePlatform(); $query = $connection->createQueryBuilder(); $query - ->select($dbPlatform->getCountExpression('id')) + ->select(self::COUNT_ID_SQL_EXPRESSION) ->from('ezcontentobject_link'); if ($fromId !== null) { @@ -1687,28 +1654,21 @@ protected function countContentRelations(?int $fromId = null, ?int $toId = null) ); } - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** * Counts the number of fields. * - * @param int $contentId - * - * @return int - * * @throws \Doctrine\DBAL\Exception */ protected function countContentFields(?int $contentId = null): int { $connection = $this->getDatabaseConnection(); - $dbPlatform = $connection->getDatabasePlatform(); $query = $connection->createQueryBuilder(); $query - ->select($dbPlatform->getCountExpression('id')) + ->select(self::COUNT_ID_SQL_EXPRESSION) ->from('ezcontentobject_attribute'); if ($contentId !== null) { @@ -1720,9 +1680,7 @@ protected function countContentFields(?int $contentId = null): int ); } - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** @@ -1737,11 +1695,10 @@ protected function countContentFields(?int $contentId = null): int protected function countContentVersions(?int $contentId = null): int { $connection = $this->getDatabaseConnection(); - $dbPlatform = $connection->getDatabasePlatform(); $query = $connection->createQueryBuilder(); $query - ->select($dbPlatform->getCountExpression('id')) + ->select(self::COUNT_ID_SQL_EXPRESSION) ->from('ezcontentobject_version'); if ($contentId !== null) { @@ -1753,28 +1710,21 @@ protected function countContentVersions(?int $contentId = null): int ); } - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** * Counts the number of content names. * - * @param int $contentId - * - * @return int - * * @throws \Doctrine\DBAL\Exception */ protected function countContentNames(?int $contentId = null): int { $connection = $this->getDatabaseConnection(); - $dbPlatform = $connection->getDatabasePlatform(); $query = $connection->createQueryBuilder(); $query - ->select($dbPlatform->getCountExpression('contentobject_id')) + ->select('COUNT(contentobject_id)') ->from('ezcontentobject_name'); if ($contentId !== null) { @@ -1786,27 +1736,20 @@ protected function countContentNames(?int $contentId = null): int ); } - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** * Counts the number of content objects. * - * @param int|null $contentId - * - * @return int - * * @throws \Doctrine\DBAL\Exception */ protected function countContent(?int $contentId = null): int { $connection = $this->getDatabaseConnection(); - $dbPlatform = $connection->getDatabasePlatform(); $query = $connection->createQueryBuilder(); $query - ->select($dbPlatform->getCountExpression('id')) + ->select(self::COUNT_ID_SQL_EXPRESSION) ->from('ezcontentobject'); if ($contentId !== null) { @@ -1818,18 +1761,13 @@ protected function countContent(?int $contentId = null): int ); } - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** * Stores $fixture in $file to be required as a fixture. - * - * @param string $file - * @param mixed $fixture */ - protected function storeFixture($file, $fixture) + protected function storeFixture(string $file, mixed $fixture): void { file_put_contents( $file, @@ -1859,7 +1797,7 @@ protected function getFieldFixture(): Field * * @return \Ibexa\Contracts\Core\Persistence\Content\Field */ - protected function getOtherLanguageFieldFixture() + protected function getOtherLanguageFieldFixture(): Field { $field = $this->getFieldFixture(); $field->languageCode = 'eng-US'; @@ -1919,7 +1857,7 @@ protected function getRelationCreateStructFixture(): RelationCreateStruct $struct->sourceContentId = 1; $struct->sourceContentVersionNo = 1; $struct->sourceFieldDefinitionId = 0; - $struct->type = RelationValue::COMMON; + $struct->type = RelationType::COMMON->value; return $struct; } @@ -1957,4 +1895,35 @@ private function assertContentVersionAttributesLanguages( ->orderBy('id') ); } + + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Doctrine\DBAL\Exception + */ + private function createContentVersionWithStatus(int $status): void + { + $gateway = $this->getDatabaseGateway(); + + // insert content + $struct = $this->getCreateStructFixture(); + $contentId = $gateway->insertContentObject($struct); + + // insert version + $version = $this->getVersionFixture(); + $version->contentInfo->id = $contentId; + $gateway->insertVersion($version, []); + + self::assertTrue( + $gateway->setStatus($version->contentInfo->id, $version->versionNo, $status) + ); + + self::assertQueryResult( + [[$status]], + $this->getDatabaseConnection() + ->createQueryBuilder() + ->select('status') + ->from('ezcontentobject_version') + ); + } } diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index 55bfcc766b..eb99fc7df1 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -7,6 +7,7 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Location; @@ -22,6 +23,8 @@ */ class DoctrineDatabaseTest extends LanguageAwareTestCase { + private const string NODE_IDS_PARAM_NAME = 'node_ids'; + protected function getLocationGateway(): DoctrineDatabase { return new DoctrineDatabase( @@ -32,6 +35,9 @@ protected function getLocationGateway(): DoctrineDatabase ); } + /** + * @return array + */ private static function getLoadLocationValues(): array { return [ @@ -52,6 +58,9 @@ private static function getLoadLocationValues(): array ]; } + /** + * @param array $locationData + */ private function assertLoadLocationProperties(array $locationData): void { foreach (self::getLoadLocationValues() as $field => $expectedValue) { @@ -63,37 +72,52 @@ private function assertLoadLocationProperties(array $locationData): void } } + /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testLoadLocationByRemoteId(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $data = $gateway->getBasicNodeDataByRemoteId('dbc2f3c8716c12f32c379dbf0b1cb133'); - self::assertLoadLocationProperties($data); + $this->assertLoadLocationProperties($data); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testLoadLocation(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $data = $gateway->getBasicNodeData(77); - self::assertLoadLocationProperties($data); + $this->assertLoadLocationProperties($data); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadLocationList(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); - $locationsData = $gateway->getNodeDataList([77]); + $locationsData = iterator_to_array($gateway->getNodeDataList([77])); self::assertCount(1, $locationsData); $locationRow = reset($locationsData); - self::assertLoadLocationProperties($locationRow); + $this->assertLoadLocationProperties($locationRow); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testLoadInvalidLocation(): void { $this->expectException(NotFoundException::class); @@ -103,6 +127,9 @@ public function testLoadInvalidLocation(): void $gateway->getBasicNodeData(1337); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadLocationDataByContent(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -115,9 +142,12 @@ public function testLoadLocationDataByContent(): void $locationRow = reset($locationsData); - self::assertLoadLocationProperties($locationRow); + $this->assertLoadLocationProperties($locationRow); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadParentLocationDataForDraftContentAll(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -130,9 +160,12 @@ public function testLoadParentLocationDataForDraftContentAll(): void $locationRow = reset($locationsData); - self::assertLoadLocationProperties($locationRow); + $this->assertLoadLocationProperties($locationRow); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadLocationDataByContentLimitSubtree(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -144,6 +177,9 @@ public function testLoadLocationDataByContentLimitSubtree(): void self::assertCount(0, $locationsData); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testMoveSubtreePathUpdate(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -184,11 +220,23 @@ public function testMoveSubtreePathUpdate(): void 'is_invisible' ) ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [69, 71, 75, 77, 2])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [69, 71, 75, 77, 2], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('contentobject_id') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testMoveHiddenDestinationUpdate(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -230,11 +278,23 @@ public function testMoveHiddenDestinationUpdate(): void 'is_invisible' ) ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [69, 71, 75, 77, 2])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [69, 71, 75, 77, 2], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('contentobject_id') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testMoveHiddenSourceUpdate(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -276,11 +336,23 @@ public function testMoveHiddenSourceUpdate(): void 'is_invisible' ) ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [69, 71, 75, 77, 2])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [69, 71, 75, 77, 2], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('contentobject_id') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testMoveHiddenSourceChildUpdate(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -324,7 +396,16 @@ public function testMoveHiddenSourceChildUpdate(): void 'is_invisible' ) ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [69, 70, 71, 75, 77, 2])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [69, 70, 71, 75, 77, 2], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('contentobject_id') ); } @@ -364,6 +445,9 @@ public function testMoveSubtreeAssignmentUpdate(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testHideUpdateHidden(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -381,13 +465,20 @@ public function testHideUpdateHidden(): void $query ->select('node_id', 'is_hidden', 'is_invisible') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [1, 2, 69, 75])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter([1, 2, 69, 75], ArrayParameterType::INTEGER, ':' . self::NODE_IDS_PARAM_NAME) + ) + ) ->orderBy('node_id') ); } /** * @depends testHideUpdateHidden + * + * @throws \Doctrine\DBAL\Exception */ public function testHideUnhideUpdateHidden(): void { @@ -407,13 +498,24 @@ public function testHideUnhideUpdateHidden(): void $query ->select('node_id', 'is_hidden', 'is_invisible') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [1, 2, 69, 75])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [1, 2, 69, 75], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('node_id') ); } /** * @depends testHideUpdateHidden + * + * @throws \Doctrine\DBAL\Exception */ public function testHideUnhideParentTree(): void { @@ -436,13 +538,24 @@ public function testHideUnhideParentTree(): void $query ->select('node_id', 'is_hidden', 'is_invisible') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [1, 2, 69, 70, 71, 75])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [1, 2, 69, 70, 71, 75], + ArrayParameterType::INTEGER, + ':' . self::NODE_IDS_PARAM_NAME + ) + ) + ) ->orderBy('node_id') ); } /** * @depends testHideUpdateHidden + * + * @throws \Doctrine\DBAL\Exception */ public function testHideUnhidePartialSubtree(): void { @@ -465,11 +578,19 @@ public function testHideUnhidePartialSubtree(): void $query ->select('node_id', 'is_hidden', 'is_invisible') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [1, 2, 69, 70, 71, 75])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter([1, 2, 69, 70, 71, 75], ArrayParameterType::INTEGER, 'node_ids') + ) + ) ->orderBy('node_id') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testSwapLocations(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -485,11 +606,19 @@ public function testSwapLocations(): void $query ->select('node_id', 'contentobject_id') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [70, 78])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter([70, 78], ArrayParameterType::INTEGER, 'node_ids') + ) + ) ->orderBy('node_id') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCreateLocation(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -518,13 +647,25 @@ public function testCreateLocation(): void $query ->select('node_id', 'path_string') ->from('ezcontentobject_tree') - ->where($query->expr()->in('contentobject_id', [68, 75])) + ->where( + $query->expr()->in( + 'contentobject_id', + $query->createNamedParameter( + [68, 75], + ArrayParameterType::INTEGER, + ':contentobject_ids' + ) + ) + ) ->orderBy('node_id') ); } /** * @depends testCreateLocation + * + * @throws \Doctrine\DBAL\Exception + * @throws \ReflectionException */ public function testGetMainNodeId(): void { @@ -568,6 +709,9 @@ public function testGetMainNodeId(): void self::assertEquals($mainLocation->id, $methodReflection->invoke($gateway, 68)); } + /** + * @return array + */ public static function getCreateLocationValues(): array { return [ @@ -591,13 +735,11 @@ public static function getCreateLocationValues(): array * @depends testCreateLocation * * @dataProvider getCreateLocationValues + * + * @throws \Doctrine\DBAL\Exception */ public function testCreateLocationValues(string $field, int|string $value): void { - if ($value === null) { - self::markTestIncomplete('Proper value setting yet unknown.'); - } - $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $gateway->create( @@ -629,34 +771,33 @@ public function testCreateLocationValues(string $field, int|string $value): void ); } - public static function getCreateLocationReturnValues(): array + /** + * @return iterable + */ + public static function getCreateLocationReturnValues(): iterable { - return [ - ['id', 228], - ['priority', 1], - ['hidden', false], - ['invisible', false], - ['remoteId', 'some_id'], - ['contentId', '68'], - ['parentId', '77'], - ['pathString', '/1/2/77/228/'], - ['depth', 3], - ['sortField', 1], - ['sortOrder', 1], - ]; + yield ['id', 228]; + yield ['priority', 1]; + yield ['hidden', false]; + yield ['invisible', false]; + yield ['remoteId', 'some_id']; + yield ['contentId', '68']; + yield ['parentId', '77']; + yield ['pathString', '/1/2/77/228/']; + yield ['depth', 3]; + yield ['sortField', 1]; + yield ['sortOrder', 1]; } /** * @depends testCreateLocation * * @dataProvider getCreateLocationReturnValues + * + * @throws \Doctrine\DBAL\Exception */ public function testCreateLocationReturnValues(string $field, int|bool|string $value): void { - if ($value === null) { - self::markTestIncomplete('Proper value setting yet unknown.'); - } - $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); $gateway = $this->getLocationGateway(); $location = $gateway->create( @@ -678,22 +819,24 @@ public function testCreateLocationReturnValues(string $field, int|bool|string $v ] ); - self::assertTrue($location instanceof Location); self::assertEquals($value, $location->$field); } - public static function getUpdateLocationData(): array + /** + * @return iterable + */ + public static function getUpdateLocationData(): iterable { - return [ - ['priority', 23], - ['remote_id', 'someNewHash'], - ['sort_field', 4], - ['sort_order', 4], - ]; + yield ['priority', 23]; + yield ['remote_id', 'someNewHash']; + yield ['sort_field', 4]; + yield ['sort_order', 4]; } /** * @dataProvider getUpdateLocationData + * + * @throws \Doctrine\DBAL\Exception */ public function testUpdateLocation(string $field, int|string $value): void { @@ -717,29 +860,37 @@ public function testUpdateLocation(string $field, int|string $value): void $query ->select($field) ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [70])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter([70], ArrayParameterType::INTEGER, ':' . self::NODE_IDS_PARAM_NAME) + ) + ) ); } - public static function getNodeAssignmentValues(): array + /** + * @return iterable}> + */ + public static function getNodeAssignmentValues(): iterable { - return [ - ['contentobject_version', [1]], - ['from_node_id', [0]], - ['id', [215]], - ['is_main', [0]], - ['op_code', [3]], - ['parent_node', [77]], - ['parent_remote_id', ['some_id']], - ['remote_id', ['0']], - ['sort_field', [2]], - ['sort_order', [0]], - ['is_main', [0]], - ['priority', [1]], - ['is_hidden', [1]], - ]; + yield ['contentobject_version', [1]]; + yield ['from_node_id', [0]]; + yield ['id', [215]]; + yield ['is_main', [0]]; + yield ['op_code', [3]]; + yield ['parent_node', [77]]; + yield ['parent_remote_id', ['some_id']]; + yield ['remote_id', ['0']]; + yield ['sort_field', [2]]; + yield ['sort_order', [0]]; + yield ['priority', [1]]; + yield ['is_hidden', [1]]; } + /** + * @param string[] $fields + */ private function buildGenericNodeSelectContentWithParentQuery( int $contentId, int $parentLocationId, @@ -750,7 +901,7 @@ private function buildGenericNodeSelectContentWithParentQuery( $query = $this->getDatabaseConnection()->createQueryBuilder(); $expr = $query->expr(); $query - ->select($fields) + ->select(...$fields) ->from($nodeTable) ->where( $expr->eq( @@ -768,6 +919,9 @@ private function buildGenericNodeSelectContentWithParentQuery( return $query; } + /** + * @param string[] $fields + */ private function buildNodeAssignmentSelectContentWithParentQuery( int $contentId, int $parentLocationId, @@ -782,6 +936,9 @@ private function buildNodeAssignmentSelectContentWithParentQuery( ); } + /** + * @param string[] $fields + */ private function buildContentTreeSelectContentWithParentQuery( int $contentId, int $parentLocationId, @@ -802,7 +959,7 @@ private function buildContentTreeSelectContentWithParentQuery( * @dataProvider getNodeAssignmentValues * * @param string $field - * @param array $expectedResult + * @param array $expectedResult */ public function testCreateLocationNodeAssignmentCreation(string $field, array $expectedResult): void { @@ -822,7 +979,7 @@ public function testCreateLocationNodeAssignmentCreation(string $field, array $e ] ), 77, - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); self::assertQueryResult( @@ -850,8 +1007,8 @@ public function testCreateLocationNodeAssignmentCreationMainLocation(): void 'sortOrder' => 1, ] ), - '77', - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + 77, + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); self::assertQueryResult( @@ -860,6 +1017,9 @@ public function testCreateLocationNodeAssignmentCreationMainLocation(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateLocationsContentVersionNo(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -900,6 +1060,9 @@ public function testUpdateLocationsContentVersionNo(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteNodeAssignment(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -919,6 +1082,9 @@ public function testDeleteNodeAssignment(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteNodeAssignmentWithSecondArgument(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -931,8 +1097,8 @@ public function testDeleteNodeAssignmentWithSecondArgument(): void ->where( $query->expr()->eq('contentobject_id', 11) ); - $statement = $query->execute(); - $nodeAssignmentsCount = (int)$statement->fetchColumn(); + $statement = $query->executeQuery(); + $nodeAssignmentsCount = (int)$statement->fetchOne(); $gateway->deleteNodeAssignment(11, 1); @@ -948,25 +1114,26 @@ public function testDeleteNodeAssignmentWithSecondArgument(): void ); } - public static function getConvertNodeAssignmentsLocationValues(): array + /** + * @return iterable + */ + public static function getConvertNodeAssignmentsLocationValues(): iterable { - return [ - ['contentobject_id', '68'], - ['contentobject_is_published', '1'], - ['contentobject_version', '1'], - ['depth', '3'], - ['is_hidden', '1'], - ['is_invisible', '1'], - ['main_node_id', '70'], - ['modified_subnode', time()], - ['node_id', '228'], - ['parent_node_id', '77'], - ['path_string', '/1/2/77/228/'], - ['priority', '101'], - ['remote_id', 'some_id'], - ['sort_field', '1'], - ['sort_order', '1'], - ]; + yield ['contentobject_id', '68']; + yield ['contentobject_is_published', '1']; + yield ['contentobject_version', '1']; + yield ['depth', '3']; + yield ['is_hidden', '1']; + yield ['is_invisible', '1']; + yield ['main_node_id', '70']; + yield ['modified_subnode', time()]; + yield ['node_id', '228']; + yield ['parent_node_id', '77']; + yield ['path_string', '/1/2/77/228/']; + yield ['priority', '101']; + yield ['remote_id', 'some_id']; + yield ['sort_field', '1']; + yield ['sort_order', '1']; } /** @@ -975,6 +1142,7 @@ public static function getConvertNodeAssignmentsLocationValues(): array * @dataProvider getConvertNodeAssignmentsLocationValues * * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testConvertNodeAssignments(string $field, string|int $value): void { @@ -997,8 +1165,8 @@ public function testConvertNodeAssignments(string $field, string|int $value): vo 'invisible' => false, ] ), - '77', - DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE + 77, + Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); @@ -1034,6 +1202,9 @@ public function testConvertNodeAssignments(string $field, string|int $value): vo /** * @depends testCreateLocationNodeAssignmentCreation + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testConvertNodeAssignmentsMainLocation(): void { @@ -1070,6 +1241,9 @@ public function testConvertNodeAssignmentsMainLocation(): void /** * @depends testCreateLocationNodeAssignmentCreation + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testConvertNodeAssignmentsParentHidden(): void { @@ -1110,6 +1284,9 @@ public function testConvertNodeAssignmentsParentHidden(): void /** * @depends testCreateLocationNodeAssignmentCreation + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testConvertNodeAssignmentsParentInvisible(): void { @@ -1150,6 +1327,9 @@ public function testConvertNodeAssignmentsParentInvisible(): void /** * @depends testCreateLocationNodeAssignmentCreation + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testConvertNodeAssignmentsUpdateAssignment(): void { @@ -1168,20 +1348,22 @@ public function testConvertNodeAssignmentsUpdateAssignment(): void 'sortOrder' => 1, ] ), - '77', + 77, Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE ); $gateway->createLocationsFromNodeAssignments(68, 1); self::assertQueryResult( - [[DoctrineDatabase::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP]], + [[Gateway::NODE_ASSIGNMENT_OP_CODE_CREATE_NOP]], $this->buildNodeAssignmentSelectContentWithParentQuery(68, 77, ['op_code']) ); } /** * Test for the setSectionForSubtree() method. + * + * @throws \Doctrine\DBAL\Exception */ public function testSetSectionForSubtree(): void { @@ -1231,12 +1413,10 @@ public function testChangeMainLocation(): void ParameterType::INTEGER ), 'path_string' => $query->createPositionalParameter( - '/1/5/13/228/', - ParameterType::STRING + '/1/5/13/228/' ), 'remote_id' => $query->createPositionalParameter( - 'asdfg123437', - ParameterType::STRING + 'asdfg123437' ), ] ); @@ -1259,8 +1439,7 @@ public function testChangeMainLocation(): void 'is_main' => $query->createPositionalParameter(0, ParameterType::INTEGER), 'parent_node' => $query->createPositionalParameter(227, ParameterType::INTEGER), 'parent_remote_id' => $query->createPositionalParameter( - '5238a276bf8231fbcf8a986cdc82a6a5', - ParameterType::STRING + '5238a276bf8231fbcf8a986cdc82a6a5' ), ] ); @@ -1340,6 +1519,8 @@ public function testChangeMainLocation(): void /** * Test for the getChildren() method. + * + * @throws \Doctrine\DBAL\Exception */ public function testGetChildren(): void { @@ -1383,16 +1564,14 @@ public function testGetFallbackMainNodeData(): void ParameterType::INTEGER ), 'path_string' => $query->createPositionalParameter( - '/1/5/13/228/', - ParameterType::STRING + '/1/5/13/228/' ), 'remote_id' => $query->createPositionalParameter( - 'asdfg123437', - ParameterType::STRING + 'asdfg123437' ), ] ); - $query->execute(); + $query->executeStatement(); $gateway = $this->getLocationGateway(); $data = $gateway->getFallbackMainNodeData(12, 13); @@ -1404,6 +1583,9 @@ public function testGetFallbackMainNodeData(): void /** * Test for the removeLocation() method. + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testRemoveLocation(): void { @@ -1415,24 +1597,25 @@ public function testRemoveLocation(): void try { $gateway->getBasicNodeData(13); self::fail('Location was not deleted!'); - } catch (NotFoundException $e) { + } catch (NotFoundException) { // Do nothing } } - public function providerForTestUpdatePathIdentificationString(): array + /** + * @return iterable + */ + public static function providerForTestUpdatePathIdentificationString(): iterable { - return [ - [77, 2, 'new_solutions', 'new_solutions'], - [75, 69, 'stylesheets', 'products/stylesheets'], - ]; + yield [77, 2, 'new_solutions', 'new_solutions']; + yield [75, 69, 'stylesheets', 'products/stylesheets']; } /** - * Test for the updatePathIdentificationString() method. - * - * * @dataProvider providerForTestUpdatePathIdentificationString + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testUpdatePathIdentificationString( int $locationId, diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php index 15f194686a..3f699f7dd8 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php @@ -7,6 +7,7 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Values\Content\Query; @@ -19,9 +20,9 @@ */ class DoctrineDatabaseTrashTest extends LanguageAwareTestCase { - /** - * @throws \Doctrine\DBAL\Exception - */ + private const string PATH_STRING_OF_LOCATION_TO_BE_TRASHED = '/1/2/69/70/71/'; + private const string PATH_STRING_OF_TRASHED_LOCATION = '/1/2/69/'; + protected function getLocationGateway(): DoctrineDatabase { return new DoctrineDatabase( @@ -33,6 +34,9 @@ protected function getLocationGateway(): DoctrineDatabase } /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * * @todo test updated content status */ public function testTrashLocation(): void @@ -52,10 +56,23 @@ public function testTrashLocation(): void $query ->select('node_id', 'priority') ->from('ezcontentobject_tree') - ->where($query->expr()->in('node_id', [1, 2, 69, 70, 71])) + ->where( + $query->expr()->in( + 'node_id', + $query->createNamedParameter( + [1, 2, 69, 70, 71], + ArrayParameterType::INTEGER, + ':node_ids' + ) + ) + ) ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testTrashLocationUpdateTrashTable(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -65,7 +82,7 @@ public function testTrashLocationUpdateTrashTable(): void $query = $this->getDatabaseConnection()->createQueryBuilder(); self::assertQueryResult( [ - [71, '/1/2/69/70/71/'], + [71, self::PATH_STRING_OF_LOCATION_TO_BE_TRASHED], ], $query ->select('node_id', 'path_string') @@ -73,6 +90,9 @@ public function testTrashLocationUpdateTrashTable(): void ); } + /** + * @phpstan-return list + */ public static function getUntrashedLocationValues(): array { return [ @@ -95,6 +115,9 @@ public static function getUntrashedLocationValues(): array /** * @dataProvider getUntrashedLocationValues + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testUntrashLocationDefault(string $property, int|string $value): void { @@ -110,10 +133,23 @@ public function testUntrashLocationDefault(string $property, int|string $value): $query ->select($property) ->from('ezcontentobject_tree') - ->where($query->expr()->in('contentobject_id', [69])) + ->where( + $query->expr()->in( + 'contentobject_id', + $query->createNamedParameter( + [69], + ArrayParameterType::INTEGER, + ':contentobject_ids' + ) + ) + ) ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testUntrashLocationNewParent(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -128,10 +164,22 @@ public function testUntrashLocationNewParent(): void $query ->select('node_id', 'parent_node_id', 'path_string') ->from('ezcontentobject_tree') - ->where($query->expr()->in('contentobject_id', [69])) + ->where( + $query->expr()->in( + 'contentobject_id', + $query->createNamedParameter( + [69], + ArrayParameterType::INTEGER, + ':contentobject_ids' + ) + ) + ) ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUntrashInvalidLocation(): void { $this->expectException(NotFoundException::class); @@ -142,6 +190,9 @@ public function testUntrashInvalidLocation(): void $handler->untrashLocation(23); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUntrashLocationInvalidParent(): void { $this->expectException(NotFoundException::class); @@ -153,6 +204,9 @@ public function testUntrashLocationInvalidParent(): void $handler->untrashLocation(71, 1337); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUntrashLocationInvalidOldParent(): void { $this->expectException(NotFoundException::class); @@ -166,6 +220,9 @@ public function testUntrashLocationInvalidOldParent(): void $handler->untrashLocation(71); } + /** + * @phpstan-return list + */ public static function getLoadTrashValues(): array { return [ @@ -177,7 +234,7 @@ public static function getLoadTrashValues(): array ['contentobject_id', 69], ['parent_node_id', 70], ['path_identification_string', 'products/software/os_type_i'], - ['path_string', '/1/2/69/70/71/'], + ['path_string', self::PATH_STRING_OF_LOCATION_TO_BE_TRASHED], ['modified_subnode', 1311065013], ['main_node_id', 71], ['depth', 4], @@ -188,6 +245,9 @@ public static function getLoadTrashValues(): array /** * @dataProvider getLoadTrashValues + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testLoadTrashByLocationId(string $field, int|string $value): void { @@ -204,6 +264,11 @@ public function testLoadTrashByLocationId(string $field, int|string $value): voi ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testCountTrashed(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -222,6 +287,10 @@ public function testCountTrashed(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testListEmptyTrash(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -233,7 +302,11 @@ public function testListEmptyTrash(): void ); } - protected function trashSubtree() + /** + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ + protected function trashSubtree(): void { $handler = $this->getLocationGateway(); $handler->trashLocation(69); @@ -246,6 +319,11 @@ protected function trashSubtree() $handler->trashLocation(76); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testListFullTrash(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -258,6 +336,11 @@ public function testListFullTrash(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testListTrashLimited(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -270,6 +353,9 @@ public function testListTrashLimited(): void ); } + /** + * @phpstan-return list + */ public static function getTrashValues(): array { return [ @@ -283,7 +369,7 @@ public static function getTrashValues(): array ['node_id', 69], ['parent_node_id', 2], ['path_identification_string', 'products'], - ['path_string', '/1/2/69/'], + ['path_string', self::PATH_STRING_OF_TRASHED_LOCATION], ['priority', 0], ['remote_id', '9cec85d730eec7578190ee95ce5a36f5'], ['sort_field', 2], @@ -293,6 +379,10 @@ public static function getTrashValues(): array /** * @dataProvider getTrashValues + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ public function testListTrashItem(string $key, int|string $value): void { @@ -304,6 +394,11 @@ public function testListTrashItem(string $key, int|string $value): void self::assertEquals($value, $trashList[0][$key]); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testListTrashSortedPathStringDesc(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -317,9 +412,9 @@ public function testListTrashSortedPathStringDesc(): void '/1/2/69/72/74/', '/1/2/69/72/73/', '/1/2/69/72/', - '/1/2/69/70/71/', + self::PATH_STRING_OF_LOCATION_TO_BE_TRASHED, '/1/2/69/70/', - '/1/2/69/', + self::PATH_STRING_OF_TRASHED_LOCATION, ], array_map( static function (array $trashItem) { @@ -336,6 +431,11 @@ static function (array $trashItem) { ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testListTrashSortedDepth(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -344,14 +444,14 @@ public function testListTrashSortedDepth(): void self::assertEquals( [ - '/1/2/69/', + self::PATH_STRING_OF_TRASHED_LOCATION, '/1/2/69/76/', '/1/2/69/72/', '/1/2/69/70/', '/1/2/69/72/75/', '/1/2/69/72/74/', '/1/2/69/72/73/', - '/1/2/69/70/71/', + self::PATH_STRING_OF_LOCATION_TO_BE_TRASHED, ], array_map( static function (array $trashItem) { @@ -369,6 +469,10 @@ static function (array $trashItem) { ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testCleanupTrash(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -385,6 +489,10 @@ public function testCleanupTrash(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testRemoveElementFromTrash(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -402,6 +510,9 @@ public function testRemoveElementFromTrash(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountLocationsByContentId(): void { $this->insertDatabaseFixture(self::FIXTURE_PATH_FULL_EXAMPLE_TREE); @@ -433,12 +544,11 @@ public function testCountLocationsByContentId(): void ParameterType::INTEGER ), 'remote_id' => $query->createPositionalParameter( - 'some_remote_id', - ParameterType::STRING + 'some_remote_id' ), ] ); - $query->execute(); + $query->executeStatement(); self::assertSame(2, $handler->countLocationsByContentId(67)); } } diff --git a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php index 51b399681a..88586446e5 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php @@ -7,6 +7,7 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Content\Type\Gateway; +use Ibexa\Contracts\Core\Persistence\Content\FieldValue as PersistenceValue; use Ibexa\Contracts\Core\Persistence\Content\Location; use Ibexa\Contracts\Core\Persistence\Content\Type; // For SORT_ORDER_* constants @@ -23,6 +24,10 @@ */ class DoctrineDatabaseTest extends LanguageAwareTestCase { + private const string EXISTING_TYPES_FIXTURE_PATH = __DIR__ . '/_fixtures/existing_types.php'; + private const string EXISTING_GROUPS_FIXTURE_PATH = __DIR__ . '/_fixtures/existing_groups.php'; + private const string COUNT_ALL_SQL_EXPRESSION = 'COUNT( * )'; + /** * The DoctrineDatabase gateway to test. */ @@ -96,10 +101,13 @@ protected function getGroupFixture(): Group return $group; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateGroup(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -113,7 +121,7 @@ public function testUpdateGroup(): void ['4'], ], $this->getDatabaseConnection()->createQueryBuilder() - ->select('COUNT(*)') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclassgroup') ); @@ -193,10 +201,13 @@ protected function getGroupUpdateStructFixture(): UpdateStruct return $struct; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountTypesInGroup(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -211,10 +222,13 @@ public function testCountTypesInGroup(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountGroupsForType(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -229,10 +243,13 @@ public function testCountGroupsForType(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteGroup(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -251,10 +268,13 @@ public function testDeleteGroup(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadGroupData(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -276,10 +296,13 @@ public function testLoadGroupData(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadGroupDataByIdentifier(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -301,10 +324,13 @@ public function testLoadGroupDataByIdentifier(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadAllGroupsData(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -329,10 +355,13 @@ public function testLoadAllGroupsData(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadTypesDataForGroup(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -344,10 +373,13 @@ public function testLoadTypesDataForGroup(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadTypeData(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -361,21 +393,15 @@ public function testLoadTypeData(): void 50, $rows[0] ); - - /* - * Store mapper fixture - * - file_put_contents( - dirname( __DIR__ ) . '/_fixtures/map_load_type.php', - "insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -391,10 +417,13 @@ public function testLoadTypeDataByIdentifier(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadTypeDataByRemoteId(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -413,33 +442,34 @@ public function testLoadTypeDataByRemoteId(): void /** * Returns the expected data from creating a type. * - * @return string[][] + * @return iterable */ - public static function getTypeCreationExpectations(): array + public static function getTypeCreationExpectations(): iterable { - return [ - ['always_available', 0], - ['contentobject_name', ''], - ['created', '1024392098'], - ['creator_id', '14'], - ['identifier', 'folder'], - ['initial_language_id', '2'], - ['is_container', '1'], - ['language_mask', 7], - ['modified', '1082454875'], - ['modifier_id', '14'], - ['remote_id', 'a3d405b81be900468eb153d774f4f0d2'], - ['serialized_description_list', 'a:2:{i:0;s:0:"";s:16:"always-available";b:0;}'], - ['serialized_name_list', 'a:3:{s:16:"always-available";s:6:"eng-US";s:6:"eng-US";s:6:"Folder";s:6:"eng-GB";s:11:"Folder (GB)";}'], - ['sort_field', 7], - ['sort_order', 1], - ['url_alias_name', ''], - ['version', '0'], - ]; + yield ['always_available', 0]; + yield ['contentobject_name', '']; + yield ['created', '1024392098']; + yield ['creator_id', '14']; + yield ['identifier', 'folder']; + yield ['initial_language_id', '2']; + yield ['is_container', '1']; + yield ['language_mask', 7]; + yield ['modified', '1082454875']; + yield ['modifier_id', '14']; + yield ['remote_id', 'a3d405b81be900468eb153d774f4f0d2']; + yield ['serialized_description_list', 'a:2:{i:0;s:0:"";s:16:"always-available";b:0;}']; + yield ['serialized_name_list', 'a:3:{s:16:"always-available";s:6:"eng-US";s:6:"eng-US";s:6:"Folder";s:6:"eng-GB";s:11:"Folder (GB)";}']; + yield ['sort_field', 7]; + yield ['sort_order', 1]; + yield ['url_alias_name', '']; + yield ['version', '0']; } /** * @dataProvider getTypeCreationExpectations + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testInsertType(string $column, int|string $expectation): void { @@ -460,20 +490,23 @@ public function testInsertType(string $column, int|string $expectation): void /** * Returns the data expected to be inserted in ezcontentclass_name. * - * @return string[][] + * @return iterable}> */ - public static function getTypeCreationContentClassNameExpectations(): array + public static function getTypeCreationContentClassNameExpectations(): iterable { - return [ - ['contentclass_version', [0, 0]], - ['language_id', [3, 4]], - ['language_locale', ['eng-US', 'eng-GB']], - ['name', ['Folder', 'Folder (GB)']], - ]; + yield ['contentclass_version', [0, 0]]; + yield ['language_id', [3, 4]]; + yield ['language_locale', ['eng-US', 'eng-GB']]; + yield ['name', ['Folder', 'Folder (GB)']]; } /** * @dataProvider getTypeCreationContentClassNameExpectations + * + * @param array $expectation + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ public function testInsertTypeContentClassName(string $column, array $expectation): void { @@ -504,7 +537,6 @@ static function ($value): array { protected function getTypeFixture(): Type { $type = new Type(); - $type->status = 0; $type->name = [ 'always-available' => 'eng-US', @@ -535,6 +567,9 @@ protected function getTypeFixture(): Type return $type; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testInsertFieldDefinition(): void { $gateway = $this->getGateway(); @@ -633,7 +668,8 @@ protected function getFieldDefinitionFixture(): FieldDefinition $field->isRequired = true; $field->isInfoCollector = true; // $field->fieldTypeConstraints ??? - $field->defaultValue = [ + $field->defaultValue = new PersistenceValue(); + $field->defaultValue->data = [ 0 => '', 'always-available' => false, ]; @@ -673,10 +709,13 @@ protected function getStorageFieldDefinitionFixture(): StorageFieldDefinition return $fieldDef; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteFieldDefinition(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -686,15 +725,18 @@ public function testDeleteFieldDefinition(): void self::assertQueryResult( [[5]], $this->getDatabaseConnection()->createQueryBuilder() - ->select('COUNT(*)') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_attribute') ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateFieldDefinition(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $fieldDefinitionFixture = $this->getFieldDefinitionFixture(); $fieldDefinitionFixture->id = 160; @@ -763,10 +805,14 @@ public function testUpdateFieldDefinition(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testInsertGroupAssignment(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_groups.php' + self::EXISTING_GROUPS_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -792,10 +838,13 @@ public function testInsertGroupAssignment(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteGroupAssignment(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -806,7 +855,7 @@ public function testDeleteGroupAssignment(): void [['1']], $this->getDatabaseConnection()->createQueryBuilder() ->select( - 'COUNT(*)' + self::COUNT_ALL_SQL_EXPRESSION )->from('ezcontentclass_classgroup') ->where('contentclass_id = 1') ); @@ -814,11 +863,14 @@ public function testDeleteGroupAssignment(): void /** * @dataProvider getTypeUpdateExpectations + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testUpdateType(string $fieldName, string $expectedValue): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -838,14 +890,18 @@ public function testUpdateType(string $fieldName, string $expectedValue): void $fieldName )->from('ezcontentclass') ->where('id = 1 AND version = 0'), - "Incorrect value stored for '{$fieldName}'." + "Incorrect value stored for '$fieldName'." ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateTypeName(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -935,6 +991,9 @@ protected function getUpdateTypeFixture(): Type return $type; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountInstancesOfTypeExist(): void { $this->insertDatabaseFixture( @@ -943,7 +1002,7 @@ public function testCountInstancesOfTypeExist(): void ); $gateway = $this->getGateway(); - $res = $gateway->countInstancesOfType(3, 0); + $res = $gateway->countInstancesOfType(3); self::assertEquals( 6, @@ -951,6 +1010,9 @@ public function testCountInstancesOfTypeExist(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountInstancesOfTypeNotExist(): void { $this->insertDatabaseFixture( @@ -959,7 +1021,7 @@ public function testCountInstancesOfTypeNotExist(): void ); $gateway = $this->getGateway(); - $res = $gateway->countInstancesOfType(23422342, 1); + $res = $gateway->countInstancesOfType(23422342); self::assertEquals( 0, @@ -967,10 +1029,13 @@ public function testCountInstancesOfTypeNotExist(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteFieldDefinitionsForTypeExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -979,7 +1044,7 @@ public function testDeleteFieldDefinitionsForTypeExisting(): void $countAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); $countAffectedAttr - ->select('COUNT(*)') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_attribute') ->where( $countAffectedAttr->expr()->eq( @@ -994,7 +1059,7 @@ public function testDeleteFieldDefinitionsForTypeExisting(): void ); $countNotAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countNotAffectedAttr->select('COUNT(*)') + $countNotAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_attribute'); self::assertQueryResult( @@ -1003,10 +1068,13 @@ public function testDeleteFieldDefinitionsForTypeExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteFieldDefinitionsForTypeNotExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -1014,7 +1082,7 @@ public function testDeleteFieldDefinitionsForTypeNotExisting(): void $gateway->deleteFieldDefinitionsForType(23, 1); $countNotAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countNotAffectedAttr->select('COUNT(*)') + $countNotAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_attribute'); self::assertQueryResult( @@ -1023,10 +1091,13 @@ public function testDeleteFieldDefinitionsForTypeNotExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteGroupAssignmentsForTypeExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -1034,7 +1105,7 @@ public function testDeleteGroupAssignmentsForTypeExisting(): void $gateway->deleteGroupAssignmentsForType(1, 0); $countAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countAffectedAttr->select('COUNT(*)') + $countAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_classgroup'); self::assertQueryResult( @@ -1043,10 +1114,13 @@ public function testDeleteGroupAssignmentsForTypeExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteGroupAssignmentsForTypeNotExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -1054,7 +1128,7 @@ public function testDeleteGroupAssignmentsForTypeNotExisting(): void $gateway->deleteType(23, 1); $countAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countAffectedAttr->select('COUNT(*)') + $countAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_classgroup'); self::assertQueryResult( @@ -1063,10 +1137,13 @@ public function testDeleteGroupAssignmentsForTypeNotExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteTypeExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -1074,7 +1151,7 @@ public function testDeleteTypeExisting(): void $gateway->deleteType(1, 0); $countAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countAffectedAttr->select('COUNT(*)') + $countAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass'); self::assertQueryResult( @@ -1083,10 +1160,13 @@ public function testDeleteTypeExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDeleteTypeNotExisting(): void { $this->insertDatabaseFixture( - __DIR__ . '/_fixtures/existing_types.php' + self::EXISTING_TYPES_FIXTURE_PATH ); $gateway = $this->getGateway(); @@ -1094,7 +1174,7 @@ public function testDeleteTypeNotExisting(): void $gateway->deleteType(23, 1); $countAffectedAttr = $this->getDatabaseConnection()->createQueryBuilder(); - $countAffectedAttr->select('COUNT(*)') + $countAffectedAttr->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass'); self::assertQueryResult( @@ -1103,6 +1183,9 @@ public function testDeleteTypeNotExisting(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testPublishTypeAndFields(): void { $this->insertDatabaseFixture( @@ -1115,7 +1198,7 @@ public function testPublishTypeAndFields(): void self::assertQueryResult( [[1]], $this->getDatabaseConnection()->createQueryBuilder() - ->select('COUNT( * )') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass') ->where('id = 1 AND version = 0') ); @@ -1123,7 +1206,7 @@ public function testPublishTypeAndFields(): void self::assertQueryResult( [[2]], $this->getDatabaseConnection()->createQueryBuilder() - ->select('COUNT( * )') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_classgroup') ->where('contentclass_id = 1 AND contentclass_version = 0') ); @@ -1131,7 +1214,7 @@ public function testPublishTypeAndFields(): void self::assertQueryResult( [[3]], $this->getDatabaseConnection()->createQueryBuilder() - ->select('COUNT( * )') + ->select(self::COUNT_ALL_SQL_EXPRESSION) ->from('ezcontentclass_attribute') ->where('contentclass_id = 1 AND version = 0') ); diff --git a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php index 5dde3b6cc8..0f7333eaea 100644 --- a/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php @@ -19,19 +19,9 @@ */ class DoctrineDatabaseTest extends TestCase { - /** - * Gateway mock. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway - */ - protected ?MockObject $gatewayMock = null; + protected Gateway & MockObject $gatewayMock; - /** - * Content Updater mock. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater - */ - protected ?MockObject $contentUpdaterMock = null; + protected ContentUpdater & MockObject $contentUpdaterMock; public function testUpdateContentObjects(): void { @@ -65,7 +55,7 @@ public function testDeleteOldType(): void $types = $this->getTypeFixtures(); - $handler->deleteOldType($types['from'], $types['to']); + $handler->deleteOldType($types['from']); } public function testPublishNewType(): void @@ -73,7 +63,6 @@ public function testPublishNewType(): void $handler = $this->getUpdateHandler(); $gatewayMock = $this->getGatewayMock(); - $updaterMock = $this->getContentUpdaterMock(); $gatewayMock->expects(self::once()) ->method('publishTypeAndFields') @@ -104,22 +93,12 @@ protected function getTypeFixtures(): array return $types; } - /** - * Returns the Update Handler to test. - * - * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Update\Handler\DoctrineDatabase - */ protected function getUpdateHandler(): DoctrineDatabase { return new DoctrineDatabase($this->getGatewayMock()); } - /** - * Returns a gateway mock. - * - * @return \Ibexa\Core\Persistence\Legacy\Content\Type\Gateway - */ - protected function getGatewayMock() + protected function getGatewayMock(): Gateway & MockObject { if (!isset($this->gatewayMock)) { $this->gatewayMock = $this->getMockForAbstractClass(Gateway::class); @@ -128,12 +107,7 @@ protected function getGatewayMock() return $this->gatewayMock; } - /** - * Returns a Content Updater mock. - * - * @return \Ibexa\Core\Persistence\Legacy\Content\Type\ContentUpdater - */ - protected function getContentUpdaterMock() + protected function getContentUpdaterMock(): ContentUpdater & MockObject { if (!isset($this->contentUpdaterMock)) { $this->contentUpdaterMock = $this->createMock(ContentUpdater::class); diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php index 1d5ee10edc..d9ed203a75 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php @@ -21,15 +21,14 @@ */ class DoctrineDatabaseTest extends TestCase { - /** - * Database gateway to test. - */ protected DoctrineDatabase $gateway; /** * Test for the loadUrlAliasData() method. + * + * @throws \Doctrine\DBAL\Exception */ - public function testLoadUrlaliasDataNonExistent(): void + public function testLoadUrlAliasDataNonExistent(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_simple.php'); $gateway = $this->getGateway(); @@ -41,8 +40,10 @@ public function testLoadUrlaliasDataNonExistent(): void /** * Test for the loadUrlAliasData() method. + * + * @throws \Doctrine\DBAL\Exception */ - public function testLoadUrlaliasData(): void + public function testLoadUrlAliasData(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_simple.php'); $gateway = $this->getGateway(); @@ -83,7 +84,7 @@ public function testLoadUrlaliasData(): void * * Test with fixture containing language mask with multiple languages. */ - public function testLoadUrlaliasDataMultipleLanguages(): void + public function testLoadUrlAliasDataMultipleLanguages(): void { $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_multilang.php'); $gateway = $this->getGateway(); @@ -120,56 +121,53 @@ public function testLoadUrlaliasDataMultipleLanguages(): void } /** - * @return array + * @phpstan-return iterable>>}> */ - public function providerForTestLoadPathData(): array + public function providerForTestLoadPathData(): iterable { - return [ + yield [ + 2, [ - 2, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], ], ], + ]; + yield [ + 3, [ - 3, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], - [ - ['parent' => '2', 'lang_mask' => '5', 'text' => 'two'], - ['parent' => '2', 'lang_mask' => '3', 'text' => 'dva'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], + ], + [ + ['parent' => '2', 'lang_mask' => '5', 'text' => 'two'], + ['parent' => '2', 'lang_mask' => '3', 'text' => 'dva'], ], ], + ]; + yield [ + 4, [ - 4, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], - [ - ['parent' => '2', 'lang_mask' => '5', 'text' => 'two'], - ['parent' => '2', 'lang_mask' => '3', 'text' => 'dva'], - ], - [ - ['parent' => '3', 'lang_mask' => '9', 'text' => 'drei'], - ['parent' => '3', 'lang_mask' => '5', 'text' => 'three'], - ['parent' => '3', 'lang_mask' => '3', 'text' => 'tri'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], + ], + [ + ['parent' => '2', 'lang_mask' => '5', 'text' => 'two'], + ['parent' => '2', 'lang_mask' => '3', 'text' => 'dva'], + ], + [ + ['parent' => '3', 'lang_mask' => '9', 'text' => 'drei'], + ['parent' => '3', 'lang_mask' => '5', 'text' => 'three'], + ['parent' => '3', 'lang_mask' => '3', 'text' => 'tri'], ], ], ]; } /** - * Test for the loadPathData() method. - * - * * @dataProvider providerForTestLoadPathData + * + * @phpstan-param list>> $pathData */ public function testLoadPathData(int $id, array $pathData): void { @@ -185,43 +183,43 @@ public function testLoadPathData(int $id, array $pathData): void } /** - * @return array + * @phpstan-return iterable>>}> */ - public function providerForTestLoadPathDataMultipleLanguages(): array + public static function providerForTestLoadPathDataMultipleLanguages(): iterable { - return [ + yield [ + 2, [ - 2, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], ], ], + ]; + + yield [ + 3, [ - 3, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], - [ - ['parent' => '2', 'lang_mask' => '6', 'text' => 'dva'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], + ], + [ + ['parent' => '2', 'lang_mask' => '6', 'text' => 'dva'], ], ], + ]; + + yield [ + 4, [ - 4, [ - [ - ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], - ], - [ - ['parent' => '2', 'lang_mask' => '6', 'text' => 'dva'], - ], - [ - ['parent' => '3', 'lang_mask' => '4', 'text' => 'three'], - ['parent' => '3', 'lang_mask' => '2', 'text' => 'tri'], - ], + ['parent' => '0', 'lang_mask' => '3', 'text' => 'jedan'], + ], + [ + ['parent' => '2', 'lang_mask' => '6', 'text' => 'dva'], + ], + [ + ['parent' => '3', 'lang_mask' => '4', 'text' => 'three'], + ['parent' => '3', 'lang_mask' => '2', 'text' => 'tri'], ], ], ]; @@ -230,8 +228,12 @@ public function providerForTestLoadPathDataMultipleLanguages(): array /** * Test for the loadPathData() method. * + * @phpstan-param list>> $pathData * * @dataProvider providerForTestLoadPathDataMultipleLanguages + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testLoadPathDataMultipleLanguages(int $id, array $pathData): void { diff --git a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php index 943d96a454..3c62f450be 100644 --- a/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php @@ -8,7 +8,6 @@ namespace Ibexa\Tests\Core\Persistence\Legacy\Notification\Gateway; -use Doctrine\DBAL\FetchMode; use Ibexa\Contracts\Core\Persistence\Notification\CreateStruct; use Ibexa\Contracts\Core\Persistence\Notification\Notification; use Ibexa\Core\Persistence\Legacy\Notification\Gateway\DoctrineDatabase; @@ -19,8 +18,10 @@ */ class DoctrineDatabaseTest extends TestCase { - public const EXISTING_NOTIFICATION_ID = 1; - public const EXISTING_NOTIFICATION_DATA = [ + public const int EXISTING_NOTIFICATION_ID = 1; + + /** @var array */ + public const array EXISTING_NOTIFICATION_DATA = [ 'id' => 1, 'owner_id' => 14, 'is_pending' => 1, @@ -38,6 +39,10 @@ protected function setUp(): void ); } + /** + * @throws \JsonException + * @throws \Doctrine\DBAL\Exception + */ public function testInsert(): void { $id = $this->getGateway()->insert(new CreateStruct([ @@ -60,6 +65,9 @@ public function testInsert(): void ], $data); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testGetNotificationById(): void { $data = $this->getGateway()->getNotificationById(self::EXISTING_NOTIFICATION_ID); @@ -69,6 +77,10 @@ public function testGetNotificationById(): void ], $data); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateNotification(): void { $notification = new Notification([ @@ -92,6 +104,9 @@ public function testUpdateNotification(): void ], $this->loadNotification(self::EXISTING_NOTIFICATION_ID)); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountUserNotifications(): void { self::assertEquals(5, $this->getGateway()->countUserNotifications( @@ -99,6 +114,9 @@ public function testCountUserNotifications(): void )); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testCountUserPendingNotifications(): void { self::assertEquals( @@ -109,6 +127,9 @@ public function testCountUserPendingNotifications(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadUserNotifications(): void { $userId = 14; @@ -145,6 +166,9 @@ public function testLoadUserNotifications(): void ], $results); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testDelete(): void { $this->getGateway()->delete(self::EXISTING_NOTIFICATION_ID); @@ -164,11 +188,16 @@ protected function getGateway(): DoctrineDatabase ); } + /** + * @return array + * + * @throws \Doctrine\DBAL\Exception + */ private function loadNotification(int $id): array { $data = $this->connection ->executeQuery('SELECT * FROM eznotification WHERE id = :id', ['id' => $id]) - ->fetch(FetchMode::ASSOCIATIVE); + ->fetchAssociative(); return is_array($data) ? $data : []; } diff --git a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php index 4989906794..7cff092afe 100644 --- a/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php @@ -19,13 +19,20 @@ */ class DoctrineDatabaseTest extends TestCase { + private DoctrineDatabase $gateway; + /** - * Database gateway to test. + * @var array */ - private ?DoctrineDatabase $gateway = null; - - /** @var array[] */ - private $fixtureData; + private array $fixtureData; protected function setUp(): void { @@ -37,6 +44,9 @@ protected function setUp(): void $this->initGateway(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadUrlData(): void { $row = $this->gateway->loadUrlData(23); @@ -47,6 +57,9 @@ public function testLoadUrlData(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testLoadUrlDataByUrl(): void { $rows = $this->gateway->loadUrlDataByUrl('https://doc.ibexa.co/display/USER/'); @@ -57,6 +70,11 @@ public function testLoadUrlDataByUrl(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testFind(): void { $criterion = new MatchAllCriterion(); @@ -71,6 +89,11 @@ public function testFind(): void ); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Doctrine\DBAL\Exception + */ public function testFindWithDisabledCounting(): void { $criterion = new MatchAllCriterion(); diff --git a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php index 79aee4ffd6..3e5a198fd2 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php @@ -13,14 +13,17 @@ use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway; use Ibexa\Core\Persistence\Legacy\UserPreference\Gateway\DoctrineDatabase; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; +use LogicException; /** * @covers \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway */ class DoctrineDatabaseTest extends TestCase { - public const EXISTING_USER_PREFERENCE_ID = 1; - public const EXISTING_USER_PREFERENCE_DATA = [ + public const int EXISTING_USER_PREFERENCE_ID = 1; + + /** @var array */ + public const array EXISTING_USER_PREFERENCE_DATA = [ 'id' => 1, 'user_id' => 14, 'name' => 'timezone', @@ -36,6 +39,9 @@ protected function setUp(): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testInsert(): void { $id = $this->getGateway()->setUserPreference(new UserPreferenceSetStruct([ @@ -54,6 +60,9 @@ public function testInsert(): void ], $data); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function testUpdateUserPreference(): void { $userPreference = new UserPreferenceSetStruct([ @@ -116,9 +125,9 @@ protected function getGateway(): Gateway } /** - * @param int $id + * @return array * - * @return array + * @throws \Doctrine\DBAL\Exception */ private function loadUserPreference(int $id): array { @@ -132,8 +141,11 @@ private function loadUserPreference(int $id): array $queryBuilder->createPositionalParameter($id, ParameterType::INTEGER) ) ); - $result = $queryBuilder->executeQuery()->fetchAllAssociative(); + $result = $queryBuilder->executeQuery()->fetchAssociative(); + if (false === $result) { + throw new LogicException("Unable to find user preference of id = $id"); + } - return reset($result); + return $result; } } From d33b20245742fc8292ce710361f879ac68791220 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 13:41:04 +0200 Subject: [PATCH 044/185] IBX-9727: [PHPDoc] Fixed array shapes for name and description content type persistence value --- src/contracts/Persistence/Content/Type.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/contracts/Persistence/Content/Type.php b/src/contracts/Persistence/Content/Type.php index 1a4e9eb447..d6e5281c73 100644 --- a/src/contracts/Persistence/Content/Type.php +++ b/src/contracts/Persistence/Content/Type.php @@ -38,26 +38,26 @@ class Type extends ValueObject public $status = self::STATUS_DRAFT; /** - * Human readable name of the content type. + * Human-readable name of the content type. * * The structure of this field is: - * - * array( 'eng' => '', 'de' => '' ); - * + * ``` + * [ 'eng' => '', 'de' => '' ]; + * ``` * - * @var string[] + * @var array */ public $name; /** - * Human readable description of the content type. + * Human-readable description of the content type. * * The structure of this field is: - * - * array( 'eng' => '', 'de' => '' ); - * + * ``` + * [ 'eng' => '', 'de' => '' ] + * ``` * - * @var string[] + * @var array */ public $description = []; From 06e4529a8bb006a53a00f955f3563b481bb09bb2 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 15:20:50 +0200 Subject: [PATCH 045/185] IBX-9811: Upgraded Binary files Doctrine storage gateways to doctrine/dbal v3 and improved code quality --- .../BinaryBase/BinaryBaseStorage/Gateway.php | 32 ++-- .../Gateway/DoctrineStorage.php | 163 ++++++------------ .../Gateway/DoctrineStorage.php | 22 +-- .../MediaStorage/Gateway/DoctrineStorage.php | 82 ++++----- src/lib/IO/IOMetadataHandler.php | 37 ++-- 5 files changed, 117 insertions(+), 219 deletions(-) diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php index 9ad9dd9988..57e973f1b3 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php @@ -19,50 +19,42 @@ abstract class Gateway extends StorageGateway * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - abstract public function storeFileReference(VersionInfo $versionInfo, Field $field); + abstract public function storeFileReference(VersionInfo $versionInfo, Field $field): bool; /** * Returns the file reference data for the given $fieldId in $versionNo. * - * @param mixed $fieldId - * @param int $versionNo - * - * @return array|void + * @return array|null */ - abstract public function getFileReferenceData($fieldId, $versionNo); + abstract public function getFileReferenceData(int $fieldId, int $versionNo): ?array; /** * Removes all file references for the given $fieldIds. * - * @param array $fieldIds - * @param int $versionNo + * @param int[] $fieldIds */ - abstract public function removeFileReferences(array $fieldIds, $versionNo); + abstract public function removeFileReferences(array $fieldIds, int $versionNo): void; /** * Removes a specific file reference for $fieldId and $versionId. - * - * @param mixed $fieldId - * @param int $versionNo */ - abstract public function removeFileReference($fieldId, $versionNo); + abstract public function removeFileReference(int $fieldId, int $versionNo): void; /** * Returns a map of files referenced by the given $fieldIds. * - * @param array $fieldIds - * @param int $versionNo + * @param int[] $fieldIds * - * @return array + * @phpstan-return list */ - abstract public function getReferencedFiles(array $fieldIds, $versionNo); + abstract public function getReferencedFiles(array $fieldIds, int $versionNo): array; /** * Returns a map with the number of references each file from $files has. * - * @param array $files + * @param string[] $files file paths * - * @return array + * @return array */ - abstract public function countFileReferences(array $files); + abstract public function countFileReferences(array $files): array; } diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index 3c8d645b15..f5b51212f5 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -20,12 +20,12 @@ */ abstract class DoctrineStorage extends Gateway { - private const string FIELD_ID_PARAM_NAME = ':fieldId'; - private const string FILENAME_PARAM_NAME = ':filename'; - private const string MIME_TYPE_PARAM_NAME = ':mimeType'; - private const string ORIGINAL_FILENAME_PARAM_NAME = ':originalFilename'; - private const string VERSION_NO_PARAM_NAME = ':versionNo'; - private const string FIELD_ID_LIST_PARAMETER_NAME = ':fieldIds'; + private const string FIELD_ID_PARAM_NAME = 'fieldId'; + private const string FILENAME_PARAM_NAME = 'filename'; + private const string MIME_TYPE_PARAM_NAME = 'mimeType'; + private const string ORIGINAL_FILENAME_PARAM_NAME = 'originalFilename'; + private const string VERSION_NO_PARAM_NAME = 'versionNo'; + private const string FIELD_ID_LIST_PARAMETER_NAME = 'fieldIds'; protected Connection $connection; @@ -36,17 +36,15 @@ public function __construct(Connection $connection) /** * Return the table name to store data in. - * - * @return string */ - abstract protected function getStorageTable(); + abstract protected function getStorageTable(): string; /** * Return a column to property mapping for the storage table. * - * @return array + * @phpstan-return array */ - protected function getPropertyMapping() + protected function getPropertyMapping(): array { return [ 'filename' => [ @@ -70,12 +68,8 @@ protected function getPropertyMapping() * This method is intended to be overwritten by derived classes in order to * add additional columns to be fetched from the database. Please do not * forget to call the parent when overwriting this method. - * - * @param \Doctrine\DBAL\Query\QueryBuilder $queryBuilder - * @param int $fieldId - * @param int $versionNo */ - protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versionNo) + protected function setFetchColumns(QueryBuilder $queryBuilder, int $fieldId, int $versionNo): void { $queryBuilder->select( $this->connection->quoteIdentifier('filename'), @@ -90,19 +84,15 @@ protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versio * This method is intended to be overwritten by derived classes in order to * add additional columns to be set in the database. Please do not forget * to call the parent when overwriting this method. - * - * @param \Doctrine\DBAL\Query\QueryBuilder $queryBuilder - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) + protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field): void { $queryBuilder - ->setValue('contentobject_attribute_id', self::FIELD_ID_PARAM_NAME) - ->setValue('filename', self::FILENAME_PARAM_NAME) - ->setValue('mime_type', self::MIME_TYPE_PARAM_NAME) - ->setValue('original_filename', self::ORIGINAL_FILENAME_PARAM_NAME) - ->setValue('version', self::VERSION_NO_PARAM_NAME) + ->setValue('contentobject_attribute_id', ':' . self::FIELD_ID_PARAM_NAME) + ->setValue('filename', ':' . self::FILENAME_PARAM_NAME) + ->setValue('mime_type', ':' . self::MIME_TYPE_PARAM_NAME) + ->setValue('original_filename', ':' . self::ORIGINAL_FILENAME_PARAM_NAME) + ->setValue('version', ':' . self::VERSION_NO_PARAM_NAME) ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) ->setParameter(self::FILENAME_PARAM_NAME, $this->removeMimeFromPath($field->value->externalData['id'])) ->setParameter(self::MIME_TYPE_PARAM_NAME, $field->value->externalData['mimeType']) @@ -116,14 +106,14 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) + protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field): void { $queryBuilder - ->set('contentobject_attribute_id', self::FIELD_ID_PARAM_NAME) - ->set('filename', self::FILENAME_PARAM_NAME) - ->set('mime_type', self::MIME_TYPE_PARAM_NAME) - ->set('original_filename', self::ORIGINAL_FILENAME_PARAM_NAME) - ->set('version', self::VERSION_NO_PARAM_NAME) + ->set('contentobject_attribute_id', ':' . self::FIELD_ID_PARAM_NAME) + ->set('filename', ':' . self::FILENAME_PARAM_NAME) + ->set('mime_type', ':' . self::MIME_TYPE_PARAM_NAME) + ->set('original_filename', ':' . self::ORIGINAL_FILENAME_PARAM_NAME) + ->set('version', ':' . self::VERSION_NO_PARAM_NAME) ->setParameter(self::FIELD_ID_PARAM_NAME, $field->id, ParameterType::INTEGER) ->setParameter(self::FILENAME_PARAM_NAME, $this->removeMimeFromPath($field->value->externalData['id'])) ->setParameter(self::MIME_TYPE_PARAM_NAME, $field->value->externalData['mimeType']) @@ -135,18 +125,15 @@ protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $ver /** * Store the file reference in $field for $versionNo. * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return bool + * @throws \Doctrine\DBAL\Exception */ - public function storeFileReference(VersionInfo $versionInfo, Field $field) + public function storeFileReference(VersionInfo $versionInfo, Field $field): bool { $referencedData = $this->getFileReferenceData($field->id, $versionInfo->versionNo); if ($referencedData === null) { $this->storeNewFieldData($versionInfo, $field); - } elseif (is_array($referencedData) && !empty(array_diff_assoc($referencedData, $field->value->externalData))) { + } elseif (!empty(array_diff_assoc($referencedData, $field->value->externalData))) { $this->updateFieldData($versionInfo, $field); } @@ -156,8 +143,10 @@ public function storeFileReference(VersionInfo $versionInfo, Field $field) /** * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field + * + * @throws \Doctrine\DBAL\Exception */ - protected function updateFieldData(VersionInfo $versionInfo, Field $field) + protected function updateFieldData(VersionInfo $versionInfo, Field $field): void { $updateQuery = $this->connection->createQueryBuilder(); $updateQuery->update( @@ -170,11 +159,11 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field) $updateQuery->expr()->and( $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $updateQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) @@ -186,10 +175,9 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field) } /** - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field + * @throws \Doctrine\DBAL\Exception */ - protected function storeNewFieldData(VersionInfo $versionInfo, Field $field) + protected function storeNewFieldData(VersionInfo $versionInfo, Field $field): void { $insertQuery = $this->connection->createQueryBuilder(); $insertQuery->insert( @@ -203,27 +191,16 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field) /** * Remove the prepended mime-type directory from $path for legacy storage. - * - * @param string $path - * - * @return string */ - public function removeMimeFromPath($path) + public function removeMimeFromPath(string $path): string { - $path = (string)$path; - return substr($path, strpos($path, '/') + 1); } /** - * Return the file reference data for the given $fieldId in $versionNo. - * - * @param int $fieldId - * @param int $versionNo - * - * @return array|null + * @throws \Doctrine\DBAL\Exception */ - public function getFileReferenceData($fieldId, $versionNo) + public function getFileReferenceData(int $fieldId, int $versionNo): ?array { $selectQuery = $this->connection->createQueryBuilder(); @@ -235,11 +212,11 @@ public function getFileReferenceData($fieldId, $versionNo) $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) @@ -269,12 +246,8 @@ public function getFileReferenceData($fieldId, $versionNo) /** * Return the property name for the given $columnName. - * - * @param string $columnName - * - * @return string */ - protected function toPropertyName($columnName) + protected function toPropertyName(string $columnName): string { $propertyMap = $this->getPropertyMapping(); @@ -283,13 +256,8 @@ protected function toPropertyName($columnName) /** * Return $value casted as specified by {@link getPropertyMapping()}. - * - * @param mixed $value - * @param string $columnName - * - * @return mixed */ - protected function castToPropertyValue($value, $columnName) + protected function castToPropertyValue(mixed $value, string $columnName): mixed { $propertyMap = $this->getPropertyMapping(); $castFunction = $propertyMap[$columnName]['cast']; @@ -299,24 +267,16 @@ protected function castToPropertyValue($value, $columnName) /** * Prepend $path with the first part of the given $mimeType. - * - * @param string $path - * @param string $mimeType - * - * @return string */ - public function prependMimeToPath(string $path, $mimeType) + public function prependMimeToPath(string $path, string $mimeType): string { - return substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; + return substr($mimeType, 0, (int)strpos($mimeType, '/')) . '/' . $path; } /** - * Remove all file references for the given $fieldIds. - * - * @param array $fieldIds - * @param int $versionNo + * @throws \Doctrine\DBAL\Exception */ - public function removeFileReferences(array $fieldIds, $versionNo): void + public function removeFileReferences(array $fieldIds, int $versionNo): void { if (empty($fieldIds)) { return; @@ -329,11 +289,11 @@ public function removeFileReferences(array $fieldIds, $versionNo): void $deleteQuery->expr()->and( $deleteQuery->expr()->in( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_LIST_PARAMETER_NAME + ':' . self::FIELD_ID_LIST_PARAMETER_NAME ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) @@ -345,12 +305,9 @@ public function removeFileReferences(array $fieldIds, $versionNo): void } /** - * Remove a specific file reference for $fieldId and $versionId. - * - * @param int $fieldId - * @param int $versionNo + * @throws \Doctrine\DBAL\Exception */ - public function removeFileReference($fieldId, $versionNo): void + public function removeFileReference(int $fieldId, int $versionNo): void { $deleteQuery = $this->connection->createQueryBuilder(); $deleteQuery @@ -359,11 +316,11 @@ public function removeFileReference($fieldId, $versionNo): void $deleteQuery->expr()->and( $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) @@ -377,11 +334,9 @@ public function removeFileReference($fieldId, $versionNo): void /** * Return a set o file references, referenced by the given $fieldIds. * - * @param array $fieldIds - * - * @return array + * @throws \Doctrine\DBAL\Exception */ - public function getReferencedFiles(array $fieldIds, $versionNo) + public function getReferencedFiles(array $fieldIds, int $versionNo): array { if (empty($fieldIds)) { return []; @@ -398,15 +353,15 @@ public function getReferencedFiles(array $fieldIds, $versionNo) $selectQuery->expr()->and( $selectQuery->expr()->in( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_LIST_PARAMETER_NAME + ':' . self::FIELD_ID_LIST_PARAMETER_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(self::FIELD_ID_LIST_PARAMETER_NAME, $fieldIds, Connection::PARAM_INT_ARRAY) + ->setParameter(self::FIELD_ID_LIST_PARAMETER_NAME, $fieldIds, ArrayParameterType::INTEGER) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; @@ -421,13 +376,9 @@ function (array $row) { } /** - * Return a map with the number of references each file from $files has. - * - * @param array $files - * - * @return array + * @throws \Doctrine\DBAL\Exception */ - public function countFileReferences(array $files) + public function countFileReferences(array $files): array { if (empty($files)) { return []; @@ -460,7 +411,7 @@ public function countFileReferences(array $files) [$this, 'removeMimeFromPath'], $files ), - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ; diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php index 0ecf5af997..a38121526d 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php @@ -7,29 +7,23 @@ namespace Ibexa\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway; +use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage as BaseDoctrineStorage; -use PDO; /** * Binary File Field Type external storage DoctrineStorage gateway. */ class DoctrineStorage extends BaseDoctrineStorage { - /** - * {@inheritdoc} - */ protected function getStorageTable(): string { return 'ezbinaryfile'; } - /** - * {@inheritdoc} - */ - protected function getPropertyMapping() + protected function getPropertyMapping(): array { $propertyMap = parent::getPropertyMapping(); $propertyMap['download_count'] = [ @@ -40,10 +34,7 @@ protected function getPropertyMapping() return $propertyMap; } - /** - * {@inheritdoc} - */ - protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versionNo) + protected function setFetchColumns(QueryBuilder $queryBuilder, int $fieldId, int $versionNo): void { parent::setFetchColumns($queryBuilder, $fieldId, $versionNo); @@ -52,10 +43,7 @@ protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versio ); } - /** - * {@inheritdoc} - */ - protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) + protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field): void { parent::setInsertColumns($queryBuilder, $versionInfo, $field); @@ -64,7 +52,7 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver ->setParameter( ':downloadCount', $field->value->externalData['downloadCount'], - PDO::PARAM_INT + ParameterType::INTEGER ) ; } diff --git a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php index 0a13b1fc1b..b9e3656a72 100644 --- a/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php @@ -12,34 +12,27 @@ use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage as BaseDoctrineStorage; -use PDO; /** * Media Field Type external storage DoctrineStorage gateway. */ class DoctrineStorage extends BaseDoctrineStorage { - private const string CONTROLS_PARAM_NAME = ':controls'; - private const string HAS_CONTROLLER_PARAM_NAME = ':hasController'; - private const string HEIGHT_PARAM_NAME = ':height'; - private const string IS_AUTOPLAY_PARAM_NAME = ':isAutoplay'; - private const string IS_LOOP_PARAM_NAME = ':isLoop'; - private const string PLUGINS_PAGE_PAGE = ':pluginsPage'; - private const string QUALITY_PARAM_NAME = ':quality'; - private const string WIDTH_PARAM_NAME = ':width'; + private const string CONTROLS_PARAM_NAME = 'controls'; + private const string HAS_CONTROLLER_PARAM_NAME = 'hasController'; + private const string HEIGHT_PARAM_NAME = 'height'; + private const string IS_AUTOPLAY_PARAM_NAME = 'isAutoplay'; + private const string IS_LOOP_PARAM_NAME = 'isLoop'; + private const string PLUGINS_PAGE_PAGE = 'pluginsPage'; + private const string QUALITY_PARAM_NAME = 'quality'; + private const string WIDTH_PARAM_NAME = 'width'; - /** - * {@inheritdoc} - */ protected function getStorageTable(): string { return 'ezmedia'; } - /** - * {@inheritdoc} - */ - protected function getPropertyMapping() + protected function getPropertyMapping(): array { $propertyMap = parent::getPropertyMapping(); $propertyMap['has_controller'] = [ @@ -72,63 +65,54 @@ protected function getPropertyMapping() return $propertyMap; } - /** - * {@inheritdoc} - */ - protected function setFetchColumns(QueryBuilder $queryBuilder, $fieldId, $versionNo) + protected function setFetchColumns(QueryBuilder $queryBuilder, int $fieldId, int $versionNo): void { parent::setFetchColumns($queryBuilder, $fieldId, $versionNo); $queryBuilder->addSelect($this->connection->quoteIdentifier('has_controller'), $this->connection->quoteIdentifier('is_autoplay'), $this->connection->quoteIdentifier('is_loop'), $this->connection->quoteIdentifier('width'), $this->connection->quoteIdentifier('height')); } - /** - * {@inheritdoc} - */ - protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) + protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field): void { parent::setInsertColumns($queryBuilder, $versionInfo, $field); $queryBuilder - ->setValue('controls', self::CONTROLS_PARAM_NAME) - ->setValue('has_controller', self::HAS_CONTROLLER_PARAM_NAME) - ->setValue('height', self::HEIGHT_PARAM_NAME) - ->setValue('is_autoplay', self::IS_AUTOPLAY_PARAM_NAME) - ->setValue('is_loop', self::IS_LOOP_PARAM_NAME) - ->setValue('pluginspage', self::PLUGINS_PAGE_PAGE) - ->setValue('quality', self::QUALITY_PARAM_NAME) - ->setValue('width', self::WIDTH_PARAM_NAME) + ->setValue('controls', ':' . self::CONTROLS_PARAM_NAME) + ->setValue('has_controller', ':' . self::HAS_CONTROLLER_PARAM_NAME) + ->setValue('height', ':' . self::HEIGHT_PARAM_NAME) + ->setValue('is_autoplay', ':' . self::IS_AUTOPLAY_PARAM_NAME) + ->setValue('is_loop', ':' . self::IS_LOOP_PARAM_NAME) + ->setValue('pluginspage', ':' . self::PLUGINS_PAGE_PAGE) + ->setValue('quality', ':' . self::QUALITY_PARAM_NAME) + ->setValue('width', ':' . self::WIDTH_PARAM_NAME) ->setParameter(self::CONTROLS_PARAM_NAME, '') ->setParameter( self::HAS_CONTROLLER_PARAM_NAME, $field->value->externalData['hasController'], - PDO::PARAM_INT + ParameterType::INTEGER ) - ->setParameter(self::HEIGHT_PARAM_NAME, $field->value->externalData['height'], PDO::PARAM_INT) - ->setParameter(self::IS_AUTOPLAY_PARAM_NAME, $field->value->externalData['autoplay'], PDO::PARAM_INT) - ->setParameter(self::IS_LOOP_PARAM_NAME, $field->value->externalData['loop'], PDO::PARAM_INT) + ->setParameter(self::HEIGHT_PARAM_NAME, $field->value->externalData['height'], ParameterType::INTEGER) + ->setParameter(self::IS_AUTOPLAY_PARAM_NAME, $field->value->externalData['autoplay'], ParameterType::INTEGER) + ->setParameter(self::IS_LOOP_PARAM_NAME, $field->value->externalData['loop'], ParameterType::INTEGER) ->setParameter(self::PLUGINS_PAGE_PAGE, '') ->setParameter(self::QUALITY_PARAM_NAME, 'high') - ->setParameter(self::WIDTH_PARAM_NAME, $field->value->externalData['width'], PDO::PARAM_INT) + ->setParameter(self::WIDTH_PARAM_NAME, $field->value->externalData['width'], ParameterType::INTEGER) ; } - /** - * {@inheritdoc} - */ - protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field) + protected function setUpdateColumns(QueryBuilder $queryBuilder, VersionInfo $versionInfo, Field $field): void { parent::setUpdateColumns($queryBuilder, $versionInfo, $field); $queryBuilder - ->set('controls', self::CONTROLS_PARAM_NAME) - ->set('has_controller', self::HAS_CONTROLLER_PARAM_NAME) - ->set('height', self::HEIGHT_PARAM_NAME) - ->set('is_autoplay', self::IS_AUTOPLAY_PARAM_NAME) - ->set('is_loop', self::IS_LOOP_PARAM_NAME) - ->set('pluginspage', self::PLUGINS_PAGE_PAGE) - ->set('quality', self::QUALITY_PARAM_NAME) - ->set('width', self::WIDTH_PARAM_NAME) + ->set('controls', ':' . self::CONTROLS_PARAM_NAME) + ->set('has_controller', ':' . self::HAS_CONTROLLER_PARAM_NAME) + ->set('height', ':' . self::HEIGHT_PARAM_NAME) + ->set('is_autoplay', ':' . self::IS_AUTOPLAY_PARAM_NAME) + ->set('is_loop', ':' . self::IS_LOOP_PARAM_NAME) + ->set('pluginspage', ':' . self::PLUGINS_PAGE_PAGE) + ->set('quality', ':' . self::QUALITY_PARAM_NAME) + ->set('width', ':' . self::WIDTH_PARAM_NAME) ->setParameter(self::CONTROLS_PARAM_NAME, '') ->setParameter( self::HAS_CONTROLLER_PARAM_NAME, diff --git a/src/lib/IO/IOMetadataHandler.php b/src/lib/IO/IOMetadataHandler.php index 8a8d468f92..e951101a65 100644 --- a/src/lib/IO/IOMetadataHandler.php +++ b/src/lib/IO/IOMetadataHandler.php @@ -7,61 +7,44 @@ namespace Ibexa\Core\IO; +use Ibexa\Contracts\Core\IO\BinaryFile; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct; /** - * Provides reading & writing of files meta data (size, modification time...). + * Provides reading & writing of files meta-data (size, modification time...). */ interface IOMetadataHandler { /** * Stores the file from $binaryFileCreateStruct. * - * @param \Ibexa\Contracts\Core\IO\BinaryFileCreateStruct $spiBinaryFileCreateStruct - * - * @return \Ibexa\Contracts\Core\IO\BinaryFile - * - * @throws \RuntimeException if an error occured creating the file + * @throws \RuntimeException if an error occurred creating the file */ - public function create(BinaryFileCreateStruct $spiBinaryFileCreateStruct); + public function create(BinaryFileCreateStruct $spiBinaryFileCreateStruct): BinaryFile; /** * Deletes file $spiBinaryFileId. * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If $spiBinaryFileId is not found - * - * @param string $spiBinaryFileId + *@throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If $spiBinaryFileId is not found */ - public function delete($spiBinaryFileId); + public function delete(string $binaryFileId): void; /** * Loads and returns metadata for $spiBinaryFileId. * - * @param string $spiBinaryFileId - * - * @return \Ibexa\Contracts\Core\IO\BinaryFile - * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - public function load($spiBinaryFileId); + public function load(string $binaryFileId): BinaryFile; /** * Checks if a file $spiBinaryFileId exists. - * - * @param string $spiBinaryFileId - * - * @return bool */ - public function exists($spiBinaryFileId); + public function exists(string $binaryFileId): bool; /** * Returns the file's mimetype. Example: text/plain. - * - * @param $spiBinaryFileId - * - * @return string */ - public function getMimeType($spiBinaryFileId); + public function getMimeType(string $binaryFileId): string; - public function deleteDirectory($spiPath); + public function deleteDirectory(string $pathName): void; } From 58d84ef8ce81c78a87c13d16b71b99c0818e054c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 16:01:12 +0200 Subject: [PATCH 046/185] IBX-9811: [Tests] Aligned Legacy BaseTest with doctrine/dbal v3 and improved code quality --- .../integration/Core/Repository/BaseTest.php | 274 ++++++++++-------- 1 file changed, 152 insertions(+), 122 deletions(-) diff --git a/tests/integration/Core/Repository/BaseTest.php b/tests/integration/Core/Repository/BaseTest.php index 7f0c67409e..6ef41f97f1 100644 --- a/tests/integration/Core/Repository/BaseTest.php +++ b/tests/integration/Core/Repository/BaseTest.php @@ -9,7 +9,9 @@ use ArrayObject; use DateTime; +use DateTimeInterface; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Exception as DBALException; use ErrorException; use Exception; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; @@ -22,30 +24,42 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation; +use Ibexa\Contracts\Core\Repository\Values\User\Role; use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Contracts\Core\Repository\Values\User\UserGroup; use Ibexa\Contracts\Core\Repository\Values\User\UserReference; use Ibexa\Contracts\Core\Repository\Values\ValueObject; +use Ibexa\Contracts\Core\Search\Handler; use Ibexa\Contracts\Core\Test\Repository\SetupFactory; use Ibexa\Contracts\Core\Test\Repository\SetupFactory\Legacy as LegacySetupFactory; use Ibexa\Tests\Core\Repository\PHPUnitConstraint; -use PDOException; +use LogicException; use PHPUnit\Framework\TestCase; +use ReflectionObject; +use ReflectionProperty; +use RuntimeException; /** * Base class for api specific tests. + * + * @phpstan-type TPoliciesData list< + * array{ + * module: string, + * function: string, + * limitations?: \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] + * } + * > */ abstract class BaseTest extends TestCase { /** * Maximum integer number accepted by the different backends. */ - public const DB_INT_MAX = 2147483647; + public const int DB_INT_MAX = 2147483647; private ?object $setupFactory = null; - /** @var \Ibexa\Contracts\Core\Repository\Repository */ - private $repository; + private Repository $repository; protected function setUp(): void { @@ -54,7 +68,7 @@ protected function setUp(): void try { // Use setup factory instance here w/o clearing data in case test don't need to $this->getSetupFactory()->getRepository(false); - } catch (PDOException $e) { + } catch (DBALException $e) { self::fail( 'The communication with the database cannot be established. ' . "This is required in order to perform the tests.\n\n" . @@ -75,16 +89,16 @@ protected function setUp(): void */ protected function tearDown(): void { - $this->repository = null; + unset($this->repository); parent::tearDown(); } /** * Returns the ID generator, fitting to the repository implementation. * - * @return \Ibexa\Tests\Integration\Core\Repository\IdManager + * @throws \ErrorException */ - protected function getIdManager() + protected function getIdManager(): IdManager { return $this->getSetupFactory()->getIdManager(); } @@ -92,12 +106,9 @@ protected function getIdManager() /** * Generates a repository specific ID value. * - * @param string $type - * @param mixed $rawId - * - * @return mixed + * @throws \ErrorException */ - protected function generateId($type, $rawId) + protected function generateId(string $type, mixed $rawId): mixed { return $this->getIdManager()->generateId($type, $rawId); } @@ -105,12 +116,9 @@ protected function generateId($type, $rawId) /** * Parses a repository specific ID value. * - * @param string $type - * @param mixed $id - * - * @return mixed + * @throws \ErrorException */ - protected function parseId($type, $id) + protected function parseId(string $type, mixed $id): mixed { return $this->getIdManager()->parseId($type, $id); } @@ -118,21 +126,22 @@ protected function parseId($type, $id) /** * Returns a config setting provided by the setup factory. * - * @param string $configKey - * - * @return mixed + * @throws \ErrorException + * @throws \Exception */ - protected function getConfigValue($configKey) + protected function getConfigValue(string $configKey): mixed { return $this->getSetupFactory()->getConfigValue($configKey); } /** * @param bool $initialInitializeFromScratch Only has an effect if set in first call within a test + * + * @throws \Doctrine\DBAL\Exception */ protected function getRepository(bool $initialInitializeFromScratch = true): Repository { - if (null === $this->repository) { + if (!isset($this->repository)) { try { $this->repository = $this->getSetupFactory()->getRepository( $initialInitializeFromScratch @@ -179,6 +188,9 @@ protected function getSetupFactory(): SetupFactory $this->setupFactory = new $setupClass(); } + if (!$this->setupFactory instanceof SetupFactory) { + throw new LogicException('Setup factory must be an instance of ' . SetupFactory::class); + } return $this->setupFactory; } @@ -190,7 +202,7 @@ protected function getSetupFactory(): SetupFactory * @param mixed[] $expectedValues * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $actualObject */ - protected function assertPropertiesCorrect(array $expectedValues, ValueObject $actualObject) + protected function assertPropertiesCorrect(array $expectedValues, ValueObject $actualObject): void { foreach ($expectedValues as $propertyName => $propertyValue) { if ($propertyValue instanceof ValueObject) { @@ -218,9 +230,8 @@ protected function assertPropertiesCorrect(array $expectedValues, ValueObject $a * @TODO: introduced because of randomly failing tests, ref: https://issues.ibexa.co/browse/EZP-21734 * * @param mixed[] $expectedValues - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $actualObject */ - protected function assertPropertiesCorrectUnsorted(array $expectedValues, ValueObject $actualObject) + protected function assertPropertiesCorrectUnsorted(array $expectedValues, ValueObject $actualObject): void { foreach ($expectedValues as $propertyName => $propertyValue) { if ($propertyValue instanceof ValueObject) { @@ -236,12 +247,13 @@ protected function assertPropertiesCorrectUnsorted(array $expectedValues, ValueO * $actualObject. Additional (virtual) properties can be asserted using * $additionalProperties. * - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $expectedValues - * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject $actualObject - * @param array $propertyNames + * @param string[] $additionalProperties */ - protected function assertStructPropertiesCorrect(ValueObject $expectedValues, ValueObject $actualObject, array $additionalProperties = []) - { + protected function assertStructPropertiesCorrect( + ValueObject $expectedValues, + ValueObject $actualObject, + array $additionalProperties = [] + ): void { foreach ($expectedValues as $propertyName => $propertyValue) { if ($propertyValue instanceof ValueObject) { $this->assertStructPropertiesCorrect($propertyValue, $actualObject->$propertyName); @@ -258,7 +270,7 @@ protected function assertStructPropertiesCorrect(ValueObject $expectedValues, Va /** * @see \Ibexa\Tests\Integration\Core\Repository\BaseTest::assertPropertiesCorrectUnsorted * - * @param array $items An array of scalar values + * @phpstan-param array $items An array of scalar values */ private function sortItems(array &$items): void { @@ -266,23 +278,30 @@ private function sortItems(array &$items): void if (!is_scalar($a) || !is_scalar($b)) { $this->fail('Wrong usage: method ' . __METHOD__ . ' accepts only an array of scalar values'); } + if (!is_string($a) || !is_string($b)) { + return $a > $b ? 1 : -1; + } return strcmp($a, $b); }; usort($items, $sorter); } - private function assertPropertiesEqual($propertyName, $expectedValue, $actualValue, bool $sortArray = false): void - { + private function assertPropertiesEqual( + string $propertyName, + mixed $expectedValue, + mixed $actualValue, + bool $sortArray = false + ): void { if ($expectedValue instanceof ArrayObject) { $expectedValue = $expectedValue->getArrayCopy(); } elseif ($expectedValue instanceof DateTime) { - $expectedValue = $expectedValue->format(DateTime::RFC850); + $expectedValue = $expectedValue->format(DateTimeInterface::RFC850); } if ($actualValue instanceof ArrayObject) { $actualValue = $actualValue->getArrayCopy(); } elseif ($actualValue instanceof DateTime) { - $actualValue = $actualValue->format(DateTime::RFC850); + $actualValue = $actualValue->format(DateTimeInterface::RFC850); } if ($sortArray && is_array($actualValue) && is_array($expectedValue)) { @@ -299,6 +318,11 @@ private function assertPropertiesEqual($propertyName, $expectedValue, $actualVal /** * Create a user in editor user group. + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ protected function createUserVersion1( string $login = 'user', @@ -308,11 +332,10 @@ protected function createUserVersion1( ): User { $repository = $this->getRepository(); - /* BEGIN: Inline */ $userService = $repository->getUserService(); - // Instantiate a create struct with mandatory properties - $email = $email ?? "{$login}@example.com"; + // Instantiate a create-struct with mandatory properties + $email = $email ?? "$login@example.com"; $userCreate = $userService->newUserCreateStruct( $login, $email, @@ -332,21 +355,21 @@ protected function createUserVersion1( // Load parent group for the user $group = $userService->loadUserGroup($userGroupId); - // Create a new user instance. - $user = $userService->createUser($userCreate, [$group]); - /* END: Inline */ - - return $user; + return $userService->createUser($userCreate, [$group]); } /** * Create a user in new user group with editor rights limited to Media Library (/1/48/). * - * @uses ::createCustomUserVersion1() + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User + * @uses \createCustomUserVersion1() */ - protected function createMediaUserVersion1() + protected function createMediaUserVersion1(): User { return $this->createCustomUserVersion1( 'Media Editor', @@ -356,16 +379,22 @@ protected function createMediaUserVersion1() } /** - * Create a user with new user group and assign a existing role (optionally with RoleLimitation). + * Create a user with new user group and assign an existing role (optionally with RoleLimitation). * * @param string $userGroupName Name of the new user group to create * @param string $roleIdentifier Role identifier to assign to the new group - * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation|null $roleLimitation * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ - protected function createCustomUserVersion1($userGroupName, $roleIdentifier, RoleLimitation $roleLimitation = null) - { + protected function createCustomUserVersion1( + string $userGroupName, + string $roleIdentifier, + ?RoleLimitation $roleLimitation = null + ): User { return $this->createCustomUserWithLogin( 'user', 'user@example.com', @@ -376,26 +405,28 @@ protected function createCustomUserVersion1($userGroupName, $roleIdentifier, Rol } /** - * Create a user with new user group and assign a existing role (optionally with RoleLimitation). + * Create a user with new user group and assign an existing role (optionally with RoleLimitation). * * @param string $login User login * @param string $email User e-mail * @param string $userGroupName Name of the new user group to create * @param string $roleIdentifier Role identifier to assign to the new group - * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation|null $roleLimitation * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ protected function createCustomUserWithLogin( string $login, string $email, - $userGroupName, + string $userGroupName, string $roleIdentifier, - RoleLimitation $roleLimitation = null - ) { + ?RoleLimitation $roleLimitation = null + ): User { $repository = $this->getRepository(); - /* BEGIN: Inline */ // ID of the "Users" user group in an Ibexa demo installation $rootUsersGroupId = $this->generateId('location', 4); @@ -417,7 +448,7 @@ protected function createCustomUserWithLogin( $roleLimitation ); - // Instantiate a create struct with mandatory properties + // Instantiate a create-struct with mandatory properties $userCreate = $userService->newUserCreateStruct( $login, $email, @@ -431,24 +462,25 @@ protected function createCustomUserWithLogin( $userCreate->setField('last_name', ucfirst($login)); // Create a new user instance. - $user = $userService->createUser($userCreate, [$userGroup]); - /* END: Inline */ - - return $user; + return $userService->createUser($userCreate, [$userGroup]); } /** * Create a user using given data. * - * @param string $login - * @param string $firstName - * @param string $lastName * @param \Ibexa\Contracts\Core\Repository\Values\User\UserGroup|null $userGroup optional user group, Editor by default * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - protected function createUser(string $login, $firstName, $lastName, UserGroup $userGroup = null) - { + protected function createUser( + string $login, + string $firstName, + string $lastName, + ?UserGroup $userGroup = null + ): User { $repository = $this->getRepository(); $userService = $repository->getUserService(); @@ -456,10 +488,10 @@ protected function createUser(string $login, $firstName, $lastName, UserGroup $u $userGroup = $userService->loadUserGroup(13); } - // Instantiate a create struct with mandatory properties + // Instantiate a create-struct with mandatory properties $userCreate = $userService->newUserCreateStruct( $login, - "{$login}@example.com", + "$login@example.com", 'secret', 'eng-US' ); @@ -470,21 +502,15 @@ protected function createUser(string $login, $firstName, $lastName, UserGroup $u $userCreate->setField('last_name', $lastName); // Create a new user instance. - $user = $userService->createUser($userCreate, [$userGroup]); - - return $user; + return $userService->createUser($userCreate, [$userGroup]); } /** - * Only for internal use. + * @internal Only for internal use. * * Creates a \DateTime object for $timestamp in the current time zone - * - * @param int $timestamp - * - * @return \DateTime */ - public function createDateTime($timestamp = null) + public function createDateTime(?int $timestamp = null): DateTime { $dateTime = new DateTime(); if ($timestamp !== null) { @@ -497,16 +523,17 @@ public function createDateTime($timestamp = null) /** * Calls given Repository's aggregated SearchHandler::refresh(). * - * @param \Ibexa\Contracts\Core\Repository\Repository $repository + * @throws \ErrorException + * @throws \ReflectionException */ - protected function refreshSearch(Repository $repository) + protected function refreshSearch(Repository $repository): void { if ($this->isLegacySearchEngineSetup()) { return; } while (true) { - $repositoryReflection = new \ReflectionObject($repository); + $repositoryReflection = new ReflectionObject($repository); // If the repository is decorated, we need to recurse in the "repository" property if (!$repositoryReflection->hasProperty('repository')) { break; @@ -517,15 +544,20 @@ protected function refreshSearch(Repository $repository) $repository = $repositoryProperty->getValue($repository); } - $searchHandlerProperty = new \ReflectionProperty($repository, 'searchHandler'); + $searchHandlerProperty = new ReflectionProperty($repository, 'searchHandler'); $searchHandlerProperty->setAccessible(true); - /** @var \Ibexa\Solr\Handler $searchHandler */ $searchHandler = $searchHandlerProperty->getValue($repository); - $searchHandler->commit(); + // @todo declare commit on \Ibexa\Contracts\Core\Search\Handler + if ($searchHandler instanceof Handler && method_exists($searchHandler, 'commit')) { + $searchHandler->commit(); + } } + /** + * @throws \ErrorException + */ protected function isLegacySearchEngineSetup(): bool { return get_class($this->getSetupFactory()) === LegacySetupFactory::class; @@ -534,17 +566,14 @@ protected function isLegacySearchEngineSetup(): bool /** * Create role of a given name with the given policies described by an array. * - * @param $roleName - * @param array $policiesData [['module' => 'content', 'function' => 'read', 'limitations' => []] + * @phpstan-param TPoliciesData $policiesData * - * @return \Ibexa\Contracts\Core\Repository\Values\User\Role - * - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\LimitationValidationException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ - public function createRoleWithPolicies(string $roleName, array $policiesData) + public function createRoleWithPolicies(string $roleName, array $policiesData): Role { $repository = $this->getRepository(false); $roleService = $repository->getRoleService(); @@ -575,17 +604,14 @@ public function createRoleWithPolicies(string $roleName, array $policiesData) /** * Create user and assign new role with the given policies. * - * @param string $login - * @param array $policiesData list of policies in the form of [ [ 'module' => 'name', 'function' => 'name'] ] - * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation|null $roleLimitation - * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User + * @phpstan-param TPoliciesData $policiesData list of policies in the form of [ [ 'module' => 'name', 'function' => 'name'] ] * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - public function createUserWithPolicies(string $login, array $policiesData, RoleLimitation $roleLimitation = null) + public function createUserWithPolicies(string $login, array $policiesData, RoleLimitation $roleLimitation = null): User { $repository = $this->getRepository(false); $roleService = $repository->getRoleService(); @@ -595,7 +621,7 @@ public function createUserWithPolicies(string $login, array $policiesData, RoleL try { $userCreateStruct = $userService->newUserCreateStruct( $login, - "{$login}@test.local", + "$login@test.local", $login, 'eng-GB' ); @@ -625,8 +651,8 @@ protected function getRawDatabaseConnection(): Connection ->getServiceContainer()->get('ibexa.persistence.connection'); if (!$connection instanceof Connection) { - throw new \RuntimeException( - sprintf('Found %s instead of %s', get_class($connection), Connection::class) + throw new RuntimeException( + sprintf('Found %s instead of %s', get_debug_type($connection), Connection::class) ); } @@ -642,8 +668,6 @@ protected function getRawDatabaseConnection(): Connection * @throws \Exception * * @param callable $callback - * - * @return mixed the return result of the given callback */ public function performRawDatabaseOperation(callable $callback): void { @@ -712,11 +736,9 @@ protected function assertContentItemEquals( /** * Create 'folder' Content. * - * @param array $names Folder names in the form of ['<language_code>' => '<name>'] - * @param int|null $parentLocationId - * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content published Content + * @param array $names Folder names in the form of ['<language_code>' => '<name>'] * * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException @@ -733,7 +755,7 @@ public function createFolder( $locationService = $repository->getLocationService(); if (empty($names)) { - throw new \RuntimeException(sprintf('%s expects a non-empty names list', __METHOD__)); + throw new RuntimeException(sprintf('%s expects a non-empty names list', __METHOD__)); } $mainLanguageCode = array_keys($names)[0]; @@ -741,7 +763,9 @@ public function createFolder( $contentTypeService->loadContentTypeByIdentifier('folder'), $mainLanguageCode ); - $struct->remoteId = $remoteId; + if (null !== $remoteId) { + $struct->remoteId = $remoteId; + } $struct->alwaysAvailable = $alwaysAvailable; foreach ($names as $languageCode => $translatedName) { $struct->setField('name', $translatedName, $languageCode); @@ -766,17 +790,18 @@ public function createFolder( * Update 'folder' Content. * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Content $content - * @param array $names Folder names in the form of ['<language_code>' => '<name>'] + * @param array $names Folder names in the form of ['<language_code>' => '<name>'] * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Content * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ - protected function updateFolder(Content $content, array $names) + protected function updateFolder(Content $content, array $names): Content { $repository = $this->getRepository(false); $contentService = $repository->getContentService(); @@ -795,11 +820,9 @@ protected function updateFolder(Content $content, array $names) /** * Add new Language to the Repository. * - * @param string $languageCode - * @param string $name - * @param bool $enabled - * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\Language + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ protected function createLanguage(string $languageCode, string $name, bool $enabled = true): Language { @@ -814,6 +837,11 @@ protected function createLanguage(string $languageCode, string $name, bool $enab return $languageService->createLanguage($languageStruct); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception + */ protected function createLanguageIfNotExists( string $languageCode, string $name, @@ -823,7 +851,7 @@ protected function createLanguageIfNotExists( try { return $repository->getContentLanguageService()->loadLanguage($languageCode); - } catch (NotFoundException $e) { + } catch (NotFoundException) { return $this->createLanguage($languageCode, $name, $enabled); } } @@ -831,11 +859,10 @@ protected function createLanguageIfNotExists( /** * @param string $identifier content type identifier * @param string $mainTranslation main translation language code - * @param array $fieldsToDefine a map of field definition identifiers to their field type identifiers + * @param array $fieldsToDefine a map of field definition identifiers to their field type identifiers * @param bool $alwaysAvailable default always available * - * @return \Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType - * + * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException @@ -868,6 +895,9 @@ protected function createSimpleContentType( return $contentTypeService->loadContentTypeByIdentifier($identifier); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function loginAsUser(UserReference $user): void { $this->getRepository(false)->getPermissionResolver()->setCurrentUserReference($user); From e8bf137e26ed84425ec1d9a93f4989048ab6e801 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 16:03:21 +0200 Subject: [PATCH 047/185] IBX-9727: [PHPDoc] Fixed typo in Search\Handler contracts doc --- src/contracts/Search/Handler.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/contracts/Search/Handler.php b/src/contracts/Search/Handler.php index 46e50ff3a8..648485cea0 100644 --- a/src/contracts/Search/Handler.php +++ b/src/contracts/Search/Handler.php @@ -16,8 +16,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult; /** - * The Search handler retrieves sets of of Content objects, based on a - * set of criteria. + * The Search handler retrieves sets of Content objects, based on a set of criteria. * * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ From 0d9f8717199edcd71a7c23e644845f87aef2c4e3 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 16:15:19 +0200 Subject: [PATCH 048/185] IBX-9811: [Tests] Aligned TrashService integration tests with doctrine/dbal v3 and improved code quality --- .../Core/Repository/BaseTrashServiceTest.php | 13 ++- .../TrashServiceAuthorizationTest.php | 95 +++++++++---------- .../Core/Repository/TrashServiceTest.php | 19 ++-- 3 files changed, 64 insertions(+), 63 deletions(-) diff --git a/tests/integration/Core/Repository/BaseTrashServiceTest.php b/tests/integration/Core/Repository/BaseTrashServiceTest.php index 5e68e4a76a..724fd4d3e0 100644 --- a/tests/integration/Core/Repository/BaseTrashServiceTest.php +++ b/tests/integration/Core/Repository/BaseTrashServiceTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Integration\Core\Repository; use Doctrine\DBAL\ParameterType; +use Ibexa\Contracts\Core\Repository\Values\Content\TrashItem; /** * Base class for trash specific tests. @@ -18,13 +19,14 @@ abstract class BaseTrashServiceTest extends BaseTest * Creates a trashed item from the Community page location and stores * this item in a location variable named $trashItem. * - * @return \Ibexa\Contracts\Core\Repository\Values\Content\TrashItem + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ - protected function createTrashItem() + protected function createTrashItem(): TrashItem { $repository = $this->getRepository(); - /* BEGIN: Inline */ // remoteId of the "Media" page main location $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; @@ -38,13 +40,14 @@ protected function createTrashItem() // Trash the "Community" page location $trashItem = $trashService->trash($mediaLocation); - /* END: Inline */ + self::assertNotNull($trashItem, 'Failed to trash "Community" page location'); return $trashItem; } /** * @throws \ErrorException + * @throws \Doctrine\DBAL\Exception */ protected function updateTrashedDate(int $locationId, int $newTimestamp): void { @@ -56,6 +59,6 @@ protected function updateTrashedDate(int $locationId, int $newTimestamp): void ->where('node_id = :location_id') ->setParameter('trashed_timestamp', $newTimestamp, ParameterType::INTEGER) ->setParameter('location_id', $locationId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } } diff --git a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php index e0c83de069..e2f87e39ab 100644 --- a/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php +++ b/tests/integration/Core/Repository/TrashServiceAuthorizationTest.php @@ -8,7 +8,9 @@ namespace Ibexa\Tests\Integration\Core\Repository; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; +use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\Content\Location; +use Ibexa\Contracts\Core\Repository\Values\Content\TrashItem; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\LanguageLimitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ObjectStateLimitation; use Ibexa\Core\Repository\TrashService; @@ -28,31 +30,20 @@ class TrashServiceAuthorizationTest extends BaseTrashServiceTest * * @covers \Ibexa\Contracts\Core\Repository\TrashService::loadTrashItem() * - * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testLoadTrashItem - * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testLoadTrashItemThrowsUnauthorizedException(): void { - $this->expectException(UnauthorizedException::class); - $repository = $this->getRepository(); $trashService = $repository->getTrashService(); - $permissionResolver = $repository->getPermissionResolver(); - - $anonymousUserId = $this->generateId('user', 10); - /* BEGIN: Use Case */ - // $anonymousUserId is the ID of the "Anonymous" user - $trashItem = $this->createTrashItem(); - - // Load user service - $userService = $repository->getUserService(); - - // Set "Anonymous" as current user - $permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId)); + $trashItem = $this->setAnonymousUserAsCurrentUser($repository); + $this->expectException(UnauthorizedException::class); // This call will fail with an "UnauthorizedException" $trashService->loadTrashItem($trashItem->id); - /* END: Use Case */ } /** @@ -149,9 +140,6 @@ public function testTrashRequiresContentRemovePolicy(): void * Test for the recover() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::recover() - * - * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover - * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ public function testRecoverThrowsUnauthorizedException(): void { @@ -159,18 +147,7 @@ public function testRecoverThrowsUnauthorizedException(): void $repository = $this->getRepository(); $trashService = $repository->getTrashService(); - $permissionResolver = $repository->getPermissionResolver(); - - $anonymousUserId = $this->generateId('user', 10); - /* BEGIN: Use Case */ - // $anonymousUserId is the ID of the "Anonymous" user - $trashItem = $this->createTrashItem(); - - // Load user service - $userService = $repository->getUserService(); - - // Set "Anonymous" as current user - $permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId)); + $trashItem = $this->setAnonymousUserAsCurrentUser($repository); // This call will fail with an "UnauthorizedException" $trashService->recover($trashItem); @@ -181,9 +158,6 @@ public function testRecoverThrowsUnauthorizedException(): void * Test for the recover() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::recover($trashItem, $newParentLocation) - * - * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testRecover - * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParameter(): void { @@ -221,9 +195,6 @@ public function testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParam * Test for the emptyTrash() method. * * @covers \Ibexa\Contracts\Core\Repository\TrashService::emptyTrash() - * - * @depends Ibexa\Tests\Integration\Core\Repository\TrashServiceTest::testEmptyTrash - * @depends Ibexa\Tests\Integration\Core\Repository\UserServiceTest::testLoadUser */ public function testEmptyTrashThrowsUnauthorizedException(): void { @@ -263,25 +234,23 @@ public function testDeleteTrashItemThrowsUnauthorizedException(): void $repository = $this->getRepository(); $trashService = $repository->getTrashService(); - $permissionResolver = $repository->getPermissionResolver(); - - $anonymousUserId = $this->generateId('user', 10); - /* BEGIN: Use Case */ - // $anonymousUserId is the ID of the "Anonymous" user - $trashItem = $this->createTrashItem(); - - // Load user service - $userService = $repository->getUserService(); - - // Set "Anonymous" as current user - $permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId)); + $trashItem = $this->setAnonymousUserAsCurrentUser($repository); // This call will fail with an "UnauthorizedException" $trashService->deleteTrashItem($trashItem); /* END: Use Case */ } - public function testTrashRequiresPremissionsToRemoveAllSubitems(): void + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception + * @throws \ReflectionException + * @throws \ErrorException + */ + public function testTrashRequiresPermissionsToRemoveAllSubitems(): void { $this->createRoleWithPolicies('Publisher', [ ['module' => 'content', 'function' => 'read'], @@ -319,4 +288,28 @@ public function testTrashRequiresPremissionsToRemoveAllSubitems(): void $this->expectException(UnauthorizedException::class); $trashService->trash($parentLocation); } + + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + */ + private function setAnonymousUserAsCurrentUser( + Repository $repository + ): TrashItem { + $permissionResolver = $repository->getPermissionResolver(); + + $anonymousUserId = $this->generateId('user', 10); + // $anonymousUserId is the ID of the "Anonymous" user + $trashItem = $this->createTrashItem(); + + // Load user service + $userService = $repository->getUserService(); + + // Set "Anonymous" as current user + $permissionResolver->setCurrentUserReference($userService->loadUser($anonymousUserId)); + + return $trashItem; + } } diff --git a/tests/integration/Core/Repository/TrashServiceTest.php b/tests/integration/Core/Repository/TrashServiceTest.php index 9a6c79df59..9ef8d17e5b 100644 --- a/tests/integration/Core/Repository/TrashServiceTest.php +++ b/tests/integration/Core/Repository/TrashServiceTest.php @@ -38,13 +38,11 @@ class TrashServiceTest extends BaseTrashServiceTest /** * Test for the trash() method. * - * @depends Ibexa\Tests\Integration\Core\Repository\LocationServiceTest::testLoadLocationByRemoteId + * @throws \Exception */ public function testTrash(): void { - /* BEGIN: Use Case */ $trashItem = $this->createTrashItem(); - /* END: Use Case */ self::assertInstanceOf( TrashItem::class, @@ -56,6 +54,10 @@ public function testTrash(): void * Test for the trash() method. * * @depends testTrash + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testTrashSetsExpectedTrashItemProperties(): void { @@ -89,6 +91,9 @@ public function testTrashSetsExpectedTrashItemProperties(): void * Test for the trash() method. * * @depends testTrash + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testTrashRemovesLocationFromMainStorage(): void { @@ -134,7 +139,7 @@ public function testTrashRemovesChildLocationsFromMainStorage(): void $locationService->loadLocationByRemoteId($remoteId); self::fail("Location '{$remoteId}' should exist.'"); } catch (NotFoundException $e) { - // echo $e->getFile(), ' +', $e->getLine(), PHP_EOL; + // Nothing to do } } @@ -398,7 +403,7 @@ public function testAliasesForRemovedItems(): void $mediaLocation = $locationService->loadLocationByRemoteId($mediaRemoteId); $trashItem = $trashService->trash($mediaLocation); - $this->assertAliasNotExists($urlAliasService, '/Media'); + $this->assertAliasNotExists('/Media'); $this->createNewContentInPlaceTrashedOne($repository, $mediaLocation->parentLocationId); @@ -1274,13 +1279,13 @@ protected function createNewContentInPlaceTrashedOne(Repository $repository, int /** * @param string $urlPath Url alias path */ - private function assertAliasNotExists(URLAliasService $urlAliasService, string $urlPath): void + private function assertAliasNotExists(string $urlPath): void { try { $this->getRepository()->getURLAliasService()->lookup($urlPath); self::fail(sprintf('Alias [%s] should not exist', $urlPath)); } catch (NotFoundException $e) { - self::assertTrue(true); + // nothing to do } } From e86b62cbe45e8671c8fd9e819ac69a267bcc6a30 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 16:27:44 +0200 Subject: [PATCH 049/185] IBX-9811: [Tests] Aligned Image integration tests with doctrine/dbal v3 and improved code quality --- .../FieldType/ImageIntegrationTest.php | 83 +++++++++++-------- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php index c333496114..36966599aa 100644 --- a/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php @@ -28,21 +28,25 @@ */ class ImageIntegrationTest extends FileSearchBaseIntegrationTest { + private const string IMAGE_FIXTURE_PATH = __DIR__ . '/_fixtures/image.jpg'; + private const string IMAGE_FIXTURE_ALT_TEXT = 'My icy flower at night'; + /** * Stores the loaded image path for copy test. */ - protected static $loadedImagePath; + protected static string $loadedImagePath; /** * IOService storage prefix for the tested Type's files. - * - * @var string */ - protected static $storagePrefixConfigKey = 'ibexa.io.images.storage.prefix'; + protected static string $storagePrefixConfigKey = 'ibexa.io.images.storage.prefix'; - protected function getStoragePrefix() + /** + * @throws \ErrorException + */ + protected function getStoragePrefix(): string { - return $this->getConfigValue(self::$storagePrefixConfigKey); + return (string)$this->getConfigValue(self::$storagePrefixConfigKey); } /** @@ -55,15 +59,15 @@ protected function getFixtureData(): array return [ 'create' => [ 'fileName' => 'Icy-Night-Flower.jpg', - 'inputUri' => ($path = __DIR__ . '/_fixtures/image.jpg'), - 'alternativeText' => 'My icy flower at night', - 'fileSize' => filesize($path), + 'inputUri' => self::IMAGE_FIXTURE_PATH, + 'alternativeText' => self::IMAGE_FIXTURE_ALT_TEXT, + 'fileSize' => filesize(self::IMAGE_FIXTURE_PATH), ], 'update' => [ 'fileName' => 'Blue-Blue-Blue.png', - 'inputUri' => ($path = __DIR__ . '/_fixtures/image.png'), + 'inputUri' => self::IMAGE_FIXTURE_PATH, 'alternativeText' => 'Such a blue …', - 'fileSize' => filesize($path), + 'fileSize' => filesize(self::IMAGE_FIXTURE_PATH), ], ]; } @@ -207,6 +211,8 @@ public function getInvalidValidatorConfiguration(): array /** * Get initial field data for valid object creation. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function getValidCreationFieldData(): ImageValue { @@ -222,7 +228,7 @@ public function getValidCreationFieldData(): ImageValue */ public function getFieldName(): string { - return 'My icy flower at night'; + return self::IMAGE_FIXTURE_ALT_TEXT; } /** @@ -320,7 +326,7 @@ public function provideInvalidUpdateFieldData(): array } /** - * Asserts the the field data was loaded correctly. + * Asserts the field data was loaded correctly. * * Asserts that the data provided by {@link getValidCreationFieldData()} * was copied and loaded correctly. @@ -340,7 +346,7 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field): void * * This is a PHPUnit data provider * - * The returned records must have the the original value assigned to the + * The returned records must have the original value assigned to the * first index and the expected hash result to the second. For example: * * @@ -354,6 +360,8 @@ public function assertCopiedFieldDataLoadedCorrectly(Field $field): void * * * @return array + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function provideToHashData(): array { @@ -361,15 +369,15 @@ public function provideToHashData(): array [ new ImageValue( [ - 'inputUri' => ($path = __DIR__ . '/_fixtures/image.jpg'), + 'inputUri' => self::IMAGE_FIXTURE_PATH, 'fileName' => 'Icy-Night-Flower.jpg', - 'alternativeText' => 'My icy flower at night', + 'alternativeText' => self::IMAGE_FIXTURE_ALT_TEXT, ] ), [ - 'inputUri' => $path, + 'inputUri' => self::IMAGE_FIXTURE_PATH, 'fileName' => 'Icy-Night-Flower.jpg', - 'alternativeText' => 'My icy flower at night', + 'alternativeText' => self::IMAGE_FIXTURE_ALT_TEXT, 'fileSize' => null, 'id' => null, 'imageId' => null, @@ -385,7 +393,7 @@ public function provideToHashData(): array [ 'id' => $path = 'var/test/storage/images/file.png', 'fileName' => 'Icy-Night-Flower.jpg', - 'alternativeText' => 'My icy flower at night', + 'alternativeText' => self::IMAGE_FIXTURE_ALT_TEXT, 'fileSize' => 23, 'imageId' => '1-2', 'uri' => "/$path", @@ -397,7 +405,7 @@ public function provideToHashData(): array [ 'id' => $path, 'fileName' => 'Icy-Night-Flower.jpg', - 'alternativeText' => 'My icy flower at night', + 'alternativeText' => self::IMAGE_FIXTURE_ALT_TEXT, 'fileSize' => 23, 'inputUri' => null, 'imageId' => '1-2', @@ -430,6 +438,12 @@ public function provideFromHashData(): array ]; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception + */ public function testInherentCopyForNewLanguage(): void { $repository = $this->getRepository(); @@ -450,7 +464,7 @@ public function testInherentCopyForNewLanguage(): void $updateStruct->initialLanguageCode = 'ger-DE'; $updateStruct->setField('name', 'Sindelfingen'); - // Automatically creates a copy of the image field in the back ground + // Automatically creates a copy of the image field in the background $updatedDraft = $contentService->updateContent($draft->versionInfo, $updateStruct); $paths = []; @@ -461,7 +475,7 @@ public function testInherentCopyForNewLanguage(): void } self::assertTrue( - isset($paths['eng-US']) && isset($paths['ger-DE']), + isset($paths['eng-US'], $paths['ger-DE']), 'Failed asserting that file path for all languages were found in draft' ); @@ -516,8 +530,7 @@ public function testUpdatingImageMetadataOnlyWorks(): void $type = $this->createContentType( $this->getValidFieldSettings(), - $this->getValidValidatorConfiguration(), - [] + $this->getValidValidatorConfiguration() ); $draft = $this->createContent($this->getValidCreationFieldData(), $type); @@ -545,6 +558,7 @@ public function testUpdatingImageMetadataOnlyWorks(): void * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testThatRemovingDraftDoesntRemovePublishedImages(): void { @@ -592,6 +606,7 @@ public function testThatRemovingDraftDoesntRemovePublishedImages(): void * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testUpdateImageAltTextOnly(): void { @@ -599,9 +614,9 @@ public function testUpdateImageAltTextOnly(): void __METHOD__, new ImageValue( [ - 'inputUri' => __DIR__ . '/_fixtures/image.jpg', + 'inputUri' => self::IMAGE_FIXTURE_PATH, 'fileName' => 'image.jpg', - 'fileSize' => filesize(__DIR__ . '/_fixtures/image.jpg'), + 'fileSize' => filesize(self::IMAGE_FIXTURE_PATH), 'alternativeText' => 'Initial alternative text', ] ), @@ -704,6 +719,7 @@ protected function getAdditionallyIndexedFieldData(): array * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testRemovingContentRemovesImages(): void { @@ -744,6 +760,7 @@ public function testRemovingContentRemovesImages(): void * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testRemovingDraftRemovesOldImage(): void { @@ -786,7 +803,6 @@ public function testRemovingDraftRemovesOldImage(): void } /** - * @throws \Doctrine\DBAL\Driver\Exception * @throws \Doctrine\DBAL\Exception * @throws \ErrorException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception @@ -803,9 +819,9 @@ public function testDeleteImageWithCorruptedName(): void __METHOD__, new ImageValue( [ - 'inputUri' => __DIR__ . '/_fixtures/image.jpg', + 'inputUri' => self::IMAGE_FIXTURE_PATH, 'fileName' => 'image.jpg', - 'fileSize' => filesize(__DIR__ . '/_fixtures/image.jpg'), + 'fileSize' => filesize(self::IMAGE_FIXTURE_PATH), 'alternativeText' => 'Alternative', ] ), @@ -847,7 +863,6 @@ public function testDeleteImageWithCorruptedName(): void * * @throws \Doctrine\DBAL\Exception * @throws \ErrorException - * @throws \Doctrine\DBAL\Driver\Exception */ private function fetchXML(int $contentId, int $versionNo, int $fieldDefinitionId): array { @@ -864,7 +879,7 @@ private function fetchXML(int $contentId, int $versionNo, int $fieldDefinitionId ->setParameter('version', $versionNo, ParameterType::INTEGER) ->setParameter('contentobject_id', $contentId, ParameterType::INTEGER); - $result = $query->execute()->fetchAssociative(); + $result = $query->executeQuery()->fetchAssociative(); self::assertNotFalse($result); return $result; @@ -904,7 +919,7 @@ private function updateXML( $query ->update(Gateway::CONTENT_FIELD_TABLE) ->set('data_text', ':data_text') - ->setParameter('data_text', $document->saveXML(), ParameterType::STRING) + ->setParameter('data_text', $document->saveXML()) ->andWhere('contentclassattribute_id = :contentclassattribute_id') ->andWhere('version = :version') ->andWhere('contentobject_id = :contentobject_id') @@ -912,13 +927,14 @@ private function updateXML( ->setParameter('version', $versionNo, ParameterType::INTEGER) ->setParameter('contentobject_id', $contentId, ParameterType::INTEGER); - $query->execute(); + $query->executeStatement(); } /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ private function publishNewImage( string $name, @@ -955,6 +971,7 @@ private function publishNewImage( * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Doctrine\DBAL\Exception */ private function updateImage(Content $publishedImageContent, ImageValue $newImageValue): Content { From 5ee0b8790a00d80a304a7202c26c4991f740d675 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Apr 2025 16:49:07 +0200 Subject: [PATCH 050/185] IBX-9727: [Tests] Fixed ChainConfigResolverTest after applying strict types Rector --- tests/bundle/Core/ChainConfigResolverTest.php | 91 ++++++++----------- 1 file changed, 39 insertions(+), 52 deletions(-) diff --git a/tests/bundle/Core/ChainConfigResolverTest.php b/tests/bundle/Core/ChainConfigResolverTest.php index be4dd79aa6..55b0658632 100644 --- a/tests/bundle/Core/ChainConfigResolverTest.php +++ b/tests/bundle/Core/ChainConfigResolverTest.php @@ -4,12 +4,14 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core; use Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\MVC\Exception\ParameterNotFoundException; +use LogicException; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; @@ -18,7 +20,6 @@ */ class ChainConfigResolverTest extends TestCase { - /** @var \Ibexa\Bundle\Core\DependencyInjection\Configuration\ChainConfigResolver */ private ChainConfigResolver $chainResolver; protected function setUp(): void @@ -30,7 +31,7 @@ public function testPriority(): void { self::assertEquals([], $this->chainResolver->getAllResolvers()); - list($low, $high) = $this->createResolverMocks(); + [$low, $high] = $this->createResolverMocks(); $this->chainResolver->addResolver($low, 10); $this->chainResolver->addResolver($high, 100); @@ -50,19 +51,14 @@ public function testPriority(): void */ public function testSortResolvers(): void { - list($low, $medium, $high) = $this->createResolverMocks(); + [$low, $medium, $high] = $this->createResolverMocks(); // We're using a mock here and not $this->chainResolver because we need to ensure that the sorting operation is done only once. - $resolver = $this->buildMock( - ChainConfigResolver::class, - ['sortResolvers'] - ); + $resolver = $this->mockChainConfigResolver(); $resolver ->expects(self::once()) ->method('sortResolvers') - ->will( - self::returnValue( - [$high, $medium, $low] - ) + ->willReturn( + [$high, $medium, $low] ); $resolver->addResolver($low, 10); @@ -80,29 +76,18 @@ public function testSortResolvers(): void */ public function testReSortResolvers(): void { - list($low, $medium, $high) = $this->createResolverMocks(); + [$low, $medium, $high] = $this->createResolverMocks(); $highest = clone $high; // We're using a mock here and not $this->chainResolver because we need to ensure that the sorting operation is done only once. - $resolver = $this->buildMock( - ChainConfigResolver::class, - ['sortResolvers'] - ); - $resolver - ->expects(self::at(0)) - ->method('sortResolvers') - ->will( - self::returnValue( - [$high, $medium, $low] - ) - ); - // The second time sortResolvers() is called, we're supposed to get the newly added router ($highest) + $resolver = $this->mockChainConfigResolver(); + $resolver - ->expects(self::at(1)) + ->expects(self::exactly(2)) ->method('sortResolvers') - ->will( - self::returnValue( - [$highest, $high, $medium, $low] - ) + ->willReturnOnConsecutiveCalls( + [$high, $medium, $low], + // The second time sortResolvers() is called, we're supposed to get the newly added router ($highest) + [$highest, $high, $medium, $low] ); $resolver->addResolver($low, 10); @@ -123,7 +108,7 @@ public function testReSortResolvers(): void public function testGetDefaultNamespace(): void { - $this->expectException(\LogicException::class); + $this->expectException(LogicException::class); $this->chainResolver->getDefaultNamespace(); } @@ -164,32 +149,34 @@ public function testGetParameterInvalid(): void /** * @dataProvider getParameterProvider * - * @param string $paramName - * @param string $namespace - * @param string $scope - * @param mixed $expectedValue + * @param string|bool|array $expectedValue */ - public function testGetParameter(string $paramName, string $namespace, string $scope, string|bool|array $expectedValue): void - { + public function testGetParameter( + string $paramName, + string $namespace, + string $scope, + string|bool|array $expectedValue + ): void { $resolver = $this->createMock(ConfigResolverInterface::class); $resolver ->expects(self::once()) ->method('getParameter') ->with($paramName, $namespace, $scope) - ->will(self::returnValue($expectedValue)); + ->willReturn($expectedValue); $this->chainResolver->addResolver($resolver); self::assertSame($expectedValue, $this->chainResolver->getParameter($paramName, $namespace, $scope)); } - public function getParameterProvider(): array + /** + * @phpstan-return iterable}> + */ + public static function getParameterProvider(): iterable { - return [ - ['foo', 'namespace', 'scope', 'someValue'], - ['some.parameter', 'wowNamespace', 'mySiteaccess', ['foo', 'bar']], - ['another.parameter.but.longer.name', 'yetAnotherNamespace', 'anotherSiteaccess', ['foo', ['fruit' => 'apple']]], - ['boolean.parameter', 'yetAnotherNamespace', 'admin', false], - ]; + yield ['foo', 'namespace', 'scope', 'someValue']; + yield ['some.parameter', 'wowNamespace', 'mySiteaccess', ['foo', 'bar']]; + yield ['another.parameter.but.longer.name', 'yetAnotherNamespace', 'anotherSiteaccess', ['foo', ['fruit' => 'apple']]]; + yield ['boolean.parameter', 'yetAnotherNamespace', 'admin', false]; } public function testHasParameterTrue(): void @@ -203,7 +190,7 @@ public function testHasParameterTrue(): void ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will(self::returnValue(false)); + ->willReturn(false); $this->chainResolver->addResolver($resolver1); $resolver2 = $this->createMock(ConfigResolverInterface::class); @@ -211,7 +198,7 @@ public function testHasParameterTrue(): void ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will(self::returnValue(true)); + ->willReturn(true); $this->chainResolver->addResolver($resolver2); $resolver3 = $this->createMock(ConfigResolverInterface::class); @@ -234,14 +221,14 @@ public function testHasParameterFalse(): void ->expects(self::once()) ->method('hasParameter') ->with($paramName, $namespace, $scope) - ->will(self::returnValue(false)); + ->willReturn(false); $this->chainResolver->addResolver($resolver); self::assertFalse($this->chainResolver->hasParameter($paramName, $namespace, $scope)); } /** - * @return \PHPUnit\Framework\MockObject\MockObject[] + * @return array<\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface&\PHPUnit\Framework\MockObject\MockObject> */ private function createResolverMocks(): array { @@ -252,12 +239,12 @@ private function createResolverMocks(): array ]; } - private function buildMock(string $class, array $methods = []): MockObject + private function mockChainConfigResolver(): MockObject & ChainConfigResolver { return $this - ->getMockBuilder($class) + ->getMockBuilder(ChainConfigResolver::class) ->disableOriginalConstructor() - ->setMethods($methods) + ->onlyMethods(['sortResolvers']) ->getMock(); } } From db59599c400e85b445c97f468f4d11ba7c16430a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 12 Apr 2025 23:38:20 +0200 Subject: [PATCH 051/185] IBX-9727: Defined array shape of Persistence UrlAlias::$pathData property --- src/contracts/Persistence/Content/UrlAlias.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/contracts/Persistence/Content/UrlAlias.php b/src/contracts/Persistence/Content/UrlAlias.php index 282cfe50d0..e8b9cf7c30 100644 --- a/src/contracts/Persistence/Content/UrlAlias.php +++ b/src/contracts/Persistence/Content/UrlAlias.php @@ -13,12 +13,14 @@ * UrlAlias models one url alias path element separated by '/' in urls. * * This class models the legacy structure used for url aliases. + * + * @phpstan-type TPathData list}> */ class UrlAlias extends ValueObject { - public const LOCATION = 0; - public const RESOURCE = 1; - public const VIRTUAL = 2; + public const int LOCATION = 0; + public const int RESOURCE = 1; + public const int VIRTUAL = 2; /** * A unique identifier for the alias @@ -65,7 +67,7 @@ class UrlAlias extends ValueObject * ) * * - * @var array + * @phpstan-var TPathData */ public $pathData; From 8cf5f6726c4739154ffa4e9601188122ea93486a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 12 Apr 2025 23:39:55 +0200 Subject: [PATCH 052/185] IBX-9727: [Tests] Fixed UrlAliasHandlerTest after applying strict types Rector --- .../Content/UrlAlias/UrlAliasHandlerTest.php | 110 +++++++++++++----- 1 file changed, 78 insertions(+), 32 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php index 6778f5037a..608442802b 100644 --- a/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php @@ -35,6 +35,8 @@ * @covers \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\Handler * * @group urlalias-handler + * + * @phpstan-import-type TPathData from \Ibexa\Contracts\Core\Persistence\Content\UrlAlias */ class UrlAliasHandlerTest extends TestCase { @@ -92,6 +94,9 @@ public function testLookupThrowsInvalidArgumentException(): void $handler->lookup(str_repeat('/1', 99)); } + /** + * @phpstan-return list + */ public function providerForTestLookupLocationUrlAlias(): array { return [ @@ -344,9 +349,18 @@ public function providerForTestLookupLocationUrlAlias(): array * * @dataProvider providerForTestLookupLocationUrlAlias * - * @depends testLookup + * @depends testLookup * * @group location + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testLookupLocationUrlAlias( string $url, @@ -400,6 +414,10 @@ public function testLookupLocationUrlAlias( * @group location * * @todo refactor, only forward pertinent + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupLocationCaseCorrection( string $url, @@ -433,6 +451,9 @@ public function testLookupLocationCaseCorrection( ); } + /** + * @phpstan-return list + */ public function providerForTestLookupLocationMultipleLanguages(): array { return [ @@ -528,6 +549,10 @@ public function providerForTestLookupLocationMultipleLanguages(): array * * @group multiple-languages * @group location + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupLocationMultipleLanguages( string $url, @@ -584,6 +609,9 @@ public function testLookupLocationHistoryUrlAlias(): void ); } + /** + * @phpstan-return list + */ public function providerForTestLookupCustomLocationUrlAlias(): array { return [ @@ -711,6 +739,10 @@ public function providerForTestLookupCustomLocationUrlAlias(): array * * @group location * @group custom + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupCustomLocationUrlAlias( string $url, @@ -755,6 +787,10 @@ public function testLookupCustomLocationUrlAlias( * * @group location * @group custom + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupCustomLocationUrlAliasCaseCorrection( string $url, @@ -789,6 +825,9 @@ public function testLookupCustomLocationUrlAliasCaseCorrection( ); } + /** + * @phpstan-return list + */ public function providerForTestLookupVirtualUrlAlias(): array { return [ @@ -824,6 +863,9 @@ public function testLookupVirtualUrlAlias(string $url, string $id): void $this->assertVirtualUrlAliasValid($urlAlias, $id); } + /** + * @phpstan-return list + */ public function providerForTestLookupResourceUrlAlias(): array { return [ @@ -884,6 +926,10 @@ public function providerForTestLookupResourceUrlAlias(): array * @depends testLookup * * @group resource + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupResourceUrlAlias( string $url, @@ -928,6 +974,10 @@ public function testLookupResourceUrlAlias( * @depends testLookup * * @group resource + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testLookupResourceUrlAliasCaseInsensitive( string $url, @@ -1176,21 +1226,23 @@ public function providerForTestPublishUrlAliasForLocationComplex() /** * Test for the publishUrlAliasForLocation() method. * - * @todo document - * * @dataProvider providerForTestPublishUrlAliasForLocationComplex * * @depends testPublishUrlAliasForLocation * * @group publish + * + * @phpstan-param TPathData $pathData + * + * @param string[] $languageCodes */ public function testPublishUrlAliasForLocationComplex( - $url, - $pathData, + string $url, + array $pathData, array $languageCodes, - $alwaysAvailable, - $locationId, - $id + bool $alwaysAvailable, + int $locationId, + string $id ): void { $handler = $this->getHandler(); $this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php'); @@ -3016,10 +3068,11 @@ public function testLocationCopiedSubtree(): void } /** - * Test for the loadUrlAlias() method. + * @dataProvider providerForTestLookupLocationMultipleLanguages * + * @phpstan-param TPathData $pathData * - * @dataProvider providerForTestLookupLocationMultipleLanguages + * @param string[] $languageCodes */ public function testLoadAutogeneratedUrlAlias( string $url, @@ -3054,10 +3107,11 @@ public function testLoadAutogeneratedUrlAlias( } /** - * Test for the loadUrlAlias() method. + * @dataProvider providerForTestLookupResourceUrlAlias * + * @phpstan-param TPathData $pathData * - * @dataProvider providerForTestLookupResourceUrlAlias + * @param string[] $languageCodes */ public function testLoadResourceUrlAlias( string $url, @@ -3172,6 +3226,9 @@ public function testLoadUrlAliasThrowsNotFoundException(): void $handler->loadUrlAlias('non-existent'); } + /** + * @phpstan-return list + */ public function providerForTestPublishUrlAliasForLocationSkipsReservedWord(): array { return [ @@ -5332,12 +5389,10 @@ protected function countRows(): int $connection = $this->getDatabaseConnection(); $query = $connection->createQueryBuilder(); $query - ->select($connection->getDatabasePlatform()->getCountExpression('*')) + ->select('COUNT(*)') ->from(UrlAliasGateway::TABLE); - $statement = $query->execute(); - - return (int)$statement->fetchColumn(); + return (int)$query->executeQuery()->fetchOne(); } /** @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ @@ -5409,9 +5464,6 @@ protected function getHandler(): Handler ); } - /** - * @throws \Doctrine\DBAL\Exception - */ protected function getLanguageHandler(): LanguageHandler { if (!isset($this->languageHandler)) { @@ -5426,10 +5478,7 @@ protected function getLanguageHandler(): LanguageHandler return $this->languageHandler; } - /** - * @return \Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator - */ - protected function getLanguageMaskGenerator() + protected function getLanguageMaskGenerator(): LanguageMaskGenerator { if (!isset($this->languageMaskGenerator)) { $this->languageMaskGenerator = new LanguageMaskGenerator( @@ -5440,10 +5489,7 @@ protected function getLanguageMaskGenerator() return $this->languageMaskGenerator; } - /** - * @return \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway - */ - protected function getLocationGateway() + protected function getLocationGateway(): LocationGateway { if (!isset($this->locationGateway)) { $this->locationGateway = new DoctrineDatabaseLocation( @@ -5457,15 +5503,15 @@ protected function getLocationGateway() return $this->locationGateway; } - /** - * @return \Ibexa\Core\Persistence\TransformationProcessor - */ public function getProcessor(): DefinitionBased { + $ruleFiles = glob(__DIR__ . '/../../../TransformationProcessor/_fixtures/transformations/*.tr'); + self::assertNotFalse($ruleFiles, 'An error occurred trying to get rule files'); + return new DefinitionBased( new Parser(), new PcreCompiler(new Utf8Converter()), - glob(__DIR__ . '/../../../TransformationProcessor/_fixtures/transformations/*.tr') + $ruleFiles ); } @@ -5474,7 +5520,7 @@ public function getProcessor(): DefinitionBased * * @see testArchiveUrlAliasesForDeletedTranslations for the description of parameters * - * @return array + * @phpstan-return list */ public function providerForArchiveUrlAliasesForDeletedTranslations(): array { From 6274ef7e8115b00821bda607e2712b8f945452c5 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sat, 12 Apr 2025 23:58:46 +0200 Subject: [PATCH 053/185] IBX-8471: [Tests] Upgraded TestOutput stub to Symfony 7 --- tests/bundle/Core/EventListener/Stubs/TestOutput.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/bundle/Core/EventListener/Stubs/TestOutput.php b/tests/bundle/Core/EventListener/Stubs/TestOutput.php index 89595d21be..1887d2fcda 100644 --- a/tests/bundle/Core/EventListener/Stubs/TestOutput.php +++ b/tests/bundle/Core/EventListener/Stubs/TestOutput.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\EventListener\Stubs; @@ -14,14 +15,14 @@ */ class TestOutput extends Output { - public $output = ''; + public string $output = ''; public function clear(): void { $this->output = ''; } - protected function doWrite($message, $newline) + protected function doWrite(string $message, bool $newline): void { $this->output .= $message . ($newline ? "\n" : ''); } From 2564ed3e90b41b7fe4acb1854d03225f9c0bf0bb Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 11:06:33 +0200 Subject: [PATCH 054/185] IBX-9727: [Tests] Fixed LocationServiceTest after applying strict types Rector --- .../Core/Repository/LocationServiceTest.php | 124 ++++++------------ 1 file changed, 43 insertions(+), 81 deletions(-) diff --git a/tests/integration/Core/Repository/LocationServiceTest.php b/tests/integration/Core/Repository/LocationServiceTest.php index 12ca15a9cc..9a14e2eb15 100644 --- a/tests/integration/Core/Repository/LocationServiceTest.php +++ b/tests/integration/Core/Repository/LocationServiceTest.php @@ -20,7 +20,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\LocationList; -use Ibexa\Contracts\Core\Repository\Values\Content\LocationUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\Query; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; @@ -41,7 +40,8 @@ class LocationServiceTest extends BaseTest * * @return \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::newLocationCreateStruct() + * @throws \ErrorException + * @throws \Doctrine\DBAL\Exception */ public function testNewLocationCreateStruct() { @@ -70,8 +70,6 @@ public function testNewLocationCreateStruct() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct $locationCreate * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::newLocationCreateStruct() - * * @depends testNewLocationCreateStruct */ public function testNewLocationCreateStructValues(LocationCreateStruct $locationCreate): void @@ -93,9 +91,15 @@ public function testNewLocationCreateStructValues(LocationCreateStruct $location /** * Test for the createLocation() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation() * * @depends testNewLocationCreateStruct + * + * @phpstan-return array{ + * locationCreate: \Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct, + * createdLocation: \Ibexa\Contracts\Core\Repository\Values\Content\Location, + * contentInfo: \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo, + * parentLocation: \Ibexa\Contracts\Core\Repository\Values\Content\Location + * } */ public function testCreateLocation(): array { @@ -103,7 +107,6 @@ public function testCreateLocation(): array $contentId = $this->generateId('object', 41); $parentLocationId = $this->generateId('location', 5); - /* BEGIN: Use Case */ // $contentId is the ID of an existing content object // $parentLocationId is the ID of an existing location $contentService = $repository->getContentService(); @@ -123,12 +126,6 @@ public function testCreateLocation(): array $contentInfo, $locationCreate ); - /* END: Use Case */ - - self::assertInstanceOf( - Location::class, - $location - ); return [ 'locationCreate' => $locationCreate, @@ -139,12 +136,11 @@ public function testCreateLocation(): array } /** - * Test for the createLocation() method. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation - * * @depends testCreateLocation - * @depends Ibexa\Tests\Integration\Core\Repository\ContentServiceTest::testHideContent + * + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testCreateLocationChecksContentVisibility(): void { @@ -182,8 +178,6 @@ public function testCreateLocationChecksContentVisibility(): void /** * Test for the createLocation() method with utilizing default ContentType sorting options. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::createLocation */ public function testCreateLocationWithContentTypeSortingOptions(): void { @@ -395,9 +389,14 @@ public function testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfR /* END: Use Case */ } - public function dataProviderForOutOfRangeLocationPriority(): array + /** + * @phpstan-return iterable + */ + public static function dataProviderForOutOfRangeLocationPriority(): iterable { - return [[-2147483649], [2147483648]]; + yield 'below lower bound' => [-2147483649]; + + yield 'above upper bound' => [2147483648]; } /** @@ -899,22 +898,21 @@ static function (Location $location) { } /** - * Test for the loadLocations() method. - * * @return \Ibexa\Contracts\Core\Repository\Values\Content\Location[] * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations($contentInfo, $rootLocation) - * * @depends testLoadLocations + * + * @throws \ErrorException + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ - public function testLoadLocationsLimitedSubtree() + public function testLoadLocationsLimitedSubtree(): array { $repository = $this->getRepository(); $originalLocationId = $this->generateId('location', 54); $originalParentLocationId = $this->generateId('location', 48); $newParentLocationId = $this->generateId('location', 43); - /* BEGIN: Use Case */ // $originalLocationId is the ID of an existing location // $originalParentLocationId is the ID of the parent location of // $originalLocationId @@ -939,7 +937,6 @@ public function testLoadLocationsLimitedSubtree() $originalLocation->contentInfo, $findRootLocation ); - /* END: Use Case */ self::assertIsArray($locations); @@ -951,8 +948,6 @@ public function testLoadLocationsLimitedSubtree() * * @param \Ibexa\Contracts\Core\Repository\Values\Content\Location[] $locations * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() - * * @depends testLoadLocationsLimitedSubtree */ public function testLoadLocationsLimitedSubtreeContent(array $locations): void @@ -968,7 +963,6 @@ public function testLoadLocationsLimitedSubtreeContent(array $locations): void /** * Test for the loadLocations() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations() * * @depends testLoadLocations */ @@ -999,7 +993,6 @@ public function testLoadLocationsThrowsBadStateException(): void /** * Test for the loadLocations() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocations($contentInfo, $rootLocation) * * @depends testLoadLocations */ @@ -1035,7 +1028,6 @@ public function testLoadLocationsThrowsBadStateExceptionLimitedSubtree(): void /** * Test for the loadLocationChildren() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren * * @depends testLoadLocation */ @@ -1068,8 +1060,6 @@ public function testLoadLocationChildren() /** * Test loading parent Locations for draft Content. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadParentLocationsForDraftContent */ public function testLoadParentLocationsForDraftContent() { @@ -1126,7 +1116,6 @@ public function testLoadParentLocationsForDraftContentThrowsBadStateException(Co /** * Test for the getLocationChildCount() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::getLocationChildCount() * * @depends testLoadLocation */ @@ -1146,7 +1135,6 @@ public function testGetLocationChildCount(): void /** * Test for the loadLocationChildren() method. * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren() * * @depends testLoadLocationChildren */ @@ -1179,9 +1167,6 @@ static function (Location $location) { ); } - /** - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren - */ public function testLoadLocationChildrenWithOffset(): LocationList { $repository = $this->getRepository(); @@ -1205,8 +1190,6 @@ public function testLoadLocationChildrenWithOffset(): LocationList * * @param \Ibexa\Contracts\Core\Repository\Values\Content\LocationList $locations * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren - * * @depends testLoadLocationChildrenWithOffset */ public function testLoadLocationChildrenDataWithOffset(LocationList $locations): void @@ -1231,8 +1214,6 @@ public function testLoadLocationChildrenDataWithOffset(LocationList $locations): } /** - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren - * * @depends testLoadLocationChildren */ public function testLoadLocationChildrenWithOffsetAndLimit(): LocationList @@ -1254,8 +1235,6 @@ public function testLoadLocationChildrenWithOffsetAndLimit(): LocationList } /** - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren - * * @depends testLoadLocationChildrenWithOffsetAndLimit */ public function testLoadLocationChildrenDataWithOffsetAndLimit(LocationList $locations): void @@ -1373,11 +1352,10 @@ private function createStructureForTestLoadLocationChildrenRespectsParentSorting } /** - * @covers \Ibexa\Contracts\Core\Repository\LocationService::loadLocationChildren - * * @dataProvider providerForLoadLocationChildrenRespectsParentSortingClauses * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception + * @throws \Doctrine\DBAL\Exception */ public function testLoadLocationChildrenRespectsParentSortingClauses( int $sortField, @@ -1409,24 +1387,15 @@ static function (Location $location) { } /** - * Test for the newLocationUpdateStruct() method. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::newLocationUpdateStruct + * @throws \Doctrine\DBAL\Exception */ public function testNewLocationUpdateStruct(): void { $repository = $this->getRepository(); - /* BEGIN: Use Case */ $locationService = $repository->getLocationService(); $updateStruct = $locationService->newLocationUpdateStruct(); - /* END: Use Case */ - - self::assertInstanceOf( - LocationUpdateStruct::class, - $updateStruct - ); $this->assertPropertiesCorrect( [ @@ -1440,18 +1409,25 @@ public function testNewLocationUpdateStruct(): void } /** - * Test for the updateLocation() method. + * @depends testLoadLocation * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() + * @phpstan-return array{ + * originalLocation: \Ibexa\Contracts\Core\Repository\Values\Content\Location, + * updateStruct: \Ibexa\Contracts\Core\Repository\Values\Content\LocationUpdateStruct, + * updatedLocation: \Ibexa\Contracts\Core\Repository\Values\Content\Location + * } * - * @depends testLoadLocation + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testUpdateLocation(): array { $repository = $this->getRepository(); $originalLocationId = $this->generateId('location', 5); - /* BEGIN: Use Case */ // $originalLocationId is the ID of an existing location $locationService = $repository->getLocationService(); @@ -1464,12 +1440,6 @@ public function testUpdateLocation(): array $updateStruct->sortOrder = Location::SORT_ORDER_DESC; $updatedLocation = $locationService->updateLocation($originalLocation, $updateStruct); - /* END: Use Case */ - - self::assertInstanceOf( - Location::class, - $updatedLocation - ); return [ 'originalLocation' => $originalLocation, @@ -1479,10 +1449,6 @@ public function testUpdateLocation(): array } /** - * Test for the updateLocation() method. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() - * * @depends testUpdateLocation */ public function testUpdateLocationStructValues(array $data): void @@ -1510,11 +1476,11 @@ public function testUpdateLocationStructValues(array $data): void } /** - * Test for the updateLocation() method. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() - * * @depends testLoadLocation + * + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testUpdateLocationWithSameRemoteId(): void { @@ -1546,10 +1512,6 @@ public function testUpdateLocationWithSameRemoteId(): void } /** - * Test for the updateLocation() method. - * - * @covers \Ibexa\Contracts\Core\Repository\LocationService::updateLocation() - * * @depends testLoadLocation */ public function testUpdateLocationThrowsInvalidArgumentException(): void @@ -3400,7 +3362,7 @@ public function testMoveSubtreeUpdatesPathIdentificationString(): void self::assertEquals( 'top_node/parent/move_me', - $query->execute()->fetchColumn() + $query->executeQuery()->fetchOne() ); } From 679322960b6b4a2007ae3da036d8ad6ae4c3321a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 11:16:13 +0200 Subject: [PATCH 055/185] IBX-9727: [Tests] Fixed TrashServiceTest after applying strict types Rector --- .../Core/Repository/TrashServiceTest.php | 153 ++++++++---------- 1 file changed, 66 insertions(+), 87 deletions(-) diff --git a/tests/integration/Core/Repository/TrashServiceTest.php b/tests/integration/Core/Repository/TrashServiceTest.php index 9ef8d17e5b..6e261f2cad 100644 --- a/tests/integration/Core/Repository/TrashServiceTest.php +++ b/tests/integration/Core/Repository/TrashServiceTest.php @@ -11,7 +11,6 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Repository; -use Ibexa\Contracts\Core\Repository\URLAliasService; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location as APILocation; @@ -24,6 +23,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\Limitation\SubtreeLimitation; use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\TrashItem; +use function time; /** * Test case for operations in the TrashService using in memory storage. @@ -35,6 +35,9 @@ */ class TrashServiceTest extends BaseTrashServiceTest { + private const string MEDIA_REMOTE_ID = '75c715a51699d2d309a924eca6a95145'; + private const string MEDIA_URL = '/Media'; + /** * Test for the trash() method. * @@ -51,8 +54,6 @@ public function testTrash(): void } /** - * Test for the trash() method. - * * @depends testTrash * * @throws \Doctrine\DBAL\Exception @@ -63,11 +64,9 @@ public function testTrashSetsExpectedTrashItemProperties(): void { $repository = $this->getRepository(); - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; - // Load the location that will be trashed $location = $repository->getLocationService() - ->loadLocationByRemoteId($mediaRemoteId); + ->loadLocationByRemoteId(self::MEDIA_REMOTE_ID); $expected = [ 'id' => $location->id, @@ -101,9 +100,6 @@ public function testTrashRemovesLocationFromMainStorage(): void $repository = $this->getRepository(); - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; - - /* BEGIN: Use Case */ $this->createTrashItem(); // Load the location service @@ -111,8 +107,7 @@ public function testTrashRemovesLocationFromMainStorage(): void // This call will fail with a "NotFoundException", because the media // location was marked as trashed in the main storage - $locationService->loadLocationByRemoteId($mediaRemoteId); - /* END: Use Case */ + $locationService->loadLocationByRemoteId(self::MEDIA_REMOTE_ID); } /** @@ -296,9 +291,11 @@ public function testLoadTrashItemThrowsNotFoundException(): void } /** - * Test for the recover() method. - * * @depends testTrash + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testRecover(): void { @@ -306,9 +303,6 @@ public function testRecover(): void $trashService = $repository->getTrashService(); $locationService = $repository->getLocationService(); - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; - - /* BEGIN: Use Case */ $trashItem = $this->createTrashItem(); // Recover the trashed item @@ -316,13 +310,7 @@ public function testRecover(): void // Load the recovered location $locationReloaded = $locationService->loadLocationByRemoteId( - $mediaRemoteId - ); - /* END: Use Case */ - - self::assertInstanceOf( - APILocation::class, - $location + self::MEDIA_REMOTE_ID ); self::assertEquals( @@ -330,16 +318,15 @@ public function testRecover(): void $locationReloaded ); - try { - $trashService->loadTrashItem($trashItem->id); - self::fail('Trash item was not removed after being recovered.'); - } catch (NotFoundException $e) { - // All well - } + $this->expectException(NotFoundException::class); + $trashService->loadTrashItem($trashItem->id); } /** - * Test recovering a non existing trash item results in a NotFoundException. + * Test recovering a non-existing trash item results in a NotFoundException. + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testRecoverThrowsNotFoundExceptionForNonExistingTrashItem(): void { @@ -358,56 +345,57 @@ public function testRecoverThrowsNotFoundExceptionForNonExistingTrashItem(): voi } /** - * Test for the trash() method. - * * @depends testTrash + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testNotFoundAliasAfterRemoveIt(): void { $this->expectException(NotFoundException::class); - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; - $repository = $this->getRepository(); $trashService = $repository->getTrashService(); $urlAliasService = $repository->getURLAliasService(); $locationService = $repository->getLocationService(); // Double ->lookup() call because there where issue that one call was not enough to spot bug - $urlAliasService->lookup('/Media'); - $urlAliasService->lookup('/Media'); + $urlAliasService->lookup(self::MEDIA_URL); + $urlAliasService->lookup(self::MEDIA_URL); - $mediaLocation = $locationService->loadLocationByRemoteId($mediaRemoteId); + $mediaLocation = $locationService->loadLocationByRemoteId(self::MEDIA_REMOTE_ID); $trashService->trash($mediaLocation); - $urlAliasService->lookup('/Media'); + $urlAliasService->lookup(self::MEDIA_URL); } /** - * Test for the recover() method. - * * @depends testTrash + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testAliasesForRemovedItems(): void { - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; - $repository = $this->getRepository(); $trashService = $repository->getTrashService(); $urlAliasService = $repository->getURLAliasService(); $locationService = $repository->getLocationService(); // Double ->lookup() call because there where issue that one call was not enough to spot bug - $urlAliasService->lookup('/Media'); - $trashedLocationAlias = $urlAliasService->lookup('/Media'); + $urlAliasService->lookup(self::MEDIA_URL); + $trashedLocationAlias = $urlAliasService->lookup(self::MEDIA_URL); - $mediaLocation = $locationService->loadLocationByRemoteId($mediaRemoteId); + $mediaLocation = $locationService->loadLocationByRemoteId(self::MEDIA_REMOTE_ID); $trashItem = $trashService->trash($mediaLocation); - $this->assertAliasNotExists('/Media'); + $this->assertAliasNotExists(self::MEDIA_URL); $this->createNewContentInPlaceTrashedOne($repository, $mediaLocation->parentLocationId); - $createdLocationAlias = $urlAliasService->lookup('/Media'); + $createdLocationAlias = $urlAliasService->lookup(self::MEDIA_URL); self::assertNotEquals( $trashedLocationAlias->destination, @@ -426,9 +414,11 @@ public function testAliasesForRemovedItems(): void } /** - * Test for the recover() method. - * * @depends testRecover + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testRecoverDoesNotRestoreChildLocations(): void { @@ -466,20 +456,17 @@ public function testRecoverDoesNotRestoreChildLocations(): void } } - try { - $trashService->loadTrashItem($trashItem->id); - self::fail('Trash item was not removed after being recovered.'); - } catch (NotFoundException $e) { - // All well - } + $this->expectException(NotFoundException::class); + $trashService->loadTrashItem($trashItem->id); } /** - * Test for the recover() method. - * * @depends testRecover * - * @todo Fix naming + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException */ public function testRecoverWithLocationCreateStructParameter(): void { @@ -488,7 +475,6 @@ public function testRecoverWithLocationCreateStructParameter(): void $locationService = $repository->getLocationService(); $homeLocationId = $this->generateId('location', 2); - /* BEGIN: Use Case */ // $homeLocationId is the ID of the "Home" location in an Ibexa // demo installation @@ -499,13 +485,12 @@ public function testRecoverWithLocationCreateStructParameter(): void // Recover location with new location $location = $trashService->recover($trashItem, $newParentLocation); - /* END: Use Case */ $this->assertPropertiesCorrect( [ 'remoteId' => $trashItem->remoteId, 'parentLocationId' => $homeLocationId, - // Not the full sub tree is restored + // Not the full subtree is restored 'depth' => $newParentLocation->depth + 1, 'hidden' => false, 'invisible' => $trashItem->invisible, @@ -517,18 +502,18 @@ public function testRecoverWithLocationCreateStructParameter(): void $location ); - try { - $trashService->loadTrashItem($trashItem->id); - self::fail('Trash item was not removed after being recovered.'); - } catch (NotFoundException $e) { - // All well - } + $this->expectException(NotFoundException::class); + $trashService->loadTrashItem($trashItem->id); } /** - * Test for the recover() method. - * * @depends testRecover + * + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \ReflectionException */ public function testRecoverIncrementsChildCountOnOriginalParent(): void { @@ -556,18 +541,18 @@ public function testRecoverIncrementsChildCountOnOriginalParent(): void $locationService->getLocationChildCount($location) ); - try { - $trashService->loadTrashItem($trashItem->id); - self::fail('Trash item was not removed after being recovered.'); - } catch (NotFoundException $e) { - // All well - } + $this->expectException(NotFoundException::class); + $trashService->loadTrashItem($trashItem->id); } /** - * Test for the recover() method. - * * @depends testRecoverWithLocationCreateStructParameter + * + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \ReflectionException */ public function testRecoverWithLocationCreateStructParameterIncrementsChildCountOnNewParent(): void { @@ -581,7 +566,6 @@ public function testRecoverWithLocationCreateStructParameterIncrementsChildCount $childCount = $locationService->getLocationChildCount($location); - /* BEGIN: Use Case */ // $homeLocationId is the ID of the "Home" location in an Ibexa // demo installation @@ -592,7 +576,6 @@ public function testRecoverWithLocationCreateStructParameterIncrementsChildCount // Recover location with new location $trashService->recover($trashItem, $newParentLocation); - /* END: Use Case */ $this->refreshSearch($repository); @@ -601,12 +584,8 @@ public function testRecoverWithLocationCreateStructParameterIncrementsChildCount $locationService->getLocationChildCount($location) ); - try { - $trashService->loadTrashItem($trashItem->id); - self::fail('Trash item was not removed after being recovered.'); - } catch (NotFoundException $e) { - // All well - } + $this->expectException(NotFoundException::class); + $trashService->loadTrashItem($trashItem->id); } /** @@ -678,7 +657,7 @@ public function testFindTrashItemsSortedByDateTrashed(): void $firstTrashedItem = $trashService->trash( $locationService->loadLocation($folder1->contentInfo->mainLocationId) ); - $this->updateTrashedDate($firstTrashedItem->id, \time() - 100); + $this->updateTrashedDate($firstTrashedItem->id, time() - 100); $latestTrashItem = $trashService->trash( $locationService->loadLocation($folder2->contentInfo->mainLocationId) ); @@ -1235,7 +1214,7 @@ private function createRemoteIdList(): array /* BEGIN: Inline */ // remoteId of the "Community" location in an Ibexa demo installation - $mediaRemoteId = '75c715a51699d2d309a924eca6a95145'; + $mediaRemoteId = self::MEDIA_REMOTE_ID; // Load the location service $locationService = $repository->getLocationService(); From bbf137015850207c9ee3a79fa9b571abfc491cbd Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 11:28:19 +0200 Subject: [PATCH 056/185] IBX-9811: [Tests] Aligned URLAliasServiceTest with doctrine/dbal v3 and improved code quality --- .../Core/Repository/URLAliasServiceTest.php | 157 +++++++++--------- 1 file changed, 77 insertions(+), 80 deletions(-) diff --git a/tests/integration/Core/Repository/URLAliasServiceTest.php b/tests/integration/Core/Repository/URLAliasServiceTest.php index 68fc23d243..1a0aff50cf 100644 --- a/tests/integration/Core/Repository/URLAliasServiceTest.php +++ b/tests/integration/Core/Repository/URLAliasServiceTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Integration\Core\Repository; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ParameterType; use Exception; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -17,7 +18,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; use Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; use Ibexa\Tests\Integration\Core\Repository\Common\SlugConverter as TestSlugConverter; -use PDO; use RuntimeException; /** @@ -29,6 +29,8 @@ */ class URLAliasServiceTest extends BaseTest { + private const string HOME_MY_NEW_SITE_URL = '/Home/My-New-Site'; + /** * Tests that the required LocationService::loadLocation() * at least returns an object, because this method is utilized in several @@ -67,9 +69,13 @@ protected function setUp(): void } /** - * Test for the createUrlAlias() method. + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias() + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testCreateUrlAlias(): array { @@ -85,22 +91,16 @@ public function testCreateUrlAlias(): array $location = $locationService->loadLocation($locationId); - $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US'); - /* END: Use Case */ - - self::assertInstanceOf( - URLAlias::class, - $createdUrlAlias - ); + $createdUrlAlias = $urlAliasService->createUrlAlias($location, self::HOME_MY_NEW_SITE_URL, 'eng-US'); return [$createdUrlAlias, $location->id]; } /** - * Test for the createUrlAlias() method. - * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias * + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException @@ -149,7 +149,7 @@ public function testLoad(): void } /** - * @param array $testData + * @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData * * @depends testCreateUrlAlias */ @@ -163,7 +163,7 @@ public function testCreateUrlAliasPropertyValues(array $testData): void [ 'type' => URLAlias::LOCATION, 'destination' => $locationId, - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => false, 'isHistory' => false, @@ -175,11 +175,15 @@ public function testCreateUrlAliasPropertyValues(array $testData): void } /** - * Test for the createUrlAlias() method. - * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias($location, $path, $languageCode, $forwarding) + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} * * @depends testCreateUrlAliasPropertyValues + * + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testCreateUrlAliasWithForwarding(): array { @@ -187,7 +191,6 @@ public function testCreateUrlAliasWithForwarding(): array $locationId = $this->generateId('location', 5); - /* BEGIN: Use Case */ // $locationId is the ID of an existing location $locationService = $repository->getLocationService(); @@ -195,19 +198,13 @@ public function testCreateUrlAliasWithForwarding(): array $location = $locationService->loadLocation($locationId); - $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US', true); - /* END: Use Case */ - - self::assertInstanceOf( - URLAlias::class, - $createdUrlAlias - ); + $createdUrlAlias = $urlAliasService->createUrlAlias($location, self::HOME_MY_NEW_SITE_URL, 'eng-US', true); return [$createdUrlAlias, $location->id]; } /** - * @param array $testData + * @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData * * @depends testCreateUrlAliasWithForwarding */ @@ -221,7 +218,7 @@ public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData): [ 'type' => URLAlias::LOCATION, 'destination' => $locationId, - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => false, 'isHistory' => false, @@ -233,9 +230,13 @@ public function testCreateUrlAliasPropertyValuesWithForwarding(array $testData): } /** - * Test for the createUrlAlias() method. + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createUrlAlias($location, $path, $languageCode, $forwarding, $alwaysAvailable) + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testCreateUrlAliasWithAlwaysAvailable(): array { @@ -243,7 +244,6 @@ public function testCreateUrlAliasWithAlwaysAvailable(): array $locationId = $this->generateId('location', 5); - /* BEGIN: Use Case */ // $locationId is the ID of an existing location $locationService = $repository->getLocationService(); @@ -251,13 +251,7 @@ public function testCreateUrlAliasWithAlwaysAvailable(): array $location = $locationService->loadLocation($locationId); - $createdUrlAlias = $urlAliasService->createUrlAlias($location, '/Home/My-New-Site', 'eng-US', false, true); - /* END: Use Case */ - - self::assertInstanceOf( - URLAlias::class, - $createdUrlAlias - ); + $createdUrlAlias = $urlAliasService->createUrlAlias($location, self::HOME_MY_NEW_SITE_URL, 'eng-US', false, true); return [$createdUrlAlias, $location->id]; } @@ -277,7 +271,7 @@ public function testCreateUrlAliasPropertyValuesWithAlwaysAvailable(array $testD [ 'type' => URLAlias::LOCATION, 'destination' => $locationId, - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => true, 'isHistory' => false, @@ -327,7 +321,7 @@ public function testCreateGlobalUrlAlias() $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( 'module:content/search?SearchText=Ibexa', - '/Home/My-New-Site', + self::HOME_MY_NEW_SITE_URL, 'eng-US' ); /* END: Use Case */ @@ -353,7 +347,7 @@ public function testCreateGlobalUrlAliasPropertyValues(URLAlias $createdUrlAlias [ 'type' => URLAlias::RESOURCE, 'destination' => 'content/search?SearchText=Ibexa', - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => false, 'isHistory' => false, @@ -378,7 +372,7 @@ public function testCreateGlobalUrlAliasWithForward() $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( 'module:content/search?SearchText=Ibexa', - '/Home/My-New-Site', + self::HOME_MY_NEW_SITE_URL, 'eng-US', true ); @@ -405,7 +399,7 @@ public function testCreateGlobalUrlAliasWithForwardPropertyValues(URLAlias $crea [ 'type' => URLAlias::RESOURCE, 'destination' => 'content/search?SearchText=Ibexa', - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => false, 'isHistory' => false, @@ -430,7 +424,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailable() $createdUrlAlias = $urlAliasService->createGlobalUrlAlias( 'module:content/search?SearchText=Ibexa', - '/Home/My-New-Site', + self::HOME_MY_NEW_SITE_URL, 'eng-US', false, true @@ -458,7 +452,7 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAli [ 'type' => URLAlias::RESOURCE, 'destination' => 'content/search?SearchText=Ibexa', - 'path' => '/Home/My-New-Site', + 'path' => self::HOME_MY_NEW_SITE_URL, 'languageCodes' => ['eng-US'], 'alwaysAvailable' => true, 'isHistory' => false, @@ -470,9 +464,13 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAli } /** - * Test for the createUrlAlias() method. + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testCreateGlobalUrlAliasForLocation(): array { @@ -482,7 +480,6 @@ public function testCreateGlobalUrlAliasForLocation(): array $locationService = $repository->getLocationService(); $location = $locationService->loadLocation($locationId); - /* BEGIN: Use Case */ // $locationId is the ID of an existing location $urlAliasService = $repository->getURLAliasService(); @@ -494,20 +491,18 @@ public function testCreateGlobalUrlAliasForLocation(): array false, true ); - /* END: Use Case */ - - self::assertInstanceOf( - URLAlias::class, - $createdUrlAlias - ); return [$createdUrlAlias, $location->id]; } /** - * Test for the createUrlAlias() method. + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::createGlobalUrlAlias($resource, $path, $languageCode, $forwarding, $alwaysAvailable) + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testCreateGlobalUrlAliasForLocationVariation(): array { @@ -529,22 +524,16 @@ public function testCreateGlobalUrlAliasForLocationVariation(): array false, true ); - /* END: Use Case */ - - self::assertInstanceOf( - URLAlias::class, - $createdUrlAlias - ); return [$createdUrlAlias, $location->id]; } /** - * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias + * @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData * * @depends testCreateGlobalUrlAliasForLocation */ - public function testCreateGlobalUrlAliasForLocationPropertyValues($testData): void + public function testCreateGlobalUrlAliasForLocationPropertyValues(array $testData): void { [$createdUrlAlias, $locationId] = $testData; @@ -566,11 +555,11 @@ public function testCreateGlobalUrlAliasForLocationPropertyValues($testData): vo } /** - * @param \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias + * @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData * * @depends testCreateGlobalUrlAliasForLocationVariation */ - public function testCreateGlobalUrlAliasForLocationVariationPropertyValues($testData): void + public function testCreateGlobalUrlAliasForLocationVariationPropertyValues(array $testData): void { $this->testCreateGlobalUrlAliasForLocationPropertyValues($testData); } @@ -597,9 +586,11 @@ public function testCreateGlobalUrlAliasThrowsInvalidArgumentException(): void } /** - * Test for the listLocationAliases() method. + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias[], \Ibexa\Contracts\Core\Repository\Values\Content\Location} * - * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::listLocationAliases() + * @throws \Doctrine\DBAL\Exception + * @throws \ErrorException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testListLocationAliases(): array { @@ -1066,9 +1057,12 @@ public function testLookupOnRenamedParent(): void /** * Test lookup on multilingual nested Locations returns proper UrlAlias Value. * + * @return array{\Ibexa\Contracts\Core\Repository\Values\Content\Location, \Ibexa\Contracts\Core\Repository\Values\Content\Location} + * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException + * @throws \Doctrine\DBAL\Exception */ public function testLookupOnMultilingualNestedLocations(): array { @@ -1095,7 +1089,7 @@ public function testLookupOnMultilingualNestedLocations(): array )->contentInfo->mainLocationId ); $urlAlias = $urlAliasService->lookup('/My-Folder-Name/Nested-Folder-Name'); - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $nestedFolderLocation->id, 'path' => '/My-folder-Name/nested-Folder-name', @@ -1107,7 +1101,7 @@ public function testLookupOnMultilingualNestedLocations(): array $urlAlias ); $urlAlias = $urlAliasService->lookup('/Ger-Folder-Name/Ger-Nested-Folder-Name'); - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $nestedFolderLocation->id, 'path' => '/Ger-folder-Name/Ger-Nested-folder-Name', @@ -1260,7 +1254,7 @@ public function testCreateNonLatinNonEmptyUniqueAliases(): void $this->createFolder($folderNames, 2)->contentInfo->mainLocationId ); $urlAlias1 = $urlAliasService->lookup('/1'); - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $folderLocation1->id, 'path' => '/1', @@ -1276,7 +1270,7 @@ public function testCreateNonLatinNonEmptyUniqueAliases(): void $this->createFolder($folderNames, 2)->contentInfo->mainLocationId ); $urlAlias2 = $urlAliasService->lookup('/2'); - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $folderLocation2->id, 'path' => '/2', @@ -1361,7 +1355,7 @@ static function (Connection $connection) use ($folderLocation) { ) ); - return $queryBuilder->execute(); + return $queryBuilder->executeStatement(); } ); @@ -1428,7 +1422,7 @@ static function (Connection $connection) use ($nestedFolderLocation) { $expr = $queryBuilder->expr(); $queryBuilder ->update('ezurlalias_ml') - ->set('link', $queryBuilder->createPositionalParameter(666, PDO::PARAM_INT)) + ->set('link', $queryBuilder->createPositionalParameter(666, ParameterType::INTEGER)) ->where( $expr->eq( 'action', @@ -1440,7 +1434,7 @@ static function (Connection $connection) use ($nestedFolderLocation) { ->andWhere( $expr->eq( 'is_original', - $queryBuilder->createPositionalParameter(0, PDO::PARAM_INT) + $queryBuilder->createPositionalParameter(0, ParameterType::INTEGER) ) ) ->andWhere( @@ -1448,7 +1442,7 @@ static function (Connection $connection) use ($nestedFolderLocation) { ) ; - return $queryBuilder->execute(); + return $queryBuilder->executeStatement(); } ); @@ -1568,7 +1562,7 @@ protected function assertLookupHistory($expectedIsHistory, $expectedDestination, try { $urlAlias = $urlAliasService->lookup($lookupUrl); - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $expectedDestination, 'path' => $lookupUrl, @@ -1617,6 +1611,7 @@ protected function updateContentField(ContentInfo $contentInfo, string $fieldDef * Note: test depends on already broken URL aliases: eznode:59, eznode:59, eznode:60. * * @throws \ErrorException + * @throws \Doctrine\DBAL\Exception */ public function testDeleteCorruptedUrlAliases(): void { @@ -1726,7 +1721,7 @@ private function assertUrlAliasPropertiesCorrect( bool $expectedIsHistory, URLAlias $actualUrlAliasValue ): void { - self::assertPropertiesCorrect( + $this->assertPropertiesCorrect( [ 'destination' => $expectedDestinationLocation->id, 'path' => $expectedPath, @@ -1745,11 +1740,13 @@ private function assertUrlAliasPropertiesCorrect( * * @covers \Ibexa\Contracts\Core\Repository\URLAliasService::deleteCorruptedUrlAliases * - * @see testDeleteCorruptedUrlAliases - * * @param \Doctrine\DBAL\Connection $connection * * @return int Number of new rows + * + * @throws \Doctrine\DBAL\Exception + * + * @see testDeleteCorruptedUrlAliases */ private function insertBrokenUrlAliasTableFixtures(Connection $connection): int { @@ -1805,7 +1802,7 @@ private function insertBrokenUrlAliasTableFixtures(Connection $connection): int $row[$columnName] = $query->createNamedParameter($value); } $query->values($row); - $query->execute(); + $query->executeStatement(); } return count($rows); From 24b652fe1cf40c4b210983cbc50e0fe615cd2a22 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 11:32:44 +0200 Subject: [PATCH 057/185] IBX-9811: [Tests] Aligned UserServiceTest with doctrine/dbal v3 --- tests/integration/Core/Repository/UserServiceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/UserServiceTest.php b/tests/integration/Core/Repository/UserServiceTest.php index 21ca337e63..f1a0c9da93 100644 --- a/tests/integration/Core/Repository/UserServiceTest.php +++ b/tests/integration/Core/Repository/UserServiceTest.php @@ -3498,7 +3498,7 @@ protected function updateRawPasswordHash(int $userId, int $newHashType): void ->setParameter('wrong_hash_type', $newHashType, ParameterType::INTEGER) ->setParameter('user_id', $userId); - $queryBuilder->execute(); + $queryBuilder->executeStatement(); } private function assertIsSameUser(User $expectedUser, User $actualUser): void From c8be6a05bffe53da1aa7ce7aef46df114c59ce76 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 11:35:54 +0200 Subject: [PATCH 058/185] IBX-9811: [Tests] Aligned URL field type DoctrineStorageTest with doctrine/dbal v3 and improved code quality --- .../Url/Gateway/DoctrineStorageTest.php | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php index d353888e91..d6eaeca5da 100644 --- a/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php +++ b/tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php @@ -7,6 +7,7 @@ namespace Ibexa\Tests\Core\FieldType\Url\Gateway; +use Doctrine\DBAL\ParameterType; use Ibexa\Core\FieldType\Url\UrlStorage\Gateway; use Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage; use Ibexa\Tests\Core\Persistence\Legacy\TestCase; @@ -16,6 +17,10 @@ */ class DoctrineStorageTest extends TestCase { + private const string URLS_FIXTURE_FILE_PATH = __DIR__ . '/_fixtures/urls.php'; + private const string CONTENT_VIEW_SITEMAP_URL = '/content/view/sitemap/2'; + private const string CONTENT_VIEW_TAGCLOUD_URL = '/content/view/tagcloud/2'; + private DoctrineStorage $storageGateway; /** @@ -23,14 +28,14 @@ class DoctrineStorageTest extends TestCase */ public function testGetIdUrlMap(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); + $this->insertDatabaseFixture(self::URLS_FIXTURE_FILE_PATH); $gateway = $this->getStorageGateway(); self::assertEquals( [ - 23 => '/content/view/sitemap/2', - 24 => '/content/view/tagcloud/2', + 23 => self::CONTENT_VIEW_SITEMAP_URL, + 24 => self::CONTENT_VIEW_TAGCLOUD_URL, ], $gateway->getIdUrlMap( [23, 24, 'fake'] @@ -43,19 +48,19 @@ public function testGetIdUrlMap(): void */ public function testGetUrlIdMap(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); + $this->insertDatabaseFixture(self::URLS_FIXTURE_FILE_PATH); $gateway = $this->getStorageGateway(); self::assertEquals( [ - '/content/view/sitemap/2' => 23, - '/content/view/tagcloud/2' => 24, + self::CONTENT_VIEW_SITEMAP_URL => 23, + self::CONTENT_VIEW_TAGCLOUD_URL => 24, ], $gateway->getUrlIdMap( [ - '/content/view/sitemap/2', - '/content/view/tagcloud/2', + self::CONTENT_VIEW_SITEMAP_URL, + self::CONTENT_VIEW_TAGCLOUD_URL, 'fake', ] ) @@ -64,6 +69,8 @@ public function testGetUrlIdMap(): void /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::insertUrl + * + * @throws \Doctrine\DBAL\Exception */ public function testInsertUrl(): void { @@ -83,11 +90,10 @@ public function testInsertUrl(): void ':id' ) ) - ->setParameter('id', $id, \PDO::PARAM_INT) + ->setParameter('id', $id, ParameterType::INTEGER) ; - $statement = $query->execute(); - $result = $statement->fetchAllAssociative(); + $result = $query->executeQuery()->fetchAllAssociative(); $expected = [ [ @@ -102,14 +108,15 @@ public function testInsertUrl(): void self::assertGreaterThanOrEqual($time, $result[0]['created']); self::assertGreaterThanOrEqual($time, $result[0]['modified']); - unset($result[0]['created']); - unset($result[0]['modified']); + unset($result[0]['created'], $result[0]['modified']); self::assertEquals($expected, $result); } /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::linkUrl + * + * @throws \Doctrine\DBAL\Exception */ public function testLinkUrl(): void { @@ -127,12 +134,10 @@ public function testLinkUrl(): void ->where( $query->expr()->eq($this->connection->quoteIdentifier('url_id'), ':urlId') ) - ->setParameter(':urlId', $urlId, \PDO::PARAM_INT) + ->setParameter('urlId', $urlId, ParameterType::INTEGER) ; - $statement = $query->execute(); - - $result = $statement->fetchAllAssociative(); + $result = $query->executeQuery()->fetchAllAssociative(); $expected = [ [ @@ -147,10 +152,12 @@ public function testLinkUrl(): void /** * @covers \Ibexa\Core\FieldType\Url\UrlStorage\Gateway\DoctrineStorage::unlinkUrl + * + * @throws \Doctrine\DBAL\Exception */ public function testUnlinkUrl(): void { - $this->insertDatabaseFixture(__DIR__ . '/_fixtures/urls.php'); + $this->insertDatabaseFixture(self::URLS_FIXTURE_FILE_PATH); $gateway = $this->getStorageGateway(); @@ -161,8 +168,7 @@ public function testUnlinkUrl(): void $query = $this->connection->createQueryBuilder(); $query->select('*')->from('ezurl_object_link'); - $statement = $query->execute(); - $result = $statement->fetchAllAssociative(); + $result = $query->executeQuery()->fetchAllAssociative(); $expected = [ [ @@ -178,9 +184,7 @@ public function testUnlinkUrl(): void $query = $this->connection->createQueryBuilder(); $query->select('*')->from('ezurl'); - $statement = $query->execute(); - - $result = $statement->fetchAllAssociative(); + $result = $query->executeQuery()->fetchAllAssociative(); $expected = [ [ @@ -190,7 +194,7 @@ public function testUnlinkUrl(): void 'last_checked' => '0', 'modified' => '1343140541', 'original_url_md5' => 'c86bcb109d8e70f9db65c803baafd550', - 'url' => '/content/view/tagcloud/2', + 'url' => self::CONTENT_VIEW_TAGCLOUD_URL, ], ]; From b6807347c2fe7414f8e5464e374f7ab7ac1e2a31 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 12:21:40 +0200 Subject: [PATCH 059/185] IBX-9811: [Tests] Aligned TestCase and Legacy SetupFactory with doctrine/dbal v3 and improved code quality --- .../Test/Repository/SetupFactory/Legacy.php | 25 +++-- tests/lib/Persistence/Legacy/TestCase.php | 97 +++++++------------ 2 files changed, 52 insertions(+), 70 deletions(-) diff --git a/src/contracts/Test/Repository/SetupFactory/Legacy.php b/src/contracts/Test/Repository/SetupFactory/Legacy.php index 3af249c7ca..e0d7c6ca8c 100644 --- a/src/contracts/Test/Repository/SetupFactory/Legacy.php +++ b/src/contracts/Test/Repository/SetupFactory/Legacy.php @@ -31,7 +31,7 @@ use Symfony\Component\Filesystem\Filesystem; /** - * A Test Factory is used to setup the infrastructure for a tests, based on a + * A Test Factory is used to set up the infrastructure for a tests, based on a * specific repository implementation to test. */ class Legacy extends SetupFactory @@ -75,14 +75,7 @@ class Legacy extends SetupFactory */ public function __construct() { - $dsn = getenv('DATABASE'); - if (false === $dsn) { - // use sqlite in-memory by default (does not need special handling for paratest as it's per process) - self::$dsn = 'sqlite://:memory:'; - } elseif (getenv('TEST_TOKEN') !== false) { - // Using paratest, assuming dsn ends with db name here... - self::$dsn = $dsn . '_' . getenv('TEST_TOKEN'); - } + self::$dsn = $this->buildDSN(); if ($repositoryReference = getenv('REPOSITORY_SERVICE_ID')) { $this->repositoryReference = $repositoryReference; @@ -363,4 +356,18 @@ public static function getCacheDir(): string { return self::getInstallationDir() . '/var/cache'; } + + private function buildDSN(): string + { + $dsn = getenv('DATABASE_URL'); + if (false === $dsn) { + // use sqlite in-memory by default (does not need special handling for paratest as it's per process) + $dsn = 'sqlite://:memory:'; + } elseif (getenv('TEST_TOKEN') !== false) { + // Using paratest, assuming dsn ends with db name here... + $dsn .= '_' . getenv('TEST_TOKEN'); + } + + return $dsn; + } } diff --git a/tests/lib/Persistence/Legacy/TestCase.php b/tests/lib/Persistence/Legacy/TestCase.php index f6566e5df1..0ae5730cc9 100644 --- a/tests/lib/Persistence/Legacy/TestCase.php +++ b/tests/lib/Persistence/Legacy/TestCase.php @@ -9,7 +9,6 @@ use Doctrine\Common\EventManager as DoctrineEventManager; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\ConnectionException; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Test\Persistence\Fixture\FileFixtureFactory; @@ -25,8 +24,6 @@ use Ibexa\DoctrineSchema\Database\DbPlatform\SqliteDbPlatform; use Ibexa\Tests\Core\Persistence\DatabaseConnectionFactory; use Ibexa\Tests\Core\Repository\LegacySchemaImporter; -use InvalidArgumentException; -use PDOException; use PHPUnit\Framework\TestCase as BaseTestCase; use ReflectionObject; use ReflectionProperty; @@ -38,17 +35,8 @@ abstract class TestCase extends BaseTestCase { /** * DSN used for the DB backend. - * - * @var string - */ - protected $dsn; - - /** - * Name of the DB, extracted from DSN. - * - * @var string */ - protected $db; + protected string $dsn; /** * Doctrine Database connection -- to not be constructed twice for one test. @@ -57,7 +45,7 @@ abstract class TestCase extends BaseTestCase * * @var \Doctrine\DBAL\Connection */ - protected $connection; + protected Connection $connection; private ?Gateway $sharedGateway = null; @@ -65,18 +53,13 @@ abstract class TestCase extends BaseTestCase * Get data source name. * * The database connection string is read from an optional environment - * variable "DATABASE" and defaults to an in-memory SQLite database. - * - * @return string + * variable "DATABASE_URL" and defaults to an in-memory SQLite database. */ - protected function getDsn() + protected function getDsn(): string { - if (!$this->dsn) { - $this->dsn = getenv('DATABASE'); - if (!$this->dsn) { - $this->dsn = 'sqlite://:memory:'; - } - $this->db = preg_replace('(^([a-z]+).*)', '\\1', $this->dsn); + if (!isset($this->dsn)) { + $dsn = getenv('DATABASE_URL'); + $this->dsn = $dsn ?: 'sqlite://:memory:'; } return $this->dsn; @@ -87,7 +70,7 @@ protected function getDsn() */ final public function getDatabaseConnection(): Connection { - if (!$this->connection) { + if (!isset($this->connection)) { $eventManager = new DoctrineEventManager(); $connectionFactory = new DatabaseConnectionFactory( [new SqliteDbPlatform()], @@ -125,8 +108,7 @@ final public function getSharedGateway(): Gateway } /** - * Resets the database on test setup, so we always operate on a clean - * database. + * Resets the database on test setup, so we always operate on a clean database. */ protected function setUp(): void { @@ -136,10 +118,10 @@ protected function setUp(): void dirname(__DIR__, 4) . '/src/bundle/Core/Resources/config/storage/legacy/schema.yaml' ); - } catch (PDOException | ConnectionException $e) { + } catch (DBALException $e) { self::fail( sprintf( - 'PDO session could not be created: %s: %s', + 'Could not import legacy database schema: %s: %s', get_class($e), $e->getMessage() ) @@ -153,13 +135,9 @@ protected function tearDown(): void } /** - * Get a text representation of a result set. - * - * @param array $result - * - * @return string + * @phpstan-param list> $result */ - protected static function getResultTextRepresentation(array $result) + protected static function getResultTextRepresentation(array $result): string { return implode( "\n", @@ -212,10 +190,12 @@ protected function insertSharedDatabaseFixture(): void * maximum readability of the differences between expectations and real * results. * - * The expectation MUST be passed as a two dimensional array containing + * The expectation MUST be passed as a two-dimensional array containing * rows of columns. * - * @param array $expectation expected raw database rows + * @phpstan-param list> $expectation expected raw database rows + * + * @throws \Doctrine\DBAL\Exception */ public static function assertQueryResult( array $expectation, @@ -237,21 +217,16 @@ public static function assertQueryResult( * Asserts that for all keys in $properties a corresponding property * exists in $object with the *same* value as in $properties. * - * @param array $properties + * @param array $properties * @param object $object */ - protected function assertPropertiesCorrect(array $properties, $object) + protected function assertPropertiesCorrect(array $properties, object $object): void { - if (!is_object($object)) { - throw new InvalidArgumentException( - 'Received ' . gettype($object) . ' instead of object as second parameter' - ); - } foreach ($properties as $propName => $propVal) { self::assertSame( $propVal, $object->$propName, - "Incorrect value for \${$propName}" + "Incorrect value for \$$propName" ); } } @@ -263,15 +238,13 @@ protected function assertPropertiesCorrect(array $properties, $object) * vice versa!). If $propertyNames is null, all properties are checked. * Otherwise, $propertyNames provides a white list. * - * @param object $expStruct - * @param object $actStruct - * @param array $propertyNames + * @param string[]|null $propertyNames */ protected function assertStructsEqual( - $expStruct, - $actStruct, - array $propertyNames = null - ) { + object $expStruct, + object $actStruct, + ?array $propertyNames = null + ): void { if ($propertyNames === null) { $propertyNames = $this->getPublicPropertyNames($expStruct); } @@ -279,7 +252,7 @@ protected function assertStructsEqual( self::assertEquals( $expStruct->$propName, $actStruct->$propName, - "Properties \${$propName} not same" + "Properties \$$propName not same" ); } } @@ -287,32 +260,31 @@ protected function assertStructsEqual( /** * Returns public property names in $object. * - * @param object $object - * - * @return array + * @return string[] */ - protected function getPublicPropertyNames($object) + protected function getPublicPropertyNames(object $object): array { - $refl = new ReflectionObject($object); + $reflectionObject = new ReflectionObject($object); return array_map( static function ($prop): string { return $prop->getName(); }, - $refl->getProperties(ReflectionProperty::IS_PUBLIC) + $reflectionObject->getProperties(ReflectionProperty::IS_PUBLIC) ); } /** * @deprecated since Ibexa 4.0, rewrite test case to use {@see \Ibexa\Contracts\Core\Test\IbexaKernelTestCase} instead. - * - * @return string */ protected static function getInstallationDir(): string { return Legacy::getInstallationDir(); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function getTrashCriteriaConverterDependency(): CriteriaConverter { $connection = $this->getDatabaseConnection(); @@ -329,6 +301,9 @@ protected function getTrashCriteriaConverterDependency(): CriteriaConverter ); } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function getTrashSortClauseConverterDependency(): SortClauseConverter { $connection = $this->getDatabaseConnection(); From a39c4b06c255debf3f0b8e494b3b3a0be4abd57a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 12:46:56 +0200 Subject: [PATCH 060/185] IBX-9811: Upgraded LegacyDFSCluster to doctrine/dbal v3 and fixed strict types --- .../IO/IOMetadataHandler/LegacyDFSCluster.php | 122 ++++++++---------- 1 file changed, 53 insertions(+), 69 deletions(-) diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index d48dd8143b..cce8d6cc15 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -17,6 +17,7 @@ use Ibexa\Core\IO\Exception\BinaryFileNotFoundException; use Ibexa\Core\IO\IOMetadataHandler; use Ibexa\Core\IO\UrlDecorator; +use LogicException; /** * Manages IO metadata in a mysql table, ezdfsfile. @@ -25,17 +26,13 @@ */ class LegacyDFSCluster implements IOMetadataHandler { - private const string NAME_HASH_PARAM_NAME = ':name_hash'; + private const string NAME_HASH_PARAM_NAME = 'name_hash'; private const string DFS_IS_EXPIRED_COMPARISON = 'e.expired != true'; private Connection $db; private ?UrlDecorator $urlDecorator; - /** - * @param \Doctrine\DBAL\Connection $connection Doctrine DBAL connection - * @param \Ibexa\Core\IO\UrlDecorator $urlDecorator The URL decorator used to add a prefix to files path - */ public function __construct(Connection $connection, UrlDecorator $urlDecorator = null) { $this->db = $connection; @@ -49,18 +46,19 @@ public function __construct(Connection $connection, UrlDecorator $urlDecorator = * * @return \Ibexa\Contracts\Core\IO\BinaryFile * - *@throws \RuntimeException if a DBAL error occurs - * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException if the $binaryFileCreateStruct is invalid + * @throws \Doctrine\DBAL\Exception + * @throws \RuntimeException if a DBAL error occurs + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException if the $binaryFileCreateStruct is invalid * * @since 6.10 The mtime of the $binaryFileCreateStruct must be a DateTime, as specified in the struct doc. */ - public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct) + public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct): SPIBinaryFile { if (!($spiBinaryFileCreateStruct->mtime instanceof DateTime)) { throw new InvalidArgumentException('$binaryFileCreateStruct', 'Property \'mtime\' must be a DateTime'); } - $path = (string)$this->addPrefix($spiBinaryFileCreateStruct->id); + $path = $this->addPrefix($spiBinaryFileCreateStruct->id); $params = [ 'name' => $path, 'name_hash' => md5($path), @@ -73,7 +71,7 @@ public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct) try { $this->db->insert('ezdfsfile', $params); - } catch (Exception $e) { + } catch (Exception) { $this->db->update('ezdfsfile', [ 'mtime' => $params['mtime'], 'size' => $params['size'], @@ -90,13 +88,14 @@ public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct) /** * Deletes file $spiBinaryFileId. * - * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException If $spiBinaryFileId is not found - * * @param string $spiBinaryFileId + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException If $spiBinaryFileId is not found */ public function delete($spiBinaryFileId): void { - $path = (string)$this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($spiBinaryFileId); // Unlike the legacy cluster, the file is directly deleted. It was inherited from the DB cluster anyway $affectedRows = (int)$this->db->delete('ezdfsfile', [ @@ -110,18 +109,13 @@ public function delete($spiBinaryFileId): void } /** - * Loads and returns metadata for $spiBinaryFileId. - * - * @param string $spiBinaryFileId - * - * @return \Ibexa\Contracts\Core\IO\BinaryFile - * * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException if no row is found for $spiBinaryFileId * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception + * @throws \DateMalformedStringException */ - public function load($spiBinaryFileId) + public function load($spiBinaryFileId): SPIBinaryFile { - $path = (string)$this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($spiBinaryFileId); $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder @@ -137,35 +131,29 @@ public function load($spiBinaryFileId) 'e.status', ) ->from('ezdfsfile', 'e') - ->andWhere('e.name_hash = ' . self::NAME_HASH_PARAM_NAME) + ->andWhere('e.name_hash = :' . self::NAME_HASH_PARAM_NAME) ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') - ->setParameter('name_hash', md5($path)) - ->execute() + ->setParameter(self::NAME_HASH_PARAM_NAME, md5($path)) + ->executeQuery() ; - if ($result->rowCount() === 0) { + if ($result->rowCount() === 0 || false === ($row = $result->fetchAssociative())) { throw new BinaryFileNotFoundException($path); } - $row = $result->fetchAssociative() + ['id' => $spiBinaryFileId]; + /** @var array{id: string, name_hash: string, name_trunk: string, datatype: string, scope: string, size: int, mtime: int, expired: bool, status: bool} $properties */ + $properties = $row + ['id' => $spiBinaryFileId]; - return $this->mapArrayToSPIBinaryFile($row); + return $this->mapArrayToSPIBinaryFile($properties); } /** - * Checks if a file $spiBinaryFileId exists. - * - * @param string $spiBinaryFileId - * - * @throws \Ibexa\Core\Base\Exceptions\NotFoundException * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception - * - * @return bool */ public function exists($spiBinaryFileId): bool { - $path = (string)$this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($spiBinaryFileId); $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder @@ -181,22 +169,17 @@ public function exists($spiBinaryFileId): bool 'e.status', ) ->from('ezdfsfile', 'e') - ->andWhere('e.name_hash = :name_hash') + ->andWhere('e.name_hash = :' . self::NAME_HASH_PARAM_NAME) ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') - ->setParameter('name_hash', md5($path)) - ->execute() + ->setParameter(self::NAME_HASH_PARAM_NAME, md5($path)) + ->executeQuery() ; return $result->rowCount() === 1; } - /** - * @param \Ibexa\Contracts\Core\IO\BinaryFileCreateStruct $binaryFileCreateStruct - * - * @return mixed - */ - protected function getNameTrunk(SPIBinaryFileCreateStruct $binaryFileCreateStruct) + protected function getNameTrunk(SPIBinaryFileCreateStruct $binaryFileCreateStruct): string { return $this->addPrefix($binaryFileCreateStruct->id); } @@ -215,25 +198,19 @@ protected function getScope(SPIBinaryFileCreateStruct $binaryFileCreateStruct): { [$filePrefix] = explode('/', $binaryFileCreateStruct->id); - switch ($filePrefix) { - case 'images': - return 'image'; - - case 'original': - return 'binaryfile'; - } - - return 'UNKNOWN_SCOPE'; + return match ($filePrefix) { + 'images' => 'image', + 'original' => 'binaryfile', + default => 'UNKNOWN_SCOPE', + }; } /** * Adds the internal prefix string to $id. * - * @param string $id - * * @return string prefixed id */ - protected function addPrefix($id) + protected function addPrefix(string $id): string { return isset($this->urlDecorator) ? $this->urlDecorator->decorate($id) : $id; } @@ -241,37 +218,42 @@ protected function addPrefix($id) /** * Removes the internal prefix string from $prefixedId. * - * @param string $prefixedId - * * @return string the id without the prefix - * - * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException if the prefix isn't found in $prefixedId */ - protected function removePrefix($prefixedId) + protected function removePrefix(string $prefixedId): string { return isset($this->urlDecorator) ? $this->urlDecorator->undecorate($prefixedId) : $prefixedId; } - public function getMimeType($spiBinaryFileId) + /** + * @param string $spiBinaryFileId + * + * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException + * @throws \Doctrine\DBAL\Exception + */ + public function getMimeType($spiBinaryFileId): string { $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder ->select('e.datatype') ->from('ezdfsfile', 'e') - ->andWhere('e.name_hash = :name_hash') + ->andWhere('e.name_hash = :' . self::NAME_HASH_PARAM_NAME) ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') - ->setParameter('name_hash', md5($this->addPrefix($spiBinaryFileId))) - ->execute() + ->setParameter(self::NAME_HASH_PARAM_NAME, md5($this->addPrefix($spiBinaryFileId))) + ->executeQuery() ; - if ($result->rowCount() == 0) { + if ($result->rowCount() === 0) { throw new BinaryFileNotFoundException($spiBinaryFileId); } - $row = $result->fetchAssociative(); + $dataType = $result->fetchOne(); + if (false === $dataType) { + throw new LogicException("Failed to get mime type for $spiBinaryFileId"); + } - return $row['datatype']; + return $dataType; } /** @@ -298,9 +280,11 @@ public function deleteDirectory($spiPath): void /** * Maps an array of database properties (id, size, mtime, datatype, md5_path, path...) to an SPIBinaryFile object. * - * @param array $properties database properties array + * @param array{id: string, size: int, mtime: int} $properties database properties array * * @return \Ibexa\Contracts\Core\IO\BinaryFile + * + * @throws \DateMalformedStringException */ protected function mapArrayToSPIBinaryFile(array $properties): BinaryFile { From 8458514b574cd38de8ca18e885ef82f719cfcccd Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 12:49:44 +0200 Subject: [PATCH 061/185] IBX-9811: Upgraded RelationListConverter to doctrine/dbal v3 --- .../Content/FieldValue/Converter/RelationListConverter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php index c9fc6251ab..8b3be0c054 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use DOMDocument; @@ -322,7 +323,7 @@ protected function getRelationXmlHashFromDB(array $destinationContentIds): array ContentType::STATUS_DEFINED, ParameterType::INTEGER ) - ->setParameter('content_ids', $destinationContentIds, Connection::PARAM_INT_ARRAY); + ->setParameter('content_ids', $destinationContentIds, ArrayParameterType::INTEGER); $stmt = $query->executeQuery(); From db9b46ce4288a7d5c7714f861e487a94335a0916 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 17:25:51 +0200 Subject: [PATCH 062/185] IBX-9811: Upgraded ImageStorage Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../FieldType/Image/ImageStorage/Gateway.php | 42 ++--- .../ImageStorage/Gateway/DoctrineStorage.php | 154 +++++++++--------- 2 files changed, 102 insertions(+), 94 deletions(-) diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway.php b/src/lib/FieldType/Image/ImageStorage/Gateway.php index 59dcd02aa6..f5eed81747 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway.php @@ -17,48 +17,42 @@ abstract class Gateway extends StorageGateway { /** * Returns the node path string of $versionInfo. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * - * @return string */ - abstract public function getNodePathString(VersionInfo $versionInfo); + abstract public function getNodePathString(VersionInfo $versionInfo): string; /** * Stores a reference to the image in $path for $fieldId. * - * @param string $uri File IO uri - * @param mixed $fieldId + * @param string $uri File IO uri (not legacy) */ - abstract public function storeImageReference($uri, $fieldId); + abstract public function storeImageReference(string $uri, int $fieldId): void; /** - * Returns a the XML content stored for the given $fieldIds. + * Returns the XML content stored for the given $fieldIds. * - * @param int $versionNo - * @param array $fieldIds + * @param int[] $fieldIds * - * @return array + * @return array */ - abstract public function getXmlForImages($versionNo, array $fieldIds); + abstract public function getXmlForImages(int $versionNo, array $fieldIds): array; /** * Removes all references from $fieldId to a path that starts with $path. * * @param string $uri File IO uri (not legacy uri) - * @param int $versionNo - * @param mixed $fieldId + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If $uri couldn't be interpreted */ - abstract public function removeImageReferences($uri, $versionNo, $fieldId); + abstract public function removeImageReferences(string $uri, int $versionNo, int $fieldId): void; /** * Returns the number of recorded references to the given $path. * * @param string $uri File IO uri (not legacy uri) * - * @return int + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If $uri couldn't be interpreted */ - abstract public function countImageReferences($uri); + abstract public function countImageReferences(string $uri): int; /** * Returns true if there is reference to the given $uri. @@ -67,13 +61,23 @@ abstract public function isImageReferenced(string $uri): bool; /** * Returns the public uris for the images stored in $xml. + * + * @return array|null + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If URIs inside $xml couldn't be interpreted */ - abstract public function extractFilesFromXml($xml); + abstract public function extractFilesFromXml(string $xml): ?array; + /** + * @phpstan-return list + */ abstract public function getAllVersionsImageXmlForFieldId(int $fieldId): array; abstract public function updateImageData(int $fieldId, int $versionNo, string $xml): void; + /** + * @phpstan-return list> + */ abstract public function getImagesData(int $offset, int $limit): array; abstract public function updateImagePath(int $fieldId, string $oldPath, string $newPath): void; diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index 4c57c4cd94..a4f428dd9d 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -7,13 +7,13 @@ namespace Ibexa\Core\FieldType\Image\ImageStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use DOMDocument; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\Image\ImageStorage\Gateway; use Ibexa\Core\IO\UrlRedecoratorInterface; -use PDO; /** * Image Field Type external storage DoctrineStorage gateway. @@ -21,20 +21,20 @@ class DoctrineStorage extends Gateway { public const string IMAGE_FILE_TABLE = 'ezimagefile'; - private const string PATH_PARAM_NAME = ':path'; - private const string LIKE_PATH_PARAM_NAME = ':likePath'; - private const string FIELD_ID_PARAM_NAME = ':field_id'; - private const string VERSION_NO_PARAM_NAME = ':versionNo'; - private const string CONTENT_OBJECT_ID = ':contentObjectId'; + private const string PATH_PARAM_NAME = 'path'; + private const string LIKE_PATH_PARAM_NAME = 'likePath'; + private const string FIELD_ID_PARAM_NAME = 'field_id'; + private const string VERSION_NO_PARAM_NAME = 'versionNo'; + private const string CONTENT_OBJECT_ID_PARAM_NAME = 'contentObjectId'; protected Connection $connection; /** * Maps database field names to property names. * - * @var array + * @var array{id: string, version: string, language_code: string, path_identification_string: string, data_string: string} */ - protected $fieldNameMap = [ + protected array $fieldNameMap = [ 'id' => 'fieldId', 'version' => 'versionNo', 'language_code' => 'languageCode', @@ -65,11 +65,11 @@ public function getNodePathString(VersionInfo $versionInfo): string $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - self::CONTENT_OBJECT_ID + ':' . self::CONTENT_OBJECT_ID_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('node_id'), @@ -77,7 +77,7 @@ public function getNodePathString(VersionInfo $versionInfo): string ) ) ) - ->setParameter(self::CONTENT_OBJECT_ID, $versionInfo->contentInfo->id, ParameterType::INTEGER) + ->setParameter(self::CONTENT_OBJECT_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER); return $selectQuery->executeQuery()->fetchOne(); @@ -86,10 +86,11 @@ public function getNodePathString(VersionInfo $versionInfo): string /** * Store a reference to the image in $path for $fieldId. * - * @param string $uri File IO uri (not legacy) - * @param int $fieldId + * + * @throws \Doctrine\DBAL\Exception + * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException */ - public function storeImageReference($uri, $fieldId): void + public function storeImageReference(string $uri, int $fieldId): void { // legacy stores the path to the image without a leading / $path = $this->redecorator->redecorateFromSource($uri); @@ -99,11 +100,11 @@ public function storeImageReference($uri, $fieldId): void ->insert($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->values( [ - $this->connection->quoteIdentifier('contentobject_attribute_id') => self::FIELD_ID_PARAM_NAME, - $this->connection->quoteIdentifier('filepath') => self::PATH_PARAM_NAME, + $this->connection->quoteIdentifier('contentobject_attribute_id') => ':' . self::FIELD_ID_PARAM_NAME, + $this->connection->quoteIdentifier('filepath') => ':' . self::PATH_PARAM_NAME, ] ) - ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) ->setParameter(self::PATH_PARAM_NAME, $path) ; @@ -113,13 +114,9 @@ public function storeImageReference($uri, $fieldId): void /** * Return an XML content stored for the given $fieldIds. * - * @param int $versionNo - * - * @return array - * * @throws \Doctrine\DBAL\Exception */ - public function getXmlForImages($versionNo, array $fieldIds): array + public function getXmlForImages(int $versionNo, array $fieldIds): array { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery @@ -132,7 +129,7 @@ public function getXmlForImages($versionNo, array $fieldIds): array $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('attr.version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ), $selectQuery->expr()->in( $this->connection->quoteIdentifier('attr.id'), @@ -140,8 +137,8 @@ public function getXmlForImages($versionNo, array $fieldIds): array ) ) ) - ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) - ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) + ->setParameter('fieldIds', $fieldIds, ArrayParameterType::INTEGER) ; $statement = $selectQuery->executeQuery(); @@ -154,6 +151,9 @@ public function getXmlForImages($versionNo, array $fieldIds): array return $fieldLookup; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getAllVersionsImageXmlForFieldId(int $fieldId): array { $selectQuery = $this->connection->createQueryBuilder(); @@ -167,10 +167,10 @@ public function getAllVersionsImageXmlForFieldId(int $fieldId): array ->where( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ) ) - ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) ; $statement = $selectQuery->executeQuery(); @@ -178,7 +178,7 @@ public function getAllVersionsImageXmlForFieldId(int $fieldId): array $fieldLookup = []; foreach ($statement->fetchAllAssociative() as $row) { $fieldLookup[] = [ - 'version' => $row['version'], + 'version' => (int)$row['version'], 'data_text' => $row['data_text'], ]; } @@ -190,12 +190,11 @@ public function getAllVersionsImageXmlForFieldId(int $fieldId): array * Remove all references from $fieldId to a path that starts with $path. * * @param string $uri File IO uri (not legacy) - * @param int $versionNo - * @param int $fieldId * * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException + * @throws \Doctrine\DBAL\Exception */ - public function removeImageReferences($uri, $versionNo, $fieldId): void + public function removeImageReferences(string $uri, int $versionNo, int $fieldId): void { if (!$this->canRemoveImageReference($uri, $versionNo, $fieldId)) { return; @@ -210,15 +209,15 @@ public function removeImageReferences($uri, $versionNo, $fieldId): void $deleteQuery->expr()->and( $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $deleteQuery->expr()->like( $this->connection->quoteIdentifier('filepath'), - self::LIKE_PATH_PARAM_NAME + ':' . self::LIKE_PATH_PARAM_NAME ) ) ) - ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) ->setParameter(self::LIKE_PATH_PARAM_NAME, $path . '%') ; @@ -226,67 +225,69 @@ public function removeImageReferences($uri, $versionNo, $fieldId): void } /** - * Return the number of recorded references to the given $path. - * - * @param string $uri File IO uri (not legacy) - * - * @return int - * + * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException * @throws \Doctrine\DBAL\Exception */ - public function countImageReferences($uri): int + public function isImageReferenced(string $uri): bool { $path = $this->redecorator->redecorateFromSource($uri); $selectQuery = $this->connection->createQueryBuilder(); $selectQuery - ->select('COUNT(' . $this->connection->quoteIdentifier('id') . ')') + ->select('1') ->from($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->where( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('filepath'), - ':filepath' + ':' . self::LIKE_PATH_PARAM_NAME ) ) - ->setParameter(':filepath', $path) + ->setParameter(self::LIKE_PATH_PARAM_NAME, $path) ; $statement = $selectQuery->executeQuery(); - return (int) $statement->fetchFirstColumn(); + return (bool)$statement->fetchOne(); } /** + * Return the number of recorded references to the given $path. + * + * @param string $uri File IO uri (not legacy) + * * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException * @throws \Doctrine\DBAL\Exception */ - public function isImageReferenced(string $uri): bool + public function countImageReferences(string $uri): int { $path = $this->redecorator->redecorateFromSource($uri); $selectQuery = $this->connection->createQueryBuilder(); $selectQuery - ->select(1) + ->select('COUNT(' . $this->connection->quoteIdentifier('id') . ')') ->from($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->where( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('filepath'), - self::LIKE_PATH_PARAM_NAME + ':filepath' ) ) - ->setParameter(self::LIKE_PATH_PARAM_NAME, $path) + ->setParameter('filepath', $path) ; $statement = $selectQuery->executeQuery(); - return (bool)$statement->fetchOne(); + return (int) $statement->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countDistinctImagesData(): int { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery - ->select($this->connection->getDatabasePlatform()->getCountExpression('id')) + ->select('COUNT(id)') ->from($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ; @@ -299,10 +300,11 @@ public function countDistinctImagesData(): int * Check if image $path can be removed when deleting $versionNo and $fieldId. * * @param string $path legacy image path (var/storage/images...) - * @param int $versionNo - * @param int $fieldId + * + * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException + * @throws \Doctrine\DBAL\Exception */ - protected function canRemoveImageReference($path, $versionNo, $fieldId): bool + protected function canRemoveImageReference(string $path, int $versionNo, int $fieldId): bool { $selectQuery = $this->connection->createQueryBuilder(); $expressionBuilder = $selectQuery->expr(); @@ -321,17 +323,17 @@ protected function canRemoveImageReference($path, $versionNo, $fieldId): bool ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ) ) ->andWhere( $expressionBuilder->neq( $this->connection->quoteIdentifier('version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) - ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) - ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; $imageXMLs = $selectQuery->executeQuery()->fetchFirstColumn(); @@ -346,13 +348,9 @@ protected function canRemoveImageReference($path, $versionNo, $fieldId): bool } /** - * Extract, stored in DocBook XML, file paths. - * - * @param string $xml - * - * @return array|null + * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException */ - public function extractFilesFromXml($xml) + public function extractFilesFromXml(string $xml): ?array { if (empty($xml)) { // Empty image value @@ -363,7 +361,7 @@ public function extractFilesFromXml($xml) $dom = new DOMDocument(); $dom->loadXml($xml); - if ($dom->documentElement->hasAttribute('dirpath')) { + if ($dom->documentElement?->hasAttribute('dirpath')) { $url = $dom->documentElement->getAttribute('url'); if (empty($url)) { return null; @@ -387,6 +385,9 @@ public function extractFilesFromXml($xml) return null; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getImagesData(int $offset, int $limit): array { $selectQuery = $this->connection->createQueryBuilder(); @@ -403,6 +404,9 @@ public function getImagesData(int $offset, int $limit): array return $selectQuery->executeQuery()->fetchAllAssociative(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function updateImageData(int $fieldId, int $versionNo, string $xml): void { $updateQuery = $this->connection->createQueryBuilder(); @@ -418,7 +422,7 @@ public function updateImageData(int $fieldId, int $versionNo, string $xml): void ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ) ) ->andWhere( @@ -428,9 +432,9 @@ public function updateImageData(int $fieldId, int $versionNo, string $xml): void ) ) ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) - ->setParameter(':version_no', $versionNo, ParameterType::INTEGER) - ->setParameter(':xml', $xml, ParameterType::STRING) - ->execute() + ->setParameter('version_no', $versionNo, ParameterType::INTEGER) + ->setParameter('xml', $xml) + ->executeStatement() ; } @@ -452,7 +456,7 @@ public function updateImagePath(int $fieldId, string $oldPath, string $newPath): ->where( $expressionBuilder->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ) ) ->andWhere( @@ -462,8 +466,8 @@ public function updateImagePath(int $fieldId, string $oldPath, string $newPath): ) ) ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) - ->setParameter(':old_path', $oldPath) - ->setParameter(':new_path', $newPath) + ->setParameter('old_path', $oldPath) + ->setParameter('new_path', $newPath) ->executeStatement() ; } @@ -478,18 +482,18 @@ public function hasImageReference(string $uri, int $fieldId): bool $selectQuery = $this->connection->createQueryBuilder(); $selectQuery - ->select(1) + ->select('1') ->from($this->connection->quoteIdentifier(self::IMAGE_FILE_TABLE)) ->andWhere( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('filepath'), - self::PATH_PARAM_NAME + ':' . self::PATH_PARAM_NAME ) ) ->andWhere( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ) ) ->setParameter(self::PATH_PARAM_NAME, $path) From 1656c58d49a7b9739d649b71254ad8bd5b116148 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 14 Apr 2025 19:05:39 +0200 Subject: [PATCH 063/185] IBX-9811: Upgraded KeywordStorage Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../Keyword/KeywordStorage/Gateway.php | 10 +- .../Gateway/DoctrineStorage.php | 106 ++++++++---------- 2 files changed, 53 insertions(+), 63 deletions(-) diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php index 11727de2ba..d54a6e5b50 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway.php @@ -18,26 +18,24 @@ abstract class Gateway extends StorageGateway /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::storeFieldData() */ - abstract public function storeFieldData(Field $field, $contentTypeId); + abstract public function storeFieldData(Field $field, int $contentTypeId): void; /** * Sets the list of assigned keywords into $field->value->externalData. * * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field */ - abstract public function getFieldData(Field $field); + abstract public function getFieldData(Field $field): void; /** * Retrieve the ContentType ID for the given $field. * * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return mixed */ - abstract public function getContentTypeId(Field $field); + abstract public function getContentTypeId(Field $field): int; /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage::deleteFieldData() */ - abstract public function deleteFieldData($fieldId, $versionNo); + abstract public function deleteFieldData(int $fieldId, int $versionNo): void; } diff --git a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php index f1abe6f909..6064f80d60 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php @@ -14,11 +14,22 @@ use Ibexa\Core\FieldType\Keyword\KeywordStorage\Gateway; use RuntimeException; +/** + * @phpstan-type TKeywordIdMap array + * + * A keyword map (TKeywordIdMap) has the following format: + * ``` + * [ + * '' => , + * // ... + * ]; + * ``` + */ class DoctrineStorage extends Gateway { - public const KEYWORD_TABLE = 'ezkeyword'; - public const KEYWORD_ATTRIBUTE_LINK_TABLE = 'ezkeyword_attribute_link'; - private const string CONTENT_TYPE_ID_PARAM_NAME = ':contentTypeId'; + public const string KEYWORD_TABLE = 'ezkeyword'; + public const string KEYWORD_ATTRIBUTE_LINK_TABLE = 'ezkeyword_attribute_link'; + private const string CONTENT_TYPE_ID_PARAM_NAME = 'contentTypeId'; protected Connection $connection; @@ -30,9 +41,9 @@ public function __construct(Connection $connection) /** * Stores the keyword list from $field->value->externalData. * - * @param int $contentTypeId + * @throws \Doctrine\DBAL\Exception */ - public function storeFieldData(Field $field, $contentTypeId): void + public function storeFieldData(Field $field, int $contentTypeId): void { if (empty($field->value->externalData) && !empty($field->id)) { $this->deleteFieldData($field->id, $field->versionNo); @@ -51,7 +62,7 @@ public function storeFieldData(Field $field, $contentTypeId): void $field->id, $this->insertKeywords( array_diff_key( - array_fill_keys($field->value->externalData, true), + array_fill_keys($field->value->externalData, 0), $existingKeywordMap ), $contentTypeId @@ -65,7 +76,7 @@ public function storeFieldData(Field $field, $contentTypeId): void /** * Sets the list of assigned keywords into $field->value->externalData. * - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field + * @throws \Doctrine\DBAL\Exception */ public function getFieldData(Field $field): void { @@ -75,9 +86,7 @@ public function getFieldData(Field $field): void /** * Retrieve the ContentType ID for the given $field. * - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * - * @return int + * @throws \Doctrine\DBAL\Exception */ public function getContentTypeId(Field $field): int { @@ -87,10 +96,9 @@ public function getContentTypeId(Field $field): int /** * Deletes keyword data for the given $fieldId. * - * @param int $fieldId - * @param int $versionNo + * @throws \Doctrine\DBAL\Exception */ - public function deleteFieldData($fieldId, $versionNo): void + public function deleteFieldData(int $fieldId, int $versionNo): void { $this->deleteOldKeywordAssignments($fieldId, $versionNo); $this->deleteOrphanedKeywords(); @@ -98,6 +106,10 @@ public function deleteFieldData($fieldId, $versionNo): void /** * Returns a list of keywords assigned to $fieldId. + * + * @return string[] + * + * @throws \Doctrine\DBAL\Exception */ protected function getAssignedKeywords(int $fieldId, int $versionNo): array { @@ -137,11 +149,9 @@ protected function getAssignedKeywords(int $fieldId, int $versionNo): array /** * Retrieves the content type ID for the given $fieldDefinitionId. * - * @param int $fieldDefinitionId - * - * @return int + * @throws \Doctrine\DBAL\Exception */ - protected function loadContentTypeId($fieldDefinitionId): int + protected function loadContentTypeId(int $fieldDefinitionId): int { $query = $this->connection->createQueryBuilder(); $query @@ -150,7 +160,7 @@ protected function loadContentTypeId($fieldDefinitionId): int ->where( $query->expr()->eq('id', ':fieldDefinitionId') ) - ->setParameter(':fieldDefinitionId', $fieldDefinitionId); + ->setParameter('fieldDefinitionId', $fieldDefinitionId); $statement = $query->executeQuery(); @@ -171,22 +181,13 @@ protected function loadContentTypeId($fieldDefinitionId): int /** * Returns already existing keywords from $keywordList as a map. * - * The map has the following format: - * - * array( - * '' => , - * // ... - * ); - * - * * @param string[] $keywordList - * @param int $contentTypeId * - * @return int[] + * @phpstan-return TKeywordIdMap * * @throws \Doctrine\DBAL\Exception */ - protected function getExistingKeywords($keywordList, $contentTypeId): array + protected function getExistingKeywords(array $keywordList, int $contentTypeId): array { // Retrieving potentially existing keywords $query = $this->connection->createQueryBuilder(); @@ -204,11 +205,11 @@ protected function getExistingKeywords($keywordList, $contentTypeId): array ), $query->expr()->eq( $this->connection->quoteIdentifier('class_id'), - self::CONTENT_TYPE_ID_PARAM_NAME + ':' . self::CONTENT_TYPE_ID_PARAM_NAME ) ) ) - ->setParameter(':keywordList', $keywordList, Connection::PARAM_STR_ARRAY) + ->setParameter('keywordList', $keywordList, ArrayParameterType::STRING) ->setParameter(self::CONTENT_TYPE_ID_PARAM_NAME, $contentTypeId); $statement = $query->executeQuery(); @@ -216,7 +217,7 @@ protected function getExistingKeywords($keywordList, $contentTypeId): array $existingKeywordMap = []; foreach ($statement->fetchAllAssociative() as $row) { // filter out keywords that aren't the exact match (e.g. differ by case) - if (!in_array($row['keyword'], $keywordList)) { + if (!in_array($row['keyword'], $keywordList, true)) { continue; } $existingKeywordMap[$row['keyword']] = $row['id']; @@ -229,20 +230,13 @@ protected function getExistingKeywords($keywordList, $contentTypeId): array * Inserts $keywordsToInsert for $fieldDefinitionId and returns a map of * these keywords to their ID. * - * The returned array has the following format: - * - * array( - * '' => , - * // ... - * ); - * + * @phpstan-param TKeywordIdMap $keywordsToInsert * - * @param string[] $keywordsToInsert - * @param int $contentTypeId + * @phpstan-return TKeywordIdMap * - * @return int[] + * @throws \Doctrine\DBAL\Exception */ - protected function insertKeywords(array $keywordsToInsert, $contentTypeId): array + protected function insertKeywords(array $keywordsToInsert, int $contentTypeId): array { $keywordIdMap = []; // Inserting keywords not yet registered @@ -252,14 +246,14 @@ protected function insertKeywords(array $keywordsToInsert, $contentTypeId): arra ->insert($this->connection->quoteIdentifier(self::KEYWORD_TABLE)) ->values( [ - $this->connection->quoteIdentifier('class_id') => self::CONTENT_TYPE_ID_PARAM_NAME, + $this->connection->quoteIdentifier('class_id') => ':' . self::CONTENT_TYPE_ID_PARAM_NAME, $this->connection->quoteIdentifier('keyword') => ':keyword', ] ) - ->setParameter(self::CONTENT_TYPE_ID_PARAM_NAME, $contentTypeId, \PDO::PARAM_INT); + ->setParameter(self::CONTENT_TYPE_ID_PARAM_NAME, $contentTypeId, ParameterType::INTEGER); foreach (array_keys($keywordsToInsert) as $keyword) { - $insertQuery->setParameter(':keyword', $keyword); + $insertQuery->setParameter('keyword', $keyword); $insertQuery->executeStatement(); $keywordIdMap[$keyword] = (int)$this->connection->lastInsertId( $this->getSequenceName(self::KEYWORD_TABLE, 'id') @@ -270,6 +264,9 @@ protected function insertKeywords(array $keywordsToInsert, $contentTypeId): arra return $keywordIdMap; } + /** + * @throws \Doctrine\DBAL\Exception + */ protected function deleteOldKeywordAssignments(int $fieldId, int $versionNo): void { $deleteQuery = $this->connection->createQueryBuilder(); @@ -296,13 +293,7 @@ protected function deleteOldKeywordAssignments(int $fieldId, int $versionNo): vo /** * Assigns keywords from $keywordMap to the field with $fieldId and specific $versionNo. * - * $keywordMap has the format: - * - * array( - * '' => , - * // ... - * ); - * + * @phpstan-param TKeywordIdMap $keywordMap keyword map * * @throws \Doctrine\DBAL\Exception */ @@ -333,10 +324,11 @@ protected function assignKeywords(int $fieldId, array $keywordMap, int $versionN /** * Deletes all orphaned keywords. * - * Keyword is orphaned if it is not linked to a content attribute through - * ezkeyword_attribute_link table. + * Keyword is orphaned if it is not linked to a content attribute through ezkeyword_attribute_link table. + * + * @throws \Doctrine\DBAL\Exception */ - protected function deleteOrphanedKeywords() + protected function deleteOrphanedKeywords(): void { $query = $this->connection->createQueryBuilder(); $query @@ -366,7 +358,7 @@ protected function deleteOrphanedKeywords() ->where( $deleteQuery->expr()->in($this->connection->quoteIdentifier('id'), ':ids') ) - ->setParameter(':ids', $ids, ArrayParameterType::INTEGER); + ->setParameter('ids', $ids, ArrayParameterType::INTEGER); $deleteQuery->executeStatement(); } From e2a01b49ca24b099f5bacef3967dd3a86646238c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 10:57:01 +0200 Subject: [PATCH 064/185] IBX-9811: Upgraded MapLocationStorage Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../Gateway/DoctrineStorage.php | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php index 62baf318b4..0e8792d3b5 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php @@ -13,16 +13,15 @@ use Ibexa\Contracts\Core\Persistence\Content\Field; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway; -use PDO; class DoctrineStorage extends Gateway { public const string MAP_LOCATION_TABLE = 'ezgmaplocation'; - private const string LATITUDE_PARAM_NAME = ':latitude'; - private const string LONGITUDE_PARAM_NAME = ':longitude'; - private const string ADDRESS_PARAM_NAME = ':address'; - private const string FIELD_ID_PARAM_NAME = ':fieldId'; - private const string VERSION_NO_PARAM_NAME = ':versionNo'; + private const string LATITUDE_PARAM_NAME = 'latitude'; + private const string LONGITUDE_PARAM_NAME = 'longitude'; + private const string ADDRESS_PARAM_NAME = 'address'; + private const string FIELD_ID_PARAM_NAME = 'fieldId'; + private const string VERSION_NO_PARAM_NAME = 'versionNo'; protected Connection $connection; @@ -68,18 +67,18 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field): void { $updateQuery = $this->connection->createQueryBuilder(); $updateQuery->update($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE)) - ->set($this->connection->quoteIdentifier('latitude'), self::LATITUDE_PARAM_NAME) - ->set($this->connection->quoteIdentifier('longitude'), self::LONGITUDE_PARAM_NAME) - ->set($this->connection->quoteIdentifier('address'), self::ADDRESS_PARAM_NAME) + ->set($this->connection->quoteIdentifier('latitude'), ':' . self::LATITUDE_PARAM_NAME) + ->set($this->connection->quoteIdentifier('longitude'), ':' . self::LONGITUDE_PARAM_NAME) + ->set($this->connection->quoteIdentifier('address'), ':' . self::ADDRESS_PARAM_NAME) ->where( $updateQuery->expr()->and( $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $updateQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) @@ -102,11 +101,11 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field): vo $insertQuery ->insert($this->connection->quoteIdentifier(self::MAP_LOCATION_TABLE)) ->values([ - 'latitude' => self::LATITUDE_PARAM_NAME, - 'longitude' => self::LONGITUDE_PARAM_NAME, - 'address' => self::ADDRESS_PARAM_NAME, - 'contentobject_attribute_id' => self::FIELD_ID_PARAM_NAME, - 'contentobject_version' => self::VERSION_NO_PARAM_NAME, + 'latitude' => ':' . self::LATITUDE_PARAM_NAME, + 'longitude' => ':' . self::LONGITUDE_PARAM_NAME, + 'address' => ':' . self::ADDRESS_PARAM_NAME, + 'contentobject_attribute_id' => ':' . self::FIELD_ID_PARAM_NAME, + 'contentobject_version' => ':' . self::VERSION_NO_PARAM_NAME, ]) ->setParameter(self::LATITUDE_PARAM_NAME, $field->value->externalData['latitude']) ->setParameter(self::LONGITUDE_PARAM_NAME, $field->value->externalData['longitude']) @@ -118,6 +117,9 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field): vo $insertQuery->executeStatement(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function getFieldData(VersionInfo $versionInfo, Field $field): void { $field->value->externalData = $this->loadFieldData($field->id, $versionInfo->versionNo); @@ -146,16 +148,16 @@ protected function loadFieldData(int $fieldId, int $versionNo): ?array $selectQuery->expr()->and( $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_attribute_id'), - self::FIELD_ID_PARAM_NAME + ':' . self::FIELD_ID_PARAM_NAME ), $selectQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) - ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, PDO::PARAM_INT) + ->setParameter(self::FIELD_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::VERSION_NO_PARAM_NAME, $versionNo, ParameterType::INTEGER) ; $statement = $selectQuery->executeQuery(); @@ -175,12 +177,9 @@ protected function loadFieldData(int $fieldId, int $versionNo): ?array /** * Return if field data exists for $fieldId. * - * @param int $fieldId - * @param int $versionNo - * - * @return bool + * @throws \Doctrine\DBAL\Exception */ - protected function hasFieldData($fieldId, $versionNo): bool + protected function hasFieldData(int $fieldId, int $versionNo): bool { return $this->loadFieldData($fieldId, $versionNo) !== null; } @@ -206,11 +205,11 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): void ), $deleteQuery->expr()->eq( $this->connection->quoteIdentifier('contentobject_version'), - self::VERSION_NO_PARAM_NAME + ':' . self::VERSION_NO_PARAM_NAME ) ) ) - ->setParameter(':fieldIds', $fieldIds, ArrayParameterType::INTEGER) + ->setParameter('fieldIds', $fieldIds, ArrayParameterType::INTEGER) ->setParameter(self::VERSION_NO_PARAM_NAME, $versionInfo->versionNo, ParameterType::INTEGER) ; From 06c8369223a0f6904097ccc2f7bd73eba0c391e6 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 11:06:17 +0200 Subject: [PATCH 065/185] IBX-9811: Upgraded UrlStorage Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- src/lib/FieldType/Url/UrlStorage/Gateway.php | 24 ++---- .../UrlStorage/Gateway/DoctrineStorage.php | 73 ++++++++----------- 2 files changed, 38 insertions(+), 59 deletions(-) diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway.php b/src/lib/FieldType/Url/UrlStorage/Gateway.php index dac59eb04c..a7aa669f68 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway.php @@ -20,11 +20,11 @@ abstract class Gateway extends StorageGateway * * Non-existent ids are ignored. * - * @param int[]|string[] $ids An array of URL ids + * @param int[] $ids An array of URL ids * - * @return array An array of URLs, with ids as keys + * @return array An array of URLs, with ids as keys */ - abstract public function getIdUrlMap(array $ids); + abstract public function getIdUrlMap(array $ids): array; /** * Returns a list of URL ids for a list of URLs. @@ -33,34 +33,26 @@ abstract public function getIdUrlMap(array $ids); * * @param string[] $urls An array of URLs * - * @return array An array of URL ids, with URLs as keys + * @return array An array of URL ids, with URLs as keys */ - abstract public function getUrlIdMap(array $urls); + abstract public function getUrlIdMap(array $urls): array; /** * Inserts a new $url and returns its id. * * @param string $url The URL to insert in the database - * - * @return int|string */ - abstract public function insertUrl($url); + abstract public function insertUrl(string $url): int; /** * Creates link to URL with $urlId for field with $fieldId in $versionNo. - * - * @param int|string $urlId - * @param int|string $fieldId - * @param int $versionNo */ - abstract public function linkUrl($urlId, $fieldId, $versionNo); + abstract public function linkUrl(int $urlId, int $fieldId, int $versionNo): void; /** * Removes link to URL for $fieldId in $versionNo and cleans up possibly orphaned URLs. * - * @param int|string $fieldId - * @param int $versionNo * @param int[] $excludeUrlIds */ - abstract public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []); + abstract public function unlinkUrl(int $fieldId, int $versionNo, array $excludeUrlIds = []): void; } diff --git a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php index 019d9db148..1cddb8226c 100644 --- a/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php @@ -7,19 +7,19 @@ namespace Ibexa\Core\FieldType\Url\UrlStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Ibexa\Core\FieldType\Url\UrlStorage\Gateway; use Ibexa\Core\Persistence\Legacy\URL\Gateway\DoctrineDatabase; -use PDO; class DoctrineStorage extends Gateway { - public const URL_TABLE = DoctrineDatabase::URL_TABLE; - public const URL_LINK_TABLE = DoctrineDatabase::URL_LINK_TABLE; - private const string CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME = ':contentobject_attribute_id'; - private const string CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME = ':contentobject_attribute_version'; - private const string URL_ID_PARAM_NAME = ':url_id'; + public const string URL_TABLE = DoctrineDatabase::URL_TABLE; + public const string URL_LINK_TABLE = DoctrineDatabase::URL_LINK_TABLE; + private const string CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME = 'contentobject_attribute_id'; + private const string CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME = 'contentobject_attribute_version'; + private const string URL_ID_PARAM_NAME = 'url_id'; protected Connection $connection; @@ -29,13 +29,7 @@ public function __construct(Connection $connection) } /** - * Return a list of URLs for a list of URL ids. - * - * Non-existent ids are ignored. - * - * @param int[] $ids An array of URL ids - * - * @return array An array of URLs, with ids as keys + * @throws \Doctrine\DBAL\Exception */ public function getIdUrlMap(array $ids): array { @@ -50,7 +44,7 @@ public function getIdUrlMap(array $ids): array ) ->from(self::URL_TABLE) ->where('id IN (:ids)') - ->setParameter(':ids', $ids, Connection::PARAM_INT_ARRAY); + ->setParameter('ids', $ids, ArrayParameterType::INTEGER); $result = $query->executeQuery(); foreach ($result->fetchAllAssociative() as $row) { @@ -62,13 +56,7 @@ public function getIdUrlMap(array $ids): array } /** - * Return a list of URL ids for a list of URLs. - * - * Non-existent URLs are ignored. - * - * @param string[] $urls An array of URLs - * - * @return array An array of URL ids, with URLs as keys + * @throws \Doctrine\DBAL\Exception */ public function getUrlIdMap(array $urls): array { @@ -85,7 +73,7 @@ public function getUrlIdMap(array $urls): array ->where( $query->expr()->in('url', ':urls') ) - ->setParameter(':urls', $urls, Connection::PARAM_STR_ARRAY); + ->setParameter('urls', $urls, ArrayParameterType::STRING); $result = $query->executeQuery(); foreach ($result->fetchAllAssociative() as $row) { @@ -99,11 +87,10 @@ public function getUrlIdMap(array $urls): array /** * Insert a new $url and returns its id. * - * @param string $url The URL to insert in the database * * @throws \Doctrine\DBAL\Exception */ - public function insertUrl($url): int + public function insertUrl(string $url): int { $time = time(); @@ -119,10 +106,10 @@ public function insertUrl($url): int 'url' => ':url', ] ) - ->setParameter(':created', $time, PDO::PARAM_INT) - ->setParameter(':modified', $time, PDO::PARAM_INT) - ->setParameter(':original_url_md5', md5($url)) - ->setParameter(':url', $url) + ->setParameter('created', $time, ParameterType::INTEGER) + ->setParameter('modified', $time, ParameterType::INTEGER) + ->setParameter('original_url_md5', md5($url)) + ->setParameter('url', $url) ; $query->executeStatement(); @@ -135,7 +122,7 @@ public function insertUrl($url): int /** * @throws \Doctrine\DBAL\Exception */ - public function linkUrl($urlId, $fieldId, $versionNo): void + public function linkUrl(int $urlId, int $fieldId, int $versionNo): void { $query = $this->connection->createQueryBuilder(); @@ -143,14 +130,14 @@ public function linkUrl($urlId, $fieldId, $versionNo): void ->insert($this->connection->quoteIdentifier(self::URL_LINK_TABLE)) ->values( [ - 'contentobject_attribute_id' => self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, - 'contentobject_attribute_version' => self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, - 'url_id' => self::URL_ID_PARAM_NAME, + 'contentobject_attribute_id' => ':' . self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, + 'contentobject_attribute_version' => ':' . self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, + 'url_id' => ':' . self::URL_ID_PARAM_NAME, ] ) - ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, $fieldId, PDO::PARAM_INT) - ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, $versionNo, PDO::PARAM_INT) - ->setParameter(self::URL_ID_PARAM_NAME, $urlId, PDO::PARAM_INT) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME, $fieldId, ParameterType::INTEGER) + ->setParameter(self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME, $versionNo, ParameterType::INTEGER) + ->setParameter(self::URL_ID_PARAM_NAME, $urlId, ParameterType::INTEGER) ; $query->executeStatement(); @@ -159,7 +146,7 @@ public function linkUrl($urlId, $fieldId, $versionNo): void /** * @throws \Doctrine\DBAL\Exception */ - public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void + public function unlinkUrl(int $fieldId, int $versionNo, array $excludeUrlIds = []): void { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery @@ -169,11 +156,11 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void $selectQuery->expr()->and( $selectQuery->expr()->in( 'link.contentobject_attribute_id', - self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME + ':' . self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME ), $selectQuery->expr()->in( 'link.contentobject_attribute_version', - self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME + ':' . self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME ) ) ) @@ -194,11 +181,11 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void $deleteQuery->expr()->and( $deleteQuery->expr()->in( 'contentobject_attribute_id', - self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME + ':' . self::CONTENT_ITEM_ATTRIBUTE_ID_PARAM_NAME ), $deleteQuery->expr()->in( 'contentobject_attribute_version', - self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME + ':' . self::CONTENT_ITEM_ATTRIBUTE_VERSION_PARAM_NAME ) ) ) @@ -213,7 +200,7 @@ public function unlinkUrl($fieldId, $versionNo, array $excludeUrlIds = []): void ':url_ids' ) ) - ->setParameter('url_ids', $excludeUrlIds, Connection::PARAM_INT_ARRAY); + ->setParameter('url_ids', $excludeUrlIds, ArrayParameterType::INTEGER); } $deleteQuery->executeStatement(); @@ -251,7 +238,7 @@ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void ) ) ->andWhere($query->expr()->isNull('link.url_id')) - ->setParameter('url_ids', $potentiallyOrphanedUrls, Connection::PARAM_INT_ARRAY) + ->setParameter('url_ids', $potentiallyOrphanedUrls, ArrayParameterType::INTEGER) ; $ids = $query->executeQuery()->fetchFirstColumn(); @@ -263,7 +250,7 @@ private function deleteOrphanedUrls(array $potentiallyOrphanedUrls): void $deleteQuery ->delete($this->connection->quoteIdentifier(self::URL_TABLE)) ->where($deleteQuery->expr()->in('id', ':ids')) - ->setParameter(':ids', $ids, Connection::PARAM_STR_ARRAY) + ->setParameter('ids', $ids, ArrayParameterType::STRING) ; $deleteQuery->executeStatement(); From e75fb22d9794d30c2f0d45060f77194e15df49b4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 11:07:37 +0200 Subject: [PATCH 066/185] IBX-9727: Added strict types to FieldType abstract StorageGateway --- src/contracts/FieldType/StorageGateway.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/contracts/FieldType/StorageGateway.php b/src/contracts/FieldType/StorageGateway.php index 80f40d3d7c..d133519517 100644 --- a/src/contracts/FieldType/StorageGateway.php +++ b/src/contracts/FieldType/StorageGateway.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Contracts\Core\FieldType; @@ -14,13 +15,8 @@ abstract class StorageGateway implements StorageGatewayInterface { /** * Get sequence name bound to database table and column. - * - * @param string $table - * @param string $column - * - * @return string */ - protected function getSequenceName($table, $column) + protected function getSequenceName(string $table, string $column): string { return sprintf('%s_%s_seq', $table, $column); } From 5a712890a81cd2a23a82b5a074371b46e7638d83 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:02:26 +0200 Subject: [PATCH 067/185] IBX-9811: Upgraded UserStorage Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../FieldType/User/UserStorage/Gateway.php | 19 +- .../UserStorage/Gateway/DoctrineStorage.php | 180 ++++++++++-------- 2 files changed, 116 insertions(+), 83 deletions(-) diff --git a/src/lib/FieldType/User/UserStorage/Gateway.php b/src/lib/FieldType/User/UserStorage/Gateway.php index bafe8269e8..bdfebda4ac 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway.php +++ b/src/lib/FieldType/User/UserStorage/Gateway.php @@ -17,7 +17,7 @@ abstract class Gateway extends StorageGateway * Get field data. * * The User storage handles the following attributes, following the user field - * type in Ibexa 4: + * type in Ibexa: * - account_key * - has_stored_login * - contentobject_id @@ -32,12 +32,19 @@ abstract class Gateway extends StorageGateway * - login_count * - max_login * - * @param mixed $fieldId - * @param mixed $userId - * - * @return array + * @return array{ + * hasStoredLogin: bool, + * contentId: int|null, + * login: string|null, + * email: string|null, + * passwordHash: string|null, + * passwordHashType: string|null, + * passwordUpdatedAt: int|null, + * enabled: bool, + * maxLogin: int|null + * } */ - abstract public function getFieldData($fieldId, $userId = null); + abstract public function getFieldData(int $fieldId, ?int $userId = null): array; abstract public function storeFieldData(VersionInfo $versionInfo, Field $field): bool; diff --git a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php index 583ce9b9e6..29958803d2 100644 --- a/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\FieldType\User\UserStorage\Gateway; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Exception\UniqueConstraintViolationException; use Doctrine\DBAL\ParameterType; @@ -14,7 +15,6 @@ use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Core\Base\Exceptions\ForbiddenException; use Ibexa\Core\FieldType\User\UserStorage\Gateway; -use PDO; /** * User DoctrineStorage gateway. @@ -23,21 +23,31 @@ class DoctrineStorage extends Gateway { public const string USER_TABLE = 'ezuser'; public const string USER_SETTING_TABLE = 'ezuser_setting'; - private const string USER_ID_PARAM_NAME = ':userId'; - private const string LOGIN_PARAM_NAME = ':login'; - private const string EMAIL_PARAM_NAME = ':email'; - private const string PASSWORD_HASH_PARAM_NAME = ':passwordHash'; - private const string PASSWORD_HASH_TYPE_PARAM_NAME = ':passwordHashType'; - private const string PASSWORD_UPDATED_AT_PARAM_NAME = ':passwordUpdatedAt'; - private const string IS_ENABLED_PARAM_NAME = ':isEnabled'; - private const string MAX_LOGIN_PARAM_NAME = ':maxLogin'; + private const string USER_ID_PARAM_NAME = 'userId'; + private const string LOGIN_PARAM_NAME = 'login'; + private const string EMAIL_PARAM_NAME = 'email'; + private const string PASSWORD_HASH_PARAM_NAME = 'passwordHash'; + private const string PASSWORD_HASH_TYPE_PARAM_NAME = 'passwordHashType'; + private const string PASSWORD_UPDATED_AT_PARAM_NAME = 'passwordUpdatedAt'; + private const string IS_ENABLED_PARAM_NAME = 'isEnabled'; + private const string MAX_LOGIN_PARAM_NAME = 'maxLogin'; protected Connection $connection; /** * Default values for user fields. * - * @var array + * @var array{ + * hasStoredLogin: bool, + * contentId: int|null, + * login: string|null, + * email: string|null, + * passwordHash: string|null, + * passwordHashType: string|null, + * passwordUpdatedAt: int|null, + * enabled: bool, + * maxLogin: int|null + * } */ protected array $defaultValues = [ 'hasStoredLogin' => false, @@ -58,9 +68,9 @@ public function __construct( } /** - * {@inheritdoc} + * @throws \Doctrine\DBAL\Exception */ - public function getFieldData($fieldId, $userId = null) + public function getFieldData(int $fieldId, ?int $userId = null): array { $userId = $userId ?: $this->fetchUserId($fieldId); $userData = $this->fetchUserData($userId); @@ -82,16 +92,14 @@ public function getFieldData($fieldId, $userId = null) /** * Map legacy database column names to property names. * - * @return array + * @return array */ protected function getPropertyMap(): array { return [ 'has_stored_login' => [ 'name' => 'hasStoredlogin', - 'cast' => static function ($input): bool { - return $input == '1'; - }, + 'cast' => static fn ($input): bool => ((string)$input) === '1', ], 'contentobject_id' => [ 'name' => 'contentId', @@ -115,15 +123,11 @@ protected function getPropertyMap(): array ], 'password_updated_at' => [ 'name' => 'passwordUpdatedAt', - 'cast' => static function ($timestamp): ?int { - return $timestamp ? (int)$timestamp : null; - }, + 'cast' => static fn ($timestamp): ?int => $timestamp ? (int)$timestamp : null, ], 'is_enabled' => [ 'name' => 'enabled', - 'cast' => static function ($input): bool { - return $input == '1'; - }, + 'cast' => static fn ($input): bool => ((string)$input) === '1', ], 'max_login' => [ 'name' => 'maxLogin', @@ -135,9 +139,16 @@ protected function getPropertyMap(): array /** * Convert the given database values to properties. * - * @param array $databaseValues + * @phpstan-param array $databaseValues * - * @return array + * @return array{ + * contentId?: int|null, + * login?: string|null, + * email?: string|null, + * passwordHash?: string|null, + * passwordHashType?: string|null, + * passwordUpdatedAt?: int|null + * } */ protected function convertColumnsToProperties(array $databaseValues): array { @@ -156,13 +167,9 @@ protected function convertColumnsToProperties(array $databaseValues): array /** * Fetch user content object id for the given field id. * - * @param int $fieldId - * - * @return int - * * @throws \Doctrine\DBAL\Exception */ - protected function fetchUserId($fieldId): int + protected function fetchUserId(int $fieldId): int { $query = $this->connection->createQueryBuilder(); $query @@ -176,24 +183,29 @@ protected function fetchUserId($fieldId): int ':fieldId' ) ) - ->setParameter(':fieldId', $fieldId, PDO::PARAM_INT) + ->setParameter('fieldId', $fieldId, ParameterType::INTEGER) ; $statement = $query->executeQuery(); - return (int) $statement->fetchFirstColumn(); + return (int) $statement->fetchOne(); } /** * Fetch user data. * - * @param int $userId - * - * @return array + * @return array{ + * contentId: int|null, + * login: string|null, + * email: string|null, + * passwordHash: string|null, + * passwordHashType: string|null, + * passwordUpdatedAt: int|null + * } * * @throws \Doctrine\DBAL\Exception */ - protected function fetchUserData($userId) + protected function fetchUserData(int $userId): array { $query = $this->connection->createQueryBuilder(); $query @@ -209,15 +221,15 @@ protected function fetchUserData($userId) ->where( $query->expr()->eq( $this->connection->quoteIdentifier('usr.contentobject_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) - ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER) ; - $rows = $query->executeQuery()->fetchAllAssociative(); + $row = $query->executeQuery()->fetchAssociative(); - return isset($rows[0]) ? $this->convertColumnsToProperties($rows[0]) : []; + return false !== $row ? $this->convertColumnsToProperties($row) : []; } /** @@ -226,8 +238,20 @@ protected function fetchUserData($userId) * @param int $userId * * @return array + * + * @throws \Doctrine\DBAL\Exception */ - protected function fetchUserSettings($userId) + /** + * Fetch user settings. + * + * @return array{ + * enabled: bool, + * maxLogin: int|null + * } + * + * @throws \Doctrine\DBAL\Exception + */ + protected function fetchUserSettings(int $userId): array { $query = $this->connection->createQueryBuilder(); $query @@ -239,19 +263,20 @@ protected function fetchUserSettings($userId) ->where( $query->expr()->eq( $this->connection->quoteIdentifier('s.user_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) - ->setParameter(self::USER_ID_PARAM_NAME, $userId, PDO::PARAM_INT) + ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER) ; - $rows = $query->executeQuery()->fetchAllAssociative(); + $row = $query->executeQuery()->fetchAssociative(); - return isset($rows[0]) ? $this->convertColumnsToProperties($rows[0]) : []; + return false !== $row ? $this->convertColumnsToProperties($row) : []; } /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException + * @throws \Doctrine\DBAL\Exception */ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { @@ -266,7 +291,7 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field): bool } else { $this->insertFieldData($versionInfo, $field); } - } catch (UniqueConstraintViolationException $e) { + } catch (UniqueConstraintViolationException) { throw new ForbiddenException( 'User "%login%" already exists', [ @@ -287,12 +312,12 @@ protected function insertFieldData(VersionInfo $versionInfo, Field $field): void $insertQuery ->insert($this->connection->quoteIdentifier(self::USER_TABLE)) - ->setValue('contentobject_id', self::USER_ID_PARAM_NAME) - ->setValue('login', self::LOGIN_PARAM_NAME) - ->setValue('email', self::EMAIL_PARAM_NAME) - ->setValue('password_hash', self::PASSWORD_HASH_PARAM_NAME) - ->setValue('password_hash_type', self::PASSWORD_HASH_TYPE_PARAM_NAME) - ->setValue('password_updated_at', self::PASSWORD_UPDATED_AT_PARAM_NAME) + ->setValue('contentobject_id', ':' . self::USER_ID_PARAM_NAME) + ->setValue('login', ':' . self::LOGIN_PARAM_NAME) + ->setValue('email', ':' . self::EMAIL_PARAM_NAME) + ->setValue('password_hash', ':' . self::PASSWORD_HASH_PARAM_NAME) + ->setValue('password_hash_type', ':' . self::PASSWORD_HASH_TYPE_PARAM_NAME) + ->setValue('password_updated_at', ':' . self::PASSWORD_UPDATED_AT_PARAM_NAME) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) ->setParameter(self::LOGIN_PARAM_NAME, $field->value->externalData['login']) ->setParameter(self::EMAIL_PARAM_NAME, $field->value->externalData['email']) @@ -307,9 +332,9 @@ protected function insertFieldData(VersionInfo $versionInfo, Field $field): void $settingsQuery ->insert($this->connection->quoteIdentifier(self::USER_SETTING_TABLE)) - ->setValue('user_id', self::USER_ID_PARAM_NAME) - ->setValue('is_enabled', self::IS_ENABLED_PARAM_NAME) - ->setValue('max_login', self::MAX_LOGIN_PARAM_NAME) + ->setValue('user_id', ':' . self::USER_ID_PARAM_NAME) + ->setValue('is_enabled', ':' . self::IS_ENABLED_PARAM_NAME) + ->setValue('max_login', ':' . self::MAX_LOGIN_PARAM_NAME) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) ->setParameter(self::IS_ENABLED_PARAM_NAME, $field->value->externalData['enabled'], ParameterType::INTEGER) ->setParameter(self::MAX_LOGIN_PARAM_NAME, $field->value->externalData['maxLogin'], ParameterType::INTEGER); @@ -326,20 +351,20 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field): void $queryBuilder ->update($this->connection->quoteIdentifier(self::USER_TABLE)) - ->set('login', self::LOGIN_PARAM_NAME) - ->set('email', self::EMAIL_PARAM_NAME) - ->set('password_hash', self::PASSWORD_HASH_PARAM_NAME) - ->set('password_hash_type', self::PASSWORD_HASH_TYPE_PARAM_NAME) - ->set('password_updated_at', self::PASSWORD_UPDATED_AT_PARAM_NAME) - ->setParameter(self::LOGIN_PARAM_NAME, $field->value->externalData['login'], ParameterType::STRING) - ->setParameter(self::EMAIL_PARAM_NAME, $field->value->externalData['email'], ParameterType::STRING) - ->setParameter(self::PASSWORD_HASH_PARAM_NAME, $field->value->externalData['passwordHash'], ParameterType::STRING) + ->set('login', ':' . self::LOGIN_PARAM_NAME) + ->set('email', ':' . self::EMAIL_PARAM_NAME) + ->set('password_hash', ':' . self::PASSWORD_HASH_PARAM_NAME) + ->set('password_hash_type', ':' . self::PASSWORD_HASH_TYPE_PARAM_NAME) + ->set('password_updated_at', ':' . self::PASSWORD_UPDATED_AT_PARAM_NAME) + ->setParameter(self::LOGIN_PARAM_NAME, $field->value->externalData['login']) + ->setParameter(self::EMAIL_PARAM_NAME, $field->value->externalData['email']) + ->setParameter(self::PASSWORD_HASH_PARAM_NAME, $field->value->externalData['passwordHash']) ->setParameter(self::PASSWORD_HASH_TYPE_PARAM_NAME, $field->value->externalData['passwordHashType'], ParameterType::INTEGER) ->setParameter(self::PASSWORD_UPDATED_AT_PARAM_NAME, $field->value->externalData['passwordUpdatedAt']) ->where( $queryBuilder->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER) @@ -351,14 +376,14 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field): void $settingsQuery ->update($this->connection->quoteIdentifier(self::USER_SETTING_TABLE)) - ->set('is_enabled', self::IS_ENABLED_PARAM_NAME) - ->set('max_login', self::MAX_LOGIN_PARAM_NAME) + ->set('is_enabled', ':' . self::IS_ENABLED_PARAM_NAME) + ->set('max_login', ':' . self::MAX_LOGIN_PARAM_NAME) ->setParameter(self::IS_ENABLED_PARAM_NAME, $field->value->externalData['enabled'], ParameterType::INTEGER) ->setParameter(self::MAX_LOGIN_PARAM_NAME, $field->value->externalData['maxLogin'], ParameterType::INTEGER) ->where( $queryBuilder->expr()->eq( $this->connection->quoteIdentifier('user_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); @@ -368,7 +393,7 @@ protected function updateFieldData(VersionInfo $versionInfo, Field $field): void public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool { - // Delete external storage only, when when deleting last relation to fieldType + // Delete external storage only, when deleting last relation to fieldType // to avoid removing it when deleting draft, translation or by exceeding archive limit if (!$this->isLastRelationToFieldType($fieldIds)) { return false; @@ -380,7 +405,7 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool ->where( $query->expr()->eq( $this->connection->quoteIdentifier('user_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); @@ -393,7 +418,7 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool ->where( $query->expr()->eq( $this->connection->quoteIdentifier('contentobject_id'), - self::USER_ID_PARAM_NAME + ':' . self::USER_ID_PARAM_NAME ) ) ->setParameter(self::USER_ID_PARAM_NAME, $versionInfo->contentInfo->id, ParameterType::INTEGER); @@ -412,7 +437,7 @@ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool */ protected function isLastRelationToFieldType(array $fieldIds): bool { - $countExpr = $this->connection->getDatabasePlatform()->getCountExpression('id'); + $countExpr = 'COUNT(id)'; $checkQuery = $this->connection->createQueryBuilder(); $checkQuery @@ -424,31 +449,32 @@ protected function isLastRelationToFieldType(array $fieldIds): bool ':fieldIds' ) ) - ->setParameter(':fieldIds', $fieldIds, Connection::PARAM_INT_ARRAY) + ->setParameter('fieldIds', $fieldIds, ArrayParameterType::INTEGER) ->groupBy('id') ->having($countExpr . ' > 1'); - $numRows = (int)$checkQuery->execute()->fetchColumn(); + $numRows = (int)$checkQuery->executeQuery()->fetchOne(); return $numRows === 0; } + /** + * @throws \Doctrine\DBAL\Exception + */ public function countUsersWithUnsupportedHashType(array $supportedHashTypes): int { $selectQuery = $this->connection->createQueryBuilder(); $selectQuery ->select( - $this->connection->getDatabasePlatform()->getCountExpression('u.login') + 'COUNT(u.login)' ) ->from(self::USER_TABLE, 'u') ->andWhere( $selectQuery->expr()->notIn('u.password_hash_type', ':supportedPasswordHashes') ) - ->setParameter('supportedPasswordHashes', $supportedHashTypes, Connection::PARAM_INT_ARRAY); + ->setParameter('supportedPasswordHashes', $supportedHashTypes, ArrayParameterType::INTEGER); - return $selectQuery - ->execute() - ->fetchColumn(); + return $selectQuery->executeQuery()->fetchOne(); } } From de095e85684fb2a1466422e1b2378ad96e47063e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:24:23 +0200 Subject: [PATCH 068/185] IBX-9811: Upgraded Filtering criteria builders to doctrine/dbal v3 and fixed strict types --- .../Content/ContentIdQueryBuilder.php | 19 ++++++++++++++++--- .../Content/LanguageCodeQueryBuilder.php | 6 +++--- .../Content/ObjectStateIdQueryBuilder.php | 8 ++++---- .../ObjectStateIdentifierQueryBuilder.php | 4 ++-- .../Content/RemoteIdQueryBuilder.php | 6 +++--- .../Content/Section/IdQueryBuilder.php | 19 ++++++++++++++++--- .../Section/IdentifierQueryBuilder.php | 4 ++-- .../Content/Type/GroupIdQueryBuilder.php | 6 +++--- .../Content/Type/IdQueryBuilder.php | 6 +++--- .../Content/Type/IdentifierQueryBuilder.php | 6 +++--- .../Location/AncestorQueryBuilder.php | 18 +++++++++++++++--- .../Location/IdQueryBuilder.php | 6 +++--- .../Location/ParentLocationIdQueryBuilder.php | 6 +++--- .../Location/RemoteIdQueryBuilder.php | 6 +++--- .../MatchNoneQueryBuilder.php | 2 +- .../User/IsUserBasedQueryBuilder.php | 10 ++++------ .../User/Metadata/GroupQueryBuilder.php | 4 ++-- .../User/Metadata/ModifierQueryBuilder.php | 4 ++-- .../User/Metadata/OwnerQueryBuilder.php | 4 ++-- .../User/UserEmailQueryBuilder.php | 9 ++++++--- .../User/UserIdQueryBuilder.php | 6 +++--- .../User/UserLoginQueryBuilder.php | 9 ++++++--- 22 files changed, 105 insertions(+), 63 deletions(-) diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php index 2184808974..28191a7964 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php @@ -8,7 +8,8 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; +use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentId; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -24,16 +25,28 @@ public function accepts(FilteringCriterion $criterion): bool return $criterion instanceof ContentId; } + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentId $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { + if (!is_array($criterion->value)) { + throw new InvalidArgumentException( + '$criterion->value', + 'ContentId criterion value must be a list of content IDs' + ); + } + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentId $criterion */ return $queryBuilder->expr()->in( 'content.id', $queryBuilder->createNamedParameter( array_map('intval', $criterion->value), - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php index 60e47ef608..e2048c35c4 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -32,7 +32,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode $criterion */ $queryBuilder ->joinOnce( @@ -48,7 +48,7 @@ public function buildQueryConstraint( 'language.locale', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ); diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php index ec7a8e6c0a..1f9f37c231 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateId; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -28,8 +28,8 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { - $tableAlias = uniqid('osl_'); + ): string { + $tableAlias = uniqid('osl_', true); /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateId $criterion */ $queryBuilder @@ -44,7 +44,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( $tableAlias . '.contentobject_state_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php index 0b1dc7851e..6b14663017 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateIdentifier; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -54,7 +54,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( 'object_state.identifier', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php index ce20ba6f65..03b4a8035f 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\RemoteId; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -27,13 +27,13 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\RemoteId $criterion */ return $queryBuilder->expr()->in( 'content.remote_id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php index 210c1f75bd..9db2a11ea2 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php @@ -8,7 +8,8 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Section; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; +use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\SectionId; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -26,16 +27,28 @@ public function accepts(FilteringCriterion $criterion): bool return $criterion instanceof SectionId; } + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\SectionId $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { + if (!is_array($criterion->value)) { + throw new InvalidArgumentException( + '$criterion->value', + 'SectionId criterion value must be a list of section IDs' + ); + } + /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentId $criterion */ return $queryBuilder->expr()->in( 'content.section_id', $queryBuilder->createNamedParameter( array_map('intval', $criterion->value), - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php index 1ae70dd46e..45a0131073 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Section; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\SectionIdentifier; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -44,7 +44,7 @@ public function buildQueryConstraint( 'section.identifier', $queryBuilder->createNamedParameter( (array)$criterion->value, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php index 4755f10b9c..cf44eb4c5d 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeGroupId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -31,7 +31,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeGroupId $criterion */ $queryBuilder ->joinOnce( @@ -53,7 +53,7 @@ public function buildQueryConstraint( 'content_type_group.id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php index dc8fed4afc..9d46a9cb55 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -30,7 +30,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -38,7 +38,7 @@ public function buildQueryConstraint( 'content_type.id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php index 25213792ce..01a483e6c7 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Content\Type; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -30,7 +30,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeIdentifier $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -38,7 +38,7 @@ public function buildQueryConstraint( 'content_type.identifier', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php index a5aab229df..bc054a0813 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php @@ -12,8 +12,9 @@ use function array_map; use function array_unique; use function array_values; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use function explode; +use Ibexa\Contracts\Core\Exception\InvalidArgumentException; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Ancestor; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -29,10 +30,21 @@ public function accepts(FilteringCriterion $criterion): bool return $criterion instanceof Ancestor; } + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Ancestor $criterion + * + * @throws \Ibexa\Contracts\Core\Exception\InvalidArgumentException + */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { + if (!is_array($criterion->value)) { + throw new InvalidArgumentException( + '$criterion->value', + 'Ancestor criterion value must be a list path strings' + ); + } /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Ancestor $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -53,7 +65,7 @@ static function (string $pathString): array { 'location.node_id', $queryBuilder->createNamedParameter( array_values(array_unique($locationIDs)), - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php index 4ce7c1a1e5..4888c1bf98 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LocationId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -26,7 +26,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LocationId $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -34,7 +34,7 @@ public function buildQueryConstraint( 'location.node_id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php index 8dd7c2f380..1e2043a901 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ParentLocationId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -26,7 +26,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ParentLocationId $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -34,7 +34,7 @@ public function buildQueryConstraint( 'location.parent_node_id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php index e85cbc125c..de1c060167 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LocationRemoteId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -26,7 +26,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LocationRemoteId $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -34,7 +34,7 @@ public function buildQueryConstraint( 'location.remote_id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php index ea3beba54d..c3736a11b1 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php @@ -26,7 +26,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { return '1=0'; } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php index e17c8c48fe..382e55061e 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php @@ -23,13 +23,12 @@ public function accepts(FilteringCriterion $criterion): bool } /** - * @throws \Doctrine\DBAL\Exception + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsUserBased $criterion */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsUserBased $criterion */ + ): string { // intentionally not using parent buildQueryConstraint $queryBuilder ->leftJoinOnce( @@ -40,10 +39,9 @@ public function buildQueryConstraint( ); $isUserBased = (bool)reset($criterion->value); - $databasePlatform = $queryBuilder->getConnection()->getDatabasePlatform(); return $isUserBased - ? $databasePlatform->getIsNotNullExpression('user_storage.contentobject_id') - : $databasePlatform->getIsNullExpression('user_storage.contentobject_id'); + ? 'user_storage.contentobject_id IS NOT NULL' + : 'user_storage.contentobject_id IS NULL'; } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php index 3f052bc022..e4019ee5dc 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserMetadata; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -48,7 +48,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( 'user_group_location.contentobject_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php index 190ff511ba..42bc90dff3 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserMetadata; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -33,7 +33,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( 'version.creator_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php index abace92909..61df026cc2 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User\Metadata; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserMetadata; use Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder; @@ -33,7 +33,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( 'content.owner_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php index dd61d1d1fc..98acb995d8 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserEmail; @@ -24,10 +24,13 @@ public function accepts(FilteringCriterion $criterion): bool return $criterion instanceof UserEmail; } + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserEmail $criterion + */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserEmail $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -42,7 +45,7 @@ public function buildQueryConstraint( $value = (array)$criterion->value; $expression = $queryBuilder->expr()->in( 'user_storage.email', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php index ade6a78e23..f97f3f15b7 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserId; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; @@ -26,7 +26,7 @@ public function accepts(FilteringCriterion $criterion): bool public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserId $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -34,7 +34,7 @@ public function buildQueryConstraint( return $queryBuilder->expr()->in( 'user_storage.contentobject_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php index f8fda2ef74..95af6a768b 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\User; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserLogin; @@ -24,10 +24,13 @@ public function accepts(FilteringCriterion $criterion): bool return $criterion instanceof UserLogin; } + /** + * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserLogin $criterion + */ public function buildQueryConstraint( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): ?string { + ): string { /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserId $criterion */ parent::buildQueryConstraint($queryBuilder, $criterion); @@ -45,7 +48,7 @@ public function buildQueryConstraint( return $expr->in( 'user_storage.login', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } } From 8df44b5754932c7ab48dabedfa02776782fe9296 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:30:34 +0200 Subject: [PATCH 069/185] IBX-9811: Upgraded Filtering Content Gateway to doctrine/dbal v3 and fixed strict types --- .../Content/Doctrine/DoctrineGateway.php | 87 ++++++++++++------- .../Legacy/Filter/Gateway/Gateway.php | 2 + 2 files changed, 58 insertions(+), 31 deletions(-) diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index d2d29451d3..877205c35a 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -10,15 +10,11 @@ use function array_filter; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\FetchMode; -use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Persistence\Filter\SortClauseVisitor; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; -use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway; @@ -31,7 +27,8 @@ */ final class DoctrineGateway implements Gateway { - public const COLUMN_MAP = [ + /** @var array */ + public const array COLUMN_MAP = [ // Content Info 'content_id' => 'content.id', 'content_type_id' => 'content.contentclass_id', @@ -75,25 +72,22 @@ public function __construct( $this->sortClauseVisitor = $sortClauseVisitor; } - private function getDatabasePlatform(): AbstractPlatform - { - try { - return $this->connection->getDatabasePlatform(); - } catch (DBALException $e) { - throw DatabaseException::wrap($e); - } - } - + /** + * @throws \Doctrine\DBAL\Exception + */ public function count(FilteringCriterion $criterion): int { $query = $this->buildQuery( - [$this->getDatabasePlatform()->getCountExpression('DISTINCT content.id')], + ['COUNT(DISTINCT content.id)'], $criterion ); - return (int)$query->execute()->fetch(FetchMode::COLUMN); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function find( FilteringCriterion $criterion, array $sortClauses, @@ -114,8 +108,8 @@ public function find( $wrappedQuery->setMaxResults($limit); } - $resultStatement = $wrappedQuery->execute(); - while (false !== ($row = $resultStatement->fetch(FetchMode::ASSOCIATIVE))) { + $resultStatement = $wrappedQuery->executeQuery(); + while (false !== ($row = $resultStatement->fetchAssociative())) { $contentId = (int)$row['content_id']; $versionNo = (int)$row['content_version_no']; $row['content_version_names'] = $this->extractVersionNames( @@ -133,6 +127,9 @@ public function find( } } + /** + * @param string[] $columns + */ private function buildQuery( array $columns, FilteringCriterion $criterion @@ -141,7 +138,7 @@ private function buildQuery( $expressionBuilder = $queryBuilder->expr(); $queryBuilder - ->select($columns) + ->select(...$columns) ->distinct() ->from(ContentGateway::CONTENT_ITEM_TABLE, 'content') ->joinPublishedVersion() @@ -149,7 +146,7 @@ private function buildQuery( 'content', LocationGateway::CONTENT_TREE_TABLE, 'main_location', - $expressionBuilder->and( + (string)$expressionBuilder->and( 'content.id = main_location.contentobject_id', 'main_location.main_node_id = main_location.node_id' ) @@ -167,6 +164,10 @@ private function buildQuery( * Return names as a map of '' => ''. * * Process data fetched by {@see bulkFetchVersionNames} + * + * @phpstan-param list> $names + * + * @phpstan-return array */ private function extractVersionNames(array $names, int $contentId, int $versionNo): array { @@ -180,6 +181,11 @@ private function extractVersionNames(array $names, int $contentId, int $versionN return $names; } + /** + * @phpstan-param list> $fieldValues + * + * @phpstan-return list> + */ private function extractFieldValues(array $fieldValues, int $contentId, int $versionNo): array { return $this->extractVersionData($fieldValues, $contentId, $versionNo); @@ -187,18 +193,29 @@ private function extractFieldValues(array $fieldValues, int $contentId, int $ver /** * Extract Version-specific data from bulk-loaded rows. + * + * @phpstan-param list> $rows + * + * @phpstan-return list> */ private function extractVersionData(array $rows, int $contentId, int $versionNo): array { - return array_filter( - $rows, - static function (array $row) use ($contentId, $versionNo): bool { - return (int)$row['content_id'] === $contentId - && (int)$row['version_no'] === $versionNo; - } + return array_values( + array_filter( + $rows, + static function (array $row) use ($contentId, $versionNo): bool { + return (int)$row['content_id'] === $contentId + && (int)$row['version_no'] === $versionNo; + } + ) ); } + /** + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception + */ private function bulkFetchVersionNames(FilteringQueryBuilder $query): array { $query @@ -223,12 +240,17 @@ private function bulkFetchVersionNames(FilteringQueryBuilder $query): array ) // reset not needed parts, keeping FROM, other JOINs, and WHERE constraints ->setMaxResults(null) - ->setFirstResult(null) - ->resetQueryPart('orderBy'); + ->setFirstResult(1) + ->resetOrderBy(); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @phpstan-return list> + * + * @throws \Doctrine\DBAL\Exception + */ private function bulkFetchFieldValues(FilteringQueryBuilder $query): array { $query @@ -259,16 +281,19 @@ private function bulkFetchFieldValues(FilteringQueryBuilder $query): array ) // reset not needed parts, keeping FROM, other JOINs, and WHERE constraints ->setMaxResults(null) - ->setFirstResult(null) - ->resetQueryPart('orderBy'); + ->setFirstResult(1) + ->resetOrderBy(); return $query->executeQuery()->fetchAllAssociative(); } + /** + * @return \Traversable + */ private function getColumns(): Traversable { foreach (self::COLUMN_MAP as $columnAlias => $columnName) { - yield "{$columnName} AS {$columnAlias}"; + yield "$columnName AS $columnAlias"; } } diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php index c76a604349..cf4d031fc2 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php @@ -27,6 +27,8 @@ public function count(FilteringCriterion $criterion): int; * sorted by the given Sort Clauses and constrained by the given pagination limit & offset. * * @param \Ibexa\Contracts\Core\Repository\Values\Filter\FilteringSortClause[] $sortClauses + * + * @phpstan-return iterable> */ public function find( FilteringCriterion $criterion, From b22c8b3d91cc4a7e944a5bf54827ae814fa83bfe Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:33:23 +0200 Subject: [PATCH 070/185] IBX-9811: Upgraded Filtering Location Gateway to doctrine/dbal v3 and fixed strict types --- .../Location/Doctrine/DoctrineGateway.php | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php index adf967ebdc..87b4031dcc 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php @@ -9,14 +9,10 @@ namespace Ibexa\Core\Persistence\Legacy\Filter\Gateway\Location\Doctrine; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\FetchMode; -use Doctrine\DBAL\Platforms\AbstractPlatform; use Ibexa\Contracts\Core\Persistence\Filter\CriterionVisitor; use Ibexa\Contracts\Core\Persistence\Filter\Doctrine\FilteringQueryBuilder; use Ibexa\Contracts\Core\Persistence\Filter\SortClauseVisitor; use Ibexa\Contracts\Core\Repository\Values\Filter\FilteringCriterion; -use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Persistence\Legacy\Content\Gateway as ContentGateway; use Ibexa\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway; use Ibexa\Core\Persistence\Legacy\Filter\Gateway\Gateway; @@ -42,24 +38,21 @@ public function __construct( $this->sortClauseVisitor = $sortClauseVisitor; } - private function getDatabasePlatform(): AbstractPlatform - { - try { - return $this->connection->getDatabasePlatform(); - } catch (DBALException $e) { - throw DatabaseException::wrap($e); - } - } - + /** + * @throws \Doctrine\DBAL\Exception + */ public function count(FilteringCriterion $criterion): int { $query = $this->buildQuery($criterion); - $query->select($this->getDatabasePlatform()->getCountExpression('DISTINCT location.node_id')); + $query->select('COUNT(DISTINCT location.node_id)'); - return (int)$query->execute()->fetch(FetchMode::COLUMN); + return (int)$query->executeQuery()->fetchOne(); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function find( FilteringCriterion $criterion, array $sortClauses, @@ -74,9 +67,9 @@ public function find( $query->setMaxResults($limit); } - $resultStatement = $query->execute(); + $resultStatement = $query->executeQuery(); - while (false !== ($row = $resultStatement->fetch(FetchMode::ASSOCIATIVE))) { + while (false !== ($row = $resultStatement->fetchAssociative())) { yield $row; } } From 15459520d185cdabc76e34a81303ee7ebe97a81d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:36:37 +0200 Subject: [PATCH 071/185] IBX-9727: Fixed strict types for Filtering CriterionVisitor --- src/lib/Persistence/Legacy/Filter/CriterionVisitor.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php index 1bbaf32b7f..522e7f8fcb 100644 --- a/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php +++ b/src/lib/Persistence/Legacy/Filter/CriterionVisitor.php @@ -19,14 +19,20 @@ */ final class CriterionVisitor implements FilteringCriterionVisitor { - /** @var \Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder[] */ + /** @var iterable<\Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder> */ private iterable $criterionQueryBuilders; + /** + * @param iterable<\Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder> $criterionQueryBuilders + */ public function __construct(iterable $criterionQueryBuilders) { $this->setCriterionQueryBuilders($criterionQueryBuilders); } + /** + * @param iterable<\Ibexa\Contracts\Core\Repository\Values\Filter\CriterionQueryBuilder> $criterionQueryBuilders + */ public function setCriterionQueryBuilders(iterable $criterionQueryBuilders): void { $this->criterionQueryBuilders = $criterionQueryBuilders; @@ -38,7 +44,7 @@ public function setCriterionQueryBuilders(iterable $criterionQueryBuilders): voi public function visitCriteria( FilteringQueryBuilder $queryBuilder, FilteringCriterion $criterion - ): string { + ): ?string { foreach ($this->criterionQueryBuilders as $criterionQueryBuilder) { if ($criterionQueryBuilder->accepts($criterion)) { return $criterionQueryBuilder->buildQueryConstraint( From 17000c182020aab0e351f6917b76908cb55c7ebc Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:41:13 +0200 Subject: [PATCH 072/185] IBX-9811: Upgraded Token Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../Token/Doctrine/DoctrineGateway.php | 47 +++++++++++-------- .../Legacy/Token/Gateway/Token/Gateway.php | 4 ++ 2 files changed, 32 insertions(+), 19 deletions(-) diff --git a/src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php index 10975aa821..65500e43e0 100644 --- a/src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php @@ -21,18 +21,18 @@ */ final class DoctrineGateway extends AbstractGateway implements Gateway { - public const TABLE_NAME = 'ibexa_token'; - public const DEFAULT_TABLE_ALIAS = 'token'; + public const string TABLE_NAME = 'ibexa_token'; + public const string DEFAULT_TABLE_ALIAS = 'token'; - public const COLUMN_ID = 'id'; - public const COLUMN_TYPE_ID = 'type_id'; - public const COLUMN_TOKEN = 'token'; - public const COLUMN_IDENTIFIER = 'identifier'; - public const COLUMN_CREATED = 'created'; - public const COLUMN_EXPIRES = 'expires'; - public const COLUMN_REVOKED = 'revoked'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_TYPE_ID = 'type_id'; + public const string COLUMN_TOKEN = 'token'; + public const string COLUMN_IDENTIFIER = 'identifier'; + public const string COLUMN_CREATED = 'created'; + public const string COLUMN_EXPIRES = 'expires'; + public const string COLUMN_REVOKED = 'revoked'; - public const TOKEN_SEQ = 'ibexa_token_id_seq'; + public const string TOKEN_SEQ = 'ibexa_token_id_seq'; private Connection $connection; @@ -41,6 +41,9 @@ public function __construct(Connection $connection) $this->connection = $connection; } + /** + * @return string[] + */ public static function getColumns(): array { return [ @@ -82,6 +85,9 @@ public function insert( return (int)$this->connection->lastInsertId(self::TOKEN_SEQ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function revoke(int $tokenId): void { $this->connection->update( @@ -98,6 +104,9 @@ public function revoke(int $tokenId): void ); } + /** + * @throws \Doctrine\DBAL\Exception + */ public function revokeByIdentifier(int $typeId, ?string $identifier): void { $this->connection->update( @@ -136,7 +145,7 @@ public function deleteExpired(?int $typeId = null): void ->andWhere( $query->expr()->lt(self::COLUMN_EXPIRES, ':now') ) - ->setParameter(':now', $this->getCurrentUnixTimestamp(), ParameterType::INTEGER); + ->setParameter('now', $this->getCurrentUnixTimestamp(), ParameterType::INTEGER); if (null !== $typeId) { $query->andWhere( @@ -145,10 +154,10 @@ public function deleteExpired(?int $typeId = null): void ':type_id' ) ); - $query->setParameter(':type_id', $typeId, ParameterType::INTEGER); + $query->setParameter('type_id', $typeId, ParameterType::INTEGER); } - $query->execute(); + $query->executeQuery(); } public function getToken( @@ -157,7 +166,7 @@ public function getToken( ?string $identifier = null ): array { $query = $this->getTokenSelectQueryBuilder($tokenType, $token, $identifier); - $row = $query->execute()->fetchAssociative(); + $row = $query->executeQuery()->fetchAssociative(); if (false === $row) { throw new NotFound('token', "token: $token, type: $tokenType, identifier: $identifier"); @@ -179,9 +188,9 @@ public function getTokenById(int $tokenId): array ) ); - $query->setParameter(':token_id', $tokenId, ParameterType::INTEGER); + $query->setParameter('token_id', $tokenId, ParameterType::INTEGER); - $row = $query->execute()->fetchAssociative(); + $row = $query->executeQuery()->fetchAssociative(); if (false === $row) { throw new NotFound('token', "id: $tokenId"); @@ -233,8 +242,8 @@ private function getTokenSelectQueryBuilder( ) ); - $query->setParameter(':token_type', $tokenType, ParameterType::STRING); - $query->setParameter(':token', $token, ParameterType::STRING); + $query->setParameter('token_type', $tokenType); + $query->setParameter('token', $token); if (null !== $identifier) { $query->andWhere( @@ -243,7 +252,7 @@ private function getTokenSelectQueryBuilder( ':identifier' ) ); - $query->setParameter(':identifier', $identifier, ParameterType::STRING); + $query->setParameter('identifier', $identifier); } return $query; diff --git a/src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php b/src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php index eeb2a57a63..0828d8f000 100644 --- a/src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php +++ b/src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php @@ -38,6 +38,8 @@ public function delete(int $tokenId): void; public function deleteExpired(?int $typeId = null): void; /** + * @return array + * * @throws \Doctrine\DBAL\Exception * @throws \Doctrine\DBAL\Driver\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException @@ -49,6 +51,8 @@ public function getToken( ): array; /** + * @return array + * * @throws \Doctrine\DBAL\Exception * @throws \Doctrine\DBAL\Driver\Exception * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException From 88f313c216c67d31987050d29e05bbd4f4fc9f16 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 13:58:29 +0200 Subject: [PATCH 073/185] IBX-9811: Upgraded TokenType Doctrine Gateway to doctrine/dbal v3 and fixed strict types --- .../TokenType/Doctrine/DoctrineGateway.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php index c7e5e9af55..f30648275f 100644 --- a/src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php @@ -19,12 +19,12 @@ */ final class DoctrineGateway extends AbstractGateway implements Gateway { - public const TABLE_NAME = 'ibexa_token_type'; - public const DEFAULT_TABLE_ALIAS = 'token_type'; + public const string TABLE_NAME = 'ibexa_token_type'; + public const string DEFAULT_TABLE_ALIAS = 'token_type'; - public const COLUMN_ID = 'id'; - public const COLUMN_IDENTIFIER = 'identifier'; - public const TOKEN_TYPE_SEQ = 'ibexa_token_type_id_seq'; + public const string COLUMN_ID = 'id'; + public const string COLUMN_IDENTIFIER = 'identifier'; + public const string TOKEN_TYPE_SEQ = 'ibexa_token_type_id_seq'; private Connection $connection; @@ -83,9 +83,9 @@ public function getTypeById(int $typeId): array ) ); - $query->setParameter(':type_id', $typeId, ParameterType::INTEGER); + $query->setParameter('type_id', $typeId, ParameterType::INTEGER); - $row = $query->execute()->fetchAssociative(); + $row = $query->executeQuery()->fetchAssociative(); if (false === $row) { throw new NotFound('token_type', "id: $typeId"); @@ -107,9 +107,9 @@ public function getTypeByIdentifier(string $identifier): array ) ); - $query->setParameter(':identifier', $identifier, ParameterType::STRING); + $query->setParameter('identifier', $identifier); - $row = $query->execute()->fetchAssociative(); + $row = $query->executeQuery()->fetchAssociative(); if (false === $row) { throw new NotFound('token_type', "identifier: $identifier"); From 8523ea8cbde0433ad4c9db45872d96f3490f764d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 14:01:51 +0200 Subject: [PATCH 074/185] IBX-9811: Upgraded URL Section criteria handlers to doctrine/dbal v3 and fixed strict types --- .../Legacy/URL/Query/CriterionHandler/SectionId.php | 11 ++++------- .../URL/Query/CriterionHandler/SectionIdentifier.php | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php index 310c982ba0..ac0ae6a133 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php @@ -8,29 +8,26 @@ namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion; use Ibexa\Core\Persistence\Legacy\URL\Query\CriteriaConverter; class SectionId extends Base { - /** - * {@inheritdoc} - */ public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\SectionId; } /** - * {@inheritdoc} + * @param \Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion\SectionId $criterion */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, Criterion $criterion - ) { + ): string { $this->joinContentObjectLink($queryBuilder); $this->joinContentObjectAttribute($queryBuilder); $this->joinContentObject($queryBuilder); @@ -39,7 +36,7 @@ public function handle( 'c.section_id', $queryBuilder->createNamedParameter( $criterion->sectionIds, - Connection::PARAM_INT_ARRAY, + ArrayParameterType::INTEGER, ':section_ids' ) ); diff --git a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php index 3e172ac1ee..f3d137d4d6 100644 --- a/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php +++ b/src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Persistence\Legacy\URL\Query\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion; use Ibexa\Core\Persistence\Legacy\Content\Section\Gateway as SectionGateway; @@ -16,22 +16,19 @@ class SectionIdentifier extends Base { - /** - * {@inheritdoc} - */ public function accept(Criterion $criterion): bool { return $criterion instanceof Criterion\SectionIdentifier; } /** - * {@inheritdoc} + * @param \Ibexa\Contracts\Core\Repository\Values\URL\Query\Criterion\SectionIdentifier $criterion */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, Criterion $criterion - ) { + ): string { $this->joinContentObjectLink($queryBuilder); $this->joinContentObjectAttribute($queryBuilder); $this->joinContentObject($queryBuilder); @@ -47,7 +44,7 @@ public function handle( 's.identifier', $queryBuilder->createNamedParameter( $criterion->sectionIdentifiers, - Connection::PARAM_STR_ARRAY, + ArrayParameterType::STRING, ':section_identifiers' ) ); From 14604a2463ebc33c614fb5e3f0995b808508be3e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 14:03:39 +0200 Subject: [PATCH 075/185] IBX-9811: Upgraded ObjectState Limitation handler to doctrine/dbal v3 and fixed strict types --- .../LimitationHandler/ObjectStateHandler.php | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php index 5c37b46cba..2f4c2f6d08 100644 --- a/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php +++ b/src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Ibexa\Contracts\Core\Persistence\User\Policy; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Core\Persistence\Legacy\User\Role\LimitationHandler; @@ -19,10 +19,12 @@ */ class ObjectStateHandler extends LimitationHandler { - public const STATE_GROUP = 'StateGroup_'; + public const string STATE_GROUP = 'StateGroup_'; /** * Translate API STATE limitation to Legacy StateGroup_ limitations. + * + * @throws \Doctrine\DBAL\Exception */ public function toLegacy(Policy $policy): void { @@ -30,7 +32,7 @@ public function toLegacy(Policy $policy): void if ($policy->limitations[Limitation::STATE] === '*') { $map = array_fill_keys(array_keys($this->getGroupMap()), '*'); } else { - $map = $this->getGroupMap($policy->limitations[Limitation::STATE]); + $map = $this->getGroupMap(array_map('intval', $policy->limitations[Limitation::STATE])); } $policy->limitations += $map; unset($policy->limitations[Limitation::STATE]); @@ -39,10 +41,12 @@ public function toLegacy(Policy $policy): void /** * Translate Legacy StateGroup_ limitations to API STATE limitation. + * + * @throws \Doctrine\DBAL\Exception */ public function toSPI(Policy $policy): void { - if ($policy->limitations === '*' || empty($policy->limitations)) { + if ($policy->limitations === '*' || empty($policy->limitations) || is_string($policy->limitations)) { return; } @@ -95,8 +99,14 @@ public function toSPI(Policy $policy): void /** * Query for groups identifiers and id's. + * + * @param array|null $limitIds list of limitation-related IDs + * + * @return array + * + * @throws \Doctrine\DBAL\Exception */ - protected function getGroupMap(array $limitIds = null): array + protected function getGroupMap(?array $limitIds = null): array { $query = $this->connection->createQueryBuilder(); $query @@ -115,16 +125,14 @@ protected function getGroupMap(array $limitIds = null): array 's.id', $query->createPositionalParameter( array_map('intval', $limitIds), - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); } - $statement = $query->execute(); - + $groupValues = $query->executeQuery()->fetchAllAssociative(); $map = []; - $groupValues = $statement->fetchAllAssociative(); foreach ($groupValues as $groupValue) { $map[self::STATE_GROUP . $groupValue['identifier']][] = (int)$groupValue['id']; } From 76d6682a91c568be7e272c1679eb2af204654d77 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 14:08:10 +0200 Subject: [PATCH 076/185] IBX-9811: Upgraded LSE Location Gateway ExceptionConversion to doctrine/dbal v3 and improved code quality --- .../Location/Gateway/ExceptionConversion.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php index 37bbe723ae..17615d81f9 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php @@ -11,28 +11,23 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Core\Base\Exceptions\DatabaseException; use Ibexa\Core\Search\Legacy\Content\Location\Gateway; -use PDOException; /** * Base class for location gateways. */ class ExceptionConversion extends Gateway { - /** - * The wrapped gateway. - */ - protected Gateway $innerGateway; + protected DoctrineDatabase $innerGateway; - /** - * Creates a new exception conversion gateway around $innerGateway. - * - * @param \Ibexa\Core\Search\Legacy\Content\Location\Gateway $innerGateway - */ - public function __construct(Gateway $innerGateway) + public function __construct(DoctrineDatabase $innerGateway) { $this->innerGateway = $innerGateway; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function find( CriterionInterface $criterion, int $offset, @@ -43,7 +38,7 @@ public function find( ): array { try { return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $languageFilter, $doCount); - } catch (DBALException | PDOException $e) { + } catch (DBALException $e) { throw DatabaseException::wrap($e); } } From 3c1927466852157f2cdb9e8d205570b9007f4428 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 15:29:54 +0200 Subject: [PATCH 077/185] IBX-9811: Upgraded LSE Criteria handlers to doctrine/dbal v3 and fixed strict types --- .../Common/Gateway/CriteriaConverter.php | 12 ++--- .../Common/Gateway/CriterionHandler.php | 5 +- .../Gateway/CriterionHandler/ContentId.php | 6 +-- .../Gateway/CriterionHandler/ContentName.php | 15 ++---- .../CriterionHandler/ContentTypeGroupId.php | 6 +-- .../CriterionHandler/ContentTypeId.php | 6 +-- .../ContentTypeIdentifier.php | 5 +- .../Gateway/CriterionHandler/DateMetadata.php | 24 ++++----- .../Common/Gateway/CriterionHandler/Field.php | 10 ++-- .../Gateway/CriterionHandler/FieldEmpty.php | 12 ++++- .../CriterionHandler/FieldRelation.php | 13 +++-- .../CriterionHandler/FieldValue/Handler.php | 14 ++--- .../FieldValue/Handler/Collection.php | 2 +- .../FieldValue/Handler/Keyword.php | 2 +- .../FieldValue/Handler/Simple.php | 2 +- .../Gateway/CriterionHandler/FullText.php | 6 +-- .../Gateway/CriterionHandler/IsContainer.php | 2 +- .../Gateway/CriterionHandler/IsUserBased.php | 2 +- .../CriterionHandler/IsUserEnabled.php | 2 +- .../Gateway/CriterionHandler/LanguageCode.php | 4 +- .../Gateway/CriterionHandler/LogicalAnd.php | 5 +- .../Gateway/CriterionHandler/LogicalNot.php | 3 ++ .../Gateway/CriterionHandler/LogicalOr.php | 6 ++- .../CriterionHandler/MapLocationDistance.php | 54 +++++++++---------- .../CriterionHandler/ObjectStateId.php | 6 +-- .../ObjectStateIdentifier.php | 8 +-- .../Gateway/CriterionHandler/RemoteId.php | 6 +-- .../Gateway/CriterionHandler/SectionId.php | 6 +-- .../CriterionHandler/SectionIdentifier.php | 6 +-- .../Gateway/CriterionHandler/UserEmail.php | 5 +- .../Gateway/CriterionHandler/UserId.php | 6 +-- .../Gateway/CriterionHandler/UserLogin.php | 5 +- .../Gateway/CriterionHandler/UserMetadata.php | 10 ++-- .../Gateway/CriterionHandler/Ancestor.php | 2 +- .../Gateway/CriterionHandler/LocationId.php | 6 +-- .../CriterionHandler/LocationRemoteId.php | 6 +-- .../CriterionHandler/ParentLocationId.php | 6 +-- .../CriterionHandler/PermissionSubtree.php | 2 +- .../Gateway/CriterionHandler/Subtree.php | 5 +- .../Gateway/CriterionHandler/Visibility.php | 2 +- .../Gateway/CriterionHandler/Ancestor.php | 6 +-- .../CriterionHandler/Location/Depth.php | 12 ++--- .../Location/IsMainLocation.php | 2 +- .../CriterionHandler/Location/Priority.php | 15 +++--- .../Gateway/CriterionHandler/LocationId.php | 6 +-- .../CriterionHandler/LocationRemoteId.php | 6 +-- .../CriterionHandler/ParentLocationId.php | 6 +-- .../Gateway/CriterionHandler/Subtree.php | 2 +- .../Gateway/CriterionHandler/Visibility.php | 35 ++++++------ 49 files changed, 201 insertions(+), 194 deletions(-) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php index 4b480b2887..43b532060f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php @@ -13,7 +13,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; /** - * Content locator gateway implementation using the DoctrineDatabase. + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ class CriteriaConverter { @@ -22,7 +22,7 @@ class CriteriaConverter * * @var \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler[] */ - protected $handlers; + protected array $handlers; /** * Construct from an optional array of Criterion handlers. @@ -34,11 +34,6 @@ public function __construct(array $handlers = []) $this->handlers = $handlers; } - /** - * Adds handler. - * - * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler $handler - */ public function addHandler(CriterionHandler $handler): void { $this->handlers[] = $handler; @@ -47,10 +42,11 @@ public function addHandler(CriterionHandler $handler): void /** * Generic converter of criteria into query fragments. * - * @param array $languageSettings + * @phpstan-param TSearchLanguageFilter $languageSettings * * @return \Doctrine\DBAL\Query\Expression\CompositeExpression|string * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ public function convertCriteria( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php index e0cb698a62..469de62527 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php @@ -13,6 +13,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; +/** + * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService + */ abstract class CriterionHandler { /** @@ -58,7 +61,7 @@ abstract public function accept(CriterionInterface $criterion); * * accept() must be called before calling this method. * - * @param array $languageSettings + * @phpstan-param TSearchLanguageFilter $languageSettings * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php index c6030aec13..b1a9629c27 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; return $queryBuilder->expr()->in( 'c.id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php index 0834075ad5..0a2ebab882 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php @@ -20,8 +20,8 @@ */ final class ContentName extends CriterionHandler { - private const CONTENTOBJECT_NAME_ALIAS = 'ezc_n'; - private const CONTENTOBJECT_ALIAS = 'c'; + private const string CONTENTOBJECT_NAME_ALIAS = 'ezc_n'; + private const string CONTENTOBJECT_ALIAS = 'c'; public function accept(CriterionInterface $criterion): bool { @@ -30,13 +30,7 @@ public function accept(CriterionInterface $criterion): bool } /** - * @param array{ - * languages: array, - * useAlwaysAvailable: bool, - * } $languageSettings * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentName $criterion - * - * @throws \Doctrine\DBAL\Exception */ public function handle( CriteriaConverter $converter, @@ -88,11 +82,8 @@ private function prepareValue(Criterion $criterion): string ); } - /** - * @throws \Doctrine\DBAL\Exception - */ private function toLowerCase(string $value): string { - return $this->connection->getDatabasePlatform()->getLowerExpression($value); + return sprintf('LOWER( %s )', $this->connection->quote($value)); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php index 399462bf94..db94f56455 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $subSelect ->select( @@ -42,7 +42,7 @@ public function handle( )->where( $queryBuilder->expr()->in( 'group_id', - $queryBuilder->createNamedParameter($criterion->value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($criterion->value, ArrayParameterType::INTEGER) ) ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php index 9ac4d29a90..db23d63c53 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,10 +32,10 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { return $queryBuilder->expr()->in( 'c.contentclass_id', - $queryBuilder->createNamedParameter($criterion->value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($criterion->value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php index a311f39398..0b473c3cc9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Type\Handler; @@ -55,7 +56,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $idList = []; $invalidIdentifiers = []; @@ -83,7 +84,7 @@ public function handle( return $queryBuilder->expr()->in( 'c.contentclass_id', - $queryBuilder->createNamedParameter($idList, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($idList, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php index 61a8e00348..14cb138437 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -34,7 +34,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $column = $this->getColumnName($criterion); $value = (array)$criterion->value; @@ -42,11 +42,12 @@ public function handle( case Criterion\Operator::IN: return $queryBuilder->expr()->in( $column, - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); case Criterion\Operator::BETWEEN: - return $this->dbPlatform->getBetweenExpression( + return sprintf( + '%s BETWEEN %s AND %s', $column, $queryBuilder->createNamedParameter($value[0], ParameterType::INTEGER), $queryBuilder->createNamedParameter($value[1], ParameterType::INTEGER) @@ -73,15 +74,10 @@ public function handle( private function getColumnName(Criterion $criterion): string { - switch ($criterion->target) { - case Criterion\DateMetadata::TRASHED: - return 't.' . Criterion\DateMetadata::TRASHED; - case Criterion\DateMetadata::MODIFIED: - return 'c.' . Criterion\DateMetadata::MODIFIED; - case Criterion\DateMetadata::CREATED: - case Criterion\DateMetadata::PUBLISHED: - default: - return 'c.' . Criterion\DateMetadata::PUBLISHED; - } + return match ($criterion->target) { + Criterion\DateMetadata::TRASHED => 't.' . Criterion\DateMetadata::TRASHED, + Criterion\DateMetadata::MODIFIED => 'c.' . Criterion\DateMetadata::MODIFIED, + default => 'c.' . Criterion\DateMetadata::PUBLISHED, + }; } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php index a43fde2d75..4d2ad838ef 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; @@ -68,15 +69,13 @@ public function accept(CriterionInterface $criterion): bool * The returned information is returned as an array of the attribute * identifier and the sort column, which should be used. * - * @param string $fieldIdentifier - * - * @return array + * @return array, column: string|false}> * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If no searchable fields are found for the given $fieldIdentifier. * @throws \RuntimeException if no converter is found * @throws \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\Exception\NotFound */ - protected function getFieldsInformation($fieldIdentifier): array + protected function getFieldsInformation(string $fieldIdentifier): array { $fieldMapArray = []; $fieldMap = $this->contentTypeHandler->getSearchableFieldMap(); @@ -107,7 +106,6 @@ protected function getFieldsInformation($fieldIdentifier): array } /** - * @param array $languageSettings * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Field $criterion * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException If no searchable fields are found for the given criterion target. @@ -148,7 +146,7 @@ public function handle( 'contentclassattribute_id', $queryBuilder->createNamedParameter( $fieldsInfo['ids'], - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ), $filter diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php index 031b6582d6..4800c5209b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler; @@ -95,7 +96,16 @@ protected function getFieldsInformation(string $fieldIdentifier): array } /** + * @param \Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriteriaConverter $converter + * @param \Doctrine\DBAL\Query\QueryBuilder $queryBuilder * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\IsFieldEmpty $criterion + * @param array $languageSettings + * + * @return string + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function handle( CriteriaConverter $converter, @@ -125,7 +135,7 @@ public function handle( $whereExpressions[] = $subSelect->expr()->and( $subSelect->expr()->in( 'contentclassattribute_id', - $queryBuilder->createNamedParameter($fieldsInfo['ids'], Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($fieldsInfo['ids'], ArrayParameterType::INTEGER) ), $filter ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php index 72a886b8f3..6e19e3e899 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php @@ -7,8 +7,9 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -71,13 +72,15 @@ protected function getFieldDefinitionsIds($fieldDefinitionIdentifier): array /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\FieldRelation $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): CompositeExpression|string { $fieldDefinitionIds = $this->getFieldDefinitionsIds($criterion->target); $criterionValue = (array)$criterion->value; @@ -136,7 +139,7 @@ protected function buildQueryForContainsOperator( ), $expr->in( 'c_rel.contentclassattribute_id', - $queryBuilder->createNamedParameter($fieldDefinitionIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($fieldDefinitionIds, ArrayParameterType::INTEGER) ), $expr->eq( self::CONTENT_ITEM_REL_COLUMN, @@ -179,7 +182,7 @@ protected function buildQueryForInOperator( 'c_rel.contentclassattribute_id', $queryBuilder->createNamedParameter( $fieldDefinitionIds, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ) @@ -188,7 +191,7 @@ protected function buildQueryForInOperator( self::CONTENT_ITEM_REL_COLUMN, $queryBuilder->createNamedParameter( $criterionValue, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php index b155752f64..e342f421cf 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\FieldValue; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; @@ -62,8 +63,6 @@ public function __construct(Connection $connection, TransformationProcessor $tra * @param \Doctrine\DBAL\Query\QueryBuilder $subQuery to modify Field Value query constraints * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion $criterion * - * @return \Doctrine\DBAL\Query\Expression\CompositeExpression|string - * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If passed more than 1 argument to unary operator. * @throws \RuntimeException If operator is not handled. */ @@ -72,7 +71,7 @@ public function handle( QueryBuilder $subQuery, Criterion $criterion, string $column - ) { + ): string { if (is_array($criterion->value) && CriterionOperator::isUnary($criterion->operator)) { if (count($criterion->value) > 1) { throw new InvalidArgumentException('$criterion->value', "Too many arguments for unary operator '$criterion->operator'"); @@ -94,7 +93,8 @@ public function handle( break; case CriterionOperator::BETWEEN: - $filter = $this->dbPlatform->getBetweenExpression( + $filter = sprintf( + '%s BETWEEN %s AND %s', $column, $outerQuery->createNamedParameter($this->lowerCase($criterion->value[0])), $outerQuery->createNamedParameter($this->lowerCase($criterion->value[1])) @@ -211,16 +211,16 @@ private function getParamArrayType(array $values): int foreach ($values as $value) { if (is_bool($value) || ($value !== 0 && is_int($value))) { // Ignore 0 as ambiguous (float vs int) - $types[] = Connection::PARAM_INT_ARRAY; + $types[] = ArrayParameterType::INTEGER; } else { // Floats are considered strings - $types[] = Connection::PARAM_STR_ARRAY; + $types[] = ArrayParameterType::STRING; } } $arrayValueTypes = array_unique($types); // Fallback to Connection::PARAM_STR_ARRAY - return $arrayValueTypes[0] ?? Connection::PARAM_STR_ARRAY; + return $arrayValueTypes[0] ?? ArrayParameterType::STRING; } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php index 3af6436a43..c308be00cb 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php @@ -43,7 +43,7 @@ public function handle( QueryBuilder $subQuery, Criterion $criterion, string $column - ) { + ): string { $singleValueExpr = 'eq'; switch ($criterion->operator) { diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php index 7ba9aa3c87..26608b1dfc 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Keyword.php @@ -20,7 +20,7 @@ public function handle( QueryBuilder $subQuery, Criterion $criterion, string $column - ) { + ): string { $subQuery ->innerJoin( 'f_def', diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php index 8f175b42a5..1e011a35b7 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php @@ -24,7 +24,7 @@ public function handle( QueryBuilder $subQuery, Criterion $criterion, string $column - ) { + ): string { // For "Simple" FieldTypes, handle the following as equal: // - Contains // - LIKE when against int column diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php index c553cbf8ac..65934ad6b1 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php @@ -199,7 +199,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $expr = $queryBuilder->expr(); $subSelect @@ -261,10 +261,10 @@ protected function getStopWordThresholdValue(): int // Cached value does not exists, do a simple count query on ezcontentobject table $query = $this->connection->createQueryBuilder(); $query - ->select($this->dbPlatform->getCountExpression('id')) + ->select('COUNT(id)') ->from(ContentGateway::CONTENT_ITEM_TABLE); - $count = (int)$query->execute()->fetchColumn(); + $count = (int)$query->executeQuery()->fetchOne(); // Calculate the int stopWordThresholdValue based on count (first column) * factor return $this->stopWordThresholdValue = (int)($count * $this->configuration['stopWordThresholdFactor']); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsContainer.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsContainer.php index cbd61c9a96..bbb31aefc0 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsContainer.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsContainer.php @@ -33,7 +33,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { /** @var array{bool} $criterionValue */ $criterionValue = $criterion->value; $isContainer = reset($criterionValue); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php index 5b5fc28b51..423ba7619c 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php @@ -29,7 +29,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $isUserBased = (bool)reset($criterion->value); $subSelect = $this->connection->createQueryBuilder(); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php index 6e9279b446..41995a92db 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php @@ -30,7 +30,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $subSelect ->select('t1.contentobject_id') diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php index b4461149d5..90d231350f 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php @@ -36,13 +36,15 @@ public function accept(CriterionInterface $criterion): bool /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { /* @var $criterion \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LanguageCode */ return $queryBuilder->expr()->gt( $this->dbPlatform->getBitAndComparisonExpression( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php index 26ef386620..7a8e02d2f9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -25,13 +26,15 @@ public function accept(CriterionInterface $criterion): bool /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): CompositeExpression { $subexpressions = []; foreach ($criterion->criteria as $subCriterion) { $subexpressions[] = $converter->convertCriteria( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php index b2593c7c09..27bbfb2bc6 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php @@ -25,6 +25,9 @@ public function accept(CriterionInterface $criterion): bool /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalNot $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ public function handle( CriteriaConverter $converter, diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php index b6fc863751..b315942d07 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -25,13 +26,16 @@ public function accept(CriterionInterface $criterion): bool /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalOr $criterion + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): CompositeExpression { $subexpressions = []; foreach ($criterion->criteria as $subCriterion) { $subexpressions[] = $converter->convertCriteria( diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php index 50a741349f..411d86d674 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Value\MapLocationValue; @@ -24,12 +24,12 @@ class MapLocationDistance extends FieldBase /** * Distance in kilometers of one degree longitude at the Equator. */ - public const DEGREE_KM = 111.195; + public const float DEGREE_KM = 111.195; /** * Radius of the planet in kilometers. */ - public const EARTH_RADIUS = 6371.01; + public const float EARTH_RADIUS = 6371.01; public function accept(CriterionInterface $criterion): bool { @@ -39,13 +39,11 @@ public function accept(CriterionInterface $criterion): bool /** * Returns a list of IDs of searchable FieldDefinitions for the given criterion target. * - * @param string $fieldIdentifier - * - * @return array + * @return int[] * * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException If no searchable fields are found for the given $fieldIdentifier. */ - protected function getFieldDefinitionIds($fieldIdentifier): array + protected function getFieldDefinitionIds(string $fieldIdentifier): array { $fieldDefinitionIdList = []; $fieldMap = $this->contentTypeHandler->getSearchableFieldMap(); @@ -74,20 +72,23 @@ protected function getFieldDefinitionIds($fieldIdentifier): array return $fieldDefinitionIdList; } - protected function kilometersToDegrees($kilometers): float + protected function kilometersToDegrees(float $kilometers): float { return $kilometers / self::DEGREE_KM; } /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\MapLocationDistance $criterion + * + * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function handle( CriteriaConverter $converter, QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $fieldDefinitionIds = $this->getFieldDefinitionIds($criterion->target); $subSelect = $this->connection->createQueryBuilder(); @@ -117,29 +118,26 @@ public function handle( case Criterion\Operator::LT: case Criterion\Operator::LTE: $operatorFunction = $this->comparatorMap[$criterion->operator]; - $distanceInDegrees = $this->kilometersToDegrees($criterion->value) ** 2; + $criterionValue = (float)$criterion->value; + $distanceInDegrees = $this->kilometersToDegrees($criterionValue) ** 2; $distanceFilter = $expr->$operatorFunction( $distanceExpression, - $this->dbPlatform->getRoundExpression( - $queryBuilder->createNamedParameter($distanceInDegrees), - 10 - ) + sprintf('ROUND(%s, %d)', $queryBuilder->createNamedParameter($distanceInDegrees), 10) ); break; case Criterion\Operator::BETWEEN: - $distanceInDegrees1 = $this->kilometersToDegrees($criterion->value[0]) ** 2; - $distanceInDegrees2 = $this->kilometersToDegrees($criterion->value[1]) ** 2; - $distanceFilter = $this->dbPlatform->getBetweenExpression( + /** @var array{float, float} $criterionValue */ + $criterionValue = $criterion->value; + $distanceInDegrees1 = $this->kilometersToDegrees($criterionValue[0]) ** 2; + $distanceInDegrees2 = $this->kilometersToDegrees($criterionValue[1]) ** 2; + $distanceFilter = sprintf( + '%s BETWEEN ROUND(%s, %d) AND ROUND(%s, %d)', $distanceExpression, - $this->dbPlatform->getRoundExpression( - $queryBuilder->createNamedParameter($distanceInDegrees1), - 10 - ), - $this->dbPlatform->getRoundExpression( - $queryBuilder->createNamedParameter($distanceInDegrees2), - 10 - ), + $queryBuilder->createNamedParameter($distanceInDegrees1), + 10, + $queryBuilder->createNamedParameter($distanceInDegrees2), + 10 ); break; @@ -156,9 +154,7 @@ public function handle( $distanceUpper = $criterion->value; break; case Criterion\Operator::BETWEEN: - $distanceUpper = $criterion->value[0] > $criterion->value[1] ? - $criterion->value[0] : - $criterion->value[1]; + $distanceUpper = max($criterion->value[0], $criterion->value[1]); break; default: // Skip other operators @@ -190,7 +186,7 @@ public function handle( ->andWhere( $expr->in( 'f_def.contentclassattribute_id', - $queryBuilder->createNamedParameter($fieldDefinitionIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($fieldDefinitionIds, ArrayParameterType::INTEGER) ) ) ->andWhere($distanceFilter) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php index ba78111c61..54f87f3950 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $value = (array)$criterion->value; $subSelect @@ -43,7 +43,7 @@ public function handle( )->where( $queryBuilder->expr()->in( 'contentobject_state_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ) ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php index d3df19ddfc..e6e806008b 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -30,11 +30,11 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; $matchStateIdentifier = $queryBuilder->expr()->in( 't2.identifier', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); if (null !== $criterion->target) { @@ -44,7 +44,7 @@ public function handle( 't3.identifier', $queryBuilder->createNamedParameter( $criterionTarget, - Connection::PARAM_STR_ARRAY + ArrayParameterType::STRING ) ), $matchStateIdentifier diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php index 228864db54..efca721c32 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $remoteIds = (array)$criterion->value; return $queryBuilder->expr()->in( 'c.remote_id', - $queryBuilder->createNamedParameter($remoteIds, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($remoteIds, ArrayParameterType::STRING) ); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php index 9c8b41ffcc..d78176890d 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $sectionIds = (array)$criterion->value; return $queryBuilder->expr()->in( 'c.section_id', - $queryBuilder->createNamedParameter($sectionIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($sectionIds, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php index 930c8719be..70c4e14465 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -30,7 +30,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $value = (array)$criterion->value; $subSelect @@ -45,7 +45,7 @@ public function handle( ->where( $queryBuilder->expr()->in( 't2.identifier', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ) ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php index 941d87906d..96850edeac 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -42,7 +43,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { if (Criterion\Operator::LIKE === $criterion->operator) { $expression = $queryBuilder->expr()->like( 't1.email', @@ -64,7 +65,7 @@ public function handle( $value = (array)$criterion->value; $expression = $queryBuilder->expr()->in( 't1.email', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php index d86a111cad..a72bcacc10 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php @@ -8,7 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -31,7 +31,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $value = (array)$criterion->value; $subSelect @@ -40,7 +40,7 @@ public function handle( ->where( $queryBuilder->expr()->in( 't1.contentobject_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ) ); diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php index c1b28ca6ad..80829eb3d9 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -42,7 +43,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $expr = $queryBuilder->expr(); if (Criterion\Operator::LIKE === $criterion->operator) { $expression = $expr->like( @@ -65,7 +66,7 @@ public function handle( $value = (array)$criterion->value; $expression = $expr->in( 't1.login', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php index d3007421b9..49bc9e7ba3 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; @@ -35,13 +35,13 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; switch ($criterion->target) { case Criterion\UserMetadata::MODIFIER: return $queryBuilder->expr()->in( 'v.creator_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); case Criterion\UserMetadata::GROUP: @@ -66,7 +66,7 @@ public function handle( )->where( $queryBuilder->expr()->in( 't2.contentobject_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ) ); @@ -78,7 +78,7 @@ public function handle( case Criterion\UserMetadata::OWNER: return $queryBuilder->expr()->in( 'c.owner_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); default: break; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php index 93704c7e10..27a1e943d2 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php @@ -31,7 +31,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $idSet = []; foreach ($criterion->value as $value) { foreach (explode('/', trim($value, '/')) as $id) { diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php index 0761957f3e..fb8b2d0f7b 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $locationIds = (array)$criterion->value; $subSelect = $this->connection->createQueryBuilder(); $subSelect @@ -43,7 +43,7 @@ public function handle( )->where( $queryBuilder->expr()->in( 'node_id', - $queryBuilder->createNamedParameter($locationIds, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($locationIds, ArrayParameterType::INTEGER) ) ); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php index d51bdfd8d0..68aa6c4c4b 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $value = (array)$criterion->value; $subSelect @@ -44,7 +44,7 @@ public function handle( )->where( $queryBuilder->expr()->in( 'subquery_location.remote_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ) ); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php index 4e7adf864d..8ec3f1b56e 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); $expr = $queryBuilder->expr(); $subSelect @@ -45,7 +45,7 @@ public function handle( 'parent_node_id', $queryBuilder->createNamedParameter( $criterion->value, - Connection::PARAM_INT_ARRAY + ArrayParameterType::INTEGER ) ) ); diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php index 69159cba18..a6fb7b44c8 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $table = 'permission_subtree'; $statements = []; diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php index cef42e7e6d..7db527fb37 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php @@ -7,7 +7,6 @@ namespace Ibexa\Core\Search\Legacy\Content\Gateway\CriterionHandler; -use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +31,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $statements = []; foreach ($criterion->value as $pattern) { $statements[] = $queryBuilder->expr()->like( 'path_string', - $queryBuilder->createNamedParameter($pattern . '%', ParameterType::STRING) + $queryBuilder->createNamedParameter($pattern . '%') ); } diff --git a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php index 0a54382515..f169cd73fe 100644 --- a/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $subSelect = $this->connection->createQueryBuilder(); if ($criterion->value[0] === Criterion\Visibility::VISIBLE) { diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php index 0189a5d0cf..c907672f14 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $idSet = []; foreach ($criterion->value as $value) { foreach (explode('/', trim($value, '/')) as $id) { @@ -42,7 +42,7 @@ public function handle( return $queryBuilder->expr()->in( 't.node_id', - $queryBuilder->createNamedParameter(array_keys($idSet), Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter(array_keys($idSet), ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php index 4f04e0aa7a..ba4d948c4b 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php @@ -7,7 +7,6 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location; -use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -33,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $column = 't.depth'; switch ($criterion->operator) { @@ -44,10 +43,11 @@ public function handle( ); case Criterion\Operator::BETWEEN: - return $this->dbPlatform->getBetweenExpression( + return sprintf( + '%s BETWEEN %s AND %s', $column, - $queryBuilder->createNamedParameter($criterion->value[0], ParameterType::STRING), - $queryBuilder->createNamedParameter($criterion->value[1], ParameterType::STRING) + $queryBuilder->createNamedParameter($criterion->value[0]), + $queryBuilder->createNamedParameter($criterion->value[1]) ); case Criterion\Operator::EQ: @@ -59,7 +59,7 @@ public function handle( return $queryBuilder->expr()->$operatorFunction( $column, - $queryBuilder->createNamedParameter(reset($criterion->value), ParameterType::STRING) + $queryBuilder->createNamedParameter(reset($criterion->value)) ); default: diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php index 26c20f5597..eea1368049 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php @@ -32,7 +32,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $idColumn = 't.node_id'; $mainIdColumn = 't.main_node_id'; diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php index 0e4dc7ab58..cddd23acda 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php @@ -7,7 +7,6 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler\Location; -use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -33,15 +32,19 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $column = 'priority'; switch ($criterion->operator) { case Criterion\Operator::BETWEEN: - return $this->dbPlatform->getBetweenExpression( + /** @var array{int, int} $criterionValue */ + $criterionValue = $criterion->value; + + return sprintf( + '%s BETWEEN %s AND %s', $column, - $queryBuilder->createNamedParameter($criterion->value[0], ParameterType::STRING), - $queryBuilder->createNamedParameter($criterion->value[1], ParameterType::STRING) + $queryBuilder->createNamedParameter($criterionValue[0]), + $queryBuilder->createNamedParameter($criterionValue[1]) ); case Criterion\Operator::GT: @@ -52,7 +55,7 @@ public function handle( return $queryBuilder->expr()->$operatorFunction( $column, - $queryBuilder->createNamedParameter(reset($criterion->value), ParameterType::STRING) + $queryBuilder->createNamedParameter(reset($criterion->value)) ); default: diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php index aa48c62001..d66bf657e8 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; return $queryBuilder->expr()->in( 't.node_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php index 4bc815445b..fbb77a7984 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; return $queryBuilder->expr()->in( 't.remote_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_STR_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::STRING) ); } } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php index 5c59deb3e3..17a621e428 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php @@ -7,7 +7,7 @@ namespace Ibexa\Core\Search\Legacy\Content\Location\Gateway\CriterionHandler; -use Doctrine\DBAL\Connection; +use Doctrine\DBAL\ArrayParameterType; use Doctrine\DBAL\Query\QueryBuilder; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; @@ -32,12 +32,12 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $value = (array)$criterion->value; return $queryBuilder->expr()->in( 't.parent_node_id', - $queryBuilder->createNamedParameter($value, Connection::PARAM_INT_ARRAY) + $queryBuilder->createNamedParameter($value, ArrayParameterType::INTEGER) ); } } diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php index f078eae38f..edde7076b5 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php @@ -27,7 +27,7 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $statements = []; foreach ($criterion->value as $pattern) { $statements[] = $queryBuilder->expr()->like( diff --git a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php index 850368919f..da4c510ff5 100644 --- a/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php +++ b/src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php @@ -33,26 +33,23 @@ public function handle( QueryBuilder $queryBuilder, CriterionInterface $criterion, array $languageSettings - ) { + ): string { $column = 't.is_invisible'; - switch ($criterion->value[0]) { - case Criterion\Visibility::VISIBLE: - return $queryBuilder->expr()->eq( - $column, - $queryBuilder->createNamedParameter(0, ParameterType::INTEGER) - ); - - case Criterion\Visibility::HIDDEN: - return $queryBuilder->expr()->eq( - $column, - $queryBuilder->createNamedParameter(1, ParameterType::INTEGER) - ); - - default: - throw new RuntimeException( - "Unknown value '{$criterion->value[0]}' for Visibility Criterion handler." - ); - } + $criterionValue = $criterion->value[0] ?? null; + + return match ($criterionValue) { + Criterion\Visibility::VISIBLE => $queryBuilder->expr()->eq( + $column, + $queryBuilder->createNamedParameter(0, ParameterType::INTEGER) + ), + Criterion\Visibility::HIDDEN => $queryBuilder->expr()->eq( + $column, + $queryBuilder->createNamedParameter(1, ParameterType::INTEGER) + ), + default => throw new RuntimeException( + "Unknown value '$criterionValue' for Visibility Criterion handler." + ), + }; } } From fbc018960187f8e54bc28d1b972e52eb97277f48 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 15:54:37 +0200 Subject: [PATCH 078/185] IBX-8471: Upgraded `IbexaIOBundle` class to Symfony 7 --- src/bundle/IO/IbexaIOBundle.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bundle/IO/IbexaIOBundle.php b/src/bundle/IO/IbexaIOBundle.php index 5cb0049493..70190b9c84 100644 --- a/src/bundle/IO/IbexaIOBundle.php +++ b/src/bundle/IO/IbexaIOBundle.php @@ -16,8 +16,7 @@ class IbexaIOBundle extends Bundle { - /** @var \Ibexa\Bundle\IO\DependencyInjection\IbexaIOExtension|null */ - protected $extension; + protected ExtensionInterface|null|false $extension; public function build(ContainerBuilder $container): void { @@ -42,6 +41,6 @@ public function getContainerExtension(): ?ExtensionInterface $this->extension->addBinarydataHandlerFactory('flysystem', new ConfigurationFactory\BinarydataHandler\Flysystem()); } - return $this->extension; + return $this->extension ?: null; } } From 3c4079af49ae804816ed369c19eb8b826cf3c1a7 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 16:07:31 +0200 Subject: [PATCH 079/185] IBX-9727: Fixed GatewayBasedStorage implementations after strict types changes --- .../BinaryBase/BinaryBaseStorage.php | 10 ++++++---- src/lib/FieldType/Image/ImageStorage.php | 5 ++--- src/lib/FieldType/Keyword/KeywordStorage.php | 19 +++++++++---------- .../MapLocation/MapLocationStorage.php | 5 ++--- src/lib/FieldType/Url/UrlStorage.php | 9 ++++----- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php index a3698a7ec4..4dff3e2707 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage.php @@ -20,11 +20,13 @@ /** * Storage for binary files. + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway> */ class BinaryBaseStorage extends GatewayBasedStorage { /** - * An instance of IOService configured to store to the images folder. + * An instance of IOService configured to store to the images' folder. */ protected IOServiceInterface $ioService; @@ -34,11 +36,11 @@ class BinaryBaseStorage extends GatewayBasedStorage protected PathGeneratorInterface $downloadUrlGenerator; - /** @var \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway */ - protected $gateway; - protected FileExtensionBlackListValidator $fileExtensionBlackListValidator; + /** + * @param \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway $gateway + */ public function __construct( StorageGatewayInterface $gateway, IOServiceInterface $ioService, diff --git a/src/lib/FieldType/Image/ImageStorage.php b/src/lib/FieldType/Image/ImageStorage.php index 90e6a34009..c75b42460c 100644 --- a/src/lib/FieldType/Image/ImageStorage.php +++ b/src/lib/FieldType/Image/ImageStorage.php @@ -19,6 +19,8 @@ /** * Converter for Image field type external storage. + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\Image\ImageStorage\Gateway> */ class ImageStorage extends GatewayBasedStorage { @@ -28,9 +30,6 @@ class ImageStorage extends GatewayBasedStorage protected AliasCleanerInterface $aliasCleaner; - /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ - protected $gateway; - protected FilePathNormalizerInterface $filePathNormalizer; protected FileExtensionBlackListValidator $fileExtensionBlackListValidator; diff --git a/src/lib/FieldType/Keyword/KeywordStorage.php b/src/lib/FieldType/Keyword/KeywordStorage.php index 6fe2a16422..c2e5ba0fd1 100644 --- a/src/lib/FieldType/Keyword/KeywordStorage.php +++ b/src/lib/FieldType/Keyword/KeywordStorage.php @@ -17,31 +17,30 @@ * The keyword storage ships a list (array) of keywords in * $field->value->externalData. $field->value->data is simply empty, because no * internal data is store. + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\Keyword\KeywordStorage\Gateway> */ class KeywordStorage extends GatewayBasedStorage { - /** @var \Ibexa\Core\FieldType\Keyword\KeywordStorage\Gateway */ - protected $gateway; - /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage - * - * @return mixed */ - public function storeFieldData(VersionInfo $versionInfo, Field $field) + public function storeFieldData(VersionInfo $versionInfo, Field $field): bool { $contentTypeId = $this->gateway->getContentTypeId($field); - return $this->gateway->storeFieldData($field, $contentTypeId); + $this->gateway->storeFieldData($field, $contentTypeId); + + return true; } - public function getFieldData(VersionInfo $versionInfo, Field $field) + public function getFieldData(VersionInfo $versionInfo, Field $field): void { - return $this->gateway->getFieldData($field); + $this->gateway->getFieldData($field); } /** - * @param array $fieldIds + * @param int[] $fieldIds */ public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds): bool { diff --git a/src/lib/FieldType/MapLocation/MapLocationStorage.php b/src/lib/FieldType/MapLocation/MapLocationStorage.php index 28b149a8a4..ff364b3a14 100644 --- a/src/lib/FieldType/MapLocation/MapLocationStorage.php +++ b/src/lib/FieldType/MapLocation/MapLocationStorage.php @@ -13,12 +13,11 @@ /** * Storage for the MapLocation field type. + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway> */ class MapLocationStorage extends GatewayBasedStorage { - /** @var \Ibexa\Core\FieldType\MapLocation\MapLocationStorage\Gateway */ - protected $gateway; - public function storeFieldData(VersionInfo $versionInfo, Field $field) { return $this->gateway->storeFieldData($versionInfo, $field); diff --git a/src/lib/FieldType/Url/UrlStorage.php b/src/lib/FieldType/Url/UrlStorage.php index 5e43d59d63..0522753f34 100644 --- a/src/lib/FieldType/Url/UrlStorage.php +++ b/src/lib/FieldType/Url/UrlStorage.php @@ -15,19 +15,18 @@ /** * Converter for Url field type external storage. + * + * @extends \Ibexa\Contracts\Core\FieldType\GatewayBasedStorage<\Ibexa\Core\FieldType\Url\UrlStorage\Gateway> */ class UrlStorage extends GatewayBasedStorage { protected ?LoggerInterface $logger; - /** @var \Ibexa\Core\FieldType\Url\UrlStorage\Gateway */ - protected $gateway; - /** * Construct from gateways. * - * @param \Ibexa\Contracts\Core\FieldType\StorageGatewayInterface $gateway - * @param \Psr\Log\LoggerInterface $logger + * @param \Ibexa\Core\FieldType\Url\UrlStorage\Gateway $gateway + * @param \Psr\Log\LoggerInterface|null $logger */ public function __construct(StorageGatewayInterface $gateway, LoggerInterface $logger = null) { From 5e92d1a4c76c44a47b922b09997324733951442d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 16 Apr 2025 17:41:05 +0200 Subject: [PATCH 080/185] IBX-8471: Upgraded SiteAccess Matcher serializers to Symfony 7 --- .../Fragment/SiteAccessSerializationTrait.php | 44 ---------- .../AbstractPropertyWhitelistNormalizer.php | 41 --------- .../Serializer/CompoundMatcherNormalizer.php | 78 +++++++++++------ .../Serializer/HostElementNormalizer.php | 49 +++++++++-- .../Serializer/HostTextNormalizer.php | 47 +++++++++-- .../Component/Serializer/MapNormalizer.php | 58 +++++++++++-- .../Serializer/MatcherDenormalizer.php | 9 +- .../Component/Serializer/RegexNormalizer.php | 52 ++++++++++-- .../SimplifiedRequestNormalizer.php | 55 +++++++++--- .../Serializer/SiteAccessNormalizer.php | 41 +++++---- .../Serializer/URIElementNormalizer.php | 49 +++++++++-- .../Serializer/URITextNormalizer.php | 47 +++++++++-- .../Symfony/Matcher/ContentBased/Depth.php | 2 +- src/lib/MVC/Symfony/SiteAccess/Matcher.php | 12 +-- .../Matcher/AffixBasedTextMatcher.php | 8 ++ .../Symfony/SiteAccess/Matcher/Compound.php | 45 ++++++---- .../Matcher/Compound/LogicalAnd.php | 12 +-- .../SiteAccess/Matcher/Compound/LogicalOr.php | 10 ++- .../SiteAccess/Matcher/CompoundInterface.php | 9 +- .../SiteAccess/Matcher/HostElement.php | 68 ++++++++++----- .../Symfony/SiteAccess/Matcher/HostText.php | 2 +- .../MVC/Symfony/SiteAccess/Matcher/Map.php | 65 ++++++-------- .../Symfony/SiteAccess/Matcher/Map/Host.php | 5 +- .../Symfony/SiteAccess/Matcher/Map/Port.php | 34 ++++---- .../Symfony/SiteAccess/Matcher/Map/URI.php | 7 +- .../MVC/Symfony/SiteAccess/Matcher/Regex.php | 48 +++++------ .../Symfony/SiteAccess/Matcher/URIElement.php | 84 ++++++++++++------- .../Symfony/SiteAccess/Matcher/URIText.php | 2 +- src/lib/MVC/Symfony/SiteAccess/Router.php | 12 +-- .../Symfony/SiteAccess/VersatileMatcher.php | 16 ++-- 30 files changed, 648 insertions(+), 363 deletions(-) delete mode 100644 src/bundle/Core/Fragment/SiteAccessSerializationTrait.php delete mode 100644 src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php diff --git a/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php b/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php deleted file mode 100644 index e4d6e3aa3f..0000000000 --- a/src/bundle/Core/Fragment/SiteAccessSerializationTrait.php +++ /dev/null @@ -1,44 +0,0 @@ -attributes['serialized_siteaccess'] = json_encode($siteAccess); - $uri->attributes['serialized_siteaccess_matcher'] = $this->getSerializer()->serialize( - $siteAccess->matcher, - 'json', - [AbstractNormalizer::IGNORED_ATTRIBUTES => ['request', 'container', 'matcherBuilder', 'connection']] - ); - if ($siteAccess->matcher instanceof SiteAccess\Matcher\CompoundInterface) { - $subMatchers = $siteAccess->matcher->getSubMatchers(); - foreach ($subMatchers as $subMatcher) { - $uri->attributes['serialized_siteaccess_sub_matchers'][get_class($subMatcher)] = $this->getSerializer()->serialize( - $subMatcher, - 'json', - [AbstractNormalizer::IGNORED_ATTRIBUTES => ['request', 'container', 'matcherBuilder', 'connection']] - ); - } - } - } -} diff --git a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php deleted file mode 100644 index f51ff6a96a..0000000000 --- a/src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface - */ - public function normalize(mixed $object, string $format = null, array $context = []): array - { - $data = parent::normalize($object, $format, $context) ?? []; - if (!is_array($data)) { - throw new LogicException(sprintf('Expected an array, got "%s"', gettype($data))); - } - - foreach (array_keys(iterator_to_array($data)) as $property) { - if (!in_array($property, $this->getAllowedProperties(), true)) { - unset($data[$property]); - } - } - - return $data; - } - - /** - * @return string[] - */ - abstract protected function getAllowedProperties(): array; -} diff --git a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php index faeac138a4..df0716972a 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizer.php @@ -4,48 +4,63 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Core\MVC\Symfony\Component\Serializer; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; +use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; +use Symfony\Component\Serializer\Exception\LogicException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CompoundMatcherNormalizer extends AbstractPropertyWhitelistNormalizer implements DenormalizerAwareInterface +/** + * @internal + * + * @phpstan-type TNormalizedCompoundMatcherData array{type: class-string, subMatchers: array, config: array, matchersMap: array} + */ +class CompoundMatcherNormalizer implements NormalizerInterface, NormalizerAwareInterface, DenormalizerInterface, DenormalizerAwareInterface { use DenormalizerAwareTrait; + use NormalizerAwareTrait; /** - * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound $object + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound $data + * + * @phpstan-return TNormalizedCompoundMatcherData $data * * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface * * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound::__sleep */ - public function normalize(mixed $object, string $format = null, array $context = []): array + public function normalize(mixed $data, string $format = null, array $context = []): array { - $data = parent::normalize($object, $format, $context); - - /** @var array $data */ - $data['config'] = []; - $data['matchersMap'] = []; + /** @var array> $subMatchers */ + $subMatchers = $this->normalizer->normalize($data->getSubMatchers(), $format, $context); - return $data; + return [ + 'type' => $data::class, + 'subMatchers' => $subMatchers, + 'config' => [], + 'matchersMap' => [], + ]; } - protected function getAllowedProperties(): array + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { - return ['subMatchers']; + return $data instanceof Compound; } - public function supportsNormalization($data, string $format = null): bool - { - return $data instanceof Matcher\Compound; - } - - public function supportsDenormalization($data, string $type, string $format = null): bool - { - return is_a($type, Matcher\Compound::class, true); + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return is_a($type, Compound::class, true) && is_a($data['type'] ?? null, Compound::class, true); } /** @@ -53,15 +68,20 @@ public function supportsDenormalization($data, string $type, string $format = nu * * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface */ - public function denormalize($data, string $type, ?string $format = null, array $context = []): object + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): object { - $compoundMatcher = new $type([]); + $compoundMatcherType = $data['type'] ?? throw new LogicException('Unknown compound matcher type'); + if (!is_a($compoundMatcherType, Compound::class, true)) { + throw new LogicException(sprintf('%s is not a subtype of %s', $compoundMatcherType, Compound::class)); + } + + $compoundMatcher = new $compoundMatcherType($data['config'] ?? []); $subMatchers = []; - foreach ($context['serialized_siteaccess_sub_matchers'] ?? [] as $matcherType => $subMatcher) { - $subMatchers[$matcherType] = $this->serializer->deserialize( + foreach ($data['subMatchers'] ?? [] as $matcherType => $subMatcher) { + $subMatchers[$matcherType] = $this->denormalizer->denormalize( $subMatcher, $matcherType, - $format ?? 'json', + $format, $context ); } @@ -69,4 +89,12 @@ public function denormalize($data, string $type, ?string $format = null, array $ return $compoundMatcher; } + + public function getSupportedTypes(?string $format): array + { + return [ + // don't cache it, as the normalizer relies on other things besides type + Compound::class => false, + ]; + } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php index 3ba19e438f..1c243726be 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostElementNormalizer.php @@ -9,19 +9,58 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostElement; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class HostElementNormalizer extends AbstractPropertyWhitelistNormalizer +/** + * @internal + */ +final class HostElementNormalizer implements NormalizerInterface, DenormalizerInterface { - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof HostElement; } /** - * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostElement::__sleep + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostElement $data + * + * @return array{elementNumber: int, hostElements: array} */ - protected function getAllowedProperties(): array + public function normalize( + mixed $data, + ?string $format = null, + array $context = [] + ): array { + return [ + 'elementNumber' => $data->getElementNumber(), + 'hostElements' => $data->getHostElements(), + ]; + } + + public function getSupportedTypes(?string $format): array + { + return [ + HostElement::class => true, + ]; + } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): HostElement { - return ['elementNumber', 'hostElements']; + $hostElement = new HostElement($data['elementNumber']); + if (!empty($data['hostElements'])) { + $hostElement->setHostElements($data['hostElements']); + } + + return $hostElement; + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return $type === HostElement::class; } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php index af7b1a6693..527fb73ce5 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/HostTextNormalizer.php @@ -9,16 +9,53 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostText; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class HostTextNormalizer extends AbstractPropertyWhitelistNormalizer +/** + * @internal + */ +final class HostTextNormalizer implements NormalizerInterface, DenormalizerInterface { - protected function getAllowedProperties(): array - { - return ['siteAccessesConfiguration']; + /** + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\HostText $data + * @param array $context + * + * @phpstan-return array{siteAccessesConfiguration: array{prefix?: string, suffix?: string}} + */ + public function normalize( + mixed $data, + ?string $format = null, + array $context = [] + ): array { + return [ + 'siteAccessesConfiguration' => $data->getSiteAccessesConfiguration(), + ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof HostText; } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + return new HostText($data['siteAccessesConfiguration'] ?? []); + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return $type === HostText::class; + } + + public function getSupportedTypes(?string $format): array + { + return [ + HostText::class => true, + ]; + } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php index 80b60cb5bf..72b25c2b7d 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php @@ -9,28 +9,70 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; -use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class MapNormalizer extends PropertyNormalizer +/** + * @internal + */ +final class MapNormalizer implements NormalizerInterface, DenormalizerInterface { /** - * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map::__sleep + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map $data * - * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map $object + * @return array{ + * type: class-string<\Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map>, + * key: string|null, + * map: array{}, + * reverseMap: array{} + * } * - * @return array{key: string, map: array{}, reverseMap: array{}} + * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map::__sleep */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { return [ - 'key' => $object->getMapKey(), + 'type' => $data::class, + 'key' => $data->getMapKey(), 'map' => [], 'reverseMap' => [], ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Map; } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): Map + { + $mapMatcherType = $data['type'] ?? throw new LogicException('Unknown Map matcher type'); + if (!is_a($mapMatcherType, Map::class, true)) { + throw new LogicException(sprintf('%s is not a subtype of %s', $mapMatcherType, Map::class)); + } + + $mapMatcher = new $mapMatcherType($data['map'] ?? []); + if (isset($data['key'])) { + $mapMatcher->setMapKey($data['key']); + } + + return $mapMatcher; + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return is_a($type, Map::class, true) && is_a($data['type'] ?? null, Map::class, true); + } + + public function getSupportedTypes(?string $format): array + { + return [ + Map::class => true, + ]; + } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/MatcherDenormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/MatcherDenormalizer.php index f34b4c0c87..95f0a77d5a 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/MatcherDenormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/MatcherDenormalizer.php @@ -20,7 +20,7 @@ */ final class MatcherDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface { - private const MATCHER_NORMALIZER_ALREADY_WORKED = self::class . '_ALREADY_CALLED'; + private const string MATCHER_NORMALIZER_ALREADY_WORKED = self::class . '_ALREADY_CALLED'; use DenormalizerAwareTrait; @@ -56,4 +56,11 @@ public function supportsDenormalization($data, string $type, ?string $format = n return is_subclass_of($type, Matcher::class) && $this->registry->hasMatcher($type); } + + public function getSupportedTypes(?string $format): array + { + return [ + Matcher::class => false, + ]; + } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php index c605c30281..d30f098e5e 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/RegexNormalizer.php @@ -9,19 +9,61 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex; +use Symfony\Component\Serializer\Exception\LogicException; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class RegexNormalizer extends AbstractPropertyWhitelistNormalizer +/** + * @internal + */ +final class RegexNormalizer implements NormalizerInterface, DenormalizerInterface { - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof Regex; } /** - * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex::__sleep + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex $data + * + * @return array{type: class-string, regex: string, itemNumber: int} */ - protected function getAllowedProperties(): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + return [ + 'type' => $data::class, + 'regex' => $data->getRegex(), + 'itemNumber' => $data->getItemNumber(), + ]; + } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): Regex + { + $mapMatcherType = $data['type'] ?? throw new LogicException('Unknown Regex matcher type'); + if (!is_a($mapMatcherType, Regex::class, true)) { + throw new LogicException(sprintf('%s is not a subtype of %s', $mapMatcherType, Regex::class)); + } + + $regexMatcher = $data['type']($data['regex'], $data['itemNumber']); + assert($regexMatcher instanceof Regex); + + return $regexMatcher; + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return is_a($type, Regex::class, true) && is_a($data['type'] ?? null, Regex::class, true); + } + + public function getSupportedTypes(?string $format): array { - return ['regex', 'itemNumber', 'matchedSiteAccess']; + return [ + // false: building specific instance of Regex class depends on its data, not a static type + Regex::class => false, + ]; } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php index 1251e143f0..b7c3e6268a 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php @@ -8,18 +8,22 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; -use Symfony\Component\Serializer\Normalizer\PropertyNormalizer; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class SimplifiedRequestNormalizer extends PropertyNormalizer +/** + * @internal + */ +final class SimplifiedRequestNormalizer implements NormalizerInterface, DenormalizerInterface { /** - * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $object + * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $data * * @return array{ * scheme: ?string, * host: ?string, * port: ?int, - * pathinfo: ?string, + * pathInfo: ?string, * queryParams: ?array, * languages: ?string[], * headers: ?array{} @@ -27,15 +31,15 @@ final class SimplifiedRequestNormalizer extends PropertyNormalizer * * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize */ - public function normalize($object, $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { return [ - 'scheme' => $object->getScheme(), - 'host' => $object->getHost(), - 'port' => $object->getPort(), - 'pathinfo' => $object->getPathInfo(), - 'queryParams' => $object->getQueryParams(), - 'languages' => $object->getLanguages(), + 'scheme' => $data->getScheme(), + 'host' => $data->getHost(), + 'port' => $data->getPort(), + 'pathInfo' => $data->getPathInfo(), + 'queryParams' => $data->getQueryParams(), + 'languages' => $data->getLanguages(), 'headers' => [], ]; } @@ -44,4 +48,33 @@ public function supportsNormalization($data, $format = null, array $context = [] { return $data instanceof SimplifiedRequest; } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + return new SimplifiedRequest( + $data['scheme'] ?? null, + $data['host'] ?? null, + $data['port'] ?? null, + $data['pathInfo'] ?? null, + $data['queryParams'] ?? null, + $data['languages'] ?? null, + $data['headers'] ?? [], + ); + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return $type === SimplifiedRequest::class; + } + + public function getSupportedTypes(?string $format): array + { + return [ + SimplifiedRequest::class => true, + ]; + } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/SiteAccessNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/SiteAccessNormalizer.php index a6a95082e8..f755b7d9b6 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/SiteAccessNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/SiteAccessNormalizer.php @@ -25,7 +25,7 @@ final class SiteAccessNormalizer implements DenormalizerInterface, DenormalizerA use DenormalizerAwareTrait; use SerializerAwareTrait; - public function denormalize($data, string $type, ?string $format = null, array $context = []): object + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): object { // BC for SiteAccess being serialized/normalized using json_encode via \Ibexa\Bundle\Core\Fragment\SiteAccessSerializer $matcherType = $data['matcher']['type'] ?? $data['matcher']; @@ -35,7 +35,7 @@ public function denormalize($data, string $type, ?string $format = null, array $ $data['name'], $data['matchingType'], $data['matcher'] !== null - ? $this->serializer->deserialize( + ? $this->serializer?->deserialize( $matcherData, $matcherType, $format ?? 'json', @@ -50,37 +50,50 @@ public function denormalize($data, string $type, ?string $format = null, array $ /** * @phpstan-param array $context */ - public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool + public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool { return $type === SiteAccess::class; } - public function supportsNormalization($data, ?string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof SiteAccess; } /** - * @param \Ibexa\Core\MVC\Symfony\SiteAccess $object + * @param \Ibexa\Core\MVC\Symfony\SiteAccess $data * - * @return array{name: string, matchingType: string, matcher: array{type: class-string, data: string}|null, provider: string|null, groups: array} + * @return array{ + * name: string, + * matchingType: string, + * matcher: array{type: class-string<\Ibexa\Core\MVC\Symfony\SiteAccess\Matcher>, data: string|null}|null, + * provider: string|null, + * groups: array<\Ibexa\Core\MVC\Symfony\SiteAccessGroup> + * } */ - public function normalize($object, ?string $format = null, array $context = []): array + public function normalize(mixed $data, ?string $format = null, array $context = []): array { $matcherData = null; - if (is_object($object->matcher)) { + if (is_object($data->matcher)) { $matcherData = [ - 'type' => get_class($object->matcher), - 'data' => $this->serializer->serialize($object->matcher, $format ?? 'json', $context), + 'type' => get_class($data->matcher), + 'data' => $this->serializer?->serialize($data->matcher, $format ?? 'json', $context), ]; } return [ - 'name' => $object->name, - 'matchingType' => $object->matchingType, + 'name' => $data->name, + 'matchingType' => $data->matchingType, 'matcher' => $matcherData, - 'provider' => $object->provider, - 'groups' => $object->groups, + 'provider' => $data->provider, + 'groups' => $data->groups, + ]; + } + + public function getSupportedTypes(?string $format): array + { + return [ + SiteAccess::class => true, ]; } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php index 0ac40bceec..d9f2f9dc0a 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URIElementNormalizer.php @@ -9,19 +9,58 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class URIElementNormalizer extends AbstractPropertyWhitelistNormalizer +/** + * @internal + */ +final class URIElementNormalizer implements NormalizerInterface, DenormalizerInterface { - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof URIElement; } /** - * @see \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement::__sleep + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement $data + * + * @return array{elementNumber: int, uriElements: array} */ - protected function getAllowedProperties(): array + public function normalize( + mixed $data, + ?string $format = null, + array $context = [] + ): array { + return [ + 'elementNumber' => $data->getElementNumber(), + 'uriElements' => $data->getUriElements(), + ]; + } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): URIElement + { + $uriElement = new URIElement($data['elementNumber']); + if (!empty($data['uriElements'])) { + $uriElement->setUriElements($data['uriElements']); + } + + return $uriElement; + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return $type === URIElement::class; + } + + public function getSupportedTypes(?string $format): array { - return ['elementNumber', 'uriElements']; + return [ + URIElement::class => true, + ]; } } diff --git a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php index a6d50a16d6..564c5cade3 100644 --- a/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php +++ b/src/lib/MVC/Symfony/Component/Serializer/URITextNormalizer.php @@ -9,16 +9,53 @@ namespace Ibexa\Core\MVC\Symfony\Component\Serializer; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIText; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -final class URITextNormalizer extends AbstractPropertyWhitelistNormalizer +/** + * @internal + */ +final class URITextNormalizer implements NormalizerInterface, DenormalizerInterface { - protected function getAllowedProperties(): array - { - return ['siteAccessesConfiguration']; + /** + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIText $data + * @param array $context + * + * @phpstan-return array{siteAccessesConfiguration: array{prefix?: string, suffix?: string}} + */ + public function normalize( + mixed $data, + ?string $format = null, + array $context = [] + ): array { + return [ + 'siteAccessesConfiguration' => $data->getSiteAccessesConfiguration(), + ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool { return $data instanceof URIText; } + + public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed + { + return new URIText($data['siteAccessesConfiguration'] ?? []); + } + + public function supportsDenormalization( + mixed $data, + string $type, + ?string $format = null, + array $context = [] + ): bool { + return $type === URIText::class; + } + + public function getSupportedTypes(?string $format): array + { + return [ + URIText::class => true, + ]; + } } diff --git a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php index dbd08e0b18..6d72d2b4fc 100644 --- a/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php +++ b/src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php @@ -38,7 +38,7 @@ public function matchLocation(Location $location): bool public function matchContentInfo(ContentInfo $contentInfo): bool { $location = $this->repository->sudo( - static function (Repository $repository) use ($contentInfo): \Ibexa\Contracts\Core\Repository\Values\Content\Location { + static function (Repository $repository) use ($contentInfo): Location { return $repository->getLocationService()->loadLocation($contentInfo->mainLocationId); } ); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher.php b/src/lib/MVC/Symfony/SiteAccess/Matcher.php index 87c3fff24a..99af4819c2 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher.php @@ -19,20 +19,16 @@ interface Matcher * * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request */ - public function setRequest(SimplifiedRequest $request); + public function setRequest(SimplifiedRequest $request): void; /** - * Returns matched Siteaccess or false if no siteaccess could be matched. - * - * @return string|false + * Returns matched SiteAccess or false if no SiteAccess could be matched. */ - public function match(); + public function match(): string|bool; /** * Returns the matcher's name. * This information will be stored in the SiteAccess object itself to quickly be able to identify the matcher type. - * - * @return string */ - public function getName(); + public function getName(): string; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php index 76dc56296e..298b54f220 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/AffixBasedTextMatcher.php @@ -35,4 +35,12 @@ public function __construct(private readonly array $siteAccessesConfiguration) parent::__construct($this->buildRegex(), $this->getMatchedItemNumber()); } + + /** + * @phpstan-return TSiteAccessConfigurationArray + */ + public function getSiteAccessesConfiguration(): array + { + return $this->siteAccessesConfiguration; + } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php index 9162b7d20f..bc69625b56 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php @@ -8,34 +8,45 @@ namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\URILexer; /** - * Base for Compound siteaccess matchers. + * Base for Compound SiteAccess matchers. * All classes extending this one must implement a NAME class constant. + * + * @phpstan-type TMatcherName class-string<\Ibexa\Core\MVC\Symfony\SiteAccess\Matcher> | literal-string + * @phpstan-type TCompoundMatcherConfig array>, match: string}> */ abstract class Compound implements CompoundInterface, URILexer { - /** @var array Collection of rules using the Compound matcher. */ + public const string NAME = 'compound'; + + /** + * Collection of rules using the Compound matcher. + * + * @phpstan-var TCompoundMatcherConfig + */ protected array $config; /** - * Matchers map. - * Consists of an array of matchers, grouped by ruleset (so array of array of matchers). + * Matchers' map. + * Consists of an array of matchers, grouped by ruleset (so an array of an array of matchers). + * + * @phpstan-var array, \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher>> */ protected array $matchersMap; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher[] */ - protected $subMatchers = []; + protected array $subMatchers = []; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface */ - protected $matcherBuilder; + protected MatcherBuilderInterface $matcherBuilder; - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - protected $request; + protected SimplifiedRequest $request; + /** + * @phpstan-param TCompoundMatcherConfig $config + */ public function __construct(array $config) { $this->config = $config; @@ -62,7 +73,7 @@ public function setRequest(SimplifiedRequest $request): void } } - public function getRequest() + public function getRequest(): SimplifiedRequest { return $this->request; } @@ -89,7 +100,7 @@ public function analyseLink($linkUri) return $linkUri; } - public function getSubMatchers() + public function getSubMatchers(): array { return $this->subMatchers; } @@ -102,10 +113,8 @@ public function setSubMatchers(array $subMatchers): void /** * Returns the matcher's name. * This information will be stored in the SiteAccess object itself to quickly be able to identify the matcher type. - * - * @return string */ - public function getName() + public function getName(): string { return 'compound:' . @@ -117,12 +126,12 @@ public function getName() } /** - * Serialization occurs when serializing the siteaccess for subrequests. + * Serialization occurs when serializing the SiteAccess for subrequests. */ public function __sleep() { - // We don't need the whole matcher map and the matcher builder once serialized. - // config property is not needed either as it's only needed for matching. + // we don't need the whole matcher map and the matcher builder once serialized. + // config property is not needed either as it's only necessary for matching. return ['subMatchers']; } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php index 7d8c895ef6..98fa7425c8 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php @@ -11,13 +11,13 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; /** - * Siteaccess matcher that allows a combination of matchers, with a logical AND. + * SiteAccess matcher that allows a combination of matchers, with a logical AND. */ -class LogicalAnd extends Compound implements VersatileMatcher +class LogicalAnd extends Compound { - public const NAME = 'logicalAnd'; + public const string NAME = 'logicalAnd'; - public function match() + public function match(): string|bool { foreach ($this->config as $i => $rule) { foreach ($rule['matchers'] as $subMatcherClass => $matchingConfig) { @@ -35,7 +35,7 @@ public function match() return false; } - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { foreach ($this->config as $i => $rule) { if ($rule['match'] === $siteAccessName) { @@ -58,5 +58,7 @@ public function reverseMatch($siteAccessName) return $this; } } + + return null; } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php index b7ed76ccdd..f9a36e74b7 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php @@ -11,13 +11,13 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; /** - * Siteaccess matcher that allows a combination of matchers, with a logical OR. + * SiteAccess matcher that allows a combination of matchers, with a logical OR. */ class LogicalOr extends Compound { - public const NAME = 'logicalOr'; + public const string NAME = 'logicalOr'; - public function match() + public function match(): false|string { foreach ($this->config as $i => $rule) { foreach ($rule['matchers'] as $subMatcherClass => $matchingConfig) { @@ -32,7 +32,7 @@ public function match() return false; } - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { foreach ($this->config as $i => $rule) { if ($rule['match'] === $siteAccessName) { @@ -52,5 +52,7 @@ public function reverseMatch($siteAccessName) } } } + + return null; } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php index e7615e04a4..59b2639beb 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php @@ -7,30 +7,29 @@ namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; use Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; interface CompoundInterface extends VersatileMatcher { /** - * Injects the matcher builder, to allow the Compound matcher to properly build the underlying matchers. + * Injects the matcher builder to allow the Compound matcher to properly build the underlying matchers. * * @param \Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilderInterface $matcherBuilder */ - public function setMatcherBuilder(MatcherBuilderInterface $matcherBuilder); + public function setMatcherBuilder(MatcherBuilderInterface $matcherBuilder): void; /** * Returns all used sub-matchers. * * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher[] */ - public function getSubMatchers(); + public function getSubMatchers(): array; /** * Replaces sub-matchers. * * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher[] $subMatchers */ - public function setSubMatchers(array $subMatchers); + public function setSubMatchers(array $subMatchers): void; } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php index b1664a2ccc..94ac1d16fd 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; +use Ibexa\Core\Base\Exceptions\BadStateException; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; @@ -22,20 +23,18 @@ class HostElement implements VersatileMatcher /** * Host elements used for matching as an array. * - * @var array + * @phpstan-var list */ - private $hostElements; + private array $hostElements; /** - * Constructor. - * - * @param array|int $elementNumber Number of elements to take into account. + * @param array|int $elementNumber Number of elements to take into account. */ - public function __construct($elementNumber) + public function __construct(array|int $elementNumber) { if (is_array($elementNumber)) { // DI config parser will create an array with 'value' => number - $elementNumber = current($elementNumber); + $elementNumber = (int)current($elementNumber); } $this->elementNumber = (int)$elementNumber; @@ -47,15 +46,15 @@ public function __sleep() } /** - * Returns matching Siteaccess. + * Returns matching SiteAccess. * - * @return string|false Siteaccess matched or false. + * @return string|false SiteAccess matched or false. */ - public function match() + public function match(): string|bool { $elements = $this->getHostElements(); - return isset($elements[$this->elementNumber - 1]) ? $elements[$this->elementNumber - 1] : false; + return $elements[$this->elementNumber - 1] ?? false; } public function getName(): string @@ -73,38 +72,69 @@ public function setRequest(SimplifiedRequest $request): void $this->request = $request; } - public function getRequest() + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException if the request is not set + */ + public function getRequest(): SimplifiedRequest { + if (null === $this->request) { + throw new BadStateException( + 'request', + sprintf( + 'Missing required request context in %s matcher', + __CLASS__ + ) + ); + } + return $this->request; } - public function reverseMatch($siteAccessName): ?self + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + */ + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { - $hostElements = explode('.', (string)$this->request->getHost()); + $hostElements = explode('.', (string)$this->request?->getHost()); $elementNumber = $this->elementNumber - 1; if (!isset($hostElements[$elementNumber])) { return null; } $hostElements[$elementNumber] = $siteAccessName; - $this->request->setHost(implode('.', $hostElements)); + $this->getRequest()->setHost(implode('.', $hostElements)); return $this; } /** - * @return array + * @phpstan-param list $hostElements */ - private function getHostElements() + public function setHostElements(array $hostElements): void + { + $this->hostElements = $hostElements; + } + + /** + * @phpstan-return list + */ + public function getHostElements(): array { if (isset($this->hostElements)) { return $this->hostElements; - } elseif (!isset($this->request)) { + } + + if (!isset($this->request)) { return []; } - $elements = explode('.', $this->request->getHost()); + $elements = explode('.', $this->request->getHost() ?? ''); return $this->hostElements = $elements; } + + public function getElementNumber(): int + { + return $this->elementNumber; + } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php index d169a9801e..fad2a25bad 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php @@ -36,7 +36,7 @@ public function setRequest(SimplifiedRequest $request): void parent::setRequest($request); } - public function reverseMatch($siteAccessName): ?VersatileMatcher + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $this->request->setHost($this->prefix . $siteAccessName . $this->suffix); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php index 9964330763..f648f3871a 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php @@ -14,32 +14,27 @@ abstract class Map implements VersatileMatcher { /** * String that will be looked up in the map. - * - * @var string */ - protected $key; + protected string $key; /** * Map used for the matching. * - * @var array + * @var array */ - protected $map = []; + protected array $map = []; /** * Map used for reverse matching. * - * @var array + * @var array */ - protected $reverseMap = []; + protected array $reverseMap = []; - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - protected $request; + protected SimplifiedRequest $request; /** - * Constructor. - * - * @param array $map Map used for matching. + * @param array $map Map used for matching. */ public function __construct(array $map) { @@ -47,16 +42,15 @@ public function __construct(array $map) } /** - * Do not serialize the Siteaccess configuration in order to reduce ESI request URL size. + * Do not serialize the SiteAccess configuration to reduce ESI request URL size. * * @see https://issues.ibexa.co/browse/EZP-23168 * - * @return array + * @return array */ public function __sleep() { - $this->map = []; - $this->reverseMap = []; + unset($this->map, $this->reverseMap); return ['map', 'reverseMap', 'key']; } @@ -66,47 +60,30 @@ public function setRequest(SimplifiedRequest $request): void $this->request = $request; } - public function getRequest() + public function getRequest(): SimplifiedRequest { return $this->request; } /** * Injects the key that will be used for matching against the map configuration. - * - * @param string $key */ - public function setMapKey($key): void + public function setMapKey(string $key): void { $this->key = $key; } - /** - * @return string - */ - public function getMapKey() + public function getMapKey(): ?string { - return $this->key; + return $this->key ?? null; } - /** - * Returns matching Siteaccess. - * - * @return string|false Siteaccess matched or false. - */ - public function match() + public function match(): string|bool { - return isset($this->map[$this->key]) - ? $this->map[$this->key] - : false; + return $this->map[$this->key] ?? false; } - /** - * @param string $siteAccessName - * - * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher|Map|null - */ - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $reverseMap = $this->getReverseMap($siteAccessName); @@ -119,12 +96,16 @@ public function reverseMatch($siteAccessName) return $this; } - private function getReverseMap($defaultSiteAccess) + /** + * @return array + */ + private function getReverseMap(string $defaultSiteAccess): array { if (!empty($this->reverseMap)) { return $this->reverseMap; } + /** @var array $map */ $map = $this->map; foreach ($map as &$value) { // $value can be true in the case of the use of a Compound matcher @@ -132,7 +113,9 @@ private function getReverseMap($defaultSiteAccess) $value = $defaultSiteAccess; } } + /** @var array $map */ + /** @var array */ return $this->reverseMap = array_flip($map); } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php index dbe2d064a8..a5f7e543e7 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php @@ -9,6 +9,7 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; +use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; class Host extends Map { @@ -24,14 +25,14 @@ public function getName(): string */ public function setRequest(SimplifiedRequest $request): void { - if (!$this->key) { + if (!isset($this->key)) { $this->setMapKey((string)$request->getHost()); } parent::setRequest($request); } - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $matcher = parent::reverseMatch($siteAccessName); if ($matcher instanceof self) { diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php index 6969246f71..a191623670 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php @@ -9,9 +9,22 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; +use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; class Port extends Map { + /** + * @param array $map + */ + public function __construct(array $map) + { + $normalizedMap = []; + foreach ($map as $key => $value) { + $normalizedMap[(string)$key] = $value; + } + parent::__construct($normalizedMap); + } + public function getName(): string { return 'port'; @@ -24,20 +37,11 @@ public function getName(): string */ public function setRequest(SimplifiedRequest $request): void { - if (!$this->key) { - if (!empty($request->getPort())) { - $key = $request->getPort(); - } else { - switch ($request->getScheme()) { - case 'https': - $key = 443; - break; - - case 'http': - default: - $key = 80; - } - } + if (!isset($this->key)) { + $key = $request->getPort() ?? match ($request->getScheme()) { + 'https' => 443, + default => 80, + }; $this->setMapKey((string)$key); } @@ -45,7 +49,7 @@ public function setRequest(SimplifiedRequest $request): void parent::setRequest($request); } - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $matcher = parent::reverseMatch($siteAccessName); if ($matcher instanceof self) { diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php index d96e0b81f3..b4f37ca867 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php @@ -10,6 +10,7 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Map; use Ibexa\Core\MVC\Symfony\SiteAccess\URILexer; +use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; class URI extends Map implements URILexer { @@ -20,7 +21,7 @@ class URI extends Map implements URILexer */ public function setRequest(SimplifiedRequest $request): void { - if (!$this->key) { + if (!isset($this->key)) { sscanf((string)$request->getPathInfo(), '/%[^/]', $key); $this->setMapKey(rawurldecode((string)$key)); } @@ -76,12 +77,12 @@ public function analyseLink($linkUri): string return "/{$this->key}{$joiningSlash}{$linkUri}{$queryString}"; } - public function reverseMatch($siteAccessName) + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $matcher = parent::reverseMatch($siteAccessName); if ($matcher instanceof self) { $request = $matcher->getRequest(); - // Clean up "old" siteaccess prefix and add the new prefix. + // Clean up the "old" SiteAccess prefix and add the new prefix. $request->setPathinfo($this->analyseLink((string)$request->getPathInfo())); } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php index 05192c8bbd..35e86e3b65 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php @@ -14,38 +14,28 @@ abstract class Regex implements Matcher { /** * Element that will be matched against the regex. - * - * @var string */ - protected $element; + protected string $element; /** * Regular expression used for matching. - * - * @var string */ - protected $regex; + protected string $regex; /** * Item number to pick in regex. - * - * @var string */ - protected $itemNumber; + protected int $itemNumber; - /** @var \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - protected $request; + protected SimplifiedRequest $request; - /** @var string */ - protected $matchedSiteAccess; + protected string|false $matchedSiteAccess; /** - * Constructor. - * * @param string $regex Regular Expression to use. * @param int $itemNumber Item number to pick in regex. */ - public function __construct($regex, $itemNumber) + public function __construct(string $regex, int $itemNumber) { $this->regex = $regex; $this->itemNumber = $itemNumber; @@ -56,25 +46,23 @@ public function __sleep() return ['regex', 'itemNumber', 'matchedSiteAccess']; } - public function match() + public function match(): string|bool { return $this->getMatchedSiteAccess(); } /** * Returns matched SiteAccess. - * - * @return string|bool */ - protected function getMatchedSiteAccess() + protected function getMatchedSiteAccess(): string|false { if (isset($this->matchedSiteAccess)) { return $this->matchedSiteAccess; } preg_match( - "@{$this->regex}@", - (string)$this->element, + "@$this->regex@", + $this->element, $match ); @@ -94,12 +82,20 @@ public function setRequest(SimplifiedRequest $request): void } /** - * Injects element to match against with the regexp. - * - * @param string $element + * Injects an element to match against with the regexp. */ - public function setMatchElement($element): void + public function setMatchElement(string $element): void { $this->element = $element; } + + public function getRegex(): string + { + return $this->regex; + } + + public function getItemNumber(): int + { + return $this->itemNumber; + } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php index a71c7284a7..a35904d16d 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php @@ -7,6 +7,7 @@ namespace Ibexa\Core\MVC\Symfony\SiteAccess\Matcher; +use Ibexa\Core\Base\Exceptions\BadStateException; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess\URILexer; use Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher; @@ -23,19 +24,19 @@ class URIElement implements VersatileMatcher, URILexer /** * URI elements used for matching as an array. + * + * @var array */ - private ?array $uriElements = null; + private array $uriElements; /** - * Constructor. - * - * @param int|array $elementNumber Number of elements to take into account. + * @param array|int $elementNumber Number of elements to take into account. */ - public function __construct($elementNumber) + public function __construct(array|int $elementNumber) { if (is_array($elementNumber)) { // DI config parser will create an array with 'value' => number - $elementNumber = current($elementNumber); + $elementNumber = (int)current($elementNumber); } $this->elementNumber = (int)$elementNumber; @@ -47,15 +48,15 @@ public function __sleep() } /** - * Returns matching Siteaccess. + * Returns matching SiteAccess. * - * @return string|false Siteaccess matched or false. + * @return string|false SiteAccess matched or false. */ - public function match(): string|false + public function match(): string|bool { try { return implode('_', $this->getURIElements()); - } catch (LogicException $e) { + } catch (LogicException) { return false; } } @@ -65,18 +66,20 @@ public function match(): string|false * * @throws \LogicException * - * @return array + * @return string[] */ - protected function getURIElements() + public function getURIElements(): array { if (isset($this->uriElements)) { return $this->uriElements; - } elseif (!isset($this->request)) { + } + + if (!isset($this->request)) { return []; } $elements = array_slice( - explode('/', $this->request->getPathInfo()), + explode('/', (string)$this->request->getPathInfo()), 1, $this->elementNumber ); @@ -111,26 +114,36 @@ public function setRequest(SimplifiedRequest $request): void } /** - * @return \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException if the request is not set */ - public function getRequest() + public function getRequest(): SimplifiedRequest { + if (null === $this->request) { + throw new BadStateException( + 'request', + sprintf( + 'Missing required request context in %s matcher', + __CLASS__ + ) + ); + } + return $this->request; } /** - * Analyses $uri and removes the siteaccess part, if needed. + * Analyzes $uri and removes the SiteAccess part, if needed. * * @param string $uri The original URI * * @return string The modified URI */ - public function analyseURI($uri) + public function analyseURI($uri): string { $uriElements = '/' . implode('/', $this->getURIElements()); - if ($uri == $uriElements) { + if ($uri === $uriElements) { $uri = ''; - } elseif (strpos($uri, $uriElements) === 0) { + } elseif (str_starts_with($uri, $uriElements)) { $uri = mb_substr($uri, mb_strlen($uriElements)); } @@ -138,7 +151,7 @@ public function analyseURI($uri) } /** - * Analyses $linkUri when generating a link to a route, in order to have the siteaccess part back in the URI. + * Analyses $linkUri when generating a link to a route, in order to have the SiteAccess part back in the URI. * * @param string $linkUri * @@ -151,31 +164,46 @@ public function analyseLink($linkUri): string $linkUri = ltrim($linkUri, '/'); $uriElements = implode('/', $this->getURIElements()); - return "/{$uriElements}{$joiningSlash}{$linkUri}"; + return sprintf('/%s%s%s', $uriElements, $joiningSlash, $linkUri); } /** - * Returns matcher object corresponding to $siteAccessName or null if non applicable. + * Returns matcher object corresponding to $siteAccessName or null if non-applicable. * * Limitation: If the element number is > 1, we cannot predict how URI segments are expected to be built. * So we expect "_" will be reversed to "/" - * e.g. foo_bar => foo/bar with elementNumber == 2 - * Hence if number of elements is different than the element number, we report as non matched. + * e.g., foo_bar => foo/bar with elementNumber == 2 + * Hence if number of elements is different from the element number, we report as non-matched. * * @param string $siteAccessName * * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement|null + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException if request is not set */ - public function reverseMatch($siteAccessName): ?self + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $elements = $this->elementNumber > 1 ? explode('_', $siteAccessName) : [$siteAccessName]; if (count($elements) !== $this->elementNumber) { return null; } - $pathinfo = '/' . implode('/', $elements) . '/' . ltrim((string)$this->request->getPathInfo(), '/'); - $this->request->setPathinfo($pathinfo); + $pathInfo = '/' . implode('/', $elements) . '/' . ltrim((string)$this->getRequest()->getPathInfo(), '/'); + $this->getRequest()->setPathinfo($pathInfo); return $this; } + + public function getElementNumber(): int + { + return $this->elementNumber; + } + + /** + * @param string[] $uriElements + */ + public function setUriElements(array $uriElements): void + { + $this->uriElements = $uriElements; + } } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php index eeef01066e..5f5671677a 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php @@ -52,7 +52,7 @@ public function analyseLink($linkUri): string return $siteAccessUri . $linkUri; } - public function reverseMatch($siteAccessName): ?VersatileMatcher + public function reverseMatch(string $siteAccessName): ?VersatileMatcher { $this->request->setPathinfo("/{$this->prefix}{$siteAccessName}{$this->suffix}{$this->request->getPathInfo()}"); diff --git a/src/lib/MVC/Symfony/SiteAccess/Router.php b/src/lib/MVC/Symfony/SiteAccess/Router.php index 94e44a7079..7fec265007 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Router.php +++ b/src/lib/MVC/Symfony/SiteAccess/Router.php @@ -166,14 +166,10 @@ public function match(SimplifiedRequest $request) } /** - * Returns the SiteAccess object matched against $request and the siteaccess configuration. - * If nothing could be matched, the default siteaccess is returned, with "default" as matching type. - * - * @param \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest $request - * - * @return \Ibexa\Core\MVC\Symfony\SiteAccess + * Returns the SiteAccess object matched against $request and the SiteAccess configuration. + * If nothing could be matched, the default SiteAccess is returned, with "default" as the matching type. */ - private function doMatch(SimplifiedRequest $request) + private function doMatch(SimplifiedRequest $request): SiteAccess { foreach ($this->siteAccessesConfiguration as $matchingClass => $matchingConfiguration) { $matcher = $this->matcherBuilder->buildMatcher($matchingClass, $matchingConfiguration, $request); @@ -182,7 +178,7 @@ private function doMatch(SimplifiedRequest $request) } $siteAccessName = $matcher->match(); - if ($siteAccessName !== false && $this->siteAccessProvider->isDefined($siteAccessName)) { + if (is_string($siteAccessName) && $this->siteAccessProvider->isDefined($siteAccessName)) { $this->siteAccess = $this->siteAccessProvider->getSiteAccess($siteAccessName); $this->siteAccess->matchingType = $matcher->getName(); $this->siteAccess->matcher = $matcher; diff --git a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php index 0445e2e9b6..556da9206e 100644 --- a/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php +++ b/src/lib/MVC/Symfony/SiteAccess/VersatileMatcher.php @@ -7,6 +7,8 @@ namespace Ibexa\Core\MVC\Symfony\SiteAccess; +use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; + /** * Interface for SiteAccess matchers. * @@ -16,23 +18,19 @@ interface VersatileMatcher extends Matcher { /** - * Returns matcher object corresponding to $siteAccessName or null if non applicable. - * - * Note: VersatileMatcher objects always receive a request with cleaned up pathinfo (i.e. no SiteAccess part inside). + * Returns a matcher object corresponding to $siteAccessName or null if non-applicable. * - * @param string $siteAccessName + * Note: VersatileMatcher objects always receive a request with cleaned-up pathInfo (i.e. no SiteAccess part inside). * - * @return \Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher|null Typically the current matcher, with updated request. + * @return \Ibexa\Core\MVC\Symfony\SiteAccess\VersatileMatcher|null Typically the current matcher, with an updated request. */ - public function reverseMatch($siteAccessName); + public function reverseMatch(string $siteAccessName): ?VersatileMatcher; /** * Returns the SimplifiedRequest object corresponding to the reverse match. * This request object can then be used to build a link to the "reverse matched" SiteAccess. * * @see reverseMatch() - * - * @return \Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest */ - public function getRequest(); + public function getRequest(): SimplifiedRequest; } From b0ae8a4d32f2f3d2cd2c38f689a42630f8bf118f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 16 Apr 2025 17:41:48 +0200 Subject: [PATCH 081/185] IBX-8471: [Tests] Aligned SiteAccess Matcher tests with the changes --- .../CompoundMatcherNormalizerTest.php | 142 +++++++++++++----- .../Serializer/HostElementNormalizerTest.php | 34 ++++- .../Serializer/RegexNormalizerTest.php | 2 +- .../SimplifiedRequestNormalizerTest.php | 7 +- .../Serializer/Stubs/CompoundStub.php | 14 +- .../Serializer/Stubs/MatcherStub.php | 16 +- .../Serializer/Stubs/RegexMatcher.php | 3 + .../Serializer/Stubs/SerializerStub.php | 56 ------- .../Serializer/URIElementNormalizerTest.php | 8 +- .../Serializer/URITextNormalizerTest.php | 6 + .../SiteAccess/MatcherSerializationTest.php | 61 +++----- .../SiteAccess/RouterHostPortURITest.php | 10 +- .../Symfony/SiteAccess/RouterHostTextTest.php | 1 - .../SiteAccess/RouterURIElement2Test.php | 13 +- .../SiteAccess/RouterURIElementTest.php | 10 +- .../Symfony/SiteAccess/RouterURITextTest.php | 3 +- 16 files changed, 222 insertions(+), 164 deletions(-) delete mode 100644 tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php diff --git a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php index f496e68738..c7c67b26f6 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/CompoundMatcherNormalizerTest.php @@ -13,45 +13,66 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\CompoundStub; use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\MatcherStub; -use Ibexa\Tests\Core\MVC\Symfony\Component\Serializer\Stubs\SerializerStub; use PHPUnit\Framework\TestCase; -use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; -use Symfony\Component\Serializer\Serializer; +use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; +/** + * @covers \Ibexa\Core\MVC\Symfony\Component\Serializer\CompoundMatcherNormalizer + * + * @phpstan-type TNormalizedData array{type?: class-string, subMatchers: array, config: array, matchersMap: array} + */ final class CompoundMatcherNormalizerTest extends TestCase { - public function testNormalization(): void + /** @phpstan-var TNormalizedData */ + private const array DATA = [ + 'type' => CompoundStub::class, + 'subMatchers' => [ + 'foo' => ['type' => MatcherStub::class, 'data' => 'foo'], + 'bar' => ['type' => MatcherStub::class, 'data' => 'bar'], + 'baz' => ['type' => MatcherStub::class, 'data' => 'baz'], + ], + 'config' => [], + 'matchersMap' => [], + ]; + + /** + * @phpstan-return TNormalizedData + * + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ + public function testNormalization(): array { $matcher = new CompoundStub([]); + $subMatchers = $this->getSubMatchers(); $matcher->setSubMatchers( - [ - 'foo' => new MatcherStub('foo'), - 'bar' => new MatcherStub('bar'), - 'baz' => new MatcherStub('baz'), - ] + $subMatchers ); $normalizer = new CompoundMatcherNormalizer(); - $serializer = new Serializer( - [ - $normalizer, - new SerializerStub(), - new ObjectNormalizer(), - ] - ); + $innerNormalizerMock = $this->createMock(NormalizerInterface::class); + $innerNormalizerMock + ->expects(self::once()) + ->method('normalize') + ->with($subMatchers, null, []) + ->willReturn( + [ + 'foo' => ['type' => MatcherStub::class, 'data' => 'foo'], + 'bar' => ['type' => MatcherStub::class, 'data' => 'bar'], + 'baz' => ['type' => MatcherStub::class, 'data' => 'baz'], + ] + ); + + $normalizer->setNormalizer($innerNormalizerMock); + $actualNormalizedData = $normalizer->normalize($matcher); self::assertEquals( - [ - 'subMatchers' => [ - 'foo' => ['data' => 'foo'], - 'bar' => ['data' => 'bar'], - 'baz' => ['data' => 'baz'], - ], - 'config' => [], - 'matchersMap' => [], - ], - $serializer->normalize($matcher) + self::DATA, + $actualNormalizedData ); + + /** @phpstan-var TNormalizedData */ + return $actualNormalizedData; } public function testSupportsNormalization(): void @@ -63,24 +84,65 @@ public function testSupportsNormalization(): void } /** - * @throws \JsonException + * @phpstan-return iterable */ - public function testSupportsDenormalization(): void + public static function getDataForSupportsNormalization(): iterable + { + yield [self::DATA, Compound::class, true]; + yield [self::DATA, Matcher::class, false]; + + $dataWithMissingType = self::DATA; + unset($dataWithMissingType['type']); + + yield [$dataWithMissingType, Compound::class, false]; + } + + /** + * @dataProvider getDataForSupportsNormalization + * + * @phpstan-param TNormalizedData $data + * @phpstan-param class-string $type + */ + public function testSupportsDenormalization(array $data, string $type, bool $supports): void { $normalizer = new CompoundMatcherNormalizer(); - $data = json_encode( - [ - 'subMatchers' => [ - 'foo' => ['data' => 'foo'], - ], - 'config' => [], - 'matchersMap' => [], - ], - JSON_THROW_ON_ERROR - ); + self::assertSame($supports, $normalizer->supportsDenormalization($data, $type)); + } - self::assertTrue($normalizer->supportsDenormalization($data, Compound::class, 'json')); - self::assertFalse($normalizer->supportsDenormalization($data, Matcher::class, 'json')); + /** + * @depends testNormalization + * + * @phpstan-param array{type: class-string, subMatchers: array, config: array{}, matchersMap: array{}} $data + * + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ + public function testDenormalization(array $data): void + { + $expectedCompoundMatcher = new CompoundStub($this->getSubMatchers()); + $normalizer = new CompoundMatcherNormalizer(); + $innerDenormalizerMock = $this->createMock(DenormalizerInterface::class); + $innerDenormalizerMock + ->expects(self::exactly(count($data['subMatchers']))) + ->method('denormalize') + ->willReturnCallback( + static fn (array $data): Matcher => new MatcherStub($data['data'] ?? []) + ); + $normalizer->setDenormalizer($innerDenormalizerMock); + $actualCompoundMatcher = $normalizer->denormalize($data, Compound::class); + + self::assertEquals($expectedCompoundMatcher, $actualCompoundMatcher); + } + + /** + * @return array + */ + private function getSubMatchers(): array + { + return [ + 'foo' => new MatcherStub('foo'), + 'bar' => new MatcherStub('bar'), + 'baz' => new MatcherStub('baz'), + ]; } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php index 8f2ace75c3..9f97defcfc 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/HostElementNormalizerTest.php @@ -21,6 +21,17 @@ */ final class HostElementNormalizerTest extends TestCase { + private const array DATA = [ + 'elementNumber' => 2, + 'hostElements' => [ + 'ibexa', + 'dev', + ], + ]; + + /** + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ public function testNormalization(): void { $normalizer = new HostElementNormalizer(); @@ -33,17 +44,11 @@ public function testNormalization(): void $matcher = new HostElement(2); // Set request and invoke match to initialize HostElement::$hostElements - $matcher->setRequest(SimplifiedRequest::fromUrl('http://ibexa.dev/foo/bar')); + $matcher->setRequest(SimplifiedRequest::fromUrl('https://ibexa.dev/foo/bar')); $matcher->match(); self::assertEquals( - [ - 'elementNumber' => 2, - 'hostElements' => [ - 'ibexa', - 'dev', - ], - ], + self::DATA, $serializer->normalize($matcher) ); } @@ -55,4 +60,17 @@ public function testSupportsNormalization(): void self::assertTrue($normalizer->supportsNormalization($this->createMock(HostElement::class))); self::assertFalse($normalizer->supportsNormalization($this->createMock(Matcher::class))); } + + /** + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ + public function testDenormalization(): void + { + $denormalizer = new HostElementNormalizer(); + $expectedHostElement = new HostElement(2); + $expectedHostElement->setRequest(SimplifiedRequest::fromUrl('https://ibexa.dev/foo/bar')); + $actualHostElement = $denormalizer->denormalize(self::DATA, HostElement::class); + + self::assertSame('dev', $actualHostElement->match()); + } } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php index 7ddcf91f29..30a3ad4259 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/RegexNormalizerTest.php @@ -25,7 +25,7 @@ public function testNormalize(): void [ 'regex' => '/^Foo(.*)/(.*)/', 'itemNumber' => 2, - 'matchedSiteAccess' => null, + 'type' => RegexMatcherStub::class, ], $normalizer->normalize($matcher) ); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php index da30ae9699..429c49e8a8 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizerTest.php @@ -12,6 +12,9 @@ use PHPUnit\Framework\TestCase; use stdClass; +/** + * @covers \Ibexa\Core\MVC\Symfony\Component\Serializer\SimplifiedRequestNormalizer + */ final class SimplifiedRequestNormalizerTest extends TestCase { /** @@ -42,7 +45,7 @@ public function testNormalize(): void 'scheme' => 'http', 'host' => 'www.example.com', 'port' => 8080, - 'pathinfo' => '/foo', + 'pathInfo' => '/foo', 'queryParams' => ['param' => 'value', 'this' => 'that'], 'headers' => [], 'languages' => ['pl-PL', 'en-US'], @@ -74,7 +77,7 @@ public function testNormalizeWithNewConstructor(): void 'scheme' => 'http', 'host' => 'www.example.com', 'port' => 8080, - 'pathinfo' => '/foo', + 'pathInfo' => '/foo', 'queryParams' => ['param' => 'value', 'this' => 'that'], 'headers' => [], 'languages' => ['pl-PL', 'en-US'], diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php index e3c9683402..64179f75ce 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php @@ -11,20 +11,32 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound; +/** + * @phpstan-import-type TCompoundMatcherConfig from \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound + */ final class CompoundStub extends Compound { + /** + * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher[] $subMatchers + */ public function __construct(array $subMatchers) { parent::__construct([]); $this->subMatchers = $subMatchers; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function match(): never { throw new NotImplementedException(__METHOD__); } - public function reverseMatch($siteAccessName): never + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ + public function reverseMatch(string $siteAccessName): never { throw new NotImplementedException(__METHOD__); } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php index 42843fe793..fca21b7126 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php @@ -14,30 +14,38 @@ final class MatcherStub implements Matcher { - /** @var mixed */ - private $data; + private mixed $data; - public function __construct($data = null) + public function __construct(mixed $data = null) { $this->data = $data; } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function setRequest(SimplifiedRequest $request): never { throw new NotImplementedException(__METHOD__); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function match(): never { throw new NotImplementedException(__METHOD__); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function getName(): never { throw new NotImplementedException(__METHOD__); } - public function getData() + public function getData(): mixed { return $this->data; } diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php index 991669b78d..d00096cd2b 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/RegexMatcher.php @@ -13,6 +13,9 @@ final class RegexMatcher extends BaseRegex { + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException + */ public function getName(): never { throw new NotImplementedException(__METHOD__); diff --git a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php b/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php deleted file mode 100644 index 3a2828469e..0000000000 --- a/tests/lib/MVC/Symfony/Component/Serializer/Stubs/SerializerStub.php +++ /dev/null @@ -1,56 +0,0 @@ - $value) { - $result[$key] = $this->normalize($value, $format, $context); - } - - return $result; - } - - if ($object instanceof MatcherStub) { - return [ - 'data' => $object->getData(), - ]; - } - - return $object; - } - - public function supportsNormalization($data, string $format = null): bool - { - return $data instanceof MatcherStub; - } -} diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php index 6607fa1901..c768e42e35 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URIElementNormalizerTest.php @@ -16,8 +16,14 @@ use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Serializer; +/** + * @covers \Ibexa\Core\MVC\Symfony\Component\Serializer\URIElementNormalizer + */ final class URIElementNormalizerTest extends TestCase { + /** + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ public function testNormalization(): void { $normalizer = new URIElementNormalizer(); @@ -30,7 +36,7 @@ public function testNormalization(): void $matcher = new URIElement(2); // Set request and invoke match to initialize HostElement::$hostElements - $matcher->setRequest(SimplifiedRequest::fromUrl('http://ezpublish.dev/foo/bar')); + $matcher->setRequest(SimplifiedRequest::fromUrl('http://ibexa.dev/foo/bar')); $matcher->match(); self::assertEquals( diff --git a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php index e3ebe2fea9..49df925576 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/URITextNormalizerTest.php @@ -15,8 +15,14 @@ use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; use Symfony\Component\Serializer\Serializer; +/** + * @covers \Ibexa\Core\MVC\Symfony\Component\Serializer\URITextNormalizer + */ final class URITextNormalizerTest extends TestCase { + /** + * @throws \Symfony\Component\Serializer\Exception\ExceptionInterface + */ public function testNormalize(): void { $normalizer = new URITextNormalizer(); diff --git a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php index 4721706753..8b73547781 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/MatcherSerializationTest.php @@ -18,32 +18,19 @@ class MatcherSerializationTest extends TestCase use SerializerTrait; /** - * @param \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher|null $expected - * * @dataProvider matcherProvider */ - public function testDeserialize(Matcher $matcher, LogicalAnd|LogicalOr $expected = null): void + public function testDeserialize(Matcher $matcher, Matcher $expected = null): void { $serializedMatcher = $this->serializeMatcher($matcher); $context = []; - // BC layer - if ($matcher instanceof Matcher\CompoundInterface) { - $subMatchers = $matcher->getSubMatchers(); - foreach ($subMatchers as $subMatcher) { - $context['serialized_siteaccess_sub_matchers'][get_class($subMatcher)] = $this->serializeMatcher($subMatcher); - } - } - // -- - $unserializedMatcher = $this->deserializeMatcher($serializedMatcher, get_class($matcher), $context); + $deserializeMatcher = $this->deserializeMatcher($serializedMatcher, get_class($matcher), $context); $expected = $expected ?? $matcher; - self::assertEquals($expected, $unserializedMatcher); + self::assertEquals($expected, $deserializeMatcher); } - /** - * @return string - */ private function serializeMatcher(Matcher $matcher): string { return $this->getSerializer()->serialize( @@ -71,32 +58,32 @@ private function deserializeMatcher(string $serializedMatcher, string $matcherFQ public function matcherProvider(): iterable { $subMatchers = [ - Matcher\Map\URI::class => new Matcher\Map\URI(['map' => ['key' => 'value']]), - Matcher\Map\Host::class => new Matcher\Map\Host(['map' => ['key' => 'value']]), + Matcher\Map\URI::class => new Matcher\Map\URI(['campaign' => 'event']), + Matcher\Map\Host::class => new Matcher\Map\Host(['www.example.org' => 'site']), + Matcher\HostElement::class => new Matcher\HostElement(1), ]; // data truncated due to https://issues.ibexa.co/browse/EZP-31810 $expectedSubMatchers = [ Matcher\Map\URI::class => new Matcher\Map\URI([]), Matcher\Map\Host::class => new Matcher\Map\Host([]), + Matcher\HostElement::class => new Matcher\HostElement(1), ]; - $logicalAnd = new LogicalAnd( + $compoundMatcherConfig = [ [ - [ - 'match' => 'site_access_name', + 'matchers' => [ + Matcher\Map\URI::class => ['match' => 'site_access_name'], + Matcher\Map\Host::class => ['match' => 'site_access_name'], + Matcher\HostElement::class => ['match' => 'site_access_name'], ], - ] - ); + 'match' => 'site_access_name', + ], + ]; + $logicalAnd = new LogicalAnd($compoundMatcherConfig); $logicalAnd->setSubMatchers($subMatchers); $expectedLogicalAnd = new LogicalAnd([]); $expectedLogicalAnd->setSubMatchers($expectedSubMatchers); - $logicalOr = new LogicalOr( - [ - [ - 'match' => 'site_access_name', - ], - ] - ); + $logicalOr = new LogicalOr($compoundMatcherConfig); $logicalOr->setSubMatchers($subMatchers); $expectedLogicalOr = new LogicalOr([]); $expectedLogicalOr->setSubMatchers($expectedSubMatchers); @@ -152,11 +139,11 @@ public function matcherProvider(): iterable */ private function getMapPortMatcherTestCase(): array { - $matcherBeforeSerialization = new Matcher\Map\Port(['map' => ['key' => 'value']]); - $matcherBeforeSerialization->setMapKey('map'); + $matcherBeforeSerialization = new Matcher\Map\Port(['8080' => 'event']); + $matcherBeforeSerialization->setMapKey('8080'); $matcherAfterDeserialization = new Matcher\Map\Port([]); - $matcherAfterDeserialization->setMapKey('map'); + $matcherAfterDeserialization->setMapKey('8080'); return [$matcherBeforeSerialization, $matcherAfterDeserialization]; } @@ -166,7 +153,7 @@ private function getMapPortMatcherTestCase(): array */ private function getMapHostMatcherTestCase(): array { - $matcherBeforeSerialization = new Matcher\Map\Host(['map' => ['key' => 'value']]); + $matcherBeforeSerialization = new Matcher\Map\Host(['map' => 'site']); $matcherBeforeSerialization->setMapKey('map'); $matcherAfterDeserialization = new Matcher\Map\Host([]); @@ -180,11 +167,11 @@ private function getMapHostMatcherTestCase(): array */ private function getMapURIMatcherTestCase(): array { - $matcherBeforeSerialization = new Matcher\Map\URI(['map' => ['key' => 'value']]); - $matcherBeforeSerialization->setMapKey('map'); + $matcherBeforeSerialization = new Matcher\Map\URI(['www.example.org' => 'event_site']); + $matcherBeforeSerialization->setMapKey('www.example.org'); $matcherAfterDeserialization = new Matcher\Map\URI([]); - $matcherAfterDeserialization->setMapKey('map'); + $matcherAfterDeserialization->setMapKey('www.example.org'); return [$matcherBeforeSerialization, $matcherAfterDeserialization]; } diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php index 75d9e7c97f..19638f827a 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php @@ -121,17 +121,17 @@ public function testReverseMatchHost(): void public function testSetGetRequestMapPort(): void { - $mapKey = 8000; + $mapKey = '8000'; $request = new SimplifiedRequest('http', '', $mapKey); - $matcher = new Port(['foo' => $mapKey]); + $matcher = new Port([$mapKey => 'foo']); $matcher->setRequest($request); self::assertSame($request, $matcher->getRequest()); - self::assertSame((string)$mapKey, $matcher->getMapKey()); + self::assertSame($mapKey, $matcher->getMapKey()); } public function testReversePortMatchFail(): void { - $config = ['foo' => 8080]; + $config = [8080 => 'foo']; $matcher = new Port($config); self::assertNull($matcher->reverseMatch('non_existent')); } @@ -151,7 +151,7 @@ public function testReverseMatchPort(): void $result = $matcher->reverseMatch('ibexa_demo_site'); self::assertInstanceOf(Port::class, $result); self::assertSame($request, $matcher->getRequest()); - self::assertSame(8000, $result->getMapKey()); + self::assertSame('8000', $result->getMapKey()); self::assertSame(8000, $result->getRequest()->getPort()); self::assertSame('http', $result->getRequest()->getScheme()); } diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php index 2c7c7b1ae1..21d8d68355 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php @@ -91,7 +91,6 @@ public function testReverseMatch(): void $result = $matcher->reverseMatch('foobar'); self::assertInstanceOf(HostTextMatcher::class, $result); $request = $result->getRequest(); - self::assertInstanceOf(SimplifiedRequest::class, $request); self::assertSame('www.foobar.com', $request->getHost()); } diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php index 2639d21305..23fd89dcfe 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php @@ -9,7 +9,6 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement as URIElementMatcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; @@ -135,6 +134,8 @@ public function analyseProvider(): array /** * @dataProvider reverseMatchProvider + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testReverseMatch(string $siteAccessName, string $originalPathinfo): void { @@ -143,12 +144,18 @@ public function testReverseMatch(string $siteAccessName, string $originalPathinf $matcher->setRequest(new SimplifiedRequest('http', '', 80, $originalPathinfo)); $result = $matcher->reverseMatch($siteAccessName); - self::assertInstanceOf(URIElement::class, $result); - self::assertSame("/{$expectedSiteAccessPath}{$originalPathinfo}", $result->getRequest()->getPathInfo()); + self::assertInstanceOf(URIElementMatcher::class, $result); + self::assertSame( + sprintf('/%s%s', $expectedSiteAccessPath, $originalPathinfo), + $result->getRequest()->getPathInfo() + ); self::assertSame("/$expectedSiteAccessPath/some/linked/uri", $result->analyseLink('/some/linked/uri')); self::assertSame('/foo/bar/baz', $result->analyseURI("/$expectedSiteAccessPath/foo/bar/baz")); } + /** + * @return list + */ public function reverseMatchProvider(): array { return [ diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php index 1b9cf1cecb..3a58e7be8e 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php @@ -9,7 +9,6 @@ use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; use Ibexa\Core\MVC\Symfony\SiteAccess; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIElement as URIElementMatcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; @@ -113,18 +112,23 @@ public function analyseProvider(): array /** * @dataProvider reverseMatchProvider + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testReverseMatch(string $siteAccessName, string $originalPathinfo): void { $matcher = new URIElementMatcher([1]); $matcher->setRequest(new SimplifiedRequest('http', '', 80, $originalPathinfo)); $result = $matcher->reverseMatch($siteAccessName); - self::assertInstanceOf(URIElement::class, $result); - self::assertSame("/{$siteAccessName}{$originalPathinfo}", $result->getRequest()->getPathInfo()); + self::assertInstanceOf(URIElementMatcher::class, $result); + self::assertSame("/$siteAccessName$originalPathinfo", $result->getRequest()->getPathInfo()); self::assertSame("/$siteAccessName/some/linked/uri", $result->analyseLink('/some/linked/uri')); self::assertSame('/foo/bar/baz', $result->analyseURI("/$siteAccessName/foo/bar/baz")); } + /** + * @return list + */ public function reverseMatchProvider(): array { return [ diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php index 6904a08651..af7c668888 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php @@ -8,7 +8,6 @@ namespace Ibexa\Tests\Core\MVC\Symfony\SiteAccess; use Ibexa\Core\MVC\Symfony\Routing\SimplifiedRequest; -use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIText; use Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\URIText as URITextMatcher; use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; @@ -121,7 +120,7 @@ public function testReverseMatch(): void $matcher->setRequest(new SimplifiedRequest('http', '', 80, $semanticURI)); $result = $matcher->reverseMatch('something'); - self::assertInstanceOf(URIText::class, $result); + self::assertInstanceOf(URITextMatcher::class, $result); $request = $result->getRequest(); self::assertInstanceOf(SimplifiedRequest::class, $request); self::assertSame("/foosomethingbar{$semanticURI}", $request->getPathInfo()); From fd611db1e5d3e743864cca307fb1d6e70b993d45 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 17 Apr 2025 13:50:48 +0200 Subject: [PATCH 082/185] IBX-9727: Fixed strict types of Search Commons field value mappers --- .../FieldValueMapper/BaseIntegerMapper.php | 25 ++++++++++++ .../FieldValueMapper/BaseStringMapper.php | 40 +++++++++++++++++++ .../Common/FieldValueMapper/IntegerMapper.php | 15 +------ .../MultipleIntegerMapper.php | 4 +- .../MultipleRemoteIdentifierMapper.php | 4 +- .../FieldValueMapper/MultipleStringMapper.php | 8 ++-- .../RemoteIdentifierMapper.php | 2 +- .../Common/FieldValueMapper/StringMapper.php | 30 +------------- 8 files changed, 77 insertions(+), 51 deletions(-) create mode 100644 src/lib/Search/Common/FieldValueMapper/BaseIntegerMapper.php create mode 100644 src/lib/Search/Common/FieldValueMapper/BaseStringMapper.php diff --git a/src/lib/Search/Common/FieldValueMapper/BaseIntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/BaseIntegerMapper.php new file mode 100644 index 0000000000..4240cf0700 --- /dev/null +++ b/src/lib/Search/Common/FieldValueMapper/BaseIntegerMapper.php @@ -0,0 +1,25 @@ +convert($field->getValue()); } - - /** - * Convert to a proper search engine representation. - * - * @param mixed $value - */ - protected function convert($value): int - { - return (int)$value; - } } diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php index f0f0300735..ff1ef04ad5 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleIntegerMapper.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Search\FieldType\MultipleIntegerField; /** - * Common multiple integer field value mapper implementation. + * @internal */ -class MultipleIntegerMapper extends IntegerMapper +final class MultipleIntegerMapper extends BaseIntegerMapper { public function canMap(Field $field): bool { diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php index fddc8402e6..acfb88d462 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleRemoteIdentifierMapper.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Search\FieldType\MultipleRemoteIdentifierField; /** - * Common remote ID list field value mapper implementation. + * @internal */ -final class MultipleRemoteIdentifierMapper extends RemoteIdentifierMapper +final class MultipleRemoteIdentifierMapper extends BaseStringMapper { public function canMap(Field $field): bool { diff --git a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php index 7e6a56605b..ee0520a7e2 100644 --- a/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Search\FieldType; /** - * Common multiple string field value mapper implementation. + * @internal */ -class MultipleStringMapper extends StringMapper +class MultipleStringMapper extends BaseStringMapper { public function canMap(Field $field): bool { @@ -28,9 +28,7 @@ public function canMap(Field $field): bool /** * Map field value to a proper search engine representation. * - * @param \Ibexa\Contracts\Core\Search\Field $field - * - * @return array + * @return string[] */ public function map(Field $field): array { diff --git a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php index c4f7125371..d160b7be86 100644 --- a/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapper.php @@ -17,7 +17,7 @@ * * @internal for internal use by Search engine field value mapper */ -class RemoteIdentifierMapper extends StringMapper +final class RemoteIdentifierMapper extends StringMapper { public function canMap(Field $field): bool { diff --git a/src/lib/Search/Common/FieldValueMapper/StringMapper.php b/src/lib/Search/Common/FieldValueMapper/StringMapper.php index 949046b331..601152ee55 100644 --- a/src/lib/Search/Common/FieldValueMapper/StringMapper.php +++ b/src/lib/Search/Common/FieldValueMapper/StringMapper.php @@ -9,16 +9,12 @@ use Ibexa\Contracts\Core\Search\Field; use Ibexa\Contracts\Core\Search\FieldType; -use Ibexa\Core\Search\Common\FieldValueMapper; /** - * Common string field value mapper implementation. + * @internal */ -class StringMapper extends FieldValueMapper +class StringMapper extends BaseStringMapper { - public const REPLACE_WITH_SPACE_PATTERN = '([\x09\x0B\x0C]+)'; - public const REMOVE_PATTERN = '([\x00-\x08\x0E-\x1F]+)'; - public function canMap(Field $field): bool { return $field->getType() instanceof FieldType\StringField; @@ -28,26 +24,4 @@ public function map(Field $field): string { return $this->convert($field->getValue()); } - - /** - * Convert to a proper search engine representation. - * - * @param mixed $value - */ - protected function convert($value): string - { - // Replace tab, vertical tab, form-feed chars to single space. - $value = preg_replace( - self::REPLACE_WITH_SPACE_PATTERN, - ' ', - (string)$value - ); - - // Remove non-printable characters. - return preg_replace( - self::REMOVE_PATTERN, - '', - (string)$value - ); - } } From 422c6dac5c20e6c057df7c59ad39a8458f12cbb3 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 10:45:36 +0200 Subject: [PATCH 083/185] [Tests] Dropped obsolete PHP < 8.1 test case --- .../FieldType/User/ParameterProviderTest.php | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php index 2aeeacc9cf..9d4ed32a11 100644 --- a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php @@ -45,28 +45,6 @@ protected function setUp(): void $this->parameterProvider = new ParameterProvider($this->userService); } - /** - * @requires PHP < 8.1 - */ - public function testGetViewParameters(): void - { - $passwordExpiresIn = 14; - $passwordExpiresAt = (new DateTimeImmutable())->add(new DateInterval('P14D')); - - $this->userService - ->method('getPasswordInfo') - ->with($this->user) - ->willReturn(new PasswordInfo($passwordExpiresAt)); - - $parameters = $this->parameterProvider->getViewParameters( - $this->createFieldMock(self::EXAMPLE_USER_ID) - ); - - self::assertFalse($parameters['is_password_expired']); - self::assertEquals($passwordExpiresAt, $parameters['password_expires_at']); - self::assertEquals($passwordExpiresIn, $parameters['password_expires_in']->days); - } - public function testGetViewParametersWhenPasswordExpirationDateIsNull(): void { $field = $this->createFieldMock(self::EXAMPLE_USER_ID); From bb229eaddd748d620601c15d45f8222d327fdfde Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 12:38:56 +0200 Subject: [PATCH 084/185] IBX-9727: [Tests] Fixed strict types of SiteAccessAware service layer test cases --- .../SiteAccessAware/AbstractServiceTest.php | 42 +++++++++++-------- .../SiteAccessAware/ContentServiceTest.php | 8 ++-- .../ContentTypeServiceTest.php | 8 +++- .../SiteAccessAware/LanguageServiceTest.php | 8 +++- .../SiteAccessAware/LocationServiceTest.php | 8 +++- .../ObjectStateServiceTest.php | 8 +++- .../SiteAccessAware/SearchServiceTest.php | 8 +++- .../SiteAccessAware/TrashServiceTest.php | 8 +++- .../SiteAccessAware/UrlAliasServiceTest.php | 8 +++- .../SiteAccessAware/UserServiceTest.php | 10 +++-- 10 files changed, 85 insertions(+), 31 deletions(-) diff --git a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php index 38c2637299..c352cc9cd3 100644 --- a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php @@ -18,32 +18,40 @@ * Abstract tests for SiteAccessAware Services. * * Implies convention for methods on these services to either: - * - Do nothing, pass-through call and optionally (default:true) return value + * - Do nothing, pass through call and optionally (default:true) return value * - lookup languages [IF not defined by callee] on one of the arguments given and pass it to next one. + * + * @template TServiceInterface of object + * @template TServiceClass of TServiceInterface */ abstract class AbstractServiceTest extends TestCase { + /** @phpstan-var TServiceInterface & \PHPUnit\Framework\MockObject\MockObject */ + protected MockObject $innerApiServiceMock; + + /** @phpstan-var TServiceClass */ + protected object $service; + + protected LanguageResolver & MockObject $languageResolverMock; + /** * Purely to attempt to make tests easier to read. * - * As language parameter is ignored from providers and replced with values in tests, this is used to mark value of - * language argument instead of either askingproviders to use 0, or a valid language array which would then not be + * As a language parameter is ignored from providers and replaced with values in tests, this is used to mark the value of a + * language argument instead of either asking providers to use 0, or a valid language array which would then not be * used. */ - public const LANG_ARG = 0; - - /** @var \object|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $innerApiServiceMock; + public const int LANG_ARG = 0; - /** @var object */ - protected $service; - - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $languageResolverMock; - - abstract public function getAPIServiceClassName(); + /** + * @phpstan-return interface-string + */ + abstract public function getAPIServiceClassName(): string; - abstract public function getSiteAccessAwareServiceClassName(); + /** + * @phpstan-return class-string + */ + abstract public function getSiteAccessAwareServiceClassName(): string; protected function setUp(): void { @@ -62,9 +70,7 @@ protected function setUp(): void protected function tearDown(): void { - unset($this->service); - unset($this->languageResolverMock); - unset($this->innerApiServiceMock); + unset($this->service, $this->languageResolverMock, $this->innerApiServiceMock); parent::tearDown(); } diff --git a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php index 14059383a1..6918e69ba5 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php @@ -27,9 +27,12 @@ use Ibexa\Core\Repository\Values\User\User; /** - * @property \Ibexa\Contracts\Core\Repository\ContentService $service + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\ContentService, + * \Ibexa\Core\Repository\SiteAccessAware\ContentService + * > */ -class ContentServiceTest extends AbstractServiceTest +final class ContentServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { @@ -46,7 +49,6 @@ public function providerForPassTroughMethods(): array $contentInfo = new ContentInfo(); $versionInfo = new VersionInfo(); $content = $this->createMock(Content::class); - $relation = $this->createMock(Relation::class); $relationList = new RelationList(); $contentCreateStruct = new ContentCreateStruct(); $contentUpdateStruct = new ContentUpdateStruct(); diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index 5ac43a0d11..99f919f710 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -21,7 +21,13 @@ use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Repository\Values\User\User; -class ContentTypeServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\ContentTypeService, + * \Ibexa\Core\Repository\SiteAccessAware\ContentTypeService + * > + */ +final class ContentTypeServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index 5d8004047c..7ffdbf19b9 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -12,7 +12,13 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LanguageCreateStruct; use Ibexa\Core\Repository\SiteAccessAware\LanguageService; -class LanguageServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\LanguageService, + * \Ibexa\Core\Repository\SiteAccessAware\LanguageService + * > + */ +final class LanguageServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php index 3ed7b2a8d8..9162af9abd 100644 --- a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php @@ -18,7 +18,13 @@ use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\VersionInfo; -class LocationServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\LocationService, + * \Ibexa\Core\Repository\SiteAccessAware\LocationService + * > + */ +final class LocationServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index 925727a593..cf38b6e3e8 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -17,7 +17,13 @@ use Ibexa\Core\Repository\Values\ObjectState\ObjectState; use Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup; -class ObjectStateServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\ObjectStateService, + * \Ibexa\Core\Repository\SiteAccessAware\ObjectStateService + * > + */ +final class ObjectStateServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index 45e391eba3..2c707709aa 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -14,7 +14,13 @@ use Ibexa\Core\Repository\SiteAccessAware\SearchService; use Ibexa\Core\Repository\Values\Content\Content; -class SearchServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\SearchService, + * \Ibexa\Core\Repository\SiteAccessAware\SearchService + * > + */ +final class SearchServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index c42742f92f..99090cbb94 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -16,7 +16,13 @@ use Ibexa\Core\Repository\Values\Content\Location; use Ibexa\Core\Repository\Values\Content\TrashItem; -class TrashServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\TrashService, + * \Ibexa\Core\Repository\SiteAccessAware\TrashService + * > + */ +final class TrashServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index a40c46f9a5..742eb9e82e 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -12,7 +12,13 @@ use Ibexa\Core\Repository\SiteAccessAware\URLAliasService; use Ibexa\Core\Repository\Values\Content\Location; -class UrlAliasServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\URLAliasService, + * \Ibexa\Core\Repository\SiteAccessAware\URLAliasService + * > + */ +final class UrlAliasServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index e18f848a9b..53c183abee 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -22,7 +22,13 @@ use Ibexa\Core\Repository\Values\User\UserGroup; use Ibexa\Core\Repository\Values\User\UserGroupCreateStruct; -class UserServiceTest extends AbstractServiceTest +/** + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * \Ibexa\Contracts\Core\Repository\UserService, + * \Ibexa\Core\Repository\SiteAccessAware\UserService + * > + */ +final class UserServiceTest extends AbstractServiceTest { public function getAPIServiceClassName(): string { @@ -49,8 +55,6 @@ public function providerForPassTroughMethods(): array $contentType = $this->createMock(ContentType::class); $passwordValidationContext = new PasswordValidationContext(); - $passwordExpirationDate = (new DateTime())->add(new DateInterval('P30D')); - $passwordExpirationWarningDate = (new DateTime())->add(new DateInterval('P16D')); // string $method, array $arguments, bool $return = true return [ From 7ad85f4b708162aa361a66708e67988c7f38f023 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 14:26:07 +0200 Subject: [PATCH 085/185] IBX-9727: Fixed Imagine Bundle extension points classes' strict types and improved code quality --- .../Imagine/Filter/FilterConfiguration.php | 51 ++++++++----------- .../Filter/Loader/BorderFilterLoader.php | 21 ++++---- .../Filter/Loader/CropFilterLoader.php | 7 ++- .../Filter/Loader/GrayscaleFilterLoader.php | 7 ++- .../Filter/Loader/ReduceNoiseFilterLoader.php | 7 ++- .../Loader/ScaleDownOnlyFilterLoader.php | 9 ++-- .../Filter/Loader/ScaleExactFilterLoader.php | 7 ++- .../Filter/Loader/ScaleFilterLoader.php | 9 ++-- .../ScaleHeightDownOnlyFilterLoader.php | 9 +++- .../Filter/Loader/ScaleHeightFilterLoader.php | 9 +++- .../Loader/ScalePercentFilterLoader.php | 13 +++-- .../Loader/ScaleWidthDownOnlyFilterLoader.php | 7 ++- .../Filter/Loader/ScaleWidthFilterLoader.php | 9 +++- .../Filter/Loader/SwirlFilterLoader.php | 7 ++- .../Core/Imagine/IORepositoryResolver.php | 13 +++-- src/bundle/Core/Variation/PathResolver.php | 13 ++++- 16 files changed, 120 insertions(+), 78 deletions(-) diff --git a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php index cc0048df87..0ee9f63896 100644 --- a/src/bundle/Core/Imagine/Filter/FilterConfiguration.php +++ b/src/bundle/Core/Imagine/Filter/FilterConfiguration.php @@ -22,9 +22,12 @@ public function setConfigResolver(ConfigResolverInterface $configResolver): void $this->configResolver = $configResolver; } - public function get($filter) + /** + * @return array + */ + public function get($filter): array { - $configuredVariations = $this->configResolver->getParameter('image_variations'); + $configuredVariations = $this->configResolver?->getParameter('image_variations') ?? []; if (!array_key_exists($filter, $configuredVariations)) { return parent::get($filter); } @@ -34,15 +37,18 @@ public function get($filter) return [ 'cache' => 'ibexa', 'data_loader' => 'ibexa', - 'reference' => isset($configuredVariations[$filter]['reference']) ? $configuredVariations[$filter]['reference'] : null, + 'reference' => $configuredVariations[$filter]['reference'] ?? null, 'filters' => $this->getVariationFilters($filter, $configuredVariations), 'post_processors' => $this->getVariationPostProcessors($filter, $configuredVariations), ] + $filterConfig; } - public function all() + /** + * @return array + */ + public function all(): array { - return $this->configResolver->getParameter('image_variations') + parent::all(); + return ($this->configResolver?->getParameter('image_variations') ?? []) + parent::all(); } /** @@ -51,47 +57,34 @@ public function all() * Both variations configured in Ibexa (SiteAccess context) and LiipImagineBundle are used. * Ibexa variations always have precedence. * - * @param string $variationName - * @param array $configuredVariations Variations set in eZ. + * @param array $configuredVariations Variations set in Ibexa. * - * @return array + * @return array */ - private function getVariationFilters(string $variationName, array $configuredVariations) + private function getVariationFilters(string $variationName, array $configuredVariations): array { if (!isset($configuredVariations[$variationName]['filters']) && !isset($this->filters[$variationName]['filters'])) { return []; } // Check variations configured in Ibexa config first. - if (isset($configuredVariations[$variationName]['filters'])) { - $filters = $configuredVariations[$variationName]['filters']; - } else { - // Falback to variations configured in LiipImagineBundle. - $filters = $this->filters[$variationName]['filters']; - } - - return $filters; + return $configuredVariations[$variationName]['filters'] ?? $this->filters[$variationName]['filters']; } /** - * Returns post processors to be used for $variationName. + * Returns post-processors to be used for $variationName. * * Both variations configured in Ibexa and LiipImagineBundle are used. * Ibexa variations always have precedence. * - * @param string $variationName - * @param array $configuredVariations Variations set in eZ. + * @param array $configuredVariations Variations set in Ibexa. * - * @return array + * @return array */ - private function getVariationPostProcessors(string $variationName, array $configuredVariations) + private function getVariationPostProcessors(string $variationName, array $configuredVariations): array { - if (isset($configuredVariations[$variationName]['post_processors'])) { - return $configuredVariations[$variationName]['post_processors']; - } elseif (isset($this->filters[$variationName]['post_processors'])) { - return $this->filters[$variationName]['post_processors']; - } - - return []; + return $configuredVariations[$variationName]['post_processors'] + ?? $this->filters[$variationName]['post_processors'] + ?? []; } } diff --git a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php index a65b95d9d1..18108b3cf1 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php @@ -20,26 +20,23 @@ */ class BorderFilterLoader implements LoaderInterface { - public const IDENTIFIER = 'border'; + public const string IDENTIFIER = 'border'; - public const DEFAULT_BORDER_COLOR = '#000'; + public const string DEFAULT_BORDER_COLOR = '#000'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int, int}|array{int, int, string}|array{} $options Values in the consecutive order: width, height, color. + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { $optionsCount = count($options); if ($optionsCount < 2) { throw new InvalidArgumentException('Invalid options for border filter. You must provide array(width, height)'); } - $color = static::DEFAULT_BORDER_COLOR; - if ($optionsCount > 2) { - list($width, $height, $color) = $options; - } else { - list($width, $height) = $options; - } - - $border = new Border($image->palette()->color($color), $width, $height); + [$width, $height] = $options; + $color = $options[2] ?? static::DEFAULT_BORDER_COLOR; - return $border->apply($image); + return (new Border($image->palette()->color($color), $width, $height))->apply($image); } } diff --git a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php index 9066dddd9f..3820971e5c 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php @@ -16,9 +16,12 @@ */ class CropFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/crop'; + public const string IDENTIFIER = 'geometry/crop'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int, int, int, int}|array{} $options Numerically indexed array. Values in the consecutive order: height, width, offsetX (horizontal), offsetY (vertical). + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (count($options) < 4) { throw new InvalidArgumentException('Invalid options for geometry/crop filter. You must provide array(width, height, offsetX, offsetY)'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php index 8ae93cf653..b0c4557557 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php @@ -16,9 +16,12 @@ */ class GrayscaleFilterLoader implements LoaderInterface { - public const IDENTIFIER = 'colorspace/gray'; + public const string IDENTIFIER = 'colorspace/gray'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array $options + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { $image->effects()->grayscale(); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php index 929de6ae26..ebb1666647 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php @@ -20,7 +20,7 @@ */ class ReduceNoiseFilterLoader implements LoaderInterface { - public const IDENTIFIER = 'filter/noise'; + public const string IDENTIFIER = 'filter/noise'; private FilterInterface $filter; @@ -29,7 +29,10 @@ public function __construct(FilterInterface $filter) $this->filter = $filter; } - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int}|array{} $options Expecting just one entry representing radius + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (!$image instanceof ImagickImage && !$image instanceof GmagickImage) { throw new NotSupportedException('ReduceNoiseFilterLoader is only compatible with "imagick" and "gmagick" drivers'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php index 066f92f7e6..eb4af45a81 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php @@ -16,19 +16,16 @@ */ class ScaleDownOnlyFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scaledownonly'; + public const string IDENTIFIER = 'geometry/scaledownonly'; /** * Loads and applies a filter on the given image. * - * @param \Imagine\Image\ImageInterface $image - * @param array $options Numerically indexed array. First entry is width, second is height. + * @param array{int, int}|array{} $options Numerically indexed array. The first entry is width, the second is height. * * @throws \Imagine\Exception\InvalidArgumentException - * - * @return \Imagine\Image\ImageInterface */ - public function load(ImageInterface $image, array $options = []) + public function load(ImageInterface $image, array $options = []): ImageInterface { if (count($options) < 2) { throw new InvalidArgumentException('Missing width and/or height options'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php index e387f83612..c5ec93197b 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php @@ -16,9 +16,12 @@ */ class ScaleExactFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scaleexact'; + public const string IDENTIFIER = 'geometry/scaleexact'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int, int}|array{} $options Numerically indexed array. The first entry is width, the second is height. + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (count($options) < 2) { throw new InvalidArgumentException('Missing width and/or height options'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php index f7125fa3de..d0018f80f6 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php @@ -16,15 +16,18 @@ */ class ScaleFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scale'; + public const string IDENTIFIER = 'geometry/scale'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int, int}|array{} $options Numerically indexed array. The first entry is width, the second is height. + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (count($options) < 2) { throw new InvalidArgumentException('Missing width and/or height options'); } - list($width, $height) = $options; + [$width, $height] = $options; $size = $image->getSize(); $ratioWidth = $width / $size->getWidth(); $ratioHeight = $height / $size->getHeight(); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php index 664ab72d12..c79930cc34 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php @@ -16,9 +16,14 @@ */ class ScaleHeightDownOnlyFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scaleheightdownonly'; + public const string IDENTIFIER = 'geometry/scaleheightdownonly'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int}|array{} $options Numerically indexed array. The first entry is height. + * + * @throws \Imagine\Exception\InvalidArgumentException + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (empty($options)) { throw new InvalidArgumentException('Missing height option'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php index 3ccb2b236c..bc104fc4db 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php @@ -16,9 +16,14 @@ */ class ScaleHeightFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scaleheight'; + public const string IDENTIFIER = 'geometry/scaleheight'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int}|array{} $options Numerically indexed array. The first entry is height. + * + * @throws \Imagine\Exception\InvalidArgumentException + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (empty($options)) { throw new InvalidArgumentException('Missing width option'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php index 00aeaa1379..b0828888b5 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php @@ -16,9 +16,14 @@ */ class ScalePercentFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scalepercent'; - - public function load(ImageInterface $image, array $options = []) + public const string IDENTIFIER = 'geometry/scalepercent'; + + /** + * @param array{int, int}|array{} $options Numerically indexed array. The first entry is width percent, the second is height percent. + * + * @throws \Imagine\Exception\InvalidArgumentException + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (count($options) < 2) { throw new InvalidArgumentException('Missing width and/or height percent options'); @@ -27,7 +32,7 @@ public function load(ImageInterface $image, array $options = []) $size = $image->getSize(); $origWidth = $size->getWidth(); $origHeight = $size->getHeight(); - list($widthPercent, $heightPercent) = $options; + [$widthPercent, $heightPercent] = $options; $targetWidth = ($origWidth * $widthPercent) / 100; $targetHeight = ($origHeight * $heightPercent) / 100; diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php index 38784811ed..0ea4e2b426 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php @@ -16,9 +16,12 @@ */ class ScaleWidthDownOnlyFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scalewidthdownonly'; + public const string IDENTIFIER = 'geometry/scalewidthdownonly'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int}|array{} $options Numerically indexed array. The first entry is width. + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (empty($options)) { throw new InvalidArgumentException('Missing width option'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php index d381442c5a..856cccf170 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php @@ -16,9 +16,14 @@ */ class ScaleWidthFilterLoader extends FilterLoaderWrapped { - public const IDENTIFIER = 'geometry/scalewidth'; + public const string IDENTIFIER = 'geometry/scalewidth'; - public function load(ImageInterface $image, array $options = []) + /** + * @param array{int}|array{} $options Numerically indexed array. The first entry is width. + * + * @throws \Imagine\Exception\InvalidArgumentException + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (empty($options)) { throw new InvalidArgumentException('Missing width option'); diff --git a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php index 72735c4467..488bd9e88e 100644 --- a/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php +++ b/src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php @@ -13,7 +13,7 @@ class SwirlFilterLoader implements LoaderInterface { - public const IDENTIFIER = 'filter/swirl'; + public const string IDENTIFIER = 'filter/swirl'; private FilterInterface $filter; @@ -22,7 +22,10 @@ public function __construct(FilterInterface $filter) $this->filter = $filter; } - public function load(ImageInterface $image, array $options = []) + /** + * @param array{float}|array{} $options Optional - an array with one float element, the degrees of swirl. + */ + public function load(ImageInterface $image, array $options = []): ImageInterface { if (!empty($options)) { $this->filter->setOption('degrees', $options[0]); diff --git a/src/bundle/Core/Imagine/IORepositoryResolver.php b/src/bundle/Core/Imagine/IORepositoryResolver.php index 216fcd07cf..c57cf21f2c 100644 --- a/src/bundle/Core/Imagine/IORepositoryResolver.php +++ b/src/bundle/Core/Imagine/IORepositoryResolver.php @@ -24,7 +24,7 @@ */ class IORepositoryResolver extends PathResolver implements ResolverInterface { - public const VARIATION_ORIGINAL = 'original'; + public const string VARIATION_ORIGINAL = 'original'; private IOServiceInterface $ioService; @@ -46,7 +46,7 @@ public function __construct( $this->variationPurger = $variationPurger; } - public function isStored($path, $filter) + public function isStored($path, $filter): bool { return $this->ioService->exists($this->getFilePath($path, $filter)); } @@ -81,9 +81,9 @@ public function resolve($path, $filter): string /** * Stores image alias in the IO Repository. - * A temporary file is created to dump the filtered image and is used as basis for creation in the IO Repository. + * A temporary file is created to dump the filtered image and is used as a basis for creation in the IO Repository. * - * {@inheritdoc} + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function store(BinaryInterface $binary, $path, $filter): void { @@ -100,7 +100,10 @@ public function store(BinaryInterface $binary, $path, $filter): void /** * @param string[] $paths The paths where the original files are expected to be. - * @param string[] $filters The imagine filters in effect. + * @param string[] $filters The `imagine` filters in effect. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function remove(array $paths, array $filters): void { diff --git a/src/bundle/Core/Variation/PathResolver.php b/src/bundle/Core/Variation/PathResolver.php index 6ce750b772..45bbaea2cf 100644 --- a/src/bundle/Core/Variation/PathResolver.php +++ b/src/bundle/Core/Variation/PathResolver.php @@ -24,7 +24,18 @@ public function __construct( $this->variationPathGenerator = $variationPathGenerator; } - abstract public function resolve($path, $variation): string; + /** + * @see \Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface::resolve() + * + * @param string $path The path where the original file is expected to be + * @param string $filter The name of the imagine filter in effect + * + * @return string The absolute URL of the cached image + * + * @throws \Liip\ImagineBundle\Exception\Imagine\Cache\Resolver\NotResolvableException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + */ + abstract public function resolve($path, $filter): string; /** * Returns path for filtered image from original path, using the VariationPathGenerator. From 1b374c3d2ef9438cd085ffab7ae6daaa75d37794 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 15:41:54 +0200 Subject: [PATCH 086/185] IBX-8471: [DI] Replaced deprecated `!tagged` with `!tagged_iterator` --- src/bundle/Core/Resources/config/helpers.yml | 2 +- src/bundle/Core/Resources/config/routing.yml | 2 +- src/bundle/Core/Resources/config/templating.yml | 2 +- src/lib/Resources/settings/roles.yml | 2 +- .../search_engines/legacy/sort_clause_handlers_common.yml | 2 +- src/lib/Resources/settings/storage_engines/cache.yml | 2 +- tests/integration/Core/Resources/settings/common.yml | 2 +- .../integration/Core/Resources/settings/integration_legacy.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bundle/Core/Resources/config/helpers.yml b/src/bundle/Core/Resources/config/helpers.yml index b4b52a4bc0..ceb16c89cf 100644 --- a/src/bundle/Core/Resources/config/helpers.yml +++ b/src/bundle/Core/Resources/config/helpers.yml @@ -22,7 +22,7 @@ services: Ibexa\Bundle\Core\EventListener\ConfigScopeListener: arguments: - $configResolvers: !tagged ibexa.site.config.resolver + $configResolvers: !tagged_iterator ibexa.site.config.resolver $viewManager: '@Ibexa\Core\MVC\Symfony\View\ViewManagerInterface' tags: - { name: kernel.event_subscriber } diff --git a/src/bundle/Core/Resources/config/routing.yml b/src/bundle/Core/Resources/config/routing.yml index a065e1be81..9ba012bf0d 100644 --- a/src/bundle/Core/Resources/config/routing.yml +++ b/src/bundle/Core/Resources/config/routing.yml @@ -81,7 +81,7 @@ services: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider: class: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider arguments: - $providers: !tagged ibexa.site_access.provider + $providers: !tagged_iterator ibexa.site_access.provider ibexa.siteaccess.provider: alias: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider diff --git a/src/bundle/Core/Resources/config/templating.yml b/src/bundle/Core/Resources/config/templating.yml index 354dd37474..34bec08bcf 100644 --- a/src/bundle/Core/Resources/config/templating.yml +++ b/src/bundle/Core/Resources/config/templating.yml @@ -293,7 +293,7 @@ services: Ibexa\Core\MVC\Symfony\View\GenericVariableProviderRegistry: arguments: - $twigVariableProviders: !tagged ezplatform.view.variable_provider + $twigVariableProviders: !tagged_iterator ezplatform.view.variable_provider Ibexa\Core\MVC\Symfony\View\VariableProviderRegistry: '@Ibexa\Core\MVC\Symfony\View\GenericVariableProviderRegistry' diff --git a/src/lib/Resources/settings/roles.yml b/src/lib/Resources/settings/roles.yml index 290b991545..57b59122de 100644 --- a/src/lib/Resources/settings/roles.yml +++ b/src/lib/Resources/settings/roles.yml @@ -17,7 +17,7 @@ services: arguments: $persistenceLanguageHandler: '@Ibexa\Contracts\Core\Persistence\Content\Language\Handler' $persistenceContentHandler: '@Ibexa\Contracts\Core\Persistence\Content\Handler' - $versionTargetEvaluators: !tagged ibexa.permissions.limitation_type.language_target_evaluator.version + $versionTargetEvaluators: !tagged_iterator ibexa.permissions.limitation_type.language_target_evaluator.version tags: - {name: ibexa.permissions.limitation_type, alias: Language} diff --git a/src/lib/Resources/settings/search_engines/legacy/sort_clause_handlers_common.yml b/src/lib/Resources/settings/search_engines/legacy/sort_clause_handlers_common.yml index cbe5e2363a..9be7888533 100644 --- a/src/lib/Resources/settings/search_engines/legacy/sort_clause_handlers_common.yml +++ b/src/lib/Resources/settings/search_engines/legacy/sort_clause_handlers_common.yml @@ -67,7 +67,7 @@ services: Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\Factory\RandomSortClauseHandlerFactory: arguments: - '@ibexa.persistence.connection' - - !tagged ibexa.search.legacy.gateway.sort_clause_handler.gateway.random + - !tagged_iterator ibexa.search.legacy.gateway.sort_clause_handler.gateway.random Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom: class: Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler\AbstractRandom diff --git a/src/lib/Resources/settings/storage_engines/cache.yml b/src/lib/Resources/settings/storage_engines/cache.yml index aa1a21fec8..f558b49abe 100644 --- a/src/lib/Resources/settings/storage_engines/cache.yml +++ b/src/lib/Resources/settings/storage_engines/cache.yml @@ -207,7 +207,7 @@ services: lazy: true arguments: $sharedPool: '@Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter.inner' - $inMemoryPools: !tagged ibexa.cache.persistence.inmemory + $inMemoryPools: !tagged_iterator ibexa.cache.persistence.inmemory ibexa.cache_pool: public: true diff --git a/tests/integration/Core/Resources/settings/common.yml b/tests/integration/Core/Resources/settings/common.yml index 4ed76aca9f..321d8e30cf 100644 --- a/tests/integration/Core/Resources/settings/common.yml +++ b/tests/integration/Core/Resources/settings/common.yml @@ -86,7 +86,7 @@ services: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider: class: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider arguments: - $providers: !tagged ibexa.site_access.provider + $providers: !tagged_iterator ibexa.site_access.provider ibexa.siteaccess.provider: alias: Ibexa\Core\MVC\Symfony\SiteAccess\Provider\ChainSiteAccessProvider diff --git a/tests/integration/Core/Resources/settings/integration_legacy.yml b/tests/integration/Core/Resources/settings/integration_legacy.yml index 98b9b723d7..697bf11882 100644 --- a/tests/integration/Core/Resources/settings/integration_legacy.yml +++ b/tests/integration/Core/Resources/settings/integration_legacy.yml @@ -51,7 +51,7 @@ services: Ibexa\Tests\Core\Persistence\DatabaseConnectionFactory: autowire: true arguments: - $databasePlatforms: !tagged ibexa.doctrine.db.platform + $databasePlatforms: !tagged_iterator ibexa.doctrine.db.platform # build ezpublish.api.storage_engine.legacy.connection for test purposes ibexa.api.storage_engine.legacy.connection: From 01b1abdd325bcd2a6fa8b23153f204ebe36bb0c8 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 15:47:55 +0200 Subject: [PATCH 087/185] IBX-9727: Fixed the strict return type of LocationLimitationType::evaluate --- src/lib/Limitation/LocationLimitationType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Limitation/LocationLimitationType.php b/src/lib/Limitation/LocationLimitationType.php index 6d33289b08..8eb34ca815 100644 --- a/src/lib/Limitation/LocationLimitationType.php +++ b/src/lib/Limitation/LocationLimitationType.php @@ -113,7 +113,7 @@ public function buildValue(array $limitationValues): LocationLimitation * * @return bool */ - public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool|true|false + public function evaluate(APILimitationValue $value, APIUserReference $currentUser, ValueObject $object, array $targets = null): bool { if (!$value instanceof APILocationLimitation) { throw new InvalidArgumentException('$value', 'Must be of type: APILocationLimitation'); From 70349c5f5e61e8e5c910e92df4df3ce51553f1f4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 16:12:00 +0200 Subject: [PATCH 088/185] IBX-9727: Fixed strict types of Translatable classes --- .../ConstraintViolationAdapter.php | 4 +- src/contracts/FieldType/ValidationError.php | 16 +++---- .../AbstractValidationError.php | 6 ++- src/contracts/Repository/Translatable.php | 8 ++-- .../Repository/Values/Translation/Message.php | 2 +- src/lib/FieldType/ValidationError.php | 43 ++++++++----------- 6 files changed, 35 insertions(+), 44 deletions(-) diff --git a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php index c9c2430cae..243dc1706f 100644 --- a/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php +++ b/src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php @@ -25,7 +25,7 @@ final class ConstraintViolationAdapter implements ValidationErrorInterface /** * Element on which the error occurred - * e.g. property name or property path compatible with Symfony PropertyAccess component. + * e.g. property name or property path compatible with a Symfony PropertyAccess component. * * Example: StringLengthValidator[minStringLength] */ @@ -45,7 +45,7 @@ public function getTranslatableMessage(): Translation ); } - public function setTarget($target): void + public function setTarget(string $target): void { $this->target = $target; } diff --git a/src/contracts/FieldType/ValidationError.php b/src/contracts/FieldType/ValidationError.php index 310728ba31..a0b48fba8f 100644 --- a/src/contracts/FieldType/ValidationError.php +++ b/src/contracts/FieldType/ValidationError.php @@ -13,7 +13,7 @@ * Interface for validation errors. * * Enforces to return a translatable message, since it will be necessary to - * present validation errors to the user. Thus we need plural form handling and + * present validation errors to the user. Thus, we need plural form handling and * replacements of placeholders and so on. */ interface ValidationError extends Translatable @@ -21,21 +21,17 @@ interface ValidationError extends Translatable /** * Sets the target element on which the error occurred. * - * E.g. Property of a Field value which didn't validate against validation. - * Can be a property path compatible with Symfony PropertyAccess component. + * E.g., Property of a Field value which didn't validate against validation. + * Can be a property path compatible with a Symfony PropertyAccess component. * * Examples: - * - "[StringLengthValidator][minStringLength]" => Target is "minStringLength" key under "StringLengthValidator" key (fieldtype validator configuration) + * - "[StringLengthValidator][minStringLength]" => Target is the "minStringLength" key under "StringLengthValidator" key (field type validator configuration) * - "my_field_definition_identifier" - * - * @param string $target */ - public function setTarget($target); + public function setTarget(string $target): void; /** * Returns the target element on which the error occurred. - * - * @return string */ - public function getTarget(); + public function getTarget(): ?string; } diff --git a/src/contracts/FieldType/ValidationError/AbstractValidationError.php b/src/contracts/FieldType/ValidationError/AbstractValidationError.php index b2aff3c027..114e4af941 100644 --- a/src/contracts/FieldType/ValidationError/AbstractValidationError.php +++ b/src/contracts/FieldType/ValidationError/AbstractValidationError.php @@ -19,6 +19,7 @@ abstract class AbstractValidationError implements ValidationError { protected string $message; + /** @var array */ protected array $parameters; /** @@ -29,6 +30,9 @@ abstract class AbstractValidationError implements ValidationError */ protected string $target; + /** + * @param array $parameters + */ public function __construct(string $message, array $parameters, string $target) { $this->message = $message; @@ -41,7 +45,7 @@ public function getTranslatableMessage(): Translation return new Message($this->message, $this->parameters); } - public function setTarget($target): void + public function setTarget(string $target): void { $this->target = $target; } diff --git a/src/contracts/Repository/Translatable.php b/src/contracts/Repository/Translatable.php index 77ba4e54f9..45c6577ad4 100644 --- a/src/contracts/Repository/Translatable.php +++ b/src/contracts/Repository/Translatable.php @@ -7,17 +7,17 @@ namespace Ibexa\Contracts\Core\Repository; +use Ibexa\Contracts\Core\Repository\Values\Translation; + /** * Interface implemented by everything which should be translatable. This - * should for example be implemented by any exception, which might bubble up to + * should, for example, be implemented by any exception, which might bubble up to * a user, or validation errors. */ interface Translatable { /** * Returns a translatable Message. - * - * @return \Ibexa\Contracts\Core\Repository\Values\Translation */ - public function getTranslatableMessage(); + public function getTranslatableMessage(): Translation; } diff --git a/src/contracts/Repository/Values/Translation/Message.php b/src/contracts/Repository/Values/Translation/Message.php index 66c276a175..f56c4074a9 100644 --- a/src/contracts/Repository/Values/Translation/Message.php +++ b/src/contracts/Repository/Values/Translation/Message.php @@ -33,7 +33,7 @@ class Message extends Translation protected array $values; /** - * Construct singular only message from string and optional value array. + * Construct a singular only message from string and optional value array. * * @param array $values */ diff --git a/src/lib/FieldType/ValidationError.php b/src/lib/FieldType/ValidationError.php index 917311fb62..16a5deab4d 100644 --- a/src/lib/FieldType/ValidationError.php +++ b/src/lib/FieldType/ValidationError.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\FieldType; use Ibexa\Contracts\Core\FieldType\ValidationError as ValidationErrorInterface; +use Ibexa\Contracts\Core\Repository\Values\Translation; use Ibexa\Contracts\Core\Repository\Values\Translation\Message; use Ibexa\Contracts\Core\Repository\Values\Translation\Plural; @@ -16,30 +17,25 @@ */ class ValidationError implements ValidationErrorInterface { - /** @var string */ - protected $singular; + protected string $singular; - /** @var string */ - protected $plural; + protected ?string $plural; + /** @var array */ protected array $values; /** * Element on which the error occurred - * e.g. property name or property path compatible with Symfony PropertyAccess component. + * e.g. property name or property path compatible with a Symfony PropertyAccess component. * * Example: StringLengthValidator[minStringLength] - * - * @var string */ - protected $target; + protected ?string $target; /** - * @param string $singular - * @param string $plural - * @param array $values + * @param array $values */ - public function __construct($singular, $plural = null, array $values = [], $target = null) + public function __construct(string $singular, ?string $plural = null, array $values = [], ?string $target = null) { $this->singular = $singular; $this->plural = $plural; @@ -47,33 +43,28 @@ public function __construct($singular, $plural = null, array $values = [], $targ $this->target = $target; } - /** - * Returns a translatable Message. - * - * @return \Ibexa\Contracts\Core\Repository\Values\Translation - */ - public function getTranslatableMessage(): Plural|Message + public function getTranslatableMessage(): Translation { - if (isset($this->plural)) { + if (null !== $this->plural) { return new Plural( $this->singular, $this->plural, $this->values ); - } else { - return new Message( - $this->singular, - $this->values - ); } + + return new Message( + $this->singular, + $this->values + ); } - public function setTarget($target): void + public function setTarget(string $target): void { $this->target = $target; } - public function getTarget() + public function getTarget(): ?string { return $this->target; } From 925940e54ef6311d243065ec09af7f06dd0ef8c4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 16:56:20 +0200 Subject: [PATCH 089/185] IBX-9811: [Tests] Fixed strict types of integration tests related to doctrine/dbal v3 upgrade --- .../BinaryBaseStorageTest.php | 16 ++++------ .../Image/ImageStorage/ImageStorageTest.php | 31 ++++++------------- 2 files changed, 15 insertions(+), 32 deletions(-) diff --git a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php index 6f4e3c08b9..2e653336cf 100644 --- a/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php +++ b/tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php @@ -26,19 +26,15 @@ class BinaryBaseStorageTest extends BaseCoreFieldTypeIntegrationTest { - /** @var \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - protected $gateway; + protected Gateway $gateway; - protected PathGeneratorInterface&MockObject $pathGeneratorMock; + protected PathGeneratorInterface & MockObject $pathGeneratorMock; - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $ioServiceMock; + protected IOServiceInterface & MockObject $ioServiceMock; - /** @var \Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $storage; + protected BinaryBaseStorage & MockObject $storage; - /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator&\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $fileExtensionBlackListValidatorMock; + protected FileExtensionBlackListValidator & MockObject $fileExtensionBlackListValidatorMock; protected function setUp(): void { @@ -165,7 +161,7 @@ public function providerOfFieldData(): array ]; } - protected function getStorageGateway(): Gateway + protected function getStorageGateway(): Gateway\DoctrineStorage { return new DoctrineStorage($this->getDatabaseConnection()); } diff --git a/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php b/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php index 91f19ef984..36e72e1e86 100644 --- a/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php +++ b/tests/integration/Core/Image/ImageStorage/ImageStorageTest.php @@ -27,48 +27,35 @@ final class ImageStorageTest extends BaseCoreFieldTypeIntegrationTest { - /** @var \Ibexa\Core\FieldType\Image\ImageStorage\Gateway */ private DoctrineStorage $gateway; - /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $redecorator; + private UrlRedecoratorInterface & MockObject $redecorator; - /** @var \Ibexa\Core\FieldType\Image\PathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $pathGenerator; + private FilePathNormalizerInterface & MockObject $filePathNormalizer; - /** @var \Ibexa\Core\FieldType\Image\AliasCleanerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $aliasCleaner; - - /** @var \Ibexa\Core\IO\FilePathNormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $filePathNormalizer; - - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; /** @var \Ibexa\Core\FieldType\Image\ImageStorage */ private ImageStorage $storage; - /** @var \Ibexa\Core\FieldType\Validator\FileExtensionBlackListValidator&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $fileExtensionBlackListValidator; - protected function setUp(): void { parent::setUp(); $this->redecorator = $this->createMock(UrlRedecoratorInterface::class); $this->gateway = new DoctrineStorage($this->redecorator, $this->getDatabaseConnection()); - $this->pathGenerator = $this->createMock(PathGenerator::class); - $this->aliasCleaner = $this->createMock(AliasCleanerInterface::class); + $pathGenerator = $this->createMock(PathGenerator::class); + $aliasCleaner = $this->createMock(AliasCleanerInterface::class); $this->filePathNormalizer = $this->createMock(FilePathNormalizerInterface::class); $this->ioService = $this->createMock(IOServiceInterface::class); - $this->fileExtensionBlackListValidator = $this->createMock(FileExtensionBlackListValidator::class); + $fileExtensionBlackListValidator = $this->createMock(FileExtensionBlackListValidator::class); $this->storage = new ImageStorage( $this->gateway, $this->ioService, - $this->pathGenerator, - $this->aliasCleaner, + $pathGenerator, + $aliasCleaner, $this->filePathNormalizer, - $this->fileExtensionBlackListValidator + $fileExtensionBlackListValidator ); } From 0bd8aa31badf8652f61c88589b636adfefe86713 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 18 Apr 2025 17:57:04 +0200 Subject: [PATCH 090/185] IBX-9727: [Tests] Fixed strict types in bundle test classes and refactored code --- .../Cache/Warmer/ProxyCacheWarmerTest.php | 4 +- tests/bundle/Core/ConfigResolverTest.php | 4 +- .../ChainConfigResolverTest.php | 16 ++-- .../ConfigResolver/ConfigResolverTest.php | 14 ++-- .../SiteAccessAware/ContextualizerTest.php | 5 +- ...ackgroundIndexingTerminateListenerTest.php | 46 ++++++----- .../EventListener/ConfigScopeListenerTest.php | 8 +- .../ConsoleCommandListenerTest.php | 5 +- ...tentDownloadRouteReferenceListenerTest.php | 3 +- .../EventListener/ExceptionListenerTest.php | 4 +- .../IndexRequestListenerTest.php | 11 +-- .../Core/EventListener/LocaleListenerTest.php | 7 +- ...citFrontControllerRequestsListenerTest.php | 3 +- .../RequestEventListenerTest.php | 37 ++------- .../EventListener/RoutingListenerTest.php | 9 +-- .../ViewControllerListenerTest.php | 36 +++------ .../bundle/Core/Imagine/AliasCleanerTest.php | 4 +- .../Core/Imagine/AliasGeneratorTest.php | 30 +++----- .../bundle/Core/Imagine/BinaryLoaderTest.php | 4 +- .../Cache/Resolver/ProxyResolverTest.php | 77 ++++++++----------- .../Cache/Resolver/RelativeResolverTest.php | 3 +- .../Imagine/Cache/ResolverFactoryTest.php | 7 +- .../Filter/FilterConfigurationTest.php | 4 +- .../Filter/Loader/CropFilterLoaderTest.php | 4 +- .../Loader/ReduceNoiseFilterLoaderTest.php | 9 +-- .../Loader/ScaleDownOnlyFilterLoaderTest.php | 3 +- .../Loader/ScaleExactFilterLoaderTest.php | 4 +- .../Filter/Loader/ScaleFilterLoaderTest.php | 4 +- .../ScaleHeightDownOnlyFilterLoaderTest.php | 4 +- .../Loader/ScaleHeightFilterLoaderTest.php | 4 +- .../Loader/ScalePercentFilterLoaderTest.php | 4 +- .../ScaleWidthDownOnlyFilterLoaderTest.php | 4 +- .../Loader/ScaleWidthFilterLoaderTest.php | 4 +- .../Filter/Loader/SwirlFilterLoaderTest.php | 8 +- .../Core/Imagine/IORepositoryResolverTest.php | 30 +++----- .../Imagine/ImageAsset/AliasGeneratorTest.php | 10 +-- .../Imagine/PlaceholderAliasGeneratorTest.php | 15 ++-- .../ImageFileVariationPurgerTest.php | 9 +-- .../LegacyStorageImageFileListTest.php | 28 +++---- .../bundle/Core/Routing/DefaultRouterTest.php | 9 +-- .../Core/Routing/UrlAliasRouterTest.php | 38 ++++----- .../Config/IOConfigResolverTest.php | 8 +- .../Core/SiteAccess/MatcherBuilderTest.php | 25 ++---- .../bundle/Core/URLChecker/URLCheckerTest.php | 10 +-- .../bundle/IO/Migration/FileMigratorTest.php | 19 ++--- 45 files changed, 206 insertions(+), 388 deletions(-) diff --git a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php index 971c30c149..216c78858c 100644 --- a/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php +++ b/tests/bundle/Core/Cache/Warmer/ProxyCacheWarmerTest.php @@ -15,10 +15,8 @@ final class ProxyCacheWarmerTest extends TestCase { - /** @var \Ibexa\Core\Repository\ProxyFactory\ProxyGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $proxyGenerator; + private ProxyGeneratorInterface & MockObject $proxyGenerator; - /** @var \Ibexa\Bundle\Core\Cache\Warmer\ProxyCacheWarmer */ private ProxyCacheWarmer $proxyCacheWarmer; protected function setUp(): void diff --git a/tests/bundle/Core/ConfigResolverTest.php b/tests/bundle/Core/ConfigResolverTest.php index 57203b4c97..eb86bb7c40 100644 --- a/tests/bundle/Core/ConfigResolverTest.php +++ b/tests/bundle/Core/ConfigResolverTest.php @@ -16,11 +16,9 @@ class ConfigResolverTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ private SiteAccess $siteAccess; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $containerMock; + private ContainerInterface & MockObject $containerMock; protected function setUp(): void { diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php index 1aca2a44b6..19d53c382f 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php @@ -24,20 +24,18 @@ class ChainConfigResolverTest extends TestCase { - private const FIRST_SA_NAME = 'first_sa'; - private const SECOND_SA_NAME = 'second_sa'; - private const SA_GROUP = 'sa_group'; + private const string FIRST_SA_NAME = 'first_sa'; + private const string SECOND_SA_NAME = 'second_sa'; + private const string SA_GROUP = 'sa_group'; - private const DEFAULT_NAMESPACE = 'ibexa.site_access.config'; + private const string DEFAULT_NAMESPACE = 'ibexa.site_access.config'; - private const SCOPE_DEFAULT = 'default'; - private const SCOPE_GLOBAL = 'global'; + private const string SCOPE_DEFAULT = 'default'; + private const string SCOPE_GLOBAL = 'global'; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess|\PHPUnit\Framework\MockObject\MockObject */ private SiteAccess $siteAccess; - /** @var \Symfony\Component\DependencyInjection\ContainerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $containerMock; + private ContainerInterface & MockObject $containerMock; protected function setUp(): void { diff --git a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php index a1d33a9cba..9e77df5e6c 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php @@ -17,17 +17,15 @@ abstract class ConfigResolverTest extends TestCase { - protected const EXISTING_SA_NAME = 'existing_sa'; - protected const UNDEFINED_SA_NAME = 'undefined_sa'; - protected const SA_GROUP = 'sa_group'; + protected const string EXISTING_SA_NAME = 'existing_sa'; + protected const string UNDEFINED_SA_NAME = 'undefined_sa'; + protected const string SA_GROUP = 'sa_group'; - protected const DEFAULT_NAMESPACE = 'ibexa.site_access.config'; + protected const string DEFAULT_NAMESPACE = 'ibexa.site_access.config'; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ - protected $siteAccess; + protected SiteAccess $siteAccess; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\DependencyInjection\ContainerInterface */ - protected MockObject $containerMock; + protected ContainerInterface & MockObject $containerMock; protected function setUp(): void { diff --git a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php index 1406abe349..164dfbea47 100644 --- a/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php +++ b/tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php @@ -17,8 +17,7 @@ class ContextualizerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $container; + private ContainerInterface & MockObject $container; private string $namespace = 'ibexa_test'; @@ -1401,7 +1400,7 @@ public function fullMapConfigArrayProvider(): array ], ]; - foreach ($cases as $k => $newcase) { + foreach ($cases as $newcase) { // run the same tests with another baseKey than the default one if (isset($newcase[5][$this->saNodeName])) { $newcase[5]['customBaseKey'] = $newcase[5][$this->saNodeName]; diff --git a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php index 499746ca0b..bbe4867f1c 100644 --- a/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php +++ b/tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php @@ -24,14 +24,11 @@ class BackgroundIndexingTerminateListenerTest extends TestCase { - /** @var \Ibexa\Bundle\Core\EventListener\BackgroundIndexingTerminateListener */ - protected $listener; + protected BackgroundIndexingTerminateListener $listener; - /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $persistenceMock; + protected PersistenceHandler & MockObject $persistenceMock; - /** @var \Ibexa\Contracts\Core\Search\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $searchMock; + protected SearchHandler & MockObject $searchMock; protected function setUp(): void { @@ -62,30 +59,36 @@ public function testGetSubscribedEvents(): void ); } - public function indexingProvider(): array + /** + * @phpstan-return iterable< + * string, + * array{ + * 0: null|array<\Ibexa\Contracts\Core\Persistence\Content\ContentInfo|\Ibexa\Contracts\Core\Persistence\Content\Location>, + * 1?: bool + * } + * > + */ + public static function indexingProvider(): iterable { $info = new ContentInfo(['id' => 33]); $location = new Location(['id' => 44, 'contentId' => 33]); - return [ - [[$location]], - [[$location], $this->createMock(LoggerInterface::class)], - [[$info]], - [[$info], $this->createMock(LoggerInterface::class)], - [null], - [null, $this->createMock(LoggerInterface::class)], - [[$location, $info]], - [[$info, $location], $this->createMock(LoggerInterface::class)], - ]; + yield 'location' => [[$location]]; + yield 'location with logger' => [[$location], true]; + yield 'content info' => [[$info]]; + yield 'content info with logger' => [[$info], true]; + yield 'no values' => [null]; + yield 'no values with logger' => [null, true]; + yield 'location and content info' => [[$location, $info]]; + yield 'location and content info with logger' => [[$info, $location], true]; } /** * @dataProvider indexingProvider * - * @param array|null $value - * @param \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject|null $logger + * @param array<\Ibexa\Contracts\Core\Persistence\Content\ContentInfo|\Ibexa\Contracts\Core\Persistence\Content\Location>|null $values */ - public function testIndexing(array $values = null, MockObject&LoggerInterface $logger = null): void + public function testIndexing(?array $values = null, bool $mockLogger = false): void { $contentHandlerMock = $this->createMock(Content\Handler::class); $this->persistenceMock @@ -127,7 +130,8 @@ public function testIndexing(array $values = null, MockObject&LoggerInterface $l } } - if ($logger) { + if ($mockLogger) { + $logger = $this->createMock(LoggerInterface::class); $this->listener->setLogger($logger); if ($values) { diff --git a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php index 95314d80fb..d7a3189782 100644 --- a/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php +++ b/tests/bundle/Core/EventListener/ConfigScopeListenerTest.php @@ -19,13 +19,11 @@ class ConfigScopeListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private VersatileScopeInterface & MockObject $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $viewManager; + private ViewManager & MockObject $viewManager; - /** @var \PHPUnit\Framework\MockObject\MockObject */ + /** @var array<\Ibexa\Tests\Bundle\Core\EventListener\Stubs\ViewProvider&\PHPUnit\Framework\MockObject\MockObject> */ private array $viewProviders; protected function setUp(): void diff --git a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php index c085e3aeb9..e2c6fde36b 100644 --- a/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php +++ b/tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php @@ -30,7 +30,7 @@ class ConsoleCommandListenerTest extends TestCase private SiteAccess $siteAccess; /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $dispatcher; + private EventDispatcherInterface & MockObject $dispatcher; /** @var \Ibexa\Bundle\Core\EventListener\ConsoleCommandListener */ private ConsoleCommandListener $listener; @@ -41,8 +41,7 @@ class ConsoleCommandListenerTest extends TestCase /** @var \Symfony\Component\Console\Output\Output */ private TestOutput $testOutput; - /** @var \Symfony\Component\Console\Command\Command|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $command; + private Command & MockObject $command; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php index 26ca98dffd..5784f4e662 100644 --- a/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php +++ b/tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php @@ -23,8 +23,7 @@ class ContentDownloadRouteReferenceListenerTest extends TestCase { - /** @var \Ibexa\Core\Helper\TranslationHelper|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $translationHelperMock; + protected TranslationHelper & MockObject $translationHelperMock; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/ExceptionListenerTest.php b/tests/bundle/Core/EventListener/ExceptionListenerTest.php index a232502b43..ced4cc7c03 100644 --- a/tests/bundle/Core/EventListener/ExceptionListenerTest.php +++ b/tests/bundle/Core/EventListener/ExceptionListenerTest.php @@ -39,10 +39,8 @@ class ExceptionListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Contracts\Translation\TranslatorInterface */ - private MockObject $translator; + private TranslatorInterface & MockObject $translator; - /** @var \Ibexa\Bundle\Core\EventListener\ExceptionListener */ private ExceptionListener $listener; protected function setUp(): void diff --git a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php index 68d39dd13d..8b1dac1443 100644 --- a/tests/bundle/Core/EventListener/IndexRequestListenerTest.php +++ b/tests/bundle/Core/EventListener/IndexRequestListenerTest.php @@ -18,20 +18,15 @@ class IndexRequestListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Bundle\Core\EventListener\IndexRequestListener */ private IndexRequestListener $indexRequestEventListener; - /** @var \Symfony\Component\HttpFoundation\Request */ - private MockObject $request; + private Request & MockObject $request; - /** @var \Symfony\Component\HttpKernel\Event\RequestEvent */ private RequestEvent $event; - /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $httpKernel; + private HttpKernelInterface & MockObject $httpKernel; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/LocaleListenerTest.php b/tests/bundle/Core/EventListener/LocaleListenerTest.php index 3aad97cf38..bf88b93e6d 100644 --- a/tests/bundle/Core/EventListener/LocaleListenerTest.php +++ b/tests/bundle/Core/EventListener/LocaleListenerTest.php @@ -21,13 +21,10 @@ class LocaleListenerTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\Locale\LocaleConverterInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $localeConverter; + private LocaleConverterInterface & MockObject $localeConverter; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ private RequestStack $requestStack; protected function setUp(): void diff --git a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php index fa946750a6..c65c8734ad 100644 --- a/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php +++ b/tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php @@ -22,8 +22,7 @@ class RejectExplicitFrontControllerRequestsListenerTest extends TestCase /** @var \Ibexa\Bundle\Core\EventListener\RejectExplicitFrontControllerRequestsListener */ private RejectExplicitFrontControllerRequestsListener $eventListener; - /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $httpKernel; + private HttpKernelInterface & MockObject $httpKernel; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/RequestEventListenerTest.php b/tests/bundle/Core/EventListener/RequestEventListenerTest.php index 4a7086815a..9bb705d79a 100644 --- a/tests/bundle/Core/EventListener/RequestEventListenerTest.php +++ b/tests/bundle/Core/EventListener/RequestEventListenerTest.php @@ -24,48 +24,21 @@ class RequestEventListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; - - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $router; - - /** @var \PHPUnit\Framework\MockObject\MockObject|\Psr\Log\LoggerInterface */ - private MockObject $logger; - - /** @var \Ibexa\Bundle\Core\EventListener\RequestEventListener */ private RequestEventListener $requestEventListener; - /** @var \Symfony\Component\HttpFoundation\Request */ - private MockObject $request; - - /** @var \Symfony\Component\HttpKernel\Event\RequestEvent */ - private RequestEvent $event; - - /** @var \Symfony\Component\HttpKernel\HttpKernelInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $httpKernel; + private HttpKernelInterface & MockObject $httpKernel; protected function setUp(): void { parent::setUp(); - $this->configResolver = $this->createMock(ConfigResolverInterface::class); - $this->router = $this->createMock(RouterInterface::class); - $this->logger = $this->createMock(LoggerInterface::class); - - $this->requestEventListener = new RequestEventListener($this->configResolver, $this->router, 'foobar', $this->logger); + $configResolver = $this->createMock(ConfigResolverInterface::class); + $router = $this->createMock(RouterInterface::class); + $logger = $this->createMock(LoggerInterface::class); - $this->request = $this - ->getMockBuilder(Request::class) - ->setMethods(['getSession', 'hasSession']) - ->getMock(); + $this->requestEventListener = new RequestEventListener($configResolver, $router, 'foobar', $logger); $this->httpKernel = $this->createMock(HttpKernelInterface::class); - $this->event = new RequestEvent( - $this->httpKernel, - $this->request, - HttpKernelInterface::MAIN_REQUEST - ); } public function testSubscribedEvents(): void diff --git a/tests/bundle/Core/EventListener/RoutingListenerTest.php b/tests/bundle/Core/EventListener/RoutingListenerTest.php index dd4e753407..544fc43d19 100644 --- a/tests/bundle/Core/EventListener/RoutingListenerTest.php +++ b/tests/bundle/Core/EventListener/RoutingListenerTest.php @@ -21,14 +21,11 @@ class RoutingListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlAliasRouter; + private UrlAliasRouter & MockObject $urlAliasRouter; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlAliasGenerator; + private UrlAliasGenerator & MockObject $urlAliasGenerator; protected function setUp(): void { diff --git a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php index f7ce3e0be3..3010d485a1 100644 --- a/tests/bundle/Core/EventListener/ViewControllerListenerTest.php +++ b/tests/bundle/Core/EventListener/ViewControllerListenerTest.php @@ -28,32 +28,19 @@ class ViewControllerListenerTest extends TestCase { - /** @var \Symfony\Component\HttpKernel\Controller\ControllerResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $controllerResolver; + private ControllerResolverInterface & MockObject $controllerResolver; - /** @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $logger; - - /** @var \Ibexa\Bundle\Core\EventListener\ViewControllerListener */ private ViewControllerListener $controllerListener; - /** @var \Symfony\Component\HttpKernel\Event\ControllerEvent */ - private $event; - - /** @var \Symfony\Component\HttpFoundation\Request */ - private Request $request; + private ViewBuilderRegistry & MockObject $viewBuilderRegistry; - /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilderRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $viewBuilderRegistry; + private ViewBuilder & MockObject $viewBuilderMock; - /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ - private $viewConfigurator; + private EventDispatcherInterface & MockObject $eventDispatcher; - /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ViewBuilder|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $viewBuilderMock; + private ControllerEvent $event; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $eventDispatcher; + private Request $request; protected function setUp(): void { @@ -61,12 +48,12 @@ protected function setUp(): void $this->controllerResolver = $this->createMock(ControllerResolverInterface::class); $this->viewBuilderRegistry = $this->createMock(ViewBuilderRegistry::class); $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); - $this->logger = $this->createMock(LoggerInterface::class); + $logger = $this->createMock(LoggerInterface::class); $this->controllerListener = new ViewControllerListener( $this->controllerResolver, $this->viewBuilderRegistry, $this->eventDispatcher, - $this->logger + $logger ); $this->request = new Request(); @@ -132,7 +119,7 @@ public function testGetControllerMatchedView(): void $this->viewBuilderRegistry ->expects(self::once()) ->method('getFromRegistry') - ->will(self::returnValue($this->viewBuilderMock)); + ->willReturn($this->viewBuilderMock); $viewObject = new ContentView($templateIdentifier); $viewObject->setControllerReference(new ControllerReference($customController)); @@ -140,12 +127,13 @@ public function testGetControllerMatchedView(): void $this->viewBuilderMock ->expects(self::once()) ->method('buildView') - ->will(self::returnValue($viewObject)); + ->willReturn($viewObject); $this->controllerResolver ->expects(self::once()) ->method('getController') - ->will(self::returnValue(static function (): void {})); + ->willReturn(static function (): void { + }); $this->controllerListener->getController($this->event); self::assertEquals($customController, $this->request->attributes->get('_controller')); diff --git a/tests/bundle/Core/Imagine/AliasCleanerTest.php b/tests/bundle/Core/Imagine/AliasCleanerTest.php index 1035a93a40..ed0cf48a70 100644 --- a/tests/bundle/Core/Imagine/AliasCleanerTest.php +++ b/tests/bundle/Core/Imagine/AliasCleanerTest.php @@ -14,11 +14,9 @@ class AliasCleanerTest extends TestCase { - /** @var \Ibexa\Bundle\Core\Imagine\AliasCleaner */ private AliasCleaner $aliasCleaner; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $resolver; + private ResolverInterface & MockObject $resolver; protected function setUp(): void { diff --git a/tests/bundle/Core/Imagine/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/AliasGeneratorTest.php index bf4d423d08..254529190f 100644 --- a/tests/bundle/Core/Imagine/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/AliasGeneratorTest.php @@ -37,41 +37,29 @@ class AliasGeneratorTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Binary\Loader\LoaderInterface */ - private MockObject $dataLoader; + private LoaderInterface & MockObject $dataLoader; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Filter\FilterManager */ - private MockObject $filterManager; + private FilterManager & MockObject $filterManager; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private MockObject $ioResolver; + private ResolverInterface & MockObject $ioResolver; - /** @var \Liip\ImagineBundle\Imagine\Filter\FilterConfiguration */ private FilterConfiguration $filterConfiguration; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Psr\Log\LoggerInterface */ - private MockObject $logger; + private LoggerInterface & MockObject $logger; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\ImagineInterface */ - private MockObject $imagine; + private ImagineInterface & MockObject $imagine; - /** @var \Ibexa\Bundle\Core\Imagine\AliasGenerator */ private AliasGenerator $aliasGenerator; - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler */ private ImagineAwareAliasGenerator $decoratedAliasGenerator; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\BoxInterface */ - private MockObject $box; + private BoxInterface & MockObject $box; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Imagine\Image\ImageInterface */ - private MockObject $image; + private ImageInterface & MockObject $image; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\IO\IOServiceInterface */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Variation\VariationPathGenerator */ - private MockObject $variationPathGenerator; + private VariationPathGenerator & MockObject $variationPathGenerator; protected function setUp(): void { diff --git a/tests/bundle/Core/Imagine/BinaryLoaderTest.php b/tests/bundle/Core/Imagine/BinaryLoaderTest.php index c515d29b88..c450b40258 100644 --- a/tests/bundle/Core/Imagine/BinaryLoaderTest.php +++ b/tests/bundle/Core/Imagine/BinaryLoaderTest.php @@ -21,10 +21,8 @@ class BinaryLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; - /** @var \Ibexa\Bundle\Core\Imagine\BinaryLoader */ private BinaryLoader $binaryLoader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php index c87108cca5..a7b70b3e42 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Bundle\Core\Imagine\Cache\Resolver; @@ -12,15 +13,13 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -class ProxyResolverTest extends TestCase +final class ProxyResolverTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private MockObject $resolver; + private const string RESOLVED_PATH_URI = 'https://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; + private ResolverInterface & MockObject $resolver; - /** @var string */ private string $path; - /** @var string */ private string $filter; protected function setUp(): void @@ -31,57 +30,45 @@ protected function setUp(): void $this->filter = 'medium'; } - public function testResolveUsingProxyHostWithTrailingSlash(): void + /** + * @return iterable + */ + public static function getDataForTestResolveUsingProxyHost(): iterable { - $hosts = ['http://ezplatform.com/']; - $proxyResolver = new ProxyResolver($this->resolver, $hosts); - - $resolvedPath = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - - $this->resolver - ->expects(self::once()) - ->method('resolve') - ->with($this->path, $this->filter) - ->willReturn($resolvedPath); - - $expected = 'http://ezplatform.com/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - - self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); + yield 'resolve handles trailing slash' => [ + ['https://ibexa.co/'], + self::RESOLVED_PATH_URI, + 'https://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg', + ]; + + yield 'resolve removes port' => [ + ['https://ibexa.co'], + 'https://ibexa.co:8060/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg', + self::RESOLVED_PATH_URI, + ]; + + yield 'resolve removes port and handles trailing slash' => [ + ['https://ibexa.co/'], + 'https://ibexa.co:8080/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg', + self::RESOLVED_PATH_URI, + ]; } - public function testResolveAndRemovePortUsingProxyHost(): void + /** + * @dataProvider getDataForTestResolveUsingProxyHost + * + * @param string[] $hosts + */ + public function testResolveUsingProxyHost(array $hosts, string $resolvedPath, string $expectedUri): void { - $hosts = ['http://ibexa.co']; $proxyResolver = new ProxyResolver($this->resolver, $hosts); - $resolvedPath = 'http://ibexa.co:8060/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - $this->resolver ->expects(self::once()) ->method('resolve') ->with($this->path, $this->filter) ->willReturn($resolvedPath); - $expected = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - - self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); - } - - public function testResolveAndRemovePortUsingProxyHostWithTrailingSlash(): void - { - $hosts = ['http://ibexa.co']; - $proxyResolver = new ProxyResolver($this->resolver, $hosts); - - $resolvedPath = 'http://ezplatform.com:8080/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - - $this->resolver - ->expects(self::once()) - ->method('resolve') - ->with($this->path, $this->filter) - ->willReturn($resolvedPath); - - $expected = 'http://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; - - self::assertEquals($expected, $proxyResolver->resolve($this->path, $this->filter)); + self::assertEquals($expectedUri, $proxyResolver->resolve($this->path, $this->filter)); } } diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php index 9a9f414b7f..69be1c9b23 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php @@ -14,8 +14,7 @@ class RelativeResolverTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private MockObject $liipResolver; + private ResolverInterface & MockObject $liipResolver; protected function setUp(): void { diff --git a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php index 05235b4ad6..90d4d45c17 100644 --- a/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php +++ b/tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php @@ -17,13 +17,10 @@ class ResolverFactoryTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Liip\ImagineBundle\Imagine\Cache\Resolver\ResolverInterface */ - private MockObject $resolver; + private ResolverInterface & MockObject $resolver; - /** @var \Ibexa\Bundle\Core\Imagine\Cache\ResolverFactory */ private ResolverFactory $factory; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php index e57ddd8ab0..d263035fda 100644 --- a/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php +++ b/tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php @@ -14,10 +14,8 @@ class FilterConfigurationTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration */ private FilterConfiguration $filterConfiguration; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php index afc08e26de..8240a2e31c 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php @@ -16,10 +16,8 @@ class CropFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\CropFilterLoader */ private CropFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php index a7c1e4064b..441e772d89 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php @@ -11,22 +11,17 @@ use Ibexa\Bundle\Core\Imagine\Filter\Loader\ReduceNoiseFilterLoader; use Imagine\Exception\NotSupportedException; use Imagine\Image\ImageInterface; -use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class ReduceNoiseFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $filter; - - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ReduceNoiseFilterLoader */ private ReduceNoiseFilterLoader $loader; protected function setUp(): void { parent::setUp(); - $this->filter = $this->createMock(FilterInterface::class); - $this->loader = new ReduceNoiseFilterLoader($this->filter); + $filter = $this->createMock(FilterInterface::class); + $this->loader = new ReduceNoiseFilterLoader($filter); } public function testLoadInvalidDriver(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php index 6ec42370a1..714f059d97 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php @@ -16,8 +16,7 @@ class ScaleDownOnlyFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleDownOnlyFilterLoader */ private ScaleDownOnlyFilterLoader $loader; diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php index 774683c5ff..241bda6be0 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php @@ -16,10 +16,8 @@ class ScaleExactFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleExactFilterLoader */ private ScaleExactFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php index 1ae0ea2d9a..967a26b845 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php @@ -17,10 +17,8 @@ class ScaleFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleFilterLoader */ private ScaleFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php index 35dfb68288..724f873f0c 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php @@ -16,10 +16,8 @@ class ScaleHeightDownOnlyFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightDownOnlyFilterLoader */ private ScaleHeightDownOnlyFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php index 0e4b406555..d9b081a37c 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php @@ -16,10 +16,8 @@ class ScaleHeightFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleHeightFilterLoader */ private ScaleHeightFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php index 36310382a7..2fd4049279 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php @@ -17,10 +17,8 @@ class ScalePercentFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScalePercentFilterLoader */ private ScalePercentFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php index f99b13cada..f476886e84 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php @@ -16,10 +16,8 @@ class ScaleWidthDownOnlyFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthDownOnlyFilterLoader */ private ScaleWidthDownOnlyFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php index 743cfa8ba8..47da6be52e 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php @@ -16,10 +16,8 @@ class ScaleWidthFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerLoader; + private LoaderInterface & MockObject $innerLoader; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\ScaleWidthFilterLoader */ private ScaleWidthFilterLoader $loader; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php index 9300fcd990..31e1ed5d82 100644 --- a/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php +++ b/tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php @@ -15,10 +15,8 @@ class SwirlFilterLoaderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $filter; + private FilterInterface & MockObject $filter; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\Loader\SwirlFilterLoader */ private SwirlFilterLoader $loader; protected function setUp(): void @@ -39,7 +37,7 @@ public function testLoadNoOption(): void ->expects(self::once()) ->method('apply') ->with($image) - ->will(self::returnValue($image)); + ->willReturn($image); self::assertSame($image, $this->loader->load($image)); } @@ -59,7 +57,7 @@ public function testLoadWithOption(int|float $degrees): void ->expects(self::once()) ->method('apply') ->with($image) - ->will(self::returnValue($image)); + ->willReturn($image); self::assertSame($image, $this->loader->load($image, [$degrees])); } diff --git a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php index c7c80df017..26b115d287 100644 --- a/tests/bundle/Core/Imagine/IORepositoryResolverTest.php +++ b/tests/bundle/Core/Imagine/IORepositoryResolverTest.php @@ -26,26 +26,15 @@ class IORepositoryResolverTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; - /** @var \Symfony\Component\Routing\RequestContext */ private RequestContext $requestContext; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Bundle\Core\Imagine\IORepositoryResolver */ private IORepositoryResolver $imageResolver; - /** @var \Ibexa\Bundle\Core\Imagine\Filter\FilterConfiguration */ - private FilterConfiguration $filterConfiguration; - - /** @var \Ibexa\Contracts\Core\Variation\VariationPurger|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $variationPurger; - - /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $variationPathGenerator; + private VariationPathGenerator & MockObject $variationPathGenerator; protected function setUp(): void { @@ -53,15 +42,15 @@ protected function setUp(): void $this->ioService = $this->createMock(IOServiceInterface::class); $this->requestContext = new RequestContext(); $this->configResolver = $this->createMock(ConfigResolverInterface::class); - $this->filterConfiguration = new FilterConfiguration(); - $this->filterConfiguration->setConfigResolver($this->configResolver); - $this->variationPurger = $this->createMock(VariationPurger::class); + $filterConfiguration = new FilterConfiguration(); + $filterConfiguration->setConfigResolver($this->configResolver); + $variationPurger = $this->createMock(VariationPurger::class); $this->variationPathGenerator = $this->createMock(VariationPathGenerator::class); $this->imageResolver = new IORepositoryResolver( $this->ioService, $this->requestContext, - $this->filterConfiguration, - $this->variationPurger, + $filterConfiguration, + $variationPurger, $this->variationPathGenerator ); } @@ -241,14 +230,13 @@ public function testStore(): void { $filter = 'thumbnail'; $path = 'Tardis/bigger/in-the-inside/RiverSong.jpg'; - $aliasPath = 'Tardis/bigger/in-the-inside/RiverSong_thumbnail.jpg'; $binary = new Binary('foo content', 'some/mime-type'); $createStruct = new BinaryFileCreateStruct(); $this->ioService ->expects(self::once()) ->method('newBinaryCreateStructFromLocalFile') - ->will(self::returnValue($createStruct)); + ->willReturn($createStruct); $this->ioService ->expects(self::once()) diff --git a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php index c780344d34..44abb67469 100644 --- a/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php @@ -22,17 +22,13 @@ class AliasGeneratorTest extends TestCase { - /** @var \Ibexa\Bundle\Core\Imagine\ImageAsset\AliasGenerator */ private AliasGenerator $aliasGenerator; - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerAliasGenerator; + private VariationHandler & MockObject $innerAliasGenerator; - /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentService; + private ContentService & MockObject $contentService; - /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $assetMapper; + private ImageAsset\AssetMapper & MockObject $assetMapper; protected function setUp(): void { diff --git a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php index 4876586811..64fb945718 100644 --- a/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php +++ b/tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php @@ -29,22 +29,17 @@ class PlaceholderAliasGeneratorTest extends TestCase { - /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderAliasGenerator */ private PlaceholderAliasGenerator $aliasGenerator; - /** @var \Ibexa\Contracts\Core\Variation\VariationHandler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerAliasGenerator; + private VariationHandler & MockObject $innerAliasGenerator; - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; - /** @var \Ibexa\Bundle\Core\Imagine\IORepositoryResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioResolver; + private IORepositoryResolver & MockObject $ioResolver; - /** @var \Ibexa\Bundle\Core\Imagine\PlaceholderProvider|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $placeholderProvider; + private PlaceholderProvider & MockObject $placeholderProvider; - /** @var array */ + /** @var array */ private array $placeholderOptions; protected function setUp(): void diff --git a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php index 10c40d91b8..06be4f3699 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php @@ -17,14 +17,11 @@ class ImageFileVariationPurgerTest extends TestCase { - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $ioServiceMock; + protected IOServiceInterface & MockObject $ioServiceMock; - /** @var \Ibexa\Contracts\Core\Variation\VariationPathGenerator|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $pathGeneratorMock; + protected VariationPathGenerator & MockObject $pathGeneratorMock; - /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileVariationPurger */ - protected $purger; + protected ImageFileVariationPurger $purger; protected function setUp(): void { diff --git a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php index 74dd6c18f7..3d4517f746 100644 --- a/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php +++ b/tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php @@ -17,35 +17,27 @@ class LegacyStorageImageFileListTest extends TestCase { - /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\ImageFileRowReader|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $rowReaderMock; + protected ImageFileRowReader & MockObject $rowReaderMock; - /** @var \Ibexa\Bundle\Core\Imagine\VariationPurger\LegacyStorageImageFileList */ - protected $fileList; - - /** @var \Ibexa\Core\IO\IOConfigProvider|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioConfigResolverMock; - - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolverMock; + protected LegacyStorageImageFileList $fileList; protected function setUp(): void { $this->rowReaderMock = $this->createMock(ImageFileRowReader::class); - $this->ioConfigResolverMock = $this->createMock(IOConfigProvider::class); - $this->ioConfigResolverMock + $ioConfigResolverMock = $this->createMock(IOConfigProvider::class); + $ioConfigResolverMock ->method('getLegacyUrlPrefix') ->willReturn('var/ibexa_demo_site/storage'); - $this->configResolverMock = $this->createMock(ConfigResolverInterface::class); - $this->configResolverMock + $configResolverMock = $this->createMock(ConfigResolverInterface::class); + $configResolverMock ->method('getParameter') ->with('image.published_images_dir') ->willReturn('images'); $this->fileList = new LegacyStorageImageFileList( $this->rowReaderMock, - $this->ioConfigResolverMock, - $this->configResolverMock + $ioConfigResolverMock, + $configResolverMock ); } @@ -75,9 +67,9 @@ public function testImageIdTransformation(): void private function configureRowReaderMock(array $fileList): void { - $mockInvocator = $this->rowReaderMock->expects(self::any())->method('getRow'); + $mockInvocator = $this->rowReaderMock->method('getRow'); call_user_func_array([$mockInvocator, 'willReturnOnConsecutiveCalls'], $fileList); - $this->rowReaderMock->expects(self::any())->method('getCount')->willReturn(count($fileList)); + $this->rowReaderMock->method('getCount')->willReturn(count($fileList)); } } diff --git a/tests/bundle/Core/Routing/DefaultRouterTest.php b/tests/bundle/Core/Routing/DefaultRouterTest.php index 816489fe23..2650cfef21 100644 --- a/tests/bundle/Core/Routing/DefaultRouterTest.php +++ b/tests/bundle/Core/Routing/DefaultRouterTest.php @@ -23,14 +23,11 @@ class DefaultRouterTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\DependencyInjection\ContainerInterface */ - protected MockObject $container; + protected MockObject & ContainerInterface $container; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - protected MockObject $configResolver; + protected MockObject & ConfigResolverInterface $configResolver; - /** @var \Symfony\Component\Routing\RequestContext */ - protected $requestContext; + protected RequestContext $requestContext; protected function setUp(): void { diff --git a/tests/bundle/Core/Routing/UrlAliasRouterTest.php b/tests/bundle/Core/Routing/UrlAliasRouterTest.php index 15787b4e81..fcf0d1ed92 100644 --- a/tests/bundle/Core/Routing/UrlAliasRouterTest.php +++ b/tests/bundle/Core/Routing/UrlAliasRouterTest.php @@ -24,23 +24,19 @@ class UrlAliasRouterTest extends BaseUrlAliasRouterTest { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; protected function setUp(): void { $this->configResolver = $this->createMock(ConfigResolverInterface::class); $this->configResolver - ->expects(self::any()) ->method('getParameter') - ->will( - self::returnValueMap( - [ - ['url_alias_router', null, null, true], - ['content.tree_root.location_id', null, null, null], - ['content.tree_root.excluded_uri_prefixes', null, null, []], - ] - ) + ->willReturnMap( + [ + ['url_alias_router', null, null, true], + ['content.tree_root.location_id', null, null, null], + ['content.tree_root.excluded_uri_prefixes', null, null, []], + ] ); parent::setUp(); } @@ -97,7 +93,7 @@ public function testMatchRequestWithRootLocation(): void $this->router->setRootLocationId($rootLocationId); $prefix = '/root/prefix'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) @@ -119,7 +115,7 @@ public function testMatchRequestWithRootLocation(): void ->with($prefix . $path) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -153,12 +149,12 @@ public function testMatchRequestLocationCaseRedirectWithRootLocation(): void $this->router->setRootLocationId($rootLocationId); $prefix = '/root/prefix'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) ->will(self::returnValue($prefix)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -211,7 +207,7 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation(): void $this->router->setRootLocationId($rootLocationId); $prefix = '/'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) @@ -233,7 +229,7 @@ public function testMatchRequestLocationCaseRedirectWithRootRootLocation(): void ->method('lookup') ->with($requestedPath) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -269,7 +265,7 @@ public function testMatchRequestResourceCaseRedirectWithRootLocation(): void $this->router->setRootLocationId($rootLocationId); $prefix = '/root/prefix'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) @@ -317,7 +313,7 @@ public function testMatchRequestVirtualCaseRedirectWithRootLocation(): void $this->router->setRootLocationId($rootLocationId); $prefix = '/root/prefix'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::exactly(2)) ->method('getPathPrefixByRootLocationId') ->with($rootLocationId) @@ -365,7 +361,7 @@ public function testMatchRequestWithRootLocationAndExclusion(): void $pathInfo = '/shared/content/foo-bar'; $destinationId = 789; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::any()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -385,7 +381,7 @@ public function testMatchRequestWithRootLocationAndExclusion(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); diff --git a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php index 04456c055f..fca4c4eb15 100644 --- a/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php +++ b/tests/bundle/Core/SiteAccess/Config/IOConfigResolverTest.php @@ -21,13 +21,11 @@ */ class IOConfigResolverTest extends TestCase { - private const DEFAULT_NAMESPACE = 'ibexa.site_access.config'; + private const string DEFAULT_NAMESPACE = 'ibexa.site_access.config'; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessService; + private SiteAccessService & MockObject $siteAccessService; protected function setUp(): void { diff --git a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php index f00c99e9a2..bc22e457f4 100644 --- a/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php +++ b/tests/bundle/Core/SiteAccess/MatcherBuilderTest.php @@ -20,8 +20,7 @@ */ class MatcherBuilderTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessMatcherRegistry; + private SiteAccessMatcherRegistryInterface & MockObject $siteAccessMatcherRegistry; protected function setUp(): void { @@ -29,6 +28,9 @@ protected function setUp(): void $this->siteAccessMatcherRegistry = $this->createMock(SiteAccessMatcherRegistryInterface::class); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testBuildMatcherNoService(): void { $this->siteAccessMatcherRegistry @@ -40,20 +42,9 @@ public function testBuildMatcherNoService(): void self::assertInstanceOf(get_class($matcher), $builtMatcher); } - public function testBuildMatcherServiceWrongInterface(): void - { - $this->expectException(\TypeError::class); - - $serviceId = 'foo'; - $this->siteAccessMatcherRegistry - ->expects(self::once()) - ->method('getMatcher') - ->with($serviceId) - ->will(self::returnValue($this->createMock(Matcher::class))); - $matcherBuilder = new MatcherBuilder($this->siteAccessMatcherRegistry); - $matcherBuilder->buildMatcher("@$serviceId", [], new SimplifiedRequest()); - } - + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testBuildMatcherService(): void { $serviceId = 'foo'; @@ -62,7 +53,7 @@ public function testBuildMatcherService(): void ->expects(self::once()) ->method('getMatcher') ->with($serviceId) - ->will(self::returnValue($matcher)); + ->willReturn($matcher); $matchingConfig = ['foo' => 'bar']; $request = new SimplifiedRequest(); diff --git a/tests/bundle/Core/URLChecker/URLCheckerTest.php b/tests/bundle/Core/URLChecker/URLCheckerTest.php index dcbc435af2..b02a918200 100644 --- a/tests/bundle/Core/URLChecker/URLCheckerTest.php +++ b/tests/bundle/Core/URLChecker/URLCheckerTest.php @@ -21,20 +21,16 @@ class URLCheckerTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\URLService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlService; + private URLService & MockObject $urlService; - /** @var \Ibexa\Bundle\Core\URLChecker\URLHandlerRegistryInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $handlerRegistry; + private URLHandlerRegistryInterface & MockObject $handlerRegistry; - /** @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $logger; + private LoggerInterface & MockObject $logger; protected function setUp(): void { $this->urlService = $this->createMock(URLService::class); $this->urlService - ->expects(self::any()) ->method('createUpdateStruct') ->willReturnCallback(static function (): URLUpdateStruct { return new URLUpdateStruct(); diff --git a/tests/bundle/IO/Migration/FileMigratorTest.php b/tests/bundle/IO/Migration/FileMigratorTest.php index c98cef10b2..91bd52c1fb 100644 --- a/tests/bundle/IO/Migration/FileMigratorTest.php +++ b/tests/bundle/IO/Migration/FileMigratorTest.php @@ -19,26 +19,19 @@ final class FileMigratorTest extends TestCase { - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $metadataHandlerRegistry; + private HandlerRegistry & MockObject $metadataHandlerRegistry; - /** @var \Ibexa\Bundle\IO\ApiLoader\HandlerRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $binaryHandlerRegistry; + private HandlerRegistry & MockObject $binaryHandlerRegistry; - /** @var \Ibexa\Bundle\IO\Migration\FileMigratorInterface */ private FileMigrator $fileMigrator; - /** @var \Ibexa\Core\IO\IOMetadataHandler\Flysystem */ - private MockObject $metadataFlysystem; + private IOMetadataHandler\Flysystem & MockObject $metadataFlysystem; - /** @var \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster */ - private MockObject $metadataLegacyDFSCluster; + private IOMetadataHandler\LegacyDFSCluster & MockObject $metadataLegacyDFSCluster; - /** @var \Ibexa\Core\IO\IOBinarydataHandler\Flysystem */ - private MockObject $binaryFlysystemFrom; + private IOBinarydataHandler & MockObject $binaryFlysystemFrom; - /** @var \Ibexa\Core\IO\IOBinarydataHandler\Flysystem */ - private MockObject $binaryFlysystemTo; + private IOBinarydataHandler & MockObject $binaryFlysystemTo; protected function setUp(): void { From ae192302792d6e5d53f6900d5b2f56a8b11f7f9e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 13:54:30 +0200 Subject: [PATCH 091/185] IBX-8471: [Composer] Added doctrine/annotations to "require" section JMS `DefaultPhpFileExtractor` extended by our `ExceptionMessageTemplateFileVisitor` relies on `DocParser` which was moved to the annotations package and discouraged in favor of PHP 8 Attributes --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 368c8457ce..cea2a82a93 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "ext-mbstring": "*", "ext-xsl": "*", "composer/package-versions-deprecated": "^1.11", + "doctrine/annotations": "^2.0", "doctrine/dbal": "^3.7.0", "doctrine/doctrine-bundle": "^2.11.0", "doctrine/orm": "^2.7", From f57922264e03fd2fc7a26a20d6d8ceb67ac8a7e2 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 14:07:04 +0200 Subject: [PATCH 092/185] IBX-8471: Resolved usages of deprecated Twig code --- src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php index e19ea5cc33..e1709f876b 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php +++ b/src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php @@ -118,7 +118,7 @@ private function renderContentField(Field $field, $fieldTypeIdentifier, array $p ); } $blockName = $this->getRenderFieldBlockName($fieldTypeIdentifier, $type); - $context = $this->twig->mergeGlobals($params); + $context = $params + $this->twig->getGlobals(); $blocks = $this->getBlocksByField($fieldTypeIdentifier, $type, $localTemplate); if (!$this->baseTemplate->hasBlock($blockName, $context, $blocks)) { @@ -159,7 +159,7 @@ private function renderFieldDefinition(FieldDefinition $fieldDefinition, array $ 'settings' => $fieldDefinition->getFieldSettings(), ]; $blockName = $this->getRenderFieldDefinitionBlockName($fieldDefinition->fieldTypeIdentifier, $type); - $context = $this->twig->mergeGlobals($params); + $context = $params + $this->twig->getGlobals(); $blocks = $this->getBlocksByFieldDefinition($fieldDefinition, $type); if (!$this->baseTemplate->hasBlock($blockName, $context, $blocks)) { From 5f23c8f053f60c8263167f988b46f49654e5748f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 14:18:11 +0200 Subject: [PATCH 093/185] IBX-9727: Fixed incorrect ValidationError values structure --- src/lib/FieldType/BinaryBase/Type.php | 3 +-- src/lib/Limitation/BlockingLimitationType.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/FieldType/BinaryBase/Type.php b/src/lib/FieldType/BinaryBase/Type.php index e36ad27188..b1491c4888 100644 --- a/src/lib/FieldType/BinaryBase/Type.php +++ b/src/lib/FieldType/BinaryBase/Type.php @@ -13,7 +13,6 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; use Ibexa\Core\FieldType\FieldType; -use Ibexa\Core\FieldType\Media\Value; use Ibexa\Core\FieldType\ValidationError; use Ibexa\Core\FieldType\Value as BaseValue; @@ -344,7 +343,7 @@ public function validateValidatorConfiguration($validatorConfiguration) '%validator%' => $validatorIdentifier, '%parameter%' => 'maxFileSize', '%type%' => 'integer', - "[$validatorIdentifier][maxFileSize]", + '%path%' => "[$validatorIdentifier][maxFileSize]", ] ); } diff --git a/src/lib/Limitation/BlockingLimitationType.php b/src/lib/Limitation/BlockingLimitationType.php index e03b281af9..95818d97a9 100644 --- a/src/lib/Limitation/BlockingLimitationType.php +++ b/src/lib/Limitation/BlockingLimitationType.php @@ -82,7 +82,7 @@ public function validate(APILimitationValue $limitationValue): array "\$limitationValue->limitationValues => '%value%' can not be empty", null, [ - 'value' => $limitationValue->limitationValues, + 'value' => implode(', ', $limitationValue->limitationValues), ] ); } From f1921b63d7491800da887eb26b6d9495aa4b7b25 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:33:21 +0200 Subject: [PATCH 094/185] IBX-9727: Fixed strict types in DirectFragmentRenderer.php --- src/bundle/Core/Fragment/DirectFragmentRenderer.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bundle/Core/Fragment/DirectFragmentRenderer.php b/src/bundle/Core/Fragment/DirectFragmentRenderer.php index 244f85d48c..904eaeda80 100644 --- a/src/bundle/Core/Fragment/DirectFragmentRenderer.php +++ b/src/bundle/Core/Fragment/DirectFragmentRenderer.php @@ -109,12 +109,11 @@ protected function getFragmentUri( } /** - * @param string|\Symfony\Component\HttpKernel\Controller\ControllerReference $uri - * * @throws \Ibexa\Core\MVC\Symfony\Templating\Exception\InvalidResponseException + * @throws \Ibexa\Core\MVC\Exception\NoViewTemplateException */ public function render( - $uri, + string|ControllerReference $uri, Request $request, array $options = [] ): Response { From 7bc03fbc7dc270abeb6b49b155aea0a2beef063d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:41:13 +0200 Subject: [PATCH 095/185] IBX-9727: Fixed strict types of MVC\Symfony layer classes --- src/lib/MVC/Symfony/Security/UserWrapped.php | 4 +- .../Symfony/SiteAccess/Matcher/Compound.php | 2 +- .../Symfony/SiteAccess/Matcher/HostText.php | 2 +- .../Symfony/SiteAccess/Matcher/URIText.php | 2 +- .../Extension/FieldRenderingExtension.php | 2 +- src/lib/MVC/Symfony/View/BaseView.php | 41 ++++--------------- src/lib/MVC/Symfony/View/ContentView.php | 2 +- src/lib/MVC/Symfony/View/View.php | 20 +++------ 8 files changed, 23 insertions(+), 52 deletions(-) diff --git a/src/lib/MVC/Symfony/Security/UserWrapped.php b/src/lib/MVC/Symfony/Security/UserWrapped.php index 8ef7b213e4..86d4bcf3d5 100644 --- a/src/lib/MVC/Symfony/Security/UserWrapped.php +++ b/src/lib/MVC/Symfony/Security/UserWrapped.php @@ -22,7 +22,7 @@ * * It has two properties: * - wrappedUser: containing the originally matched user. - * - apiUser: containing the API User (the one from the eZ Repository ) + * - apiUser: containing the API User (the one from the Ibexa Repository) */ class UserWrapped implements ReferenceUserInterface, EquatableInterface { @@ -52,7 +52,9 @@ public function setAPIUser(APIUser $apiUser): void public function getAPIUser(): APIUser { + /** @phpstan-ignore isset.initializedProperty */ if (!isset($this->apiUser)) { + // occurs when used serialize/deserialize functions on an instance of UserWrapped throw new LogicException( 'Attempted to get APIUser before it has been set by UserProvider, APIUser is not serialized to session' ); diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php index bc69625b56..6040f7744e 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php @@ -33,7 +33,7 @@ abstract class Compound implements CompoundInterface, URILexer * Matchers' map. * Consists of an array of matchers, grouped by ruleset (so an array of an array of matchers). * - * @phpstan-var array, \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher>> + * @phpstan-var array | literal-string, \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher>> */ protected array $matchersMap; diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php index fad2a25bad..55f2a70c5b 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/HostText.php @@ -29,7 +29,7 @@ public function getName(): string public function setRequest(SimplifiedRequest $request): void { - if (!$this->element) { + if (!isset($this->element)) { $this->setMatchElement((string)$request->getHost()); } diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php index 5f5671677a..835f1bd319 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/URIText.php @@ -30,7 +30,7 @@ public function getName(): string public function setRequest(SimplifiedRequest $request): void { - if (!$this->element) { + if (!isset($this->element)) { $this->setMatchElement((string)$request->getPathInfo()); } diff --git a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php index 5817df7e8a..e7d819fbaf 100644 --- a/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php +++ b/src/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtension.php @@ -45,7 +45,7 @@ public function __construct( $this->translationHelper = $translationHelper; } - public function getFunctions() + public function getFunctions(): array { $renderFieldCallable = function (Environment $environment, Content|ContentAwareInterface $data, $fieldIdentifier, array $params = []) { $this->fieldBlockRenderer->setTwig($environment); diff --git a/src/lib/MVC/Symfony/View/BaseView.php b/src/lib/MVC/Symfony/View/BaseView.php index 87a80f4ba1..88f566e66d 100644 --- a/src/lib/MVC/Symfony/View/BaseView.php +++ b/src/lib/MVC/Symfony/View/BaseView.php @@ -37,15 +37,14 @@ abstract class BaseView implements View /** * @phpstan-param string|(\Closure(array):string) $templateIdentifier * - * @param string|\Closure $templateIdentifier Valid path to the template. Can also be a closure. - * @param string $viewType - * @param array $parameters Hash of parameters to pass to the template/closure. + * @param string|\Closure|null $templateIdentifier Valid path to the template. Can also be a closure. + * @param array $parameters Hash of parameters to pass to the template/closure. * - * @throws \Ibexa\Core\Base\Exceptions\InvalidArgumentType + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function __construct($templateIdentifier = null, array $parameters = [], $viewType = 'full') + public function __construct(string|\Closure|null $templateIdentifier = null, array $parameters = [], string $viewType = 'full') { - if (isset($templateIdentifier)) { + if (null !== $templateIdentifier) { $this->setTemplateIdentifier($templateIdentifier); } @@ -53,40 +52,22 @@ public function __construct($templateIdentifier = null, array $parameters = [], $this->parameters = $parameters; } - /** - * @param array $parameters Hash of parameters to pass to the template/closure - */ public function setParameters(array $parameters): void { $this->parameters = $parameters; } - /** - * Adds a hash of parameters to the existing parameters. - * - * @param array $parameters - */ public function addParameters(array $parameters): void { $this->parameters = array_replace($this->parameters, $parameters); } - /** - * @return array - */ - public function getParameters() + public function getParameters(): array { return $this->getInternalParameters() + $this->parameters; } - /** - * Checks if $parameterName exists. - * - * @param string $parameterName - * - * @return bool - */ - public function hasParameter($parameterName) + public function hasParameter(string $parameterName): bool { return isset($this->parameters[$parameterName]); } @@ -95,13 +76,9 @@ public function hasParameter($parameterName) * Returns parameter value by $parameterName. * Throws an \InvalidArgumentException if $parameterName is not set. * - * @param string $parameterName - * - * @throws \InvalidArgumentException - * - * @return mixed + *@throws \InvalidArgumentException */ - public function getParameter($parameterName) + public function getParameter(string $parameterName): mixed { if ($this->hasParameter($parameterName)) { return $this->parameters[$parameterName]; diff --git a/src/lib/MVC/Symfony/View/ContentView.php b/src/lib/MVC/Symfony/View/ContentView.php index ac5e1fd080..c029808b6e 100644 --- a/src/lib/MVC/Symfony/View/ContentView.php +++ b/src/lib/MVC/Symfony/View/ContentView.php @@ -37,7 +37,7 @@ * } * */ -class ContentView extends BaseView implements View, ContentValueView, LocationValueView, EmbedView, CachableView +class ContentView extends BaseView implements ContentValueView, LocationValueView, EmbedView, CachableView { private ?Content $content = null; diff --git a/src/lib/MVC/Symfony/View/View.php b/src/lib/MVC/Symfony/View/View.php index 1da8611ad7..e16cee1e2d 100644 --- a/src/lib/MVC/Symfony/View/View.php +++ b/src/lib/MVC/Symfony/View/View.php @@ -51,44 +51,36 @@ public function getTemplateIdentifier(); * Sets $parameters that will later be injected to the template/closure. * If some parameters were already present, $parameters will replace them. * - * @param array $parameters Hash of parameters + * @param array $parameters Hash of parameters to pass to the template/closure */ public function setParameters(array $parameters); /** * Adds a hash of parameters to the existing parameters. * - * @param array $parameters + * @param array $parameters */ public function addParameters(array $parameters); /** * Returns registered parameters. * - * @return array + * @return array */ - public function getParameters(); + public function getParameters(): array; /** * Checks if $parameterName exists. - * - * @param string $parameterName - * - * @return bool */ - public function hasParameter($parameterName); + public function hasParameter(string $parameterName): bool; /** * Returns parameter value by $parameterName. * Throws an \InvalidArgumentException if $parameterName is not set. * - * @param string $parameterName - * * @throws \InvalidArgumentException - * - * @return mixed */ - public function getParameter($parameterName); + public function getParameter(string $parameterName): mixed; /** * Injects the config hash that was used to match and generate the current view. From 80fe0594e1414fc28de42e09827ab349a26b3932 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:50:49 +0200 Subject: [PATCH 096/185] IBX-9727: Fixed strict types of QueryType SortSpecLexer --- .../BuiltIn/SortSpec/SortSpecLexer.php | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php index cf938ec073..00a85c5575 100644 --- a/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php +++ b/src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php @@ -8,14 +8,16 @@ namespace Ibexa\Core\QueryType\BuiltIn\SortSpec; +use LogicException; + final class SortSpecLexer implements SortSpecLexerInterface { - private const K_ASC = 'asc'; - private const K_DESC = 'desc'; + private const string K_ASC = 'asc'; + private const string K_DESC = 'desc'; - private const ID_PATTERN = '[a-zA-Z_][a-zA-Z0-9_]*'; - private const FLOAT_PATTERN = '-?[0-9]+\.[0-9]+'; - private const INT_PATTERN = '-?[0-9]+'; + private const string ID_PATTERN = '[a-zA-Z_][a-zA-Z0-9_]*'; + private const string FLOAT_PATTERN = '-?[0-9]+\.[0-9]+'; + private const string INT_PATTERN = '-?[0-9]+'; private ?string $input = null; @@ -24,12 +26,13 @@ final class SortSpecLexer implements SortSpecLexerInterface private ?int $position = null; - /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\Token|null */ - private $current; + private ?Token $current; - /** @var \Ibexa\Core\QueryType\BuiltIn\SortSpec\Token|null */ - private $next; + private ?Token $next; + /** + * @return iterable<\Ibexa\Core\QueryType\BuiltIn\SortSpec\Token> + */ public function getAll(): iterable { return $this->tokens; @@ -39,6 +42,9 @@ public function consume(): Token { $this->current = $this->next; $this->next = $this->tokens[++$this->position] ?? null; + if (null === $this->current) { + throw new LogicException('SortSpecLexer: current token is null'); + } return $this->current; } @@ -55,6 +61,10 @@ public function peek(): ?Token public function getInput(): string { + if (null === $this->input) { + throw new LogicException('SortSpecLexer: input is not set'); + } + return $this->input; } @@ -81,7 +91,7 @@ public function tokenize(string $input): void } $this->tokens[] = new Token(Token::TYPE_EOF); - $this->next = $this->tokens[0] ?? null; + $this->next = $this->tokens[0]; } private function reset(): void @@ -91,6 +101,9 @@ private function reset(): void $this->current = null; } + /** + * @phpstan-return list}> + */ private function split(string $input): array { $regexp = sprintf( @@ -104,7 +117,12 @@ private function split(string $input): array $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; - return preg_split($regexp, $input, -1, $flags); + $split = preg_split($regexp, $input, -1, $flags); + if (false === $split) { + throw new LogicException('SortSpecLexer: failed to split input'); + } + + return $split; } private function getTokenType(string $value): string From 7b3f47ae2f938f2b815f6a11815c22f1aabf4ebb Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:51:51 +0200 Subject: [PATCH 097/185] IBX-9727: [Tests] Fixed strict types of Core Bundle tests --- .../Core/Fragment/DirectFragmentRendererTest.php | 15 ++++++--------- .../Imagine/Cache/Resolver/ProxyResolverTest.php | 1 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php index 57becf6b5c..b5553cdf0f 100644 --- a/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php +++ b/tests/bundle/Core/Fragment/DirectFragmentRendererTest.php @@ -14,6 +14,7 @@ use Ibexa\Core\MVC\Symfony\Templating\Exception\InvalidResponseException; use Ibexa\Core\MVC\Symfony\View\ContentView; use Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -83,7 +84,6 @@ public function testControllerResponse(): void $directFragmentRenderer = $this->getDirectFragmentRenderer($controllerResolver); $response = $directFragmentRenderer->render('', new Request(), []); - self::assertInstanceOf(Response::class, $response); self::assertSame('response_body', $response->getContent()); } @@ -95,8 +95,10 @@ public function testControllerViewResponse(): void $controllerResolverMock = $this->getControllerResolverInterfaceMock(); $controllerResolverMock ->method('getController') - ->willReturn(static function (...$args) use ($contentView): \Ibexa\Core\MVC\Symfony\View\ContentView { - $contentView->setParameters($args); + ->willReturn(static function (?Request $request = null) use ($contentView): ContentView { + if ($request !== null) { + $contentView->setParameters($request->attributes->all()); + } return $contentView; }); @@ -114,7 +116,6 @@ public function testControllerViewResponse(): void ); $response = $directFragmentRenderer->render('', new Request(), []); - self::assertInstanceOf(Response::class, $response); self::assertSame('rendered_template_identifier', $response->getContent()); } @@ -131,7 +132,6 @@ public function testControllerStringResponse(): void $directFragmentRenderer = $this->getDirectFragmentRenderer($controllerResolver); $response = $directFragmentRenderer->render('', new Request(), []); - self::assertInstanceOf(Response::class, $response); self::assertSame('some_prerendered_response', $response->getContent()); } @@ -160,10 +160,7 @@ private function getControllerResolverInterfaceMock(): ControllerResolverInterfa return $this->createMock(ControllerResolverInterface::class); } - /** - * @return \Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer|\PHPUnit\Framework\MockObject\MockObject - */ - private function getTemplateRendererMock(): TemplateRenderer + private function getTemplateRendererMock(): TemplateRenderer & MockObject { return $this->createMock(TemplateRenderer::class); } diff --git a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php index a7b70b3e42..c136eaf57c 100644 --- a/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php +++ b/tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php @@ -16,6 +16,7 @@ final class ProxyResolverTest extends TestCase { private const string RESOLVED_PATH_URI = 'https://ibexa.co/var/site/storage/images/_aliases/medium/7/4/2/0/247-1-eng-GB/img_0885.jpg'; + private ResolverInterface & MockObject $resolver; private string $path; From a779740ff7893f3398014e44ded1d3ce92f42c84 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:52:13 +0200 Subject: [PATCH 098/185] IBX-9727: [Tests] Fixed strict types of IO Bundle tests --- tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php index 984e4f1d9c..a409070663 100644 --- a/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php +++ b/tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php @@ -20,7 +20,7 @@ class IbexaIOExtensionTest extends AbstractExtensionTestCase { - private const FIXTURES_DIR = __DIR__ . '/../_fixtures'; + private const string FIXTURES_DIR = __DIR__ . '/../_fixtures'; protected function getContainerExtensions(): array { From 088c2f8bd55a99bc02e36177cf8292a42f91e430 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:54:15 +0200 Subject: [PATCH 099/185] IBX-9727: [Tests] Fixed strict types of FieldType integration tests --- .../Core/Repository/FieldType/BaseIntegrationTest.php | 11 +++++++---- .../FieldType/DateAndTimeIntegrationTest.php | 5 +---- .../Repository/FieldType/FloatIntegrationTest.php | 4 ++-- .../Core/Repository/FieldType/TimeIntegrationTest.php | 7 ++----- .../Core/Repository/FieldType/UserIntegrationTest.php | 4 ++-- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php index fff0883967..1aa8973459 100644 --- a/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php @@ -912,7 +912,7 @@ public function testCopiedExternalData(Field $field): void /** * @depends testCopyField */ - public function testDeleteContent($content): void + public function testDeleteContent(): void { $this->expectException(NotFoundException::class); @@ -942,15 +942,18 @@ public function testCreateContentFails($failingValue, ?string $expectedException /** * Tests failing content update. * - * @param mixed $failingValue - * @param string $expectedException + * @phpstan-param class-string<\Throwable> $expectedException + * + * @phpstan-return list}> * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, string $expectedException): void + public function testUpdateContentFails(mixed $failingValue, string $expectedException): array { $this->expectException($expectedException); $this->updateContent($failingValue); + + return []; } protected function removeFieldDefinition() diff --git a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php index 2699ebbe09..2ab907f9b1 100644 --- a/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php @@ -219,12 +219,9 @@ public function provideInvalidUpdateFieldData() /** * Tests failing content update. * - * @param mixed $failingValue - * @param string $expectedException - * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, $expectedException): array + public function testUpdateContentFails(mixed $failingValue, string $expectedException): array { return [ [ diff --git a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php index 539e2a180f..3c53a0f82a 100644 --- a/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php @@ -310,8 +310,8 @@ protected function getValidSearchValueTwo(): float return 25.59; } - public function checkFullTextSupport(): bool + public function checkFullTextSupport(): void { - return false; + self::markTestSkipped('Full text search is not supported for float field type'); } } diff --git a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php index f8c2ddbf7f..32f36fa5c0 100644 --- a/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php @@ -214,12 +214,9 @@ public function provideInvalidUpdateFieldData() /** * Tests failing content update. * - * @param mixed $failingValue - * @param string $expectedException - * * @dataProvider provideInvalidUpdateFieldData */ - public function testUpdateContentFails($failingValue, $expectedException): array + public function testUpdateContentFails(mixed $failingValue, string $expectedException): array { return [ [ @@ -229,7 +226,7 @@ public function testUpdateContentFails($failingValue, $expectedException): array } /** - * Asserts the the field data was loaded correctly. + * Asserts the field data was loaded correctly. * * Asserts that the data provided by {@link getValidCreationFieldData()} * was copied and loaded correctly. diff --git a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php index 5896ba2d7f..c19e9179fc 100644 --- a/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php +++ b/tests/integration/Core/Repository/FieldType/UserIntegrationTest.php @@ -451,12 +451,12 @@ public function testRemoveFieldDefinition(): void self::assertNull($content->getFieldValue($userFieldDefinition->identifier)); } - public function testAddFieldDefinition() + public function testAddFieldDefinition(): void { // Field cannot be added to ContentType with existing content. $this->expectException(BadStateException::class); - return parent::testAddFieldDefinition(); + parent::testAddFieldDefinition(); } /** From 112bd3f0ff64b9238912b63dc27ffa294866d569 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:55:01 +0200 Subject: [PATCH 100/185] IBX-8471: [Tests] Aligned Kernel TestCase with Symfony 7 --- tests/integration/RepositoryInstaller/TestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/RepositoryInstaller/TestCase.php b/tests/integration/RepositoryInstaller/TestCase.php index d614b1fb8e..d4bf2f5213 100644 --- a/tests/integration/RepositoryInstaller/TestCase.php +++ b/tests/integration/RepositoryInstaller/TestCase.php @@ -13,7 +13,7 @@ abstract class TestCase extends IbexaKernelTestCase { /** Necessary to allow multiple Kernel classes */ - protected static $class; + protected static ?string $class; protected static function getKernelClass(): string { From ebd5740acf91d3e27855d2994bf1d5287fb06c89 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:55:44 +0200 Subject: [PATCH 101/185] IBX-9727: [Tests] Fixed strict types in BackwardCompatibleIteratorTest --- .../BackwardCompatibleIteratorTest.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php index d2707b1ba4..9a1a639861 100644 --- a/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php +++ b/tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIteratorTest.php @@ -15,14 +15,12 @@ final class BackwardCompatibleIteratorTest extends TestCase { - private const EXAMPLE_SERVICE_TAG = 'current_tag'; - private const EXAMPLE_DEPRECATED_SERVICE_TAG = 'deprecated_tag'; + private const string EXAMPLE_SERVICE_TAG = 'current_tag'; + private const string EXAMPLE_DEPRECATED_SERVICE_TAG = 'deprecated_tag'; - /** @var \Ibexa\Tests\Core\Base\Container\Compiler\TaggedServiceIdsIterator\DeprecationErrorCollector */ private DeprecationErrorCollector $deprecationErrorCollector; - /** @var \Symfony\Component\DependencyInjection\TaggedContainerInterface */ - private MockObject $container; + private TaggedContainerInterface & MockObject $container; protected function setUp(): void { From 6ea2067f5b7d83a389b21f3dc00ac78d98e86431 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 15:57:23 +0200 Subject: [PATCH 102/185] IBX-9727: [Tests] Fixed strict types in Generic field type test classes --- tests/lib/FieldType/Generic/GenericTest.php | 35 ++++++++++++++----- .../SymfonySerializerAdapterTest.php | 17 ++++----- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/tests/lib/FieldType/Generic/GenericTest.php b/tests/lib/FieldType/Generic/GenericTest.php index 37385ce126..e71e08f539 100644 --- a/tests/lib/FieldType/Generic/GenericTest.php +++ b/tests/lib/FieldType/Generic/GenericTest.php @@ -24,11 +24,9 @@ class GenericTest extends BaseFieldTypeTestCase { - /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private ValueSerializerInterface $serializer; + private ValueSerializerInterface & MockObject $serializer; - /** @var \Symfony\Component\Validator\Validator\ValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $validator; + private ValidatorInterface & MockObject $validator; protected function setUp(): void { @@ -78,11 +76,17 @@ protected function createFieldTypeUnderTest(): Type return new GenericFieldTypeStub($this->serializer, $this->validator); } + /** + * @return array{} + */ protected function getValidatorConfigurationSchemaExpectation(): array { return []; } + /** + * @return array{} + */ protected function getSettingsSchemaExpectation(): array { return []; @@ -93,6 +97,9 @@ protected function getEmptyValueExpectation(): Value return new GenericFieldValueStub(); } + /** + * @phpstan-return list + */ public function provideInvalidInputForAcceptValue(): array { return [ @@ -103,6 +110,9 @@ public function provideInvalidInputForAcceptValue(): array ]; } + /** + * @phpstan-return list + */ public function provideValidInputForAcceptValue(): array { return [ @@ -121,6 +131,9 @@ public function provideValidInputForAcceptValue(): array ]; } + /** + * @phpstan-return list + */ public function provideInputForToHash(): array { return [ @@ -135,6 +148,9 @@ public function provideInputForToHash(): array ]; } + /** + * @phpstan-return list + */ public function provideInputForFromHash(): array { return [ @@ -149,6 +165,9 @@ public function provideInputForFromHash(): array ]; } + /** + * @phpstan-return list, string}> + */ public function provideDataForGetName(): array { return [ @@ -156,14 +175,14 @@ public function provideDataForGetName(): array ]; } - private function createSerializerMock(): ValueSerializerInterface + private function createSerializerMock(): ValueSerializerInterface & MockObject { $serializer = $this->createMock(ValueSerializerInterface::class); $serializer ->method('decode') ->willReturnCallback(static function (string $json) { - return json_decode($json, true); + return json_decode($json, true, 512, JSON_THROW_ON_ERROR); }); $serializer @@ -176,8 +195,8 @@ private function createSerializerMock(): ValueSerializerInterface $serializer ->method('denormalize') - ->willReturnCallback(function (array $data, string $valueClass): Value { - $this->assertEquals($valueClass, GenericFieldValueStub::class); + ->willReturnCallback(static function (array $data, string $valueClass): Value { + self::assertEquals(GenericFieldValueStub::class, $valueClass); return new GenericFieldValueStub($data['value']); }); diff --git a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php index 8048a5a14e..ad3534d250 100644 --- a/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php +++ b/tests/lib/FieldType/Generic/ValueSerializer/SymfonySerializerAdapterTest.php @@ -19,22 +19,17 @@ class SymfonySerializerAdapterTest extends TestCase { - private const TEST_FORMAT = 'csv'; - private const TEST_CONTEXT = ['foo' => 'bar']; + private const string TEST_FORMAT = 'csv'; + private const array TEST_CONTEXT = ['foo' => 'bar']; - /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $normalizer; + private NormalizerInterface & MockObject $normalizer; - /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $denomalizer; + private DenormalizerInterface & MockObject $denomalizer; - /** @var \Symfony\Component\Serializer\Encoder\EncoderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $encoder; + private EncoderInterface & MockObject $encoder; - /** @var \Symfony\Component\Serializer\Encoder\DecoderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $decoder; + private DecoderInterface & MockObject $decoder; - /** @var \Ibexa\Core\FieldType\ValueSerializer\SymfonySerializerAdapter */ private SymfonySerializerAdapter $adapter; protected function setUp(): void From e2ba6809bf9609c608abe55f91a599897c8b635e Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 16:02:09 +0200 Subject: [PATCH 103/185] IBX-9727: [Tests] Fixed strict types in field type test classes --- tests/lib/FieldType/APIFieldTypeTest.php | 4 +- tests/lib/FieldType/Image/IO/LegacyTest.php | 10 +-- .../FieldType/ImageAsset/AssetMapperTest.php | 85 +++++++++---------- tests/lib/FieldType/ImageAssetTest.php | 15 ++-- tests/lib/FieldType/RelationListTest.php | 14 ++- tests/lib/FieldType/RelationTest.php | 11 ++- 6 files changed, 62 insertions(+), 77 deletions(-) diff --git a/tests/lib/FieldType/APIFieldTypeTest.php b/tests/lib/FieldType/APIFieldTypeTest.php index 363765af55..5672df1844 100644 --- a/tests/lib/FieldType/APIFieldTypeTest.php +++ b/tests/lib/FieldType/APIFieldTypeTest.php @@ -17,10 +17,8 @@ class APIFieldTypeTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $innerFieldType; + private SPIFieldType & MockObject $innerFieldType; - /** @var \Ibexa\Core\Repository\Values\ContentType\FieldType */ private FieldType $fieldType; protected function setUp(): void diff --git a/tests/lib/FieldType/Image/IO/LegacyTest.php b/tests/lib/FieldType/Image/IO/LegacyTest.php index c927fc790f..a7c81eda49 100644 --- a/tests/lib/FieldType/Image/IO/LegacyTest.php +++ b/tests/lib/FieldType/Image/IO/LegacyTest.php @@ -20,21 +20,17 @@ class LegacyTest extends TestCase { /** @var \Ibexa\Core\FieldType\Image\IO\Legacy */ - protected $service; + protected LegacyIOService $service; /** * Internal IOService instance for published images. - * - * @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $publishedIoServiceMock; + protected MockObject & IOServiceInterface $publishedIoServiceMock; /** * Internal IOService instance for draft images. - * - * @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $draftIoServiceMock; + protected MockObject & IOServiceInterface $draftIoServiceMock; protected function setUp(): void { diff --git a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php index 7870c19b41..a61ca71ed0 100644 --- a/tests/lib/FieldType/ImageAsset/AssetMapperTest.php +++ b/tests/lib/FieldType/ImageAsset/AssetMapperTest.php @@ -28,20 +28,17 @@ class AssetMapperTest extends TestCase { - public const EXAMPLE_CONTENT_ID = 487; + public const int EXAMPLE_CONTENT_ID = 487; - /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentService; + private MockObject & ContentService $contentService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationService; + private MockObject & LocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentTypeService; + private MockObject & ContentTypeService $contentTypeService; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private ConfigResolverInterface $configResolver; + private MockObject & ConfigResolverInterface $configResolver; + /** @var array */ private array $mappings = [ 'content_type_identifier' => 'image', 'content_field_identifier' => 'image', @@ -82,15 +79,20 @@ public function testCreateAsset(): void ->with($contentType, $languageCode) ->willReturn($contentCreateStruct); - $contentCreateStruct - ->expects(self::at(0)) - ->method('setField') - ->with($this->mappings['name_field_identifier'], $name); + $expectedCalls = [ + [$this->mappings['name_field_identifier'], $name], + [$this->mappings['content_field_identifier'], $value], + ]; + $callCount = 0; $contentCreateStruct - ->expects(self::at(1)) + ->expects(self::exactly(2)) ->method('setField') - ->with($this->mappings['content_field_identifier'], $value); + ->willReturnCallback(static function ($fieldIdentifier, $fieldValue) use ($expectedCalls, &$callCount) { + self::assertEquals($expectedCalls[$callCount][0], $fieldIdentifier); + self::assertEquals($expectedCalls[$callCount][1], $fieldValue); + ++$callCount; + }); $this->locationService ->expects(self::once()) @@ -114,10 +116,14 @@ public function testCreateAsset(): void $mapper->createAsset($name, $value, $languageCode); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testGetAssetField(): void { $expectedValue = new Field(); - $content = $this->createContentWithId(self::EXAMPLE_CONTENT_ID); + $content = $this->createExampleContent(); $mapper = $this->createPartialMapper(['isAsset']); $mapper @@ -135,22 +141,6 @@ public function testGetAssetField(): void self::assertEquals($expectedValue, $mapper->getAssetField($content)); } - public function testGetAssetFieldThrowsInvalidArgumentException(): void - { - $this->expectException(InvalidArgumentException::class); - - $content = $this->createContentWithId(self::EXAMPLE_CONTENT_ID); - - $mapper = $this->createPartialMapper(['isAsset']); - $mapper - ->expects(self::once()) - ->method('isAsset') - ->with($content) - ->willReturn(false); - - $mapper->getAssetField($content); - } - public function testGetAssetFieldDefinition(): void { $fieldDefinition = new FieldDefinition(); @@ -171,10 +161,14 @@ public function testGetAssetFieldDefinition(): void self::assertEquals($fieldDefinition, $this->createMapper()->getAssetFieldDefinition()); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testGetAssetValue(): void { $expectedValue = new Image\Value(); - $content = $this->createContentWithId(self::EXAMPLE_CONTENT_ID); + $content = $this->createExampleContent(); $mapper = $this->createPartialMapper(['isAsset']); $mapper @@ -192,11 +186,14 @@ public function testGetAssetValue(): void self::assertEquals($expectedValue, $mapper->getAssetValue($content)); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException + */ public function testGetAssetValueThrowsInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); - $content = $this->createContentWithId(self::EXAMPLE_CONTENT_ID); + $content = $this->createExampleContent(); $mapper = $this->createPartialMapper(['isAsset']); $mapper @@ -210,6 +207,8 @@ public function testGetAssetValueThrowsInvalidArgumentException(): void /** * @dataProvider dataProviderForIsAsset + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException */ public function testIsAsset(int $contentContentTypeId, int $assetContentTypeId, bool $expected): void { @@ -278,7 +277,10 @@ private function createMapper(): AssetMapper ); } - private function createPartialMapper(array $methods = []): AssetMapper + /** + * @param array $methods + */ + private function createPartialMapper(array $methods = []): AssetMapper & MockObject { return $this ->getMockBuilder(AssetMapper::class) @@ -291,18 +293,17 @@ private function createPartialMapper(array $methods = []): AssetMapper ->disableOriginalClone() ->disableArgumentCloning() ->disallowMockingUnknownTypes() - ->setMethods($methods) + ->onlyMethods($methods) ->getMock(); } - private function createContentWithId(int $id): Content + private function createExampleContent(): Content & MockObject { $content = $this->createMock(Content::class); $content - ->expects(self::any()) ->method('__get') ->with('id') - ->willReturn($id); + ->willReturn(self::EXAMPLE_CONTENT_ID); return $content; } @@ -315,7 +316,6 @@ private function createContentWithContentType(int $contentTypeId): Content $content = $this->createMock(Content::class); $content - ->expects(self::any()) ->method('__get') ->with('contentInfo') ->willReturn($contentInfo); @@ -323,10 +323,7 @@ private function createContentWithContentType(int $contentTypeId): Content return $content; } - /** - * @return \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject - */ - private function mockConfigResolver(): ConfigResolverInterface + private function mockConfigResolver(): ConfigResolverInterface & MockObject { $mock = $this->createMock(ConfigResolverInterface::class); $mock diff --git a/tests/lib/FieldType/ImageAssetTest.php b/tests/lib/FieldType/ImageAssetTest.php index 3340c0d941..b65118aa11 100644 --- a/tests/lib/FieldType/ImageAssetTest.php +++ b/tests/lib/FieldType/ImageAssetTest.php @@ -9,7 +9,7 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; -use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; +use Ibexa\Contracts\Core\Persistence\Content\Handler as PersistenceContentHandler; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Values\Content\Content; @@ -30,16 +30,13 @@ */ class ImageAssetTest extends FieldTypeTestCase { - private const DESTINATION_CONTENT_ID = 14; + private const int DESTINATION_CONTENT_ID = 14; - /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentServiceMock; + private ContentService & MockObject $contentServiceMock; - /** @var \Ibexa\Core\FieldType\ImageAsset\AssetMapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $assetMapperMock; + private ImageAsset\AssetMapper & MockObject $assetMapperMock; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentHandlerMock; + private PersistenceContentHandler & MockObject $contentHandlerMock; /** * {@inheritdoc} @@ -50,7 +47,7 @@ protected function setUp(): void $this->contentServiceMock = $this->createMock(ContentService::class); $this->assetMapperMock = $this->createMock(ImageAsset\AssetMapper::class); - $this->contentHandlerMock = $this->createMock(SPIContentHandler::class); + $this->contentHandlerMock = $this->createMock(PersistenceContentHandler::class); $versionInfo = new VersionInfo([ 'versionNo' => 24, 'names' => [ diff --git a/tests/lib/FieldType/RelationListTest.php b/tests/lib/FieldType/RelationListTest.php index dcbec9aa29..a097baa0a7 100644 --- a/tests/lib/FieldType/RelationListTest.php +++ b/tests/lib/FieldType/RelationListTest.php @@ -8,7 +8,7 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; -use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; +use Ibexa\Contracts\Core\Persistence\Content\Handler as PersistenceContentHandler; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Relation; @@ -21,14 +21,12 @@ class RelationListTest extends FieldTypeTestCase { - private const DESTINATION_CONTENT_ID_14 = 14; - private const DESTINATION_CONTENT_ID_22 = 22; + private PersistenceContentHandler & MockObject $contentHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler */ - private MockObject $contentHandler; + private TargetContentValidatorInterface & MockObject $targetContentValidator; - /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $targetContentValidator; + private const int DESTINATION_CONTENT_ID_14 = 14; + private const int DESTINATION_CONTENT_ID_22 = 22; protected function setUp(): void { @@ -67,7 +65,7 @@ protected function setUp(): void ['mainLanguageCode', 'en_GB'], ]); - $this->contentHandler = $this->createMock(SPIContentHandler::class); + $this->contentHandler = $this->createMock(PersistenceContentHandler::class); $this->contentHandler ->method('loadContentInfo') ->willReturnMap([ diff --git a/tests/lib/FieldType/RelationTest.php b/tests/lib/FieldType/RelationTest.php index ec5e0b8102..f986df3dcc 100644 --- a/tests/lib/FieldType/RelationTest.php +++ b/tests/lib/FieldType/RelationTest.php @@ -8,7 +8,7 @@ namespace Ibexa\Tests\Core\FieldType; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; -use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; +use Ibexa\Contracts\Core\Persistence\Content\Handler as PersistenceContentHandler; use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Relation; @@ -23,12 +23,11 @@ class RelationTest extends FieldTypeTestCase { - private const DESTINATION_CONTENT_ID = 14; + private const int DESTINATION_CONTENT_ID = 14; - private MockObject $contentHandler; + private PersistenceContentHandler & MockObject $contentHandler; - /** @var \Ibexa\Core\Repository\Validator\TargetContentValidatorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $targetContentValidator; + private TargetContentValidatorInterface & MockObject $targetContentValidator; protected function setUp(): void { @@ -50,7 +49,7 @@ protected function setUp(): void ['mainLanguageCode', 'en_GB'], ]); - $this->contentHandler = $this->createMock(SPIContentHandler::class); + $this->contentHandler = $this->createMock(PersistenceContentHandler::class); $this->contentHandler ->method('loadContentInfo') ->with(self::DESTINATION_CONTENT_ID) From 027ab9a2fb1841b654304ea43728b4e76076aa4c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 16:09:23 +0200 Subject: [PATCH 104/185] IBX-9727: [Tests] Fixed strict types in Helper classes unit test cases --- tests/lib/Helper/ContentPreviewHelperTest.php | 7 +- tests/lib/Helper/FieldHelperTest.php | 7 +- .../Helper/PreviewLocationProviderTest.php | 13 +- tests/lib/Helper/TranslationHelperTest.php | 130 ++++++++---------- 4 files changed, 70 insertions(+), 87 deletions(-) diff --git a/tests/lib/Helper/ContentPreviewHelperTest.php b/tests/lib/Helper/ContentPreviewHelperTest.php index 14f630f877..18b120c9bb 100644 --- a/tests/lib/Helper/ContentPreviewHelperTest.php +++ b/tests/lib/Helper/ContentPreviewHelperTest.php @@ -20,13 +20,10 @@ class ContentPreviewHelperTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $eventDispatcher; + private MockObject & EventDispatcherInterface $eventDispatcher; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessRouter; + private MockObject & SiteAccessRouterInterface $siteAccessRouter; - /** @var \Ibexa\Core\Helper\ContentPreviewHelper */ private ContentPreviewHelper $previewHelper; protected function setUp(): void diff --git a/tests/lib/Helper/FieldHelperTest.php b/tests/lib/Helper/FieldHelperTest.php index 7794833f27..d69365b7f5 100644 --- a/tests/lib/Helper/FieldHelperTest.php +++ b/tests/lib/Helper/FieldHelperTest.php @@ -23,14 +23,11 @@ class FieldHelperTest extends TestCase { - /** @var \Ibexa\Core\Helper\FieldHelper */ private FieldHelper $fieldHelper; - /** @var \Ibexa\Contracts\Core\Repository\FieldTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $fieldTypeServiceMock; + private MockObject & FieldTypeService $fieldTypeServiceMock; - /** @var \Ibexa\Core\Helper\TranslationHelper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $translationHelper; + private MockObject & TranslationHelper $translationHelper; protected function setUp(): void { diff --git a/tests/lib/Helper/PreviewLocationProviderTest.php b/tests/lib/Helper/PreviewLocationProviderTest.php index 30c18fddd2..493d6cfeae 100644 --- a/tests/lib/Helper/PreviewLocationProviderTest.php +++ b/tests/lib/Helper/PreviewLocationProviderTest.php @@ -7,7 +7,7 @@ namespace Ibexa\Tests\Core\Helper; -use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as SPILocationHandler; +use Ibexa\Contracts\Core\Persistence\Content\Location\Handler as PersistenceLocationHandler; use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo as APIContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location as APILocation; @@ -20,13 +20,10 @@ class PreviewLocationProviderTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationService; + private LocationService & MockObject $locationService; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationHandler; + private PersistenceLocationHandler & MockObject $locationHandler; - /** @var \Ibexa\Core\Helper\PreviewLocationProvider */ private PreviewLocationProvider $provider; protected function setUp(): void @@ -34,7 +31,7 @@ protected function setUp(): void parent::setUp(); $this->locationService = $this->createMock(LocationService::class); - $this->locationHandler = $this->createMock(SPILocationHandler::class); + $this->locationHandler = $this->createMock(PersistenceLocationHandler::class); $this->provider = new PreviewLocationProvider($this->locationService, $this->locationHandler); } @@ -52,7 +49,7 @@ public function testGetPreviewLocationDraft(): void ->expects(self::once()) ->method('loadParentLocationsForDraftContent') ->with($contentId) - ->will(self::returnValue([new Location(['id' => $parentLocationId])])); + ->willReturn([new Location(['id' => $parentLocationId])]); $location = $this->provider->loadMainLocationByContent($content); self::assertInstanceOf(APILocation::class, $location); diff --git a/tests/lib/Helper/TranslationHelperTest.php b/tests/lib/Helper/TranslationHelperTest.php index a44b1fa213..789bf3ca6b 100644 --- a/tests/lib/Helper/TranslationHelperTest.php +++ b/tests/lib/Helper/TranslationHelperTest.php @@ -10,6 +10,7 @@ use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\Helper\TranslationHelper; use Ibexa\Core\Repository\Values\Content\Content; @@ -20,20 +21,14 @@ class TranslationHelperTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\ContentService */ - private MockObject $contentService; + private ContentService & MockObject $contentService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $logger; + private LoggerInterface & MockObject $logger; - /** @var \Ibexa\Core\Helper\TranslationHelper */ private TranslationHelper $translationHelper; - private array $siteAccessByLanguages; - /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Field[] */ private array $translatedFields; @@ -46,7 +41,7 @@ protected function setUp(): void $this->configResolver = $this->createMock(ConfigResolverInterface::class); $this->contentService = $this->createMock(ContentService::class); $this->logger = $this->createMock(LoggerInterface::class); - $this->siteAccessByLanguages = [ + $siteAccessByLanguages = [ 'fre-FR' => ['fre'], 'eng-GB' => ['my_siteaccess', 'eng'], 'esl-ES' => ['esl', 'mex'], @@ -55,7 +50,7 @@ protected function setUp(): void $this->translationHelper = new TranslationHelper( $this->configResolver, $this->contentService, - $this->siteAccessByLanguages, + $siteAccessByLanguages, $this->logger ); $this->translatedNames = [ @@ -85,10 +80,7 @@ private function generateContent(): Content ); } - /** - * @return \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo - */ - private function generateVersionInfo(): VersionInfo + private function generateVersionInfo(): APIVersionInfo { return new VersionInfo( [ @@ -101,7 +93,7 @@ private function generateVersionInfo(): VersionInfo /** * @dataProvider getTranslatedNameProvider * - * @param array $prioritizedLanguages + * @param array $prioritizedLanguages * @param string $expectedLocale */ public function testGetTranslatedName(array $prioritizedLanguages, string $expectedLocale): void @@ -111,7 +103,7 @@ public function testGetTranslatedName(array $prioritizedLanguages, string $expec ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will(self::returnValue($prioritizedLanguages)); + ->willReturn($prioritizedLanguages); self::assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentName($content)); } @@ -119,7 +111,7 @@ public function testGetTranslatedName(array $prioritizedLanguages, string $expec /** * @dataProvider getTranslatedNameProvider * - * @param array $prioritizedLanguages + * @param array $prioritizedLanguages * @param string $expectedLocale */ public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, string $expectedLocale): void @@ -130,17 +122,20 @@ public function testGetTranslatedNameByContentInfo(array $prioritizedLanguages, ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will(self::returnValue($prioritizedLanguages)); + ->willReturn($prioritizedLanguages); $this->contentService ->expects(self::once()) ->method('loadVersionInfo') ->with($contentInfo) - ->will(self::returnValue($versionInfo)); + ->willReturn($versionInfo); self::assertSame($this->translatedNames[$expectedLocale], $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo)); } + /** + * @phpstan-return list, string}> + */ public function getTranslatedNameProvider(): array { return [ @@ -164,7 +159,7 @@ public function testGetTranslatedNameByContentInfoForcedLanguage(): void ->expects(self::exactly(2)) ->method('loadVersionInfo') ->with($contentInfo) - ->will(self::returnValue($versionInfo)); + ->willReturn($versionInfo); self::assertSame('My name in english', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-GB')); self::assertSame('Mon nom en français', $this->translationHelper->getTranslatedContentNameByContentInfo($contentInfo, 'eng-US')); @@ -209,7 +204,7 @@ public function testGetTranslatedNameForcedLanguage(): void /** * @dataProvider getTranslatedFieldProvider * - * @param array $prioritizedLanguages + * @param array $prioritizedLanguages * @param string $expectedLocale */ public function getTranslatedField(array $prioritizedLanguages, string $expectedLocale): void @@ -219,20 +214,17 @@ public function getTranslatedField(array $prioritizedLanguages, string $expected ->expects(self::once()) ->method('getParameter') ->with('languages') - ->will(self::returnValue($prioritizedLanguages)); + ->willReturn($prioritizedLanguages); self::assertSame($this->translatedFields[$expectedLocale], $this->translationHelper->getTranslatedField($content, 'test')); } + /** + * @phpstan-return list, string}> + */ public function getTranslatedFieldProvider(): array { - return [ - [['fre-FR', 'eng-GB'], 'fre-FR'], - [['esl-ES', 'fre-FR'], 'esl-ES'], - [['eng-US', 'heb-IL'], 'heb-IL'], - [['eng-US', 'eng-GB'], 'eng-GB'], - [['eng-US', 'ger-DE'], 'fre-FR'], - ]; + return $this->getTranslatedNameProvider(); } public function testGetTranslationSiteAccessUnkownLanguage(): void @@ -240,13 +232,11 @@ public function testGetTranslationSiteAccessUnkownLanguage(): void $this->configResolver ->expects(self::exactly(2)) ->method('getParameter') - ->will( - self::returnValueMap( - [ - ['translation_siteaccesses', null, null, []], - ['related_siteaccesses', null, null, []], - ] - ) + ->willReturnMap( + [ + ['translation_siteaccesses', null, null, []], + ['related_siteaccesses', null, null, []], + ] ); $this->logger @@ -258,24 +248,32 @@ public function testGetTranslationSiteAccessUnkownLanguage(): void /** * @dataProvider getTranslationSiteAccessProvider + * + * @param string[] $translationSiteAccesses + * @param string[] $relatedSiteAccesses */ - public function testGetTranslationSiteAccess(string $language, array $translationSiteAccesses, array $relatedSiteAccesses, ?string $expectedResult): void - { + public function testGetTranslationSiteAccess( + string $language, + array $translationSiteAccesses, + array $relatedSiteAccesses, + ?string $expectedResult + ): void { $this->configResolver ->expects(self::exactly(2)) ->method('getParameter') - ->will( - self::returnValueMap( - [ - ['translation_siteaccesses', null, null, $translationSiteAccesses], - ['related_siteaccesses', null, null, $relatedSiteAccesses], - ] - ) + ->willReturnMap( + [ + ['translation_siteaccesses', null, null, $translationSiteAccesses], + ['related_siteaccesses', null, null, $relatedSiteAccesses], + ] ); self::assertSame($expectedResult, $this->translationHelper->getTranslationSiteAccess($language)); } + /** + * @phpstan-return list, array, string|null}> + */ public function getTranslationSiteAccessProvider(): array { return [ @@ -297,18 +295,15 @@ public function getTranslationSiteAccessProvider(): array public function testGetAvailableLanguagesWithTranslationSiteAccesses(): void { $this->configResolver - ->expects(self::any()) ->method('getParameter') - ->will( - self::returnValueMap( - [ - ['translation_siteaccesses', null, null, ['fre', 'esl']], - ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], - ['languages', null, null, ['eng-GB']], - ['languages', null, 'fre', ['fre-FR', 'eng-GB']], - ['languages', null, 'esl', ['esl-ES', 'fre-FR', 'eng-GB']], - ] - ) + ->willReturnMap( + [ + ['translation_siteaccesses', null, null, ['fre', 'esl']], + ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], + ['languages', null, null, ['eng-GB']], + ['languages', null, 'fre', ['fre-FR', 'eng-GB']], + ['languages', null, 'esl', ['esl-ES', 'fre-FR', 'eng-GB']], + ] ); $expectedLanguages = ['eng-GB', 'esl-ES', 'fre-FR']; @@ -318,19 +313,16 @@ public function testGetAvailableLanguagesWithTranslationSiteAccesses(): void public function testGetAvailableLanguagesWithoutTranslationSiteAccesses(): void { $this->configResolver - ->expects(self::any()) ->method('getParameter') - ->will( - self::returnValueMap( - [ - ['translation_siteaccesses', null, null, []], - ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], - ['languages', null, null, ['eng-GB']], - ['languages', null, 'fre', ['fre-FR', 'eng-GB']], - ['languages', null, 'esl', ['esl-ES', 'fre-FR', 'eng-GB']], - ['languages', null, 'heb', ['heb-IL', 'eng-GB']], - ] - ) + ->willReturnMap( + [ + ['translation_siteaccesses', null, null, []], + ['related_siteaccesses', null, null, ['fre', 'esl', 'heb']], + ['languages', null, null, ['eng-GB']], + ['languages', null, 'fre', ['fre-FR', 'eng-GB']], + ['languages', null, 'esl', ['esl-ES', 'fre-FR', 'eng-GB']], + ['languages', null, 'heb', ['heb-IL', 'eng-GB']], + ] ); $expectedLanguages = ['eng-GB', 'esl-ES', 'fre-FR', 'heb-IL']; From ef005a97c29c940db427f73e8364bd8061c2ef6f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 22 Apr 2025 16:10:19 +0200 Subject: [PATCH 105/185] IBX-9727: [Tests] Fixed strict types for IO layer unit tests classes --- .../lib/IO/ConfigScopeChangeAwareIOServiceTest.php | 13 +++++-------- tests/lib/IO/FilePathNormalizer/FlysystemTest.php | 4 +--- tests/lib/IO/IOMetadataHandler/FlysystemTest.php | 4 +--- .../IO/IOMetadataHandler/LegacyDFSClusterTest.php | 10 +++------- 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php index 781b4a4b3b..2e1c5a0b85 100644 --- a/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php +++ b/tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php @@ -19,17 +19,14 @@ final class ConfigScopeChangeAwareIOServiceTest extends TestCase { - protected const PREFIX = 'test-prefix'; - protected const PREFIX_PARAMETER_NAME = 'param'; + protected const string PREFIX = 'test-prefix'; + protected const string PREFIX_PARAMETER_NAME = 'param'; - /** @var \Ibexa\Core\IO\ConfigScopeChangeAwareIOService */ - protected $ioService; + protected ConfigScopeChangeAwareIOService $ioService; - /** @var \Ibexa\Core\IO\ConfigScopeChangeAwareIOService|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $innerIOService; + private IOServiceInterface & MockObject $innerIOService; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; protected function setUp(): void { diff --git a/tests/lib/IO/FilePathNormalizer/FlysystemTest.php b/tests/lib/IO/FilePathNormalizer/FlysystemTest.php index ad8698e538..14b6b0e2cd 100644 --- a/tests/lib/IO/FilePathNormalizer/FlysystemTest.php +++ b/tests/lib/IO/FilePathNormalizer/FlysystemTest.php @@ -16,11 +16,9 @@ final class FlysystemTest extends TestCase { - /** @var \Ibexa\Core\IO\FilePathNormalizer\Flysystem */ private Flysystem $filePathNormalizer; - /** @var \Ibexa\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $slugConverter; + private SlugConverter & MockObject $slugConverter; public function setUp(): void { diff --git a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php index e607f2d634..f0517a06a2 100644 --- a/tests/lib/IO/IOMetadataHandler/FlysystemTest.php +++ b/tests/lib/IO/IOMetadataHandler/FlysystemTest.php @@ -19,11 +19,9 @@ class FlysystemTest extends TestCase { - /** @var \Ibexa\Core\IO\IOMetadataHandler|\PHPUnit\Framework\MockObject\MockObject */ private Flysystem $handler; - /** @var \League\Flysystem\FilesystemOperator|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $filesystem; + private FilesystemOperator & MockObject $filesystem; protected function setUp(): void { diff --git a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php index 9951407284..a342351994 100644 --- a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php +++ b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php @@ -23,17 +23,13 @@ class LegacyDFSClusterTest extends TestCase { - /** @var \Ibexa\Core\IO\IOMetadataHandler&\PHPUnit\Framework\MockObject\MockObject */ private LegacyDFSCluster $handler; - /** @var \Doctrine\DBAL\Connection&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $dbalMock; + private Connection & MockObject $dbalMock; - /** @var \Doctrine\DBAL\Query\QueryBuilder&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $qbMock; + private QueryBuilder & MockObject $qbMock; - /** @var \Ibexa\Core\IO\UrlDecorator&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlDecoratorMock; + private UrlDecorator & MockObject $urlDecoratorMock; protected function setUp(): void { From dcda4b2134047da1b750082bcb5ab33737d0d2d0 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 23 Apr 2025 17:04:27 +0200 Subject: [PATCH 106/185] IBX-9727: [Tests] Fixed strict types for SA Matcher tests and refactored code --- .../Serializer/MapNormalizerTest.php | 1 + .../{BaseTest.php => BaseTestCase.php} | 53 +++--- .../Matcher/ContentBased/DepthTest.php | 23 +-- .../Matcher/ContentBased/Id/ContentTest.php | 4 +- .../ContentBased/Id/ContentTypeGroupTest.php | 169 ++++++++---------- .../ContentBased/Id/ContentTypeTest.php | 4 +- .../Matcher/ContentBased/Id/LocationTest.php | 4 +- .../ContentBased/Id/ParentContentTypeTest.php | 4 +- .../ContentBased/Id/ParentLocationTest.php | 4 +- .../Matcher/ContentBased/Id/RemoteTest.php | 4 +- .../Matcher/ContentBased/Id/SectionTest.php | 4 +- .../Identifier/ContentTypeTest.php | 104 ++++------- .../Identifier/ParentContentTypeTest.php | 4 +- .../ContentBased/Identifier/SectionTest.php | 4 +- .../ContentBased/MultipleValuedTest.php | 2 +- .../Matcher/ContentBased/UrlAliasTest.php | 6 +- ...yConfiguredMatcherFactoryDecoratorTest.php | 6 +- 17 files changed, 158 insertions(+), 242 deletions(-) rename tests/lib/MVC/Symfony/Matcher/ContentBased/{BaseTest.php => BaseTestCase.php} (68%) diff --git a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php index e507124a21..e605db860b 100644 --- a/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php +++ b/tests/lib/MVC/Symfony/Component/Serializer/MapNormalizerTest.php @@ -27,6 +27,7 @@ public function testNormalization(): void 'key' => 'foo', 'map' => [], 'reverseMap' => [], + 'type' => $matcher::class, ], $normalizer->normalize($matcher) ); diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTestCase.php similarity index 68% rename from tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php rename to tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTestCase.php index 96b636cf7d..ae524444c9 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTestCase.php @@ -16,12 +16,12 @@ use Ibexa\Core\Repository\Permission\LimitationService; use Ibexa\Core\Repository\Permission\PermissionResolver; use Ibexa\Core\Repository\Repository; +use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; -abstract class BaseTest extends TestCase +abstract class BaseTestCase extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected $repositoryMock; + protected Repository & MockObject $repositoryMock; protected function setUp(): void { @@ -30,11 +30,9 @@ protected function setUp(): void } /** - * @param array $matchingConfig - * - * @return \PHPUnit\Framework\MockObject\MockObject + * @param array $matchingConfig */ - protected function getPartiallyMockedViewProvider(array $matchingConfig = []) + protected function getPartiallyMockedViewProvider(array $matchingConfig = []): Configured & MockObject { return $this ->getMockBuilder(Configured::class) @@ -44,35 +42,27 @@ protected function getPartiallyMockedViewProvider(array $matchingConfig = []) $matchingConfig, ] ) - ->setMethods(['getMatcher']) + ->onlyMethods(['getMatcher']) ->getMock(); } - /** - * @return \PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryMock() + protected function getRepositoryMock(): Repository & MockObject { - $repositoryClass = Repository::class; + $repositoryMock = $this->createMock(Repository::class); - return $this - ->getMockBuilder($repositoryClass) - ->disableOriginalConstructor() - ->setMethods( - array_diff( - get_class_methods($repositoryClass), - ['sudo'] - ) - ) - ->getMock(); + $repositoryMock->method('sudo')->willReturnCallback( + static function (callable $callback) use ($repositoryMock): mixed { + return $callback($repositoryMock); + } + ); + + return $repositoryMock; } /** - * @param array $properties - * - * @return \PHPUnit\Framework\MockObject\MockObject + * @param array $properties */ - protected function getLocationMock(array $properties = []) + protected function getLocationMock(array $properties = []): Location & MockObject { return $this ->getMockBuilder(Location::class) @@ -81,11 +71,9 @@ protected function getLocationMock(array $properties = []) } /** - * @param array $properties - * - * @return \PHPUnit\Framework\MockObject\MockObject + * @param array $properties */ - protected function getContentInfoMock(array $properties = []) + protected function getContentInfoMock(array $properties = []): ContentInfo & MockObject { return $this-> getMockBuilder(ContentInfo::class) @@ -93,7 +81,7 @@ protected function getContentInfoMock(array $properties = []) ->getMockForAbstractClass(); } - protected function getPermissionResolverMock() + protected function getPermissionResolverMock(): PermissionResolver & MockObject { $configResolverMock = $this->createMock(ConfigResolverInterface::class); $configResolverMock @@ -103,7 +91,6 @@ protected function getPermissionResolverMock() return $this ->getMockBuilder(PermissionResolver::class) - ->setMethods(null) ->setConstructorArgs( [ $this->createMock(RoleDomainMapper::class), diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php index 98f0442fa6..b3a380ed40 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php @@ -12,8 +12,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth as DepthMatcher; +use PHPUnit\Framework\MockObject\MockObject; -class DepthTest extends BaseTest +class DepthTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Depth */ private Depth $matcher; @@ -124,33 +125,23 @@ public function matchContentInfoProvider(): array } /** - * Returns a Repository mock configured to return the appropriate Location object with given parent location Id. - * - * @param int $depth - * - * @return \PHPUnit\Framework\MockObject\MockObject + * Returns a Repository mock configured to return the appropriate Location object with the given parent location Id. */ - private function generateRepositoryMockForDepth(int $depth) + private function generateRepositoryMockForDepth(int $depth): Repository & MockObject { $locationServiceMock = $this->createMock(LocationService::class); $locationServiceMock->expects(self::once()) ->method('loadLocation') ->with(42) - ->will( - self::returnValue( - $this->getLocationMock(['depth' => $depth]) - ) + ->willReturn( + $this->getLocationMock(['depth' => $depth]) ); $repository = $this->getRepositoryMock(); $repository ->expects(self::once()) ->method('getLocationService') - ->will(self::returnValue($locationServiceMock)); - $repository - ->expects(self::once()) - ->method('getPermissionResolver') - ->will(self::returnValue($this->getPermissionResolverMock())); + ->willReturn($locationServiceMock); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php index f268edf72e..23f0f11cec 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content as ContentIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class ContentTest extends BaseTest +class ContentTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Content */ private Content $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php index 03938bef84..9a418ea101 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php @@ -9,14 +9,18 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeGroup; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup as ContentTypeGroupIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; +use PHPUnit\Framework\MockObject\MockObject; -class ContentTypeGroupTest extends BaseTest +/** + * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup + */ +class ContentTypeGroupTest extends BaseTestCase { - /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup */ private ContentTypeGroupIdMatcher $matcher; protected function setUp(): void @@ -28,14 +32,9 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider * - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup::matchLocation - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig - * * @param int|int[] $matchingConfig - * @param \Ibexa\Contracts\Core\Repository\Repository $repository - * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult): void + public function testMatchLocation(array|int $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -46,52 +45,24 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider(): array + /** + * @phpstan-return iterable, \Ibexa\Contracts\Core\Repository\Repository, bool}> + */ + public function matchLocationProvider(): iterable { - $data = []; - - $data[] = [ - 123, - $this->generateRepositoryMockForContentTypeGroupId(123), - true, - ]; - - $data[] = [ - 123, - $this->generateRepositoryMockForContentTypeGroupId(456), - false, - ]; - - $data[] = [ - [123, 789], - $this->generateRepositoryMockForContentTypeGroupId(456), - false, - ]; - - $data[] = [ - [123, 789], - $this->generateRepositoryMockForContentTypeGroupId(789), - true, - ]; - - return $data; + return $this->getDataForMatchProvider(); } /** * Generates a Location mock. - * - * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateLocationMock() + private function generateLocationMock(): Location & MockObject { $location = $this->getLocationMock(); $location - ->expects(self::any()) ->method('getContentInfo') - ->will( - self::returnValue( - $this->getContentInfoMock(['contentTypeId' => 42]) - ) + ->willReturn( + $this->getContentInfoMock(['contentTypeId' => 42]) ); return $location; @@ -100,14 +71,9 @@ private function generateLocationMock() /** * @dataProvider matchContentInfoProvider * - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentTypeGroup::matchContentInfo - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig - * * @param int|int[] $matchingConfig - * @param \Ibexa\Contracts\Core\Repository\Repository $repository - * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult): void + public function testMatchContentInfo(array|int $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -118,74 +84,79 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider(): array + /** + * @phpstan-return iterable, \Ibexa\Contracts\Core\Repository\Repository, bool}> + */ + public function matchContentInfoProvider(): iterable { - $data = []; - - $data[] = [ - 123, - $this->generateRepositoryMockForContentTypeGroupId(123), - true, - ]; - - $data[] = [ - 123, - $this->generateRepositoryMockForContentTypeGroupId(456), - false, - ]; - - $data[] = [ - [123, 789], - $this->generateRepositoryMockForContentTypeGroupId(456), - false, - ]; - - $data[] = [ - [123, 789], - $this->generateRepositoryMockForContentTypeGroupId(789), - true, - ]; - - return $data; + return $this->getDataForMatchProvider(); } /** - * Returns a Repository mock configured to return the appropriate Location object with given parent location Id. - * - * @param int $contentTypeGroupId - * - * @return \PHPUnit\Framework\MockObject\MockObject + * Returns a Repository mock configured to return the appropriate Location object with the given parent location Id. */ - private function generateRepositoryMockForContentTypeGroupId(int $contentTypeGroupId) + private function generateRepositoryMockForContentTypeGroupId(int $contentTypeGroupId): Repository & MockObject { $contentTypeServiceMock = $this->createMock(ContentTypeService::class); $contentTypeMock = $this->getMockForAbstractClass(ContentType::class); $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(42) - ->will(self::returnValue($contentTypeMock)); + ->willReturn($contentTypeMock); $contentTypeMock->expects(self::once()) ->method('getContentTypeGroups') - ->will( - self::returnValue( - [ - // First a group that will never match, then the right group. - // This ensures to test even if the content type belongs to several groups at once. - $this->getMockForAbstractClass(ContentTypeGroup::class), - $this - ->getMockBuilder(ContentTypeGroup::class) - ->setConstructorArgs([['id' => $contentTypeGroupId]]) - ->getMockForAbstractClass(), - ] - ) + ->willReturn( + [ + // First a group that will never match, then the right group. + // This ensures testing it even if the content type belongs to several groups at once. + $this->getMockForAbstractClass(ContentTypeGroup::class), + $this + ->getMockBuilder(ContentTypeGroup::class) + ->setConstructorArgs([['id' => $contentTypeGroupId]]) + ->getMockForAbstractClass(), + ] ); $repository = $this->getRepositoryMock(); $repository ->expects(self::once()) ->method('getContentTypeService') - ->will(self::returnValue($contentTypeServiceMock)); + ->willReturn($contentTypeServiceMock); return $repository; } + + /** + * @return iterable, + * \Ibexa\Contracts\Core\Repository\Repository, + * bool + * }> + */ + private function getDataForMatchProvider(): iterable + { + yield [ + 123, + $this->generateRepositoryMockForContentTypeGroupId(123), + true, + ]; + + yield [ + 123, + $this->generateRepositoryMockForContentTypeGroupId(456), + false, + ]; + + yield [ + [123, 789], + $this->generateRepositoryMockForContentTypeGroupId(456), + false, + ]; + + yield [ + [123, 789], + $this->generateRepositoryMockForContentTypeGroupId(789), + true, + ]; + } } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php index 28b95f08f9..ae6d239fc8 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType as ContentTypeIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class ContentTypeTest extends BaseTest +class ContentTypeTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ContentType */ private ContentType $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php index ac49ebf1b1..a847add496 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php @@ -10,9 +10,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Location as LocationIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class LocationTest extends BaseTest +class LocationTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Location */ private LocationIdMatcher $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php index 45ee288337..2fddb4597a 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentContentType as ParentContentTypeMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class ParentContentTypeTest extends BaseTest +class ParentContentTypeTest extends BaseTestCase { private const EXAMPLE_LOCATION_ID = 54; private const EXAMPLE_PARENT_LOCATION_ID = 2; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php index 1a2bd39937..922c75f068 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php @@ -12,9 +12,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation as ParentLocationIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class ParentLocationTest extends BaseTest +class ParentLocationTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\ParentLocation */ private ParentLocation $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php index 18622d9311..a0959bc1d1 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote as RemoteIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class RemoteTest extends BaseTest +class RemoteTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Remote */ private Remote $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php index 778d04a77b..176774eb4b 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php @@ -11,9 +11,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section as SectionIdMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class SectionTest extends BaseTest +class SectionTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Id\Section */ private Section $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php index b1ca1f6637..d255373c2f 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php @@ -9,13 +9,17 @@ use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType as ContentTypeIdentifierMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; +use PHPUnit\Framework\MockObject\MockObject; -class ContentTypeTest extends BaseTest +/** + * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType + */ +class ContentTypeTest extends BaseTestCase { - /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType */ private ContentTypeIdentifierMatcher $matcher; protected function setUp(): void @@ -27,14 +31,9 @@ protected function setUp(): void /** * @dataProvider matchLocationProvider * - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType::matchLocation - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig - * * @param string|string[] $matchingConfig - * @param \Ibexa\Contracts\Core\Repository\Repository $repository - * @param bool $expectedResult */ - public function testMatchLocation($matchingConfig, Repository $repository, $expectedResult): void + public function testMatchLocation(array|string $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -45,52 +44,54 @@ public function testMatchLocation($matchingConfig, Repository $repository, $expe ); } - public function matchLocationProvider(): array + /** + * @phpstan-return iterable + */ + public function getDataForMatchProvider(): iterable { - $data = []; - - $data[] = [ + yield [ 'foo', $this->generateRepositoryMockForContentTypeIdentifier('foo'), true, ]; - $data[] = [ + yield [ 'foo', $this->generateRepositoryMockForContentTypeIdentifier('bar'), false, ]; - $data[] = [ + yield [ ['foo', 'baz'], $this->generateRepositoryMockForContentTypeIdentifier('bar'), false, ]; - $data[] = [ + yield [ ['foo', 'baz'], $this->generateRepositoryMockForContentTypeIdentifier('baz'), true, ]; + } - return $data; + /** + * @phpstan-return iterable + */ + public function matchLocationProvider(): iterable + { + return $this->getDataForMatchProvider(); } /** * Generates a Location object in respect of a given content type identifier. - * - * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateLocationMock() + private function generateLocationMock(): Location & MockObject { $location = $this->getLocationMock(); $location - ->expects(self::any()) ->method('getContentInfo') - ->will( - self::returnValue( - $this->getContentInfoMock(['contentTypeId' => 42]) - ) + ->willReturn( + $this->getContentInfoMock(['contentTypeId' => 42]) ); return $location; @@ -99,14 +100,9 @@ private function generateLocationMock() /** * @dataProvider matchContentInfoProvider * - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ContentType::matchLocation - * @covers \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued::setMatchingConfig - * * @param string|string[] $matchingConfig - * @param \Ibexa\Contracts\Core\Repository\Repository $repository - * @param bool $expectedResult */ - public function testMatchContentInfo($matchingConfig, Repository $repository, $expectedResult): void + public function testMatchContentInfo(array|string $matchingConfig, Repository $repository, bool $expectedResult): void { $this->matcher->setRepository($repository); $this->matcher->setMatchingConfig($matchingConfig); @@ -119,45 +115,18 @@ public function testMatchContentInfo($matchingConfig, Repository $repository, $e ); } - public function matchContentInfoProvider(): array + /** + * @phpstan-return iterable + */ + public function matchContentInfoProvider(): iterable { - $data = []; - - $data[] = [ - 'foo', - $this->generateRepositoryMockForContentTypeIdentifier('foo'), - true, - ]; - - $data[] = [ - 'foo', - $this->generateRepositoryMockForContentTypeIdentifier('bar'), - false, - ]; - - $data[] = [ - ['foo', 'baz'], - $this->generateRepositoryMockForContentTypeIdentifier('bar'), - false, - ]; - - $data[] = [ - ['foo', 'baz'], - $this->generateRepositoryMockForContentTypeIdentifier('baz'), - true, - ]; - - return $data; + return $this->getDataForMatchProvider(); } /** * Returns a Repository mock configured to return the appropriate ContentType object with given identifier. - * - * @param int $contentTypeIdentifier - * - * @return \PHPUnit\Framework\MockObject\MockObject */ - private function generateRepositoryMockForContentTypeIdentifier(string $contentTypeIdentifier) + private function generateRepositoryMockForContentTypeIdentifier(string $contentTypeIdentifier): Repository & MockObject { $contentTypeMock = $this ->getMockBuilder(ContentType::class) @@ -169,15 +138,14 @@ private function generateRepositoryMockForContentTypeIdentifier(string $contentT $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(42) - ->will( - self::returnValue($contentTypeMock) + ->willReturn( + $contentTypeMock ); $repository = $this->getRepositoryMock(); $repository - ->expects(self::any()) ->method('getContentTypeService') - ->will(self::returnValue($contentTypeServiceMock)); + ->willReturn($contentTypeServiceMock); return $repository; } diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php index 9e8f5a75dd..aee270e704 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php @@ -13,9 +13,9 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\ParentContentType as ParentContentTypeMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class ParentContentTypeTest extends BaseTest +class ParentContentTypeTest extends BaseTestCase { private const EXAMPLE_LOCATION_ID = 54; private const EXAMPLE_PARENT_LOCATION_ID = 2; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php index c88a6ac867..d6a19be0b8 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php @@ -12,9 +12,9 @@ use Ibexa\Contracts\Core\Repository\SectionService; use Ibexa\Contracts\Core\Repository\Values\Content\Section; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section as SectionIdentifierMatcher; -use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTest; +use Ibexa\Tests\Core\MVC\Symfony\Matcher\ContentBased\BaseTestCase; -class SectionTest extends BaseTest +class SectionTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\Identifier\Section */ private SectionIdentifierMatcher $matcher; diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php index 5bbe30698d..829cc0aeb7 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php @@ -10,7 +10,7 @@ use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\MultipleValued; use PHPUnit\Framework\MockObject\MockObject; -class MultipleValuedTest extends BaseTest +class MultipleValuedTest extends BaseTestCase { /** * @dataProvider matchingConfigProvider diff --git a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php index 8221bf4b04..de59d70c59 100644 --- a/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php +++ b/tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php @@ -13,7 +13,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; use Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias as UrlAliasMatcher; -class UrlAliasTest extends BaseTest +class UrlAliasTest extends BaseTestCase { /** @var \Ibexa\Core\MVC\Symfony\Matcher\ContentBased\UrlAlias */ private UrlAliasMatcher $matcher; @@ -37,8 +37,8 @@ public function testSetMatchingConfig(string|array $matchingConfig, array $expec { $this->matcher->setMatchingConfig($matchingConfig); self::assertSame( - $this->matcher->getValues(), - $expectedValues + $expectedValues, + $this->matcher->getValues() ); } diff --git a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php index f46d86f0dc..563d69883f 100644 --- a/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php +++ b/tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php @@ -16,11 +16,9 @@ class DynamicallyConfiguredMatcherFactoryDecoratorTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\Matcher\ConfigurableMatcherFactoryInterface */ - private MockObject $innerMatcherFactory; + private ClassNameMatcherFactory & MockObject $innerMatcherFactory; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private MockObject $configResolver; + private ConfigResolver & MockObject $configResolver; public function setUp(): void { From 39d5a58f42f9321ae19105f448c23374ede5cc98 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 10:23:19 +0200 Subject: [PATCH 107/185] IBX-9727: [Tests] Fixed strict types for Limitation tests and refactored code --- tests/lib/Limitation/Base.php | 44 +++------ .../Limitation/BlockingLimitationTypeTest.php | 31 +++--- .../ContentTypeLimitationTypeTest.php | 73 +++++++------- .../Limitation/LocationLimitationTypeTest.php | 11 ++- .../Limitation/MemberOfLimitationTypeTest.php | 7 ++ .../NewObjectStateLimitationTypeTest.php | 51 +++++----- .../ObjectStateLimitationTypeTest.php | 15 ++- .../ParentContentTypeLimitationTypeTest.php | 96 +++++++++---------- .../ParentDepthLimitationTypeTest.php | 3 +- .../Limitation/SectionLimitationTypeTest.php | 66 +++++++------ .../SiteAccessLimitationTypeTest.php | 3 +- .../Limitation/SubtreeLimitationTypeTest.php | 3 +- 12 files changed, 204 insertions(+), 199 deletions(-) diff --git a/tests/lib/Limitation/Base.php b/tests/lib/Limitation/Base.php index 9f1ec7a8dc..41e338e97a 100644 --- a/tests/lib/Limitation/Base.php +++ b/tests/lib/Limitation/Base.php @@ -4,51 +4,31 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ +declare(strict_types=1); namespace Ibexa\Tests\Core\Limitation; -use Ibexa\Contracts\Core\Persistence\Handler as SPIHandler; +use Ibexa\Contracts\Core\Persistence\Handler as PersistenceHandler; use Ibexa\Contracts\Core\Repository\Values\User\User as APIUser; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class Base extends TestCase { - /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $persistenceHandlerMock = null; + private PersistenceHandler & MockObject $persistenceHandlerMock; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $userMock = null; + private APIUser & MockObject $userMock; - /** - * @param array $mockMethods For specifying the methods to mock, all by default - * - * @return \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject - */ - public function getPersistenceMock(array $mockMethods = []) + public function getPersistenceMock(): PersistenceHandler & MockObject { - if ($this->persistenceHandlerMock !== null) { - return $this->persistenceHandlerMock; - } - - return $this->persistenceHandlerMock = $this->createMock(SPIHandler::class); + return $this->persistenceHandlerMock ?? ($this->persistenceHandlerMock = $this->createMock( + PersistenceHandler::class + )); } - /** - * @param array $mockMethods For specifying the methods to mock, all by default - * - * @return \Ibexa\Contracts\Core\Repository\Values\User\User|\PHPUnit\Framework\MockObject\MockObject - */ - public function getUserMock(array $mockMethods = []) + public function getUserMock(): APIUser & MockObject { - if ($this->userMock !== null) { - return $this->userMock; - } - - return $this->userMock = $this->getMockBuilder(APIUser::class) - ->setConstructorArgs([]) - ->setMethods($mockMethods) - ->getMock(); + return $this->userMock ?? ($this->userMock = $this->createMock(APIUser::class)); } /** @@ -56,11 +36,11 @@ public function getUserMock(array $mockMethods = []) */ protected function tearDown(): void { - if ($this->persistenceHandlerMock !== null) { + if (isset($this->persistenceHandlerMock)) { unset($this->persistenceHandlerMock); } - if ($this->userMock !== null) { + if (isset($this->userMock)) { unset($this->userMock); } diff --git a/tests/lib/Limitation/BlockingLimitationTypeTest.php b/tests/lib/Limitation/BlockingLimitationTypeTest.php index 1004c1ed13..bae13e9a70 100644 --- a/tests/lib/Limitation/BlockingLimitationTypeTest.php +++ b/tests/lib/Limitation/BlockingLimitationTypeTest.php @@ -33,7 +33,7 @@ public function testConstruct(): BlockingLimitationType } /** - * @return array + * @phpstan-return list */ public function providerForTestAcceptValue(): array { @@ -95,13 +95,10 @@ public function providerForTestValidatePass(): array /** * @dataProvider providerForTestValidatePass * - * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation + * @depends testConstruct */ - public function testValidatePass(BlockingLimitation $limitation): void + public function testValidatePass(BlockingLimitation $limitation, BlockingLimitationType $limitationType): void { - // Need to create inline instead of depending on testConstruct() to get correct mock instance - $limitationType = $this->testConstruct(); - $validationErrors = $limitationType->validate($limitation); self::assertEmpty($validationErrors); } @@ -121,18 +118,14 @@ public function providerForTestValidateError(): array /** * @dataProvider providerForTestValidateError * - * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\BlockingLimitation $limitation - * @param int $errorCount + * @depends testConstruct */ - public function testValidateError(BlockingLimitation $limitation, int $errorCount): void + public function testValidateError(BlockingLimitation $limitation, int $errorCount, BlockingLimitationType $limitationType): void { $this->getPersistenceMock() ->expects(self::never()) ->method(self::anything()); - // Need to create inline instead of depending on testConstruct() to get correct mock instance - $limitationType = $this->testConstruct(); - $validationErrors = $limitationType->validate($limitation); self::assertCount($errorCount, $validationErrors); } @@ -153,7 +146,11 @@ public function testBuildValue(BlockingLimitationType $limitationType): void } /** - * @return array + * @phpstan-return list, + * }> */ public function providerForTestEvaluate(): array { @@ -193,15 +190,15 @@ public function providerForTestEvaluate(): array /** * @dataProvider providerForTestEvaluate + * + * @depends testConstruct */ public function testEvaluate( BlockingLimitation $limitation, ValueObject $object, - array $targets + array $targets, + BlockingLimitationType $limitationType ): void { - // Need to create inline instead of depending on testConstruct() to get correct mock instance - $limitationType = $this->testConstruct(); - $userMock = $this->getUserMock(); $userMock ->expects(self::never()) diff --git a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php index 74c847a0ec..6b8a5f4df4 100644 --- a/tests/lib/Limitation/ContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ContentTypeLimitationTypeTest.php @@ -13,7 +13,6 @@ use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentTypeId; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; @@ -25,14 +24,14 @@ use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; use PHPUnit\Framework\MockObject\MockObject; +use RuntimeException; /** * Test Case for LimitationType. */ class ContentTypeLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentTypeHandlerMock; + private SPIHandler & MockObject $contentTypeHandlerMock; /** * Setup Location Handler mock. @@ -61,7 +60,7 @@ public function testConstruct(): ContentTypeLimitationType } /** - * @return array + * @phpstan-return list */ public function providerForTestAcceptValue(): array { @@ -75,10 +74,12 @@ public function providerForTestAcceptValue(): array /** * @dataProvider providerForTestAcceptValue * - * @depends testConstruct + * @depends testConstruct * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\ContentTypeLimitation $limitation * @param \Ibexa\Core\Limitation\ContentTypeLimitationType $limitationType + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testAcceptValue(ContentTypeLimitation $limitation, ContentTypeLimitationType $limitationType): void { @@ -86,7 +87,7 @@ public function testAcceptValue(ContentTypeLimitation $limitation, ContentTypeLi } /** - * @return array + * @phpstan-return list */ public function providerForTestAcceptValueException(): array { @@ -112,7 +113,7 @@ public function testAcceptValueException(Limitation $limitation, ContentTypeLimi } /** - * @return array + * @phpstan-return list */ public function providerForTestValidatePass(): array { @@ -132,9 +133,8 @@ public function testValidatePass(ContentTypeLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('contentTypeHandler') - ->will(self::returnValue($this->contentTypeHandlerMock)); + ->willReturn($this->contentTypeHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock @@ -152,7 +152,7 @@ public function testValidatePass(ContentTypeLimitation $limitation): void } /** - * @return array + * @phpstan-return list */ public function providerForTestValidateError(): array { @@ -173,9 +173,8 @@ public function testValidateError(ContentTypeLimitation $limitation, int $errorC { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('contentTypeHandler') - ->will(self::returnValue($this->contentTypeHandlerMock)); + ->willReturn($this->contentTypeHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->contentTypeHandlerMock @@ -207,36 +206,42 @@ public function testBuildValue(ContentTypeLimitationType $limitationType): void $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); - self::assertInstanceOf(ContentTypeLimitation::class, $value); self::assertIsArray($value->limitationValues); self::assertEquals($expected, $value->limitationValues); } /** - * @return array + * @phpstan-return list, + * expected: bool + * }> + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function providerForTestEvaluate(): array { - // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. + // Mocks for testing Content & VersionInfo objects should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock ->expects(self::once()) ->method('getVersionInfo') - ->will(self::returnValue($versionInfoMock)); + ->willReturn($versionInfoMock); $versionInfoMock ->expects(self::once()) ->method('getContentInfo') - ->will(self::returnValue(new ContentInfo(['contentTypeId' => 66]))); + ->willReturn(new ContentInfo(['contentTypeId' => 66])); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 ->expects(self::once()) ->method('getContentInfo') - ->will(self::returnValue(new ContentInfo(['contentTypeId' => 66]))); + ->willReturn(new ContentInfo(['contentTypeId' => 66])); return [ // ContentInfo, no access @@ -307,12 +312,16 @@ public function providerForTestEvaluate(): array /** * @dataProvider providerForTestEvaluate + * + * @param \Ibexa\Contracts\Core\Repository\Values\ValueObject[] $targets + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testEvaluate( ContentTypeLimitation $limitation, ValueObject $object, array $targets, - $expected + bool $expected ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -339,7 +348,11 @@ public function testEvaluate( } /** - * @return array + * @phpstan-return list, + * }> */ public function providerForTestEvaluateInvalidArgument(): array { @@ -361,14 +374,16 @@ public function providerForTestEvaluateInvalidArgument(): array /** * @dataProvider providerForTestEvaluateInvalidArgument + * + * @param array<\Ibexa\Contracts\Core\Repository\Values\ValueObject> $targets + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, array $targets ): void { - $this->expectException(InvalidArgumentException::class); - // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -382,13 +397,13 @@ public function testEvaluateInvalidArgument( ->expects(self::never()) ->method(self::anything()); - $v = $limitationType->evaluate( + $this->expectException(InvalidArgumentException::class); + $limitationType->evaluate( $limitation, $userMock, $object, $targets ); - var_dump($v); // intentional, debug in case no exception above } /** @@ -398,7 +413,7 @@ public function testEvaluateInvalidArgument( */ public function testGetCriterionInvalidValue(ContentTypeLimitationType $limitationType): void { - $this->expectException(\RuntimeException::class); + $this->expectException(RuntimeException::class); $limitationType->getCriterion( new ContentTypeLimitation([]), @@ -418,7 +433,6 @@ public function testGetCriterionSingleValue(ContentTypeLimitationType $limitatio $this->getUserMock() ); - self::assertInstanceOf(ContentTypeId::class, $criterion); self::assertIsArray($criterion->value); self::assertIsString($criterion->operator); self::assertEquals(Operator::EQ, $criterion->operator); @@ -437,7 +451,6 @@ public function testGetCriterionMultipleValues(ContentTypeLimitationType $limita $this->getUserMock() ); - self::assertInstanceOf(ContentTypeId::class, $criterion); self::assertIsArray($criterion->value); self::assertIsString($criterion->operator); self::assertEquals(Operator::IN, $criterion->operator); @@ -452,10 +465,6 @@ public function testGetCriterionMultipleValues(ContentTypeLimitationType $limita public function testValueSchema(ContentTypeLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); - - self::assertEquals( - [], - $limitationType->valueSchema() - ); + $limitationType->valueSchema(); } } diff --git a/tests/lib/Limitation/LocationLimitationTypeTest.php b/tests/lib/Limitation/LocationLimitationTypeTest.php index 4fa8e3b5ab..9c88ec06f2 100644 --- a/tests/lib/Limitation/LocationLimitationTypeTest.php +++ b/tests/lib/Limitation/LocationLimitationTypeTest.php @@ -30,8 +30,7 @@ */ class LocationLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationHandlerMock; + private SPIHandler & MockObject $locationHandlerMock; /** * Setup Location Handler mock. @@ -212,7 +211,13 @@ public function testBuildValue(LocationLimitationType $limitationType): void } /** - * @return array + * @phpstan-return list, + * persistence: array<\Ibexa\Contracts\Core\Repository\Values\Content\Location>, + * expected: \Ibexa\Contracts\Core\Limitation\Type::ACCESS_* + * }> */ public function providerForTestEvaluate(): array { diff --git a/tests/lib/Limitation/MemberOfLimitationTypeTest.php b/tests/lib/Limitation/MemberOfLimitationTypeTest.php index 5aaea11cc8..ecb98854cc 100644 --- a/tests/lib/Limitation/MemberOfLimitationTypeTest.php +++ b/tests/lib/Limitation/MemberOfLimitationTypeTest.php @@ -199,6 +199,13 @@ public function testEvaluate( self::assertEquals($expected, $value); } + /** + * @return array + */ public function providerForTestEvaluate(): array { return [ diff --git a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php index 23cb7d6be6..2c681ef421 100644 --- a/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/NewObjectStateLimitationTypeTest.php @@ -28,8 +28,7 @@ */ class NewObjectStateLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $objectStateHandlerMock; + private SPIHandler & MockObject $objectStateHandlerMock; /** * Setup Handler mock. @@ -58,7 +57,7 @@ public function testConstruct(): NewObjectStateLimitationType } /** - * @return array + * @phpstan-return list */ public function providerForTestAcceptValue(): array { @@ -76,6 +75,8 @@ public function providerForTestAcceptValue(): array * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\NewObjectStateLimitation $limitation * @param \Ibexa\Core\Limitation\NewObjectStateLimitationType $limitationType + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testAcceptValue(NewObjectStateLimitation $limitation, NewObjectStateLimitationType $limitationType): void { @@ -83,7 +84,7 @@ public function testAcceptValue(NewObjectStateLimitation $limitation, NewObjectS } /** - * @return array + * @phpstan-return list */ public function providerForTestAcceptValueException(): array { @@ -109,7 +110,7 @@ public function testAcceptValueException(Limitation $limitation, NewObjectStateL } /** - * @return array + * @phpstan-return list */ public function providerForTestValidatePass(): array { @@ -129,9 +130,8 @@ public function testValidatePass(NewObjectStateLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('objectStateHandler') - ->will(self::returnValue($this->objectStateHandlerMock)); + ->willReturn($this->objectStateHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->objectStateHandlerMock @@ -149,7 +149,7 @@ public function testValidatePass(NewObjectStateLimitation $limitation): void } /** - * @return array + * @phpstan-return list */ public function providerForTestValidateError(): array { @@ -170,9 +170,8 @@ public function testValidateError(NewObjectStateLimitation $limitation, int $err { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('objectStateHandler') - ->will(self::returnValue($this->objectStateHandlerMock)); + ->willReturn($this->objectStateHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->objectStateHandlerMock @@ -204,13 +203,17 @@ public function testBuildValue(NewObjectStateLimitationType $limitationType): vo $expected = ['test', 'test' => 9]; $value = $limitationType->buildValue($expected); - self::assertInstanceOf(NewObjectStateLimitation::class, $value); self::assertIsArray($value->limitationValues); self::assertEquals($expected, $value->limitationValues); } /** - * @return array + * @phpstan-return list, + * expected: bool, + * }> */ public function providerForTestEvaluate(): array { @@ -229,7 +232,7 @@ public function providerForTestEvaluate(): array 'targets' => [new ObjectState(['id' => 66])], 'expected' => false, ], - // Content, no access (both must match!) + // Content, no access (both must match!) [ 'limitation' => new NewObjectStateLimitation(['limitationValues' => [2, 22]]), 'object' => new Content(), @@ -262,16 +265,18 @@ public function providerForTestEvaluate(): array /** * @dataProvider providerForTestEvaluate + * + * @depends testConstruct + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testEvaluate( NewObjectStateLimitation $limitation, ValueObject $object, array $targets, - $expected + bool $expected, + NewObjectStateLimitationType $limitationType, ): void { - // Need to create inline instead of depending on testConstruct() to get correct mock instance - $limitationType = $this->testConstruct(); - $userMock = $this->getUserMock(); $userMock ->expects(self::never()) @@ -328,8 +333,6 @@ public function testEvaluateInvalidArgument( ValueObject $object, array $targets ): void { - $this->expectException(InvalidArgumentException::class); - // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -343,13 +346,13 @@ public function testEvaluateInvalidArgument( ->expects(self::never()) ->method(self::anything()); - $v = $limitationType->evaluate( + $this->expectException(InvalidArgumentException::class); + $limitationType->evaluate( $limitation, $userMock, $object, $targets ); - var_dump($v); // intentional, debug in case no exception above } /** @@ -375,10 +378,6 @@ public function testGetCriterion(NewObjectStateLimitationType $limitationType): public function testValueSchema(NewObjectStateLimitationType $limitationType): void { $this->expectException(NotImplementedException::class); - - self::assertEquals( - [], - $limitationType->valueSchema() - ); + $limitationType->valueSchema(); } } diff --git a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php index 90e9e98702..72dda91237 100644 --- a/tests/lib/Limitation/ObjectStateLimitationTypeTest.php +++ b/tests/lib/Limitation/ObjectStateLimitationTypeTest.php @@ -19,14 +19,14 @@ use Ibexa\Core\Limitation\ObjectStateLimitationType; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use PHPUnit\Framework\MockObject\MockObject; +use RuntimeException; /** * Test Case for LimitationType. */ class ObjectStateLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $objectStateHandlerMock; + private SPIHandler & MockObject $objectStateHandlerMock; /** @var \Ibexa\Contracts\Core\Persistence\Content\ObjectState\Group[] */ private array $allObjectStateGroups; @@ -85,7 +85,14 @@ public function testConstruct(): ObjectStateLimitationType } /** - * @return array + * @phpstan-return array< + * string, + * array{ + * limitation: \Ibexa\Contracts\Core\Repository\Values\User\Limitation, + * object: \Ibexa\Contracts\Core\Repository\Values\ValueObject, + * expected: bool + * } + * > */ public function providerForTestEvaluate(): array { @@ -215,7 +222,7 @@ public function testEvaluate( */ public function testGetCriterionInvalidValue(ObjectStateLimitationType $limitationType): void { - $this->expectException(\RuntimeException::class); + $this->expectException(RuntimeException::class); $limitationType->getCriterion( new ObjectStateLimitation([]), diff --git a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php index 419467a03e..6e7a5901bb 100644 --- a/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php @@ -7,10 +7,11 @@ namespace Ibexa\Tests\Core\Limitation; -use Ibexa\Contracts\Core\Persistence\Content\ContentInfo as SPIContentInfo; -use Ibexa\Contracts\Core\Persistence\Content\Handler as SPIContentHandler; -use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; -use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as SPIContentTypeHandler; +use DateTime; +use Ibexa\Contracts\Core\Persistence\Content\ContentInfo as PersistenceContentInfo; +use Ibexa\Contracts\Core\Persistence\Content\Handler as PersistenceContentHandler; +use Ibexa\Contracts\Core\Persistence\Content\Location as PersistenceLocation; +use Ibexa\Contracts\Core\Persistence\Content\Type\Handler as PersistenceContentTypeHandler; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; @@ -32,14 +33,11 @@ */ class ParentContentTypeLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationHandlerMock; + private PersistenceLocation\Handler & MockObject $locationHandlerMock; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentTypeHandlerMock; + private PersistenceContentTypeHandler & MockObject $contentTypeHandlerMock; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentHandlerMock; + private PersistenceContentHandler & MockObject $contentHandlerMock; /** * Setup Location Handler mock. @@ -47,9 +45,9 @@ class ParentContentTypeLimitationTypeTest extends Base protected function setUp(): void { parent::setUp(); - $this->locationHandlerMock = $this->createMock(SPILocation\Handler::class); - $this->contentTypeHandlerMock = $this->createMock(SPIContentTypeHandler::class); - $this->contentHandlerMock = $this->createMock(SPIContentHandler::class); + $this->locationHandlerMock = $this->createMock(PersistenceLocation\Handler::class); + $this->contentTypeHandlerMock = $this->createMock(PersistenceContentTypeHandler::class); + $this->contentHandlerMock = $this->createMock(PersistenceContentHandler::class); } /** @@ -104,7 +102,7 @@ public function providerForTestAcceptValueException(): array return [ [new ObjectStateLimitation()], [new ParentContentTypeLimitation(['limitationValues' => [true]])], - [new ParentContentTypeLimitation(['limitationValues' => [new \DateTime()]])], + [new ParentContentTypeLimitation(['limitationValues' => [new DateTime()]])], ]; } @@ -263,13 +261,13 @@ public function providerForTestEvaluate(): array 'persistence' => [], 'expected' => false, ], - // ContentInfo, with SPI targets, no access + // ContentInfo, with Persistence targets, no access [ 'limitation' => new ParentContentTypeLimitation(), 'object' => new ContentInfo(['published' => true]), - 'targets' => [new SPILocation(['contentId' => 42])], + 'targets' => [new PersistenceLocation(['contentId' => 42])], 'persistence' => [ - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '24'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '24'])], ], 'expected' => false, ], @@ -281,13 +279,13 @@ public function providerForTestEvaluate(): array 'persistence' => [], 'expected' => false, ], - // ContentInfo, with SPI targets, no access + // ContentInfo, with Persistence targets, no access [ 'limitation' => new ParentContentTypeLimitation(['limitationValues' => [42]]), 'object' => new ContentInfo(['published' => true]), - 'targets' => [new SPILocation(['contentId' => 42])], + 'targets' => [new PersistenceLocation(['contentId' => 42])], 'persistence' => [ - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '24'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '24'])], ], 'expected' => false, ], @@ -299,13 +297,13 @@ public function providerForTestEvaluate(): array 'persistence' => [], 'expected' => true, ], - // ContentInfo, with SPI targets, with access + // ContentInfo, with Persistence targets, with access [ 'limitation' => new ParentContentTypeLimitation(['limitationValues' => [42]]), 'object' => new ContentInfo(['published' => true]), - 'targets' => [new SPILocation(['contentId' => 24])], + 'targets' => [new PersistenceLocation(['contentId' => 24])], 'persistence' => [ - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -315,10 +313,10 @@ public function providerForTestEvaluate(): array 'object' => new ContentInfo(['published' => true, 'id' => 40]), 'targets' => [], 'persistence' => [ - 'locations' => [new SPILocation(['id' => 40, 'contentId' => '24', 'parentId' => 43, 'depth' => 1])], - 'parentLocations' => [43 => new SPILocation(['id' => 43, 'contentId' => 24])], - 'parentContents' => [24 => new SPIContentInfo(['id' => 24, 'contentTypeId' => 43])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'locations' => [new PersistenceLocation(['id' => 40, 'contentId' => '24', 'parentId' => 43, 'depth' => 1])], + 'parentLocations' => [43 => new PersistenceLocation(['id' => 43, 'contentId' => 24])], + 'parentContents' => [24 => new PersistenceContentInfo(['id' => 24, 'contentTypeId' => 43])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -328,10 +326,10 @@ public function providerForTestEvaluate(): array 'object' => new ContentInfo(['published' => true, 'id' => 40]), 'targets' => [], 'persistence' => [ - 'locations' => [new SPILocation(['id' => 40, 'contentId' => '24', 'parentId' => 43, 'depth' => 1])], - 'parentLocations' => [43 => new SPILocation(['id' => 43, 'contentId' => 24])], - 'parentContents' => [24 => new SPIContentInfo(['id' => 24, 'contentTypeId' => 39])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'locations' => [new PersistenceLocation(['id' => 40, 'contentId' => '24', 'parentId' => 43, 'depth' => 1])], + 'parentLocations' => [43 => new PersistenceLocation(['id' => 43, 'contentId' => 24])], + 'parentContents' => [24 => new PersistenceContentInfo(['id' => 24, 'contentTypeId' => 39])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => false, ], @@ -341,8 +339,8 @@ public function providerForTestEvaluate(): array 'object' => new ContentInfo(['published' => false]), 'targets' => [], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => '24'])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'locations' => [new PersistenceLocation(['contentId' => '24'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -352,8 +350,8 @@ public function providerForTestEvaluate(): array 'object' => new ContentInfo(['published' => false]), 'targets' => [], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => '24'])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '4200'])], + 'locations' => [new PersistenceLocation(['contentId' => '24'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '4200'])], ], 'expected' => false, ], @@ -365,13 +363,13 @@ public function providerForTestEvaluate(): array 'persistence' => [], 'expected' => true, ], - // Content, with SPI targets, with access + // Content, with Persistence targets, with access [ 'limitation' => new ParentContentTypeLimitation(['limitationValues' => [42]]), 'object' => $this->getTestEvaluateContentMock(), - 'targets' => [new SPILocation(['contentId' => '24'])], + 'targets' => [new PersistenceLocation(['contentId' => '24'])], 'persistence' => [ - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -383,13 +381,13 @@ public function providerForTestEvaluate(): array 'persistence' => [], 'expected' => true, ], - // VersionInfo, with SPI targets, with access + // VersionInfo, with Persistence targets, with access [ 'limitation' => new ParentContentTypeLimitation(['limitationValues' => [42]]), 'object' => $this->getTestEvaluateVersionInfoMock(), - 'targets' => [new SPILocation(['contentId' => '24'])], + 'targets' => [new PersistenceLocation(['contentId' => '24'])], 'persistence' => [ - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -399,8 +397,8 @@ public function providerForTestEvaluate(): array 'object' => $this->getTestEvaluateVersionInfoMock(), 'targets' => [new LocationCreateStruct(['parentLocationId' => 24])], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => 100])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '42'])], + 'locations' => [new PersistenceLocation(['contentId' => 100])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '42'])], ], 'expected' => true, ], @@ -410,8 +408,8 @@ public function providerForTestEvaluate(): array 'object' => $this->getTestEvaluateContentMock(), 'targets' => [new LocationCreateStruct(['parentLocationId' => 24])], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => 100])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => '24'])], + 'locations' => [new PersistenceLocation(['contentId' => 100])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => '24'])], ], 'expected' => false, ], @@ -429,8 +427,8 @@ public function providerForTestEvaluate(): array 'object' => new ContentCreateStruct(), 'targets' => [new LocationCreateStruct(['parentLocationId' => 24])], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => 100])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => 34])], + 'locations' => [new PersistenceLocation(['contentId' => 100])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => 34])], ], 'expected' => false, ], @@ -440,8 +438,8 @@ public function providerForTestEvaluate(): array 'object' => new ContentCreateStruct(), 'targets' => [new LocationCreateStruct(['parentLocationId' => 43])], 'persistence' => [ - 'locations' => [new SPILocation(['contentId' => 100])], - 'contentInfos' => [new SPIContentInfo(['contentTypeId' => 12])], + 'locations' => [new PersistenceLocation(['contentId' => 100])], + 'contentInfos' => [new PersistenceContentInfo(['contentTypeId' => 12])], ], 'expected' => true, ], diff --git a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php index 58b07f8e8b..78986848c3 100644 --- a/tests/lib/Limitation/ParentDepthLimitationTypeTest.php +++ b/tests/lib/Limitation/ParentDepthLimitationTypeTest.php @@ -27,8 +27,7 @@ */ class ParentDepthLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationHandlerMock; + private SPILocationHandler & MockObject $locationHandlerMock; /** * Setup Location Handler mock. diff --git a/tests/lib/Limitation/SectionLimitationTypeTest.php b/tests/lib/Limitation/SectionLimitationTypeTest.php index 9e48acf8ff..f574d4f385 100644 --- a/tests/lib/Limitation/SectionLimitationTypeTest.php +++ b/tests/lib/Limitation/SectionLimitationTypeTest.php @@ -16,7 +16,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\SectionId; use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\ObjectStateLimitation; @@ -27,14 +26,15 @@ use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\Location; use PHPUnit\Framework\MockObject\MockObject; +use RuntimeException; +use stdClass; /** * Test Case for LimitationType. */ class SectionLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Section\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $sectionHandlerMock; + private SPISectionHandler & MockObject $sectionHandlerMock; /** * Setup Location Handler mock. @@ -81,6 +81,8 @@ public function providerForTestAcceptValue(): array * * @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation\SectionLimitation $limitation * @param \Ibexa\Core\Limitation\SectionLimitationType $limitationType + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testAcceptValue(SectionLimitation $limitation, SectionLimitationType $limitationType): void { @@ -95,7 +97,7 @@ public function providerForTestAcceptValueException(): array return [ [new ObjectStateLimitation()], [new SectionLimitation(['limitationValues' => [true]])], - [new SectionLimitation(['limitationValues' => [new \stdClass()]])], + [new SectionLimitation(['limitationValues' => [new stdClass()]])], [new SectionLimitation(['limitationValues' => [null]])], [new SectionLimitation(['limitationValues' => '/1/2/'])], ]; @@ -137,19 +139,16 @@ public function testValidatePass(SectionLimitation $limitation): void { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('sectionHandler') - ->will(self::returnValue($this->sectionHandlerMock)); + ->willReturn($this->sectionHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->sectionHandlerMock ->expects(self::at($key)) ->method('load') ->with($value) - ->will( - self::returnValue( - new SPISection(['id' => $value]) - ) + ->willReturn( + new SPISection(['id' => $value]) ); } } @@ -183,16 +182,15 @@ public function testValidateError(SectionLimitation $limitation, int $errorCount { if (!empty($limitation->limitationValues)) { $this->getPersistenceMock() - ->expects(self::any()) ->method('sectionHandler') - ->will(self::returnValue($this->sectionHandlerMock)); + ->willReturn($this->sectionHandlerMock); foreach ($limitation->limitationValues as $key => $value) { $this->sectionHandlerMock ->expects(self::at($key)) ->method('load') ->with($value) - ->will(self::throwException(new NotFoundException('Section', $value))); + ->willThrowException(new NotFoundException('Section', $value)); } } else { $this->getPersistenceMock() @@ -217,36 +215,40 @@ public function testBuildValue(SectionLimitationType $limitationType): void $expected = ['test', 'test' => '33']; $value = $limitationType->buildValue($expected); - self::assertInstanceOf(SectionLimitation::class, $value); self::assertIsArray($value->limitationValues); self::assertEquals($expected, $value->limitationValues); } /** - * @return array + * @phpstan-return list, + * expected: \Ibexa\Contracts\Core\Limitation\Type::ACCESS_* + * }> */ public function providerForTestEvaluate(): array { - // Mocks for testing Content & VersionInfo objects, should only be used once because of expect rules. + // Mocks for testing Content & VersionInfo objects should only be used once because of expect rules. $contentMock = $this->createMock(APIContent::class); $versionInfoMock = $this->createMock(APIVersionInfo::class); $contentMock ->expects(self::once()) ->method('getVersionInfo') - ->will(self::returnValue($versionInfoMock)); + ->willReturn($versionInfoMock); $versionInfoMock ->expects(self::once()) ->method('getContentInfo') - ->will(self::returnValue(new ContentInfo(['sectionId' => 2]))); + ->willReturn(new ContentInfo(['sectionId' => 2])); $versionInfoMock2 = $this->createMock(APIVersionInfo::class); $versionInfoMock2 ->expects(self::once()) ->method('getContentInfo') - ->will(self::returnValue(new ContentInfo(['sectionId' => 2]))); + ->willReturn(new ContentInfo(['sectionId' => 2])); return [ // ContentInfo, with targets, no access @@ -284,14 +286,14 @@ public function providerForTestEvaluate(): array 'targets' => null, 'expected' => LimitationType::ACCESS_DENIED, ], - // ContentInfo, no targets, un-published, with access + // ContentInfo, no targets, unpublished, with access [ 'limitation' => new SectionLimitation(['limitationValues' => ['2']]), 'object' => new ContentInfo(['published' => false, 'sectionId' => 2]), 'targets' => null, 'expected' => LimitationType::ACCESS_GRANTED, ], - // ContentInfo, no targets, un-published, no access + // ContentInfo, no targets, unpublished, no access [ 'limitation' => new SectionLimitation(['limitationValues' => ['2', '43']]), 'object' => new ContentInfo(['published' => false, 'sectionId' => 55]), @@ -357,7 +359,7 @@ public function testEvaluate( SectionLimitation $limitation, ValueObject $object, ?array $targets, - $expected + bool|null $expected ): void { // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -382,7 +384,11 @@ public function testEvaluate( } /** - * @return array + * @phpstan-return list + * }> */ public function providerForTestEvaluateInvalidArgument(): array { @@ -398,14 +404,16 @@ public function providerForTestEvaluateInvalidArgument(): array /** * @dataProvider providerForTestEvaluateInvalidArgument + * + * @param array<\Ibexa\Contracts\Core\Repository\Values\ValueObject>|null $targets + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ public function testEvaluateInvalidArgument( Limitation $limitation, ValueObject $object, ?array $targets ): void { - $this->expectException(InvalidArgumentException::class); - // Need to create inline instead of depending on testConstruct() to get correct mock instance $limitationType = $this->testConstruct(); @@ -418,13 +426,13 @@ public function testEvaluateInvalidArgument( ->expects(self::never()) ->method(self::anything()); - $v = $limitationType->evaluate( + $this->expectException(InvalidArgumentException::class); + $limitationType->evaluate( $limitation, $userMock, $object, $targets ); - var_dump($v); // intentional, debug in case no exception above } /** @@ -434,7 +442,7 @@ public function testEvaluateInvalidArgument( */ public function testGetCriterionInvalidValue(SectionLimitationType $limitationType): void { - $this->expectException(\RuntimeException::class); + $this->expectException(RuntimeException::class); $limitationType->getCriterion( new SectionLimitation([]), @@ -454,7 +462,6 @@ public function testGetCriterionSingleValue(SectionLimitationType $limitationTyp $this->getUserMock() ); - self::assertInstanceOf(SectionId::class, $criterion); self::assertIsArray($criterion->value); self::assertIsString($criterion->operator); self::assertEquals(Operator::EQ, $criterion->operator); @@ -473,7 +480,6 @@ public function testGetCriterionMultipleValues(SectionLimitationType $limitation $this->getUserMock() ); - self::assertInstanceOf(SectionId::class, $criterion); self::assertIsArray($criterion->value); self::assertIsString($criterion->operator); self::assertEquals(Operator::IN, $criterion->operator); diff --git a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php index 05d3d2d713..bb43db8051 100644 --- a/tests/lib/Limitation/SiteAccessLimitationTypeTest.php +++ b/tests/lib/Limitation/SiteAccessLimitationTypeTest.php @@ -22,8 +22,7 @@ */ class SiteAccessLimitationTypeTest extends Base { - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessServiceMock; + private SiteAccess\SiteAccessServiceInterface & MockObject $siteAccessServiceMock; protected function setUp(): void { diff --git a/tests/lib/Limitation/SubtreeLimitationTypeTest.php b/tests/lib/Limitation/SubtreeLimitationTypeTest.php index 08070ea81b..aa9d92dfc5 100644 --- a/tests/lib/Limitation/SubtreeLimitationTypeTest.php +++ b/tests/lib/Limitation/SubtreeLimitationTypeTest.php @@ -33,8 +33,7 @@ */ class SubtreeLimitationTypeTest extends Base { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationHandlerMock; + private SPILocationHandler & MockObject $locationHandlerMock; /** * Setup Location Handler mock. From 260f955da1d05534cf87fd8eac5417a3899cae52 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 10:27:04 +0200 Subject: [PATCH 108/185] IBX-9727: [Tests] Fixed strict types for Search/Common tests --- .../EventSubscriber/TrashEventSubscriberTest.php | 7 ++----- .../LocationEventSubscriberTest.php | 13 +++++-------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php b/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php index 349d3d3f9a..a7eab463c0 100644 --- a/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php +++ b/tests/lib/Search/Common/EventSubscriber/TrashEventSubscriberTest.php @@ -21,13 +21,10 @@ final class TrashEventSubscriberTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Search\Handler&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $searchHandler; + private SearchHandler & MockObject $searchHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Handler&\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $persistenceHandler; + private PersistenceHandler & MockObject $persistenceHandler; - /** @var \Ibexa\Core\Search\Common\EventSubscriber\TrashEventSubscriber */ private TrashEventSubscriber $subscriber; protected function setUp(): void diff --git a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php index 74f2ceb39c..a91150c6bf 100644 --- a/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php +++ b/tests/lib/Search/Common/LocationEventSubscriber/LocationEventSubscriberTest.php @@ -26,17 +26,14 @@ final class LocationEventSubscriberTest extends TestCase { - private const EXAMPLE_LOCATION_ID = 54; - private const EXAMPLE_CONTENT_ID = 56; - private const EXAMPLE_VERSION_NO = 3; + private const int EXAMPLE_LOCATION_ID = 54; + private const int EXAMPLE_CONTENT_ID = 56; + private const int EXAMPLE_VERSION_NO = 3; - /** @var \Ibexa\Core\Search\Legacy\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $searchHandler; + private SearchHandler & MockObject $searchHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $persistenceHandler; + private PersistenceHandler & MockObject $persistenceHandler; - /** @var \Ibexa\Core\Search\Common\EventSubscriber\LocationEventSubscriber */ private LocationEventSubscriber $subscriber; protected function setUp(): void From e90830cc3a7192dd2136473c58c60c69ce6aa4b1 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 12:28:03 +0200 Subject: [PATCH 109/185] IBX-9727: [Tests] Fixed strict types for SiteAccessAware layer tests --- ...ceTest.php => AbstractServiceTestCase.php} | 133 +++++++++++------- .../SiteAccessAware/ContentServiceTest.php | 8 +- .../ContentTypeServiceTest.php | 4 +- .../SiteAccessAware/LanguageServiceTest.php | 4 +- .../SiteAccessAware/LocationServiceTest.php | 4 +- .../ObjectStateServiceTest.php | 4 +- .../SiteAccessAware/SearchServiceTest.php | 19 +-- .../SiteAccessAware/TrashServiceTest.php | 4 +- .../SiteAccessAware/UrlAliasServiceTest.php | 18 ++- .../SiteAccessAware/UserServiceTest.php | 6 +- 10 files changed, 116 insertions(+), 88 deletions(-) rename tests/lib/Repository/SiteAccessAware/{AbstractServiceTest.php => AbstractServiceTestCase.php} (69%) diff --git a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php b/tests/lib/Repository/SiteAccessAware/AbstractServiceTestCase.php similarity index 69% rename from tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php rename to tests/lib/Repository/SiteAccessAware/AbstractServiceTestCase.php index c352cc9cd3..21669745e2 100644 --- a/tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/AbstractServiceTestCase.php @@ -24,7 +24,7 @@ * @template TServiceInterface of object * @template TServiceClass of TServiceInterface */ -abstract class AbstractServiceTest extends TestCase +abstract class AbstractServiceTestCase extends TestCase { /** @phpstan-var TServiceInterface & \PHPUnit\Framework\MockObject\MockObject */ protected MockObject $innerApiServiceMock; @@ -75,24 +75,28 @@ protected function tearDown(): void } /** - * @return array See signature on {@link testForPassTrough} for arguments and their type. + * See signature on {@link testForPassTrough} for arguments and their type. + * + * @return array, + * 2?: mixed + * }> */ - abstract public function providerForPassTroughMethods(); + abstract public function providerForPassTroughMethods(): array; /** - * Make sure these methods does nothing more then passing the arguments to inner service. + * Make sure these methods do nothing more than passing the arguments to inner service. * - * Methods tested here are basically those without as languages argument. + * Methods tested here are basically those without the `$languages` argument. * * @dataProvider providerForPassTroughMethods * - * @param string $method - * @param array $arguments - * @param mixed $return + * @phpstan-param list $arguments */ - final public function testForPassTrough($method, array $arguments, $return = true): void + final public function testForPassTrough(string $method, array $arguments, mixed $return = null): void { - if ($return) { + if (null !== $return) { $this->innerApiServiceMock ->expects(self::once()) ->method($method) @@ -107,28 +111,40 @@ final public function testForPassTrough($method, array $arguments, $return = tru $actualReturn = $this->service->$method(...$arguments); - if ($return) { + if (null !== $return) { self::assertEquals($return, $actualReturn); } } /** - * @return array See signature on {@link testForLanguagesLookup} for arguments and their type. - * NOTE: languages / prioritizedLanguage, can be set to 0, it will be replaced by tests methods. + * See signature on {@link testForLanguagesLookup} for arguments and their type. + * NOTE: `$languages` / `$prioritizedLanguage`, can be set to 0, it will be replaced by tests methods. + * + * @return array, + * mixed, + * int + * }> + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ - abstract public function providerForLanguagesLookupMethods(); + abstract public function providerForLanguagesLookupMethods(): array; /** * Method to be able to customize the logic for setting expected language argument during {@see testForLanguagesLookup()}. * - * @param array $arguments - * @param int $languageArgumentIndex - * @param array $languages + * @phpstan-param list $arguments * - * @return array + * @param string[] $languages + * + * @return array */ - protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages) - { + protected function setLanguagesLookupExpectedArguments( + array $arguments, + int $languageArgumentIndex, + array $languages + ): array { $arguments[$languageArgumentIndex] = $languages; return $arguments; @@ -137,12 +153,11 @@ protected function setLanguagesLookupExpectedArguments(array $arguments, $langua /** * Method to be able to customize the logic for setting expected language argument during {@see testForLanguagesLookup()}. * - * @param array $arguments - * @param int $languageArgumentIndex + * @phpstan-param list $arguments * - * @return array + * @return array */ - protected function setLanguagesLookupArguments(array $arguments, $languageArgumentIndex) + protected function setLanguagesLookupArguments(array $arguments, int $languageArgumentIndex): array { $arguments[$languageArgumentIndex] = []; @@ -150,22 +165,31 @@ protected function setLanguagesLookupArguments(array $arguments, $languageArgume } /** - * Test that language aware methods does a language lookup when language is not set. + * Test that language-aware methods do a language lookup when the language is not set. * * @dataProvider providerForLanguagesLookupMethods * - * @param string $method - * @param array $arguments - * @param mixed|null $return - * @param int $languageArgumentIndex From 0 and up, so the array index on $arguments. + * @phpstan-param list $arguments + * + * @param int $languageArgumentIndex From 0 and up, the array index on $arguments. */ - final public function testForLanguagesLookup($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null): void - { + final public function testForLanguagesLookup( + string $method, + array $arguments, + mixed $return, + int $languageArgumentIndex, + callable $callback = null, + int $alwaysAvailableArgumentIndex = null + ): void { $languages = ['eng-GB', 'eng-US']; $arguments = $this->setLanguagesLookupArguments($arguments, $languageArgumentIndex); - $expectedArguments = $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); + $expectedArguments = $this->setLanguagesLookupExpectedArguments( + array_values($arguments), + $languageArgumentIndex, + $languages + ); $this->languageResolverMock ->expects(self::once()) @@ -203,31 +227,37 @@ final public function testForLanguagesLookup($method, array $arguments, $return, /** * Method to be able to customize the logic for setting expected language argument during {@see testForLanguagesPassTrough()}. * - * @param array $arguments - * @param int $languageArgumentIndex - * @param array $languages + * @phpstan-param list $arguments * - * @return array + * @param string[] $languages + * + * @return array */ - protected function setLanguagesPassTroughArguments(array $arguments, $languageArgumentIndex, array $languages) - { - $arguments[$languageArgumentIndex] = $languages; - - return $arguments; + protected function setLanguagesPassTroughArguments( + array $arguments, + int $languageArgumentIndex, + array $languages + ): array { + return $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); } /** - * Make sure these methods does nothing more then passing the arguments to inner service. + * Make sure these methods do nothing more than passing the arguments to inner service. * * @dataProvider providerForLanguagesLookupMethods * - * @param string $method - * @param array $arguments - * @param mixed|null $return - * @param int $languageArgumentIndex From 0 and up, so the array index on $arguments. + * @phpstan-param list $arguments + * + * @param int $languageArgumentIndex From 0 and up, the array index on $arguments. */ - final public function testForLanguagesPassTrough($method, array $arguments, $return, $languageArgumentIndex, callable $callback = null, int $alwaysAvailableArgumentIndex = null): void - { + final public function testForLanguagesPassTrough( + string $method, + array $arguments, + mixed $return, + int $languageArgumentIndex, + callable $callback = null, + int $alwaysAvailableArgumentIndex = null + ): void { $languages = ['eng-GB', 'eng-US']; $arguments = $this->setLanguagesPassTroughArguments($arguments, $languageArgumentIndex, $languages); @@ -257,13 +287,16 @@ final public function testForLanguagesPassTrough($method, array $arguments, $ret $actualReturn = $this->service->$method(...$arguments); - if ($return) { + if (null !== $return) { self::assertEquals($return, $actualReturn); } } /** * @todo replace with coverage testing (see EZP-31035) + * + * @throws \ReflectionException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ final public function testIfThereIsMissingTest(): void { @@ -274,7 +307,7 @@ final public function testIfThereIsMissingTest(): void $class = new ReflectionClass($this->getSiteAccessAwareServiceClassName()); foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - if (!$method->isConstructor() && !in_array($method->getShortName(), $tested)) { + if (!$method->isConstructor() && !in_array($method->getShortName(), $tested, true)) { $this->addWarning( sprintf( 'Test for the %s::%s method is missing', diff --git a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php index 6918e69ba5..7aef7ca047 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentServiceTest.php @@ -16,7 +16,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Language; use Ibexa\Contracts\Core\Repository\Values\Content\LocationCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ContentId; -use Ibexa\Contracts\Core\Repository\Values\Content\Relation; use Ibexa\Contracts\Core\Repository\Values\Content\RelationList; use Ibexa\Contracts\Core\Repository\Values\Filter\Filter; use Ibexa\Core\Repository\SiteAccessAware\ContentService; @@ -27,12 +26,12 @@ use Ibexa\Core\Repository\Values\User\User; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\ContentService, * \Ibexa\Core\Repository\SiteAccessAware\ContentService * > */ -final class ContentServiceTest extends AbstractServiceTest +final class ContentServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { @@ -130,9 +129,6 @@ public function providerForPassTroughMethods(): array ]; } - /** - * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException - */ public function providerForLanguagesLookupMethods(): array { $content = $this->createMock(Content::class); diff --git a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php index 99f919f710..6448fe1a03 100644 --- a/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php @@ -22,12 +22,12 @@ use Ibexa\Core\Repository\Values\User\User; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\ContentTypeService, * \Ibexa\Core\Repository\SiteAccessAware\ContentTypeService * > */ -final class ContentTypeServiceTest extends AbstractServiceTest +final class ContentTypeServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php index 7ffdbf19b9..451f81a462 100644 --- a/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php @@ -13,12 +13,12 @@ use Ibexa\Core\Repository\SiteAccessAware\LanguageService; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\LanguageService, * \Ibexa\Core\Repository\SiteAccessAware\LanguageService * > */ -final class LanguageServiceTest extends AbstractServiceTest +final class LanguageServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php index 9162af9abd..e41ce54578 100644 --- a/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/LocationServiceTest.php @@ -19,12 +19,12 @@ use Ibexa\Core\Repository\Values\Content\VersionInfo; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\LocationService, * \Ibexa\Core\Repository\SiteAccessAware\LocationService * > */ -final class LocationServiceTest extends AbstractServiceTest +final class LocationServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php index cf38b6e3e8..38389ca16c 100644 --- a/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php @@ -18,12 +18,12 @@ use Ibexa\Core\Repository\Values\ObjectState\ObjectStateGroup; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\ObjectStateService, * \Ibexa\Core\Repository\SiteAccessAware\ObjectStateService * > */ -final class ObjectStateServiceTest extends AbstractServiceTest +final class ObjectStateServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php index 2c707709aa..919d440f87 100644 --- a/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/SearchServiceTest.php @@ -15,12 +15,12 @@ use Ibexa\Core\Repository\Values\Content\Content; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\SearchService, * \Ibexa\Core\Repository\SiteAccessAware\SearchService * > */ -final class SearchServiceTest extends AbstractServiceTest +final class SearchServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { @@ -37,7 +37,7 @@ public function providerForPassTroughMethods(): array // string $method, array $arguments, bool $return = true return [ ['suggest', ['prefix', [], 11]], - ['supports', [SearchService::CAPABILITY_ADVANCED_FULLTEXT]], + ['supports', [APIService::CAPABILITY_ADVANCED_FULLTEXT]], ]; } @@ -66,7 +66,7 @@ public function providerForLanguagesLookupMethods(): array ]; } - protected function setLanguagesLookupArguments(array $arguments, $languageArgumentIndex): array + protected function setLanguagesLookupArguments(array $arguments, int $languageArgumentIndex): array { $arguments[$languageArgumentIndex] = [ 'languages' => [], @@ -76,7 +76,7 @@ protected function setLanguagesLookupArguments(array $arguments, $languageArgume return $arguments; } - protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages): array + protected function setLanguagesLookupExpectedArguments(array $arguments, int $languageArgumentIndex, array $languages): array { $arguments[$languageArgumentIndex] = [ 'languages' => $languages, @@ -86,13 +86,8 @@ protected function setLanguagesLookupExpectedArguments(array $arguments, $langua return $arguments; } - protected function setLanguagesPassTroughArguments(array $arguments, $languageArgumentIndex, array $languages): array + protected function setLanguagesPassTroughArguments(array $arguments, int $languageArgumentIndex, array $languages): array { - $arguments[$languageArgumentIndex] = [ - 'languages' => $languages, - 'useAlwaysAvailable' => true, - ]; - - return $arguments; + return $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); } } diff --git a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php index 99090cbb94..5c3c18729f 100644 --- a/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/TrashServiceTest.php @@ -17,12 +17,12 @@ use Ibexa\Core\Repository\Values\Content\TrashItem; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\TrashService, * \Ibexa\Core\Repository\SiteAccessAware\TrashService * > */ -final class TrashServiceTest extends AbstractServiceTest +final class TrashServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { diff --git a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php index 742eb9e82e..e1e3f0992e 100644 --- a/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php @@ -13,12 +13,12 @@ use Ibexa\Core\Repository\Values\Content\Location; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\URLAliasService, * \Ibexa\Core\Repository\SiteAccessAware\URLAliasService * > */ -final class UrlAliasServiceTest extends AbstractServiceTest +final class UrlAliasServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { @@ -68,16 +68,22 @@ public function providerForLanguagesLookupMethods(): array ]; } - protected function setLanguagesLookupExpectedArguments(array $arguments, $languageArgumentIndex, array $languages): array - { + protected function setLanguagesLookupExpectedArguments( + array $arguments, + int $languageArgumentIndex, + array $languages + ): array { $arguments[$languageArgumentIndex] = $languages; $arguments[$languageArgumentIndex - 1] = true; return $arguments; } - protected function setLanguagesPassTroughArguments(array $arguments, $languageArgumentIndex, array $languages) - { + protected function setLanguagesPassTroughArguments( + array $arguments, + int $languageArgumentIndex, + array $languages + ): array { return $this->setLanguagesLookupExpectedArguments($arguments, $languageArgumentIndex, $languages); } } diff --git a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php index 53c183abee..1e0adb9691 100644 --- a/tests/lib/Repository/SiteAccessAware/UserServiceTest.php +++ b/tests/lib/Repository/SiteAccessAware/UserServiceTest.php @@ -7,8 +7,6 @@ namespace Ibexa\Tests\Core\Repository\SiteAccessAware; -use DateInterval; -use DateTime; use Ibexa\Contracts\Core\Repository\UserService as APIService; use Ibexa\Contracts\Core\Repository\Values\User\PasswordInfo; use Ibexa\Contracts\Core\Repository\Values\User\PasswordValidationContext; @@ -23,12 +21,12 @@ use Ibexa\Core\Repository\Values\User\UserGroupCreateStruct; /** - * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTest< + * @extends \Ibexa\Tests\Core\Repository\SiteAccessAware\AbstractServiceTestCase< * \Ibexa\Contracts\Core\Repository\UserService, * \Ibexa\Core\Repository\SiteAccessAware\UserService * > */ -final class UserServiceTest extends AbstractServiceTest +final class UserServiceTest extends AbstractServiceTestCase { public function getAPIServiceClassName(): string { From b68be0acd8ea36cc49f8790c5732d9284320c3ae Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 12:30:47 +0200 Subject: [PATCH 110/185] IBX-9727: [Tests] Fixed strict types for Pagination adapters tests --- .../AdapterFactory/SearchHitAdapterFactoryTest.php | 6 ++---- tests/lib/Pagination/ContentFilteringAdapterTest.php | 5 ++--- tests/lib/Pagination/LocationFilteringAdapterTest.php | 5 ++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php index 5b4297c253..fc2ce77b02 100644 --- a/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php +++ b/tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php @@ -22,14 +22,12 @@ final class SearchHitAdapterFactoryTest extends TestCase { - private const EXAMPLE_LANGUAGE_FILTER = [ + private const array EXAMPLE_LANGUAGE_FILTER = [ 'language' => 'eng-GB', ]; - /** @var \Ibexa\Contracts\Core\Repository\SearchService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $searchService; + private SearchService & MockObject $searchService; - /** @var \Ibexa\Core\Pagination\Pagerfanta\AdapterFactory\SearchHitAdapterFactory */ private SearchHitAdapterFactory $searchHitAdapterFactory; protected function setUp(): void diff --git a/tests/lib/Pagination/ContentFilteringAdapterTest.php b/tests/lib/Pagination/ContentFilteringAdapterTest.php index 8340009134..491a77dcc2 100644 --- a/tests/lib/Pagination/ContentFilteringAdapterTest.php +++ b/tests/lib/Pagination/ContentFilteringAdapterTest.php @@ -18,13 +18,12 @@ final class ContentFilteringAdapterTest extends TestCase { - private const EXAMPLE_LANGUAGE_FILTER = [ + private const array EXAMPLE_LANGUAGE_FILTER = [ 'languages' => ['eng-GB', 'pol-PL'], 'useAlwaysAvailable' => true, ]; - /** @var \Ibexa\Contracts\Core\Repository\ContentService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentService; + private ContentService & MockObject $contentService; protected function setUp(): void { diff --git a/tests/lib/Pagination/LocationFilteringAdapterTest.php b/tests/lib/Pagination/LocationFilteringAdapterTest.php index b92deeecee..1ef0e91d09 100644 --- a/tests/lib/Pagination/LocationFilteringAdapterTest.php +++ b/tests/lib/Pagination/LocationFilteringAdapterTest.php @@ -18,13 +18,12 @@ final class LocationFilteringAdapterTest extends TestCase { - private const EXAMPLE_LANGUAGE_FILTER = [ + private const array EXAMPLE_LANGUAGE_FILTER = [ 'languages' => ['eng-GB', 'pol-PL'], 'useAlwaysAvailable' => true, ]; - /** @var \Ibexa\Contracts\Core\Repository\LocationService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationService; + private LocationService & MockObject $locationService; protected function setUp(): void { From ecc8f1946ed0d901dee223e9c9f46d79d0df7b14 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 13:43:34 +0200 Subject: [PATCH 111/185] IBX-9727: [PHPDoc] Fixed PHPDoc of content type Handler::removeFieldDefinition --- src/contracts/Persistence/Content/Type/Handler.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/contracts/Persistence/Content/Type/Handler.php b/src/contracts/Persistence/Content/Type/Handler.php index 2ed1075853..e41d4ab436 100644 --- a/src/contracts/Persistence/Content/Type/Handler.php +++ b/src/contracts/Persistence/Content/Type/Handler.php @@ -260,12 +260,10 @@ public function addFieldDefinition($contentTypeId, $status, FieldDefinition $fie * Removes a field definition from an existing Type. * * This method creates a new version of the Type with the field definition - * referred to by $fieldDefinitionId removed. It does not update existing + * referred to by $fieldDefinition removed. It does not update existing * content objects depending on the field (default) values. * - * @param mixed $contentTypeId - * @param int $status One of Type::STATUS_DEFINED|Type::STATUS_DRAFT|Type::STATUS_MODIFIED - * @param mixed $fieldDefinitionId + * @phpstan-param \Ibexa\Contracts\Core\Persistence\Content\Type::STATUS_* $status * * @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException If field is not found */ From a628efb649c495c2709fac5fb43a5dae285549a4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 17:03:51 +0200 Subject: [PATCH 112/185] IBX-9727: Fixed strict types for PersistenceLogger --- .../Persistence/Cache/PersistenceLogger.php | 70 +++++++++++-------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/src/lib/Persistence/Cache/PersistenceLogger.php b/src/lib/Persistence/Cache/PersistenceLogger.php index af7d5c4328..60212fbac7 100644 --- a/src/lib/Persistence/Cache/PersistenceLogger.php +++ b/src/lib/Persistence/Cache/PersistenceLogger.php @@ -8,15 +8,23 @@ namespace Ibexa\Core\Persistence\Cache; +use function array_slice; +use function debug_backtrace; +use function hash; +use function implode; +use function serialize; + /** - * Log un-cached & cached use of SPI Persistence. + * Log un-cached and cached use of Persistence Cache. + * + * @phpstan-type TStats array{uncached: int, miss: int, hit: int, memory: int} */ class PersistenceLogger { - public const NAME = 'PersistenceLogger'; + public const string NAME = 'PersistenceLogger'; - /** @var int[] */ - protected $stats = [ + /** @phpstan-var TStats */ + protected array $stats = [ 'uncached' => 0, 'miss' => 0, 'hit' => 0, @@ -25,15 +33,15 @@ class PersistenceLogger protected bool $logCalls; - /** @var array */ - protected $calls = []; + /** @var array */ + protected array $calls = []; - /** @var array */ - protected $unCachedHandlers = []; + /** @var array */ + protected array $unCachedHandlers = []; /** - * @param bool $logCalls Flag to enable logging of calls or not, provides extra debug info about calls made to SPI - * level, including where they come form. However, this uses quite a bit of memory. + * @param bool $logCalls Flag to enable logging of calls or not, provides extra debug info about calls made + * to persistence level, including where they come form. However, this uses quite a bit of memory. */ public function __construct(bool $logCalls = true) { @@ -59,8 +67,8 @@ public function logCall(string $method, array $arguments = []): void $this->collectCacheCallData( $method, $arguments, - \array_slice( - \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 9), + array_slice( + debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 9), 2 ), 'uncached' @@ -82,11 +90,11 @@ public function logCacheMiss(array $arguments = [], int $traceOffset = 2): void return; } - $trace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8 + $traceOffset); + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8 + $traceOffset); $this->collectCacheCallData( $trace[$traceOffset - 1]['class'] . '::' . $trace[$traceOffset - 1]['function'], $arguments, - \array_slice($trace, $traceOffset), + array_slice($trace, $traceOffset), 'miss' ); } @@ -113,27 +121,25 @@ public function logCacheHit(array $arguments = [], int $traceOffset = 2, bool $i return; } - $trace = \debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8 + $traceOffset); + $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 8 + $traceOffset); $this->collectCacheCallData( $trace[$traceOffset - 1]['class'] . '::' . $trace[$traceOffset - 1]['function'], $arguments, - \array_slice($trace, $traceOffset), + array_slice($trace, $traceOffset), $inMemory ? 'memory' : 'hit' ); } /** - * Collection method for {@see logCacheHit()}, {@see logCacheMiss()} & {@see logCall()}. + * Collection method for {@see logCacheHit()}, {@see logCacheMiss()} & {@see logCall()}. * - * @param $method - * @param array $arguments - * @param array $trimmedBacktrace - * @param string $type + * @param array $arguments + * @param array $trimmedBacktrace */ private function collectCacheCallData(string $method, array $arguments, array $trimmedBacktrace, string $type): void { - // simplest/fastests hash possible to identify if we have already collected this before to save on memory use - $callHash = \hash('adler32', $method . \serialize($arguments)); + // the simplest / fastest hash possible to identify if we have already collected this before to save on memory use + $callHash = hash('adler32', $method . serialize($arguments)); if (empty($this->calls[$callHash])) { $this->calls[$callHash] = [ 'method' => $method, @@ -150,7 +156,7 @@ private function collectCacheCallData(string $method, array $arguments, array $t ++$this->calls[$callHash]['stats'][$type]; $trace = $this->getSimpleCallTrace($trimmedBacktrace); - $traceHash = \hash('adler32', \implode('', $trace)); + $traceHash = hash('adler32', implode('', $trace)); if (empty($this->calls[$callHash]['traces'][$traceHash])) { $this->calls[$callHash]['traces'][$traceHash] = [ 'trace' => $trace, @@ -164,7 +170,7 @@ private function collectCacheCallData(string $method, array $arguments, array $t * Simplify trace to an array of strings. * * Skips any traces from Symfony proxies or closures to make trace as readable as possible in as few lines as - * possible. And point is to identify which code outside kernel is triggering the SPI call, so trace stops one + * possible. And the point is to identify which code outside kernel is triggering the SPI call, so trace stops one * call after namespace is no longer in \Ibexa\Core\. * * @param array $backtrace Partial backtrace from |debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) or similar. @@ -176,7 +182,7 @@ private function getSimpleCallTrace(array $backtrace): array $calls = []; $exitOnNext = false; foreach ($backtrace as $call) { - if (!isset($call['class'][2]) || ($call['class'][2] !== '\\' && \strpos($call['class'], '\\') === false)) { + if (!isset($call['class'][2]) || ($call['class'][2] !== '\\' && !str_contains($call['class'], '\\'))) { // skip if class has no namespace (Symfony lazy proxy or plain function) continue; } @@ -188,7 +194,7 @@ private function getSimpleCallTrace(array $backtrace): array } // Break out as soon as we have listed 2 classes outside of kernel - if ($call['class'][0] !== 'e' && \strpos($call['class'], 'Ibexa\\Core\\') !== 0) { + if ($call['class'][0] !== 'e' && !str_starts_with($call['class'], 'Ibexa\\Core\\')) { $exitOnNext = true; } } @@ -215,9 +221,7 @@ public function getName(): string } /** - * Get stats (call/miss/hit/memory). - * - * @since 7.5 + * @phpstan-return TStats */ public function getStats(): array { @@ -229,11 +233,17 @@ public function isCallsLoggingEnabled(): bool return $this->logCalls; } + /** + * @return array + */ public function getCalls(): array { return $this->calls; } + /** + * @return array + */ public function getLoadedUnCachedHandlers(): array { return $this->unCachedHandlers; From f695c650645dfda8d1ae9910ead0a2eed39a9c7c Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 17:48:11 +0200 Subject: [PATCH 113/185] IBX-9727: [Tests] Fixed strict types for Persistence cache tests and improved test cases --- ...st.php => AbstractBaseHandlerTestCase.php} | 72 +-- ...t.php => AbstractCacheHandlerTestCase.php} | 128 +++-- ... AbstractInMemoryCacheHandlerTestCase.php} | 136 +++-- .../InMemoryClearingProxyAdapterTest.php | 22 +- .../Persistence/Cache/BookmarkHandlerTest.php | 16 +- .../Persistence/Cache/ContentHandlerTest.php | 221 ++++---- .../Cache/ContentLanguageHandlerTest.php | 202 ++++--- .../Cache/ContentTypeHandlerTest.php | 397 +++++++------- .../Persistence/Cache/LocationHandlerTest.php | 154 +++--- .../Cache/NotificationHandlerTest.php | 104 ++-- .../Cache/ObjectStateHandlerTest.php | 22 +- .../Cache/PersistenceHandlerTest.php | 8 +- .../Cache/PersistenceLoggerTest.php | 32 +- .../Persistence/Cache/SectionHandlerTest.php | 22 +- .../Persistence/Cache/SettingHandlerTest.php | 54 +- .../Cache/TransactionHandlerTest.php | 10 +- .../Persistence/Cache/TrashHandlerTest.php | 8 +- .../lib/Persistence/Cache/URLHandlerTest.php | 12 +- .../Persistence/Cache/UrlAliasHandlerTest.php | 308 ++++++----- .../Cache/UrlWildcardHandlerTest.php | 14 +- .../lib/Persistence/Cache/UserHandlerTest.php | 502 +++++++++--------- .../Cache/UserPreferenceHandlerTest.php | 110 ++-- 22 files changed, 1304 insertions(+), 1250 deletions(-) rename tests/lib/Persistence/Cache/{AbstractBaseHandlerTest.php => AbstractBaseHandlerTestCase.php} (70%) rename tests/lib/Persistence/Cache/{AbstractCacheHandlerTest.php => AbstractCacheHandlerTestCase.php} (70%) rename tests/lib/Persistence/Cache/{AbstractInMemoryCacheHandlerTest.php => AbstractInMemoryCacheHandlerTestCase.php} (70%) diff --git a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php b/tests/lib/Persistence/Cache/AbstractBaseHandlerTestCase.php similarity index 70% rename from tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php rename to tests/lib/Persistence/Cache/AbstractBaseHandlerTestCase.php index 1bc6e0717d..4bff0d9968 100644 --- a/tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractBaseHandlerTestCase.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\Persistence\Cache; +use Closure; use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter; use Ibexa\Core\Persistence\Cache\BookmarkHandler as CacheBookmarkHandler; @@ -38,39 +39,31 @@ use Symfony\Component\Cache\CacheItem; /** - * Abstract test case for spi cache impl. + * Abstract test case for persistence cache implementations. + * + * @phpstan-type TAdditionalCalls list */ -abstract class AbstractBaseHandlerTest extends TestCase +abstract class AbstractBaseHandlerTestCase extends TestCase { - /** @var \Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $cacheMock; + protected TransactionalInMemoryCacheAdapter & MockObject $cacheMock; - /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $persistenceHandlerMock; + protected Handler & MockObject $persistenceHandlerMock; - /** @var \Ibexa\Core\Persistence\Cache\Handler */ - protected $persistenceCacheHandler; + protected CacheHandler $persistenceCacheHandler; - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $loggerMock; + protected PersistenceLogger & MockObject $loggerMock; - /** @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $inMemoryMock; + protected InMemoryCache & MockObject $inMemoryMock; - /** @var \Closure */ - protected $cacheItemsClosure; + protected Closure $cacheItemsClosure; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $cacheIdentifierGeneratorMock; + protected CacheIdentifierGeneratorInterface & MockObject $cacheIdentifierGeneratorMock; - /** @var \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer */ - protected $cacheIdentifierSanitizer; + protected CacheIdentifierSanitizer $cacheIdentifierSanitizer; - /** @var \Ibexa\Core\Persistence\Cache\LocationPathConverter */ - protected $locationPathConverter; + protected LocationPathConverter $locationPathConverter; - /** @var \Ibexa\Core\Persistence\Cache\CacheIndicesValidatorInterface */ - protected MockObject $cacheIndicesValidator; + protected CacheIndicesValidatorInterface & MockObject $cacheIndicesValidator; /** * Setup the HandlerTest. @@ -112,7 +105,7 @@ protected function setUp(): void $this->loggerMock ); - $this->cacheItemsClosure = \Closure::bind( + $this->cacheItemsClosure = Closure::bind( static function ($key, $value, $isHit, $defaultLifetime = 0): CacheItem { $item = new CacheItem(); $item->key = $key; @@ -128,9 +121,6 @@ static function ($key, $value, $isHit, $defaultLifetime = 0): CacheItem { ); } - /** - * Tear down test (properties). - */ protected function tearDown(): void { unset( @@ -149,19 +139,25 @@ protected function tearDown(): void } /** - * @param $key - * @param null $value If null the cache item will be assumed to be a cache miss here. - * @param int $defaultLifetime - * - * @return \Symfony\Component\Cache\CacheItem + * @param mixed $value If null, the cache item will be assumed to be a cache miss here. */ - final protected function getCacheItem($key, $value = null, $defaultLifetime = 0) + final protected function getCacheItem(string $key, mixed $value = null, int $defaultLifetime = 0): CacheItem { $cacheItemsClosure = $this->cacheItemsClosure; return $cacheItemsClosure($key, $value, (bool)$value, $defaultLifetime); } + /** + * @phpstan-return array{ + * 0: \Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter & \PHPUnit\Framework\MockObject\MockObject, + * 1: \Ibexa\Contracts\Core\Persistence\Handler & \PHPUnit\Framework\MockObject\MockObject, + * 2: \Ibexa\Core\Persistence\Cache\PersistenceLogger & \PHPUnit\Framework\MockObject\MockObject, + * 3: \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface & \PHPUnit\Framework\MockObject\MockObject, + * 4: \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer, + * 5: \Ibexa\Core\Persistence\Cache\LocationPathConverter + * } + */ private function provideAbstractCacheHandlerArguments(): array { return [ @@ -174,6 +170,18 @@ private function provideAbstractCacheHandlerArguments(): array ]; } + /** + * @phpstan-return array{ + * 0: \Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter & \PHPUnit\Framework\MockObject\MockObject, + * 1: \Ibexa\Core\Persistence\Cache\PersistenceLogger & \PHPUnit\Framework\MockObject\MockObject, + * 2: \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache & \PHPUnit\Framework\MockObject\MockObject, + * 3: \Ibexa\Contracts\Core\Persistence\Handler & \PHPUnit\Framework\MockObject\MockObject, + * 4: \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierGeneratorInterface & \PHPUnit\Framework\MockObject\MockObject, + * 5: \Ibexa\Core\Persistence\Cache\Identifier\CacheIdentifierSanitizer, + * 6: \Ibexa\Core\Persistence\Cache\LocationPathConverter, + * 7: \Ibexa\Core\Persistence\Cache\CacheIndicesValidatorInterface & \PHPUnit\Framework\MockObject\MockObject + * } + */ private function provideInMemoryCacheHandlerArguments(): array { return [ diff --git a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractCacheHandlerTestCase.php similarity index 70% rename from tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php rename to tests/lib/Persistence/Cache/AbstractCacheHandlerTestCase.php index 6d8b117deb..0af65867f6 100644 --- a/tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractCacheHandlerTestCase.php @@ -10,25 +10,42 @@ /** * Abstract test case for spi cache impl. + * + * @phpstan-import-type TAdditionalCalls from \Ibexa\Tests\Core\Persistence\Cache\AbstractBaseHandlerTestCase */ -abstract class AbstractCacheHandlerTest extends AbstractBaseHandlerTest +abstract class AbstractCacheHandlerTestCase extends AbstractBaseHandlerTestCase { abstract public function getHandlerMethodName(): string; + /** + * @phpstan-return class-string + */ abstract public function getHandlerClassName(): string; - abstract public function providerForUnCachedMethods(): array; + /** + * @phpstan-return iterable< + * string, + * array{ + * 0: string, + * 1: list, + * 2?: null|list, + * 3?: null|list, + * 4?: null|list, + * 5?: null|string|list, + * 6?: mixed + * } + * > + */ + abstract public function providerForUnCachedMethods(): iterable; /** * @dataProvider providerForUnCachedMethods * - * @param string $method - * @param array $arguments - * @param array|null $tagGeneratingArguments - * @param array|null $keyGeneratingArguments - * @param array|null $tags - * @param string|array|null $key - * @param mixed $returnValue + * @phpstan-param list $arguments + * @phpstan-param list|null $tagGeneratingArguments + * @phpstan-param list|null $keyGeneratingArguments + * @phpstan-param list|null $tags + * @phpstan-param string|list|null $key */ final public function testUnCachedMethods( string $method, @@ -36,8 +53,8 @@ final public function testUnCachedMethods( array $tagGeneratingArguments = null, array $keyGeneratingArguments = null, array $tags = null, - $key = null, - $returnValue = null + string|array|null $key = null, + mixed $returnValue = null ): void { $handlerMethodName = $this->getHandlerMethodName(); @@ -61,15 +78,15 @@ final public function testUnCachedMethods( } if ($tags || $key) { - if ($tagGeneratingArguments) { + if (null !== $tagGeneratingArguments) { $this->cacheIdentifierGeneratorMock ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tags); + ->willReturnOnConsecutiveCalls(...($tags ?? [])); } - if ($keyGeneratingArguments) { + if (null !== $keyGeneratingArguments) { $callsCount = count($keyGeneratingArguments); if (is_array($key)) { @@ -104,26 +121,37 @@ final public function testUnCachedMethods( } $handler = $this->persistenceCacheHandler->$handlerMethodName(); - $actualReturnValue = call_user_func_array([$handler, $method], $arguments); + $actualReturnValue = $handler->$method(...$arguments); self::assertEquals($returnValue, $actualReturnValue); } + /** + * @phpstan-return list, + * 2: string, + * 3?: list|null, + * 4?: list|null, + * 5?: list|null, + * 6?: list|null, + * 7?: mixed, + * 8?: bool, + * 9?: TAdditionalCalls + * }> + */ abstract public function providerForCachedLoadMethodsHit(): array; /** * @dataProvider providerForCachedLoadMethodsHit * - * @param string $method - * @param array $arguments - * @param string $key - * @param array|null $tagGeneratingArguments - * @param array|null $tagGeneratingResults - * @param array|null $keyGeneratingArguments - * @param array|null $keyGeneratingResults - * @param mixed $data - * @param bool $multi Default false, set to true if method will lookup several cache items. - * @param array $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) + * @phpstan-param list $arguments + * @phpstan-param list|null $tagGeneratingArguments + * @phpstan-param list|null $tagGeneratingResults + * @phpstan-param list|null $keyGeneratingArguments + * @phpstan-param list|null $keyGeneratingResults + * @phpstan-param bool $multi Default false, set to true if the method will look up several cache items. + * @phpstan-param TAdditionalCalls $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) */ final public function testLoadMethodsCacheHit( string $method, @@ -133,7 +161,7 @@ final public function testLoadMethodsCacheHit( array $tagGeneratingResults = null, array $keyGeneratingArguments = null, array $keyGeneratingResults = null, - $data = null, + mixed $data = null, bool $multi = false, array $additionalCalls = [] ): void { @@ -147,7 +175,7 @@ final public function testLoadMethodsCacheHit( ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); + ->willReturnOnConsecutiveCalls(...($tagGeneratingResults ?? [])); } if ($keyGeneratingArguments) { @@ -155,7 +183,7 @@ final public function testLoadMethodsCacheHit( ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); + ->willReturnOnConsecutiveCalls(...($keyGeneratingResults ?? [])); } if ($multi) { @@ -183,26 +211,38 @@ final public function testLoadMethodsCacheHit( } $handler = $this->persistenceCacheHandler->$handlerMethodName(); - $return = call_user_func_array([$handler, $method], $arguments); + $return = $handler->$method(...$arguments); self::assertEquals($data, $return); } + /** + * @phpstan-return list, + * 2: string, + * 3?: list|null, + * 4?: list|null, + * 5?: list|null, + * 6?: list|null, + * 7?: mixed, + * 8?: bool, + * 9?: TAdditionalCalls + * }> + */ abstract public function providerForCachedLoadMethodsMiss(): array; /** * @dataProvider providerForCachedLoadMethodsMiss * - * @param string $method - * @param array $arguments - * @param string $key - * @param array|null $tagGeneratingArguments - * @param array|null $tagGeneratingResults - * @param array|null $keyGeneratingArguments - * @param array|null $keyGeneratingResults - * @param object $data - * @param bool $multi Default false, set to true if method will lookup several cache items. - * @param array $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) + * @param bool $multi Default false, set to true if the method will look up several cache items. + * + * @phpstan-param list $arguments + * @phpstan-param list|null $tagGeneratingArguments + * @phpstan-param list|null $tagGeneratingResults + * @phpstan-param list|null $keyGeneratingArguments + * @phpstan-param list|null $keyGeneratingResults + * @phpstan-param TAdditionalCalls $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) */ final public function testLoadMethodsCacheMiss( string $method, @@ -212,11 +252,11 @@ final public function testLoadMethodsCacheMiss( array $tagGeneratingResults = null, array $keyGeneratingArguments = null, array $keyGeneratingResults = null, - $data = null, + mixed $data = null, bool $multi = false, array $additionalCalls = [] ): void { - $cacheItem = $this->getCacheItem($key, null); + $cacheItem = $this->getCacheItem($key); $handlerMethodName = $this->getHandlerMethodName(); $handler = $this->persistenceCacheHandler->$handlerMethodName(); @@ -230,7 +270,7 @@ final public function testLoadMethodsCacheMiss( ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); + ->willReturnOnConsecutiveCalls(...($tagGeneratingResults ?? [])); } if ($keyGeneratingArguments) { @@ -238,7 +278,7 @@ final public function testLoadMethodsCacheMiss( ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); + ->willReturnOnConsecutiveCalls(...($keyGeneratingResults ?? [])); } if ($multi) { @@ -285,7 +325,7 @@ final public function testLoadMethodsCacheMiss( ->method('save') ->with($cacheItem); - $return = call_user_func_array([$handler, $method], $arguments); + $return = $handler->$method(...$arguments); self::assertEquals($data, $return); diff --git a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTestCase.php similarity index 70% rename from tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php rename to tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTestCase.php index 4ea92bb734..4f014d9ea4 100644 --- a/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php +++ b/tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTestCase.php @@ -10,25 +10,43 @@ /** * Abstract test case for spi cache impl, with in-memory handling. + * + * @phpstan-import-type TAdditionalCalls from \Ibexa\Tests\Core\Persistence\Cache\AbstractBaseHandlerTestCase */ -abstract class AbstractInMemoryCacheHandlerTest extends AbstractBaseHandlerTest +abstract class AbstractInMemoryCacheHandlerTestCase extends AbstractBaseHandlerTestCase { abstract public function getHandlerMethodName(): string; + /** + * @return class-string + */ abstract public function getHandlerClassName(): string; - abstract public function providerForUnCachedMethods(): array; + /** + * @phpstan-return iterable< + * string, + * array{ + * 0: string, + * 1: list, + * 2?: null|list, + * 3?: null|list, + * 4?: null|list, + * 5?: null|string|list, + * 6?: mixed, + * 7?: bool + * } + * > + */ + abstract public function providerForUnCachedMethods(): iterable; /** * @dataProvider providerForUnCachedMethods * - * @param string $method - * @param array $arguments - * @param array|null $tagGeneratingArguments - * @param array|null $keyGeneratingArguments - * @param array|null $tags - * @param array|null $key - * @param mixed $returnValue + * @param list $arguments + * @param list|null $tagGeneratingArguments + * @param list|null $keyGeneratingArguments + * @param list|null $tags + * @param list|null $key */ final public function testUnCachedMethods( string $method, @@ -37,7 +55,7 @@ final public function testUnCachedMethods( array $keyGeneratingArguments = null, array $tags = null, array $key = null, - $returnValue = null, + mixed $returnValue = null, bool $callInnerHandler = true ): void { $handlerMethodName = $this->getHandlerMethodName(); @@ -67,7 +85,7 @@ final public function testUnCachedMethods( ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tags); + ->willReturnOnConsecutiveCalls(...($tags ?? [])); } if ($keyGeneratingArguments) { @@ -104,26 +122,43 @@ final public function testUnCachedMethods( } $handler = $this->persistenceCacheHandler->$handlerMethodName(); - $actualReturnValue = call_user_func_array([$handler, $method], $arguments); + $actualReturnValue = $handler->$method(...$arguments); self::assertEquals($returnValue, $actualReturnValue); } - abstract public function providerForCachedLoadMethodsHit(): array; + /** + * @phpstan-return iterable< + * string, + * array{ + * 0: string, + * 1: list, + * 2: string, + * 3?: null|list, + * 4?: null|list, + * 5?: null|list, + * 6?: null|list, + * 7?: mixed, + * 8?: bool, + * 9?: mixed, + * 10?: bool, + * 11?: list + * } + * > + */ + abstract public function providerForCachedLoadMethodsHit(): iterable; /** * @dataProvider providerForCachedLoadMethodsHit * - * @param string $method - * @param array $arguments - * @param string $key - * @param array|null $tagGeneratingArguments - * @param array|null $tagGeneratingResults - * @param array|null $keyGeneratingArguments - * @param array|null $keyGeneratingResults - * @param mixed $data - * @param bool $multi Default false, set to true if method will lookup several cache items. - * @param array $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) + * @param bool $multi Default false, set to true if the method will look up several cache items. + * + * @phpstan-param list|null $tagGeneratingArguments + * @phpstan-param list|null $tagGeneratingResults + * @phpstan-param list|null $keyGeneratingArguments + * @phpstan-param list|null $keyGeneratingResults + * @phpstan-param list $arguments + * @phpstan-param list $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) */ final public function testLoadMethodsCacheHit( string $method, @@ -133,7 +168,7 @@ final public function testLoadMethodsCacheHit( array $tagGeneratingResults = null, array $keyGeneratingArguments = null, array $keyGeneratingResults = null, - $data = null, + mixed $data = null, bool $multi = false, array $additionalCalls = [] ): void { @@ -149,7 +184,7 @@ final public function testLoadMethodsCacheHit( ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); + ->willReturnOnConsecutiveCalls(...($tagGeneratingResults ?? [])); } if ($keyGeneratingArguments) { @@ -157,7 +192,7 @@ final public function testLoadMethodsCacheHit( ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); + ->willReturnOnConsecutiveCalls(...($keyGeneratingResults ?? [])); } if ($multi) { @@ -185,26 +220,41 @@ final public function testLoadMethodsCacheHit( } $handler = $this->persistenceCacheHandler->$handlerMethodName(); - $return = call_user_func_array([$handler, $method], $arguments); + $return = $handler->$method(...$arguments); self::assertEquals($data, $return); } - abstract public function providerForCachedLoadMethodsMiss(): array; + /** + * @phpstan-return iterable< + * string, + * array{ + * 0: string, + * 1: list, + * 2: string, + * 3?: null|list, + * 4?: null|list, + * 5?: null|list, + * 6?: null|list, + * 7?: mixed, + * 8?: bool, + * 9?: TAdditionalCalls + * } + * > + */ + abstract public function providerForCachedLoadMethodsMiss(): iterable; /** * @dataProvider providerForCachedLoadMethodsMiss * - * @param string $method - * @param array $arguments - * @param string $key - * @param array|null $tagGeneratingArguments - * @param array|null $tagGeneratingResults - * @param array|null $keyGeneratingArguments - * @param array|null $keyGeneratingResults - * @param null $data - * @param bool $multi Default false, set to true if method will lookup several cache items. - * @param array $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) + * @param bool $multi Default false, set to true if the method will look up several cache items. + * + * @phpstan-param list $arguments + * @phpstan-param list|null $tagGeneratingArguments + * @phpstan-param list|null $tagGeneratingResults + * @phpstan-param list|null $keyGeneratingArguments + * @phpstan-param list|null $keyGeneratingResults + * @phpstan-param TAdditionalCalls $additionalCalls Sets of additional calls being made to handlers, with 4 values (0: handler name, 1: handler class, 2: method, 3: return data) */ final public function testLoadMethodsCacheMiss( string $method, @@ -214,11 +264,11 @@ final public function testLoadMethodsCacheMiss( array $tagGeneratingResults = null, array $keyGeneratingArguments = null, array $keyGeneratingResults = null, - $data = null, + mixed $data = null, bool $multi = false, array $additionalCalls = [] ): void { - $cacheItem = $this->getCacheItem($key, null); + $cacheItem = $this->getCacheItem($key); $handlerMethodName = $this->getHandlerMethodName(); $this->loggerMock->expects(self::once())->method('logCacheMiss'); @@ -230,7 +280,7 @@ final public function testLoadMethodsCacheMiss( ->expects(self::exactly(count($tagGeneratingArguments))) ->method('generateTag') ->withConsecutive(...$tagGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$tagGeneratingResults); + ->willReturnOnConsecutiveCalls(...($tagGeneratingResults ?? [])); } if ($keyGeneratingArguments) { @@ -238,7 +288,7 @@ final public function testLoadMethodsCacheMiss( ->expects(self::exactly(count($keyGeneratingArguments))) ->method('generateKey') ->withConsecutive(...$keyGeneratingArguments) - ->willReturnOnConsecutiveCalls(...$keyGeneratingResults); + ->willReturnOnConsecutiveCalls(...($keyGeneratingResults ?? [])); } if ($multi) { @@ -286,7 +336,7 @@ final public function testLoadMethodsCacheMiss( ->with($cacheItem); $handler = $this->persistenceCacheHandler->$handlerMethodName(); - $return = call_user_func_array([$handler, $method], $arguments); + $return = $handler->$method(...$arguments); self::assertEquals($data, $return); diff --git a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php index 56bcf5202e..131218bb93 100644 --- a/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php +++ b/tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\Persistence\Cache\Adapter; +use Closure; use Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter; use Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache; use PHPUnit\Framework\MockObject\MockObject; @@ -20,21 +21,14 @@ */ class InMemoryClearingProxyAdapterTest extends TestCase { - /** @var \Ibexa\Core\Persistence\Cache\Adapter\TransactionalInMemoryCacheAdapter */ - protected $cache; + protected TransactionalInMemoryCacheAdapter $cache; - /** @var \Symfony\Component\Cache\Adapter\TagAwareAdapterInterface|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $innerPool; + private TagAwareAdapterInterface & MockObject $innerPool; - /** @var \Ibexa\Core\Persistence\Cache\InMemory\InMemoryCache|\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $inMemory; + private InMemoryCache & MockObject $inMemory; - /** @var \Closure */ - private ?\Closure $cacheItemsClosure; + private Closure $cacheItemsClosure; - /** - * Setup the HandlerTest. - */ protected function setUp(): void { parent::setUp(); @@ -47,7 +41,7 @@ protected function setUp(): void [$this->inMemory] ); - $this->cacheItemsClosure = \Closure::bind( + $this->cacheItemsClosure = Closure::bind( static function ($key, $value, $isHit, $defaultLifetime = 0, $tags = []): CacheItem { $item = new CacheItem(); $item->isTaggable = true; @@ -69,9 +63,7 @@ static function ($key, $value, $isHit, $defaultLifetime = 0, $tags = []): CacheI */ protected function tearDown(): void { - unset($this->cache); - unset($this->innerPool); - unset($this->inMemory); + unset($this->cache, $this->innerPool, $this->inMemory); parent::tearDown(); } diff --git a/tests/lib/Persistence/Cache/BookmarkHandlerTest.php b/tests/lib/Persistence/Cache/BookmarkHandlerTest.php index baf635f39a..2135adef8d 100644 --- a/tests/lib/Persistence/Cache/BookmarkHandlerTest.php +++ b/tests/lib/Persistence/Cache/BookmarkHandlerTest.php @@ -17,7 +17,7 @@ /** * Test case for Persistence\Cache\BookmarkHandler. */ -class BookmarkHandlerTest extends AbstractCacheHandlerTest +class BookmarkHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -29,16 +29,14 @@ public function getHandlerClassName(): string return SPIBookmarkHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? tags, array? $tags, string? $key, mixed? $returnValue - return [ - ['create', [new CreateStruct()], null, null, null, null, new Bookmark()], - ['delete', [1], [['bookmark', [1], false]], null, ['b-1']], - ['loadUserBookmarks', [3, 2, 1], null, null, null, null, []], - ['countUserBookmarks', [3], null, null, null, null, 1], - ['locationSwapped', [1, 2], null, null, null, null], - ]; + yield 'create' => ['create', [new CreateStruct()], null, null, null, null, new Bookmark()]; + yield 'delete' => ['delete', [1], [['bookmark', [1], false]], null, ['b-1']]; + yield 'loadUserBookmarks' => ['loadUserBookmarks', [3, 2, 1], null, null, null, null, []]; + yield 'countUserBookmarks' => ['countUserBookmarks', [3], null, null, null, null, 1]; + yield 'locationSwapped' => ['locationSwapped', [1, 2], null, null, null, null]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/ContentHandlerTest.php b/tests/lib/Persistence/Cache/ContentHandlerTest.php index 546e8a2716..76c65c994a 100644 --- a/tests/lib/Persistence/Cache/ContentHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentHandlerTest.php @@ -23,7 +23,7 @@ /** * @covers \Ibexa\Core\Persistence\Cache\ContentHandler */ -class ContentHandlerTest extends AbstractInMemoryCacheHandlerTest +class ContentHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -35,50 +35,41 @@ public function getHandlerClassName(): string return SPIContentHandler::class; } - /** - * @return array - */ - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['create', [new CreateStruct()]], - ['createDraftFromVersion', [2, 1, 14], null, [['content_version_list', [2], true]], [], ['ibx-c-2-vl']], - ['copy', [2, 1]], - ['loadDraftsForUser', [14]], - ['setStatus', [2, 0, 1], [['content_version', [2, 1], false]], null, ['c-2-v-1']], - ['setStatus', [2, 1, 1], [['content', [2], false]], null, ['c-2']], - ['updateMetadata', [2, new MetadataUpdateStruct()], [['content', [2], false]], null, ['c-2']], - ['updateContent', [2, 1, new UpdateStruct()], [['content_version', [2, 1], false]], null, ['c-2-v-1']], - //['deleteContent', [2]], own tests for relations complexity - ['deleteVersion', [2, 1], [['content_version', [2, 1], false]], null, ['c-2-v-1']], - ['addRelation', [new RelationCreateStruct(['destinationContentId' => 2, 'sourceContentId' => 4])], [['content', [2], false], ['content', [4], false]], null, ['c-2', 'c-4']], - ['removeRelation', [66, APIRelation::COMMON, 2], [['content', [2], false], ['relation', [66], false]], null, ['c-2', 're-66']], - ['loadReverseRelations', [2, 3]], - ['publish', [2, 3, new MetadataUpdateStruct()], [['content', [2], false]], null, ['c-2']], + yield 'create' => ['create', [new CreateStruct()]]; + yield 'createDraftFromVersion' => ['createDraftFromVersion', [2, 1, 14], null, [['content_version_list', [2], true]], [], ['ibx-c-2-vl']]; + yield 'copy' => ['copy', [2, 1]]; + yield 'loadDraftsForUser' => ['loadDraftsForUser', [14]]; + yield 'setStatus' => ['setStatus', [2, 0, 1], [['content_version', [2, 1], false]], null, ['c-2-v-1']]; + yield 'setStatus_published' => ['setStatus', [2, 1, 1], [['content', [2], false]], null, ['c-2']]; + yield 'updateMetadata' => ['updateMetadata', [2, new MetadataUpdateStruct()], [['content', [2], false]], null, ['c-2']]; + yield 'updateContent' => ['updateContent', [2, 1, new UpdateStruct()], [['content_version', [2, 1], false]], null, ['c-2-v-1']]; + yield 'deleteVersion' => ['deleteVersion', [2, 1], [['content_version', [2, 1], false]], null, ['c-2-v-1']]; + yield 'addRelation' => ['addRelation', [new RelationCreateStruct(['destinationContentId' => 2, 'sourceContentId' => 4])], [['content', [2], false], ['content', [4], false]], null, ['c-2', 'c-4']]; + yield 'removeRelation' => ['removeRelation', [66, APIRelation::COMMON, 2], [['content', [2], false], ['relation', [66], false]], null, ['c-2', 're-66']]; + yield 'loadReverseRelations' => ['loadReverseRelations', [2, 3]]; + yield 'publish' => ['publish', [2, 3, new MetadataUpdateStruct()], [['content', [2], false]], null, ['c-2']]; + yield 'listVersions' => [ + 'listVersions', + [2, 1], + [['content', [2], false]], + [['content_version_list', [2], true]], + [], + [], [ - 'listVersions', - [2, 1], - [['content', [2], false]], - [['content_version_list', [2], true]], - [], - [], - [ - new VersionInfo([ - 'versionNo' => 1, - 'contentInfo' => new ContentInfo([ - 'id' => 2, - ]), + new VersionInfo([ + 'versionNo' => 1, + 'contentInfo' => new ContentInfo([ + 'id' => 2, ]), - ], + ]), ], ]; } - /** - * @return array - */ - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $info = new ContentInfo(['id' => 2]); $version = new VersionInfo(['versionNo' => 1, 'contentInfo' => $info]); @@ -91,39 +82,34 @@ public function providerForCachedLoadMethodsHit(): array $relation->type = 1; $relationList[1] = $relation; - // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi = false, array $additionalCalls - return [ - ['countReverseRelations', [2, null], 'ibx-crrc-2-t-', null, null, [['content_reverse_relations_count', [2, null], true]], ['ibx-crrc-2-t-'], 10], - ['countReverseRelations', [2, 8], 'ibx-crrc-2-t-8', null, null, [['content_reverse_relations_count', [2, 8], true]], ['ibx-crrc-2-t-8'], 10], - ['countRelations', [2], 'ibx-crc-2-v--t-', null, null, [['content_relations_count_with_by_version_type_suffix', [2, null, null], true]], ['ibx-crc-2-v--t-'], 10], - ['countRelations', [2, 2], 'ibx-crc-2-v-2-t-', null, null, [['content_relations_count_with_by_version_type_suffix', [2, 2, null], true]], ['ibx-crc-2-v-2-t-'], 10], - ['countRelations', [2, null, 1], 'ibx-crc-2-v--t-1', null, null, [['content_relations_count_with_by_version_type_suffix', [2, null, 1], true]], ['ibx-crc-2-v--t-1'], 10], - ['countRelations', [2, 2, 1], 'ibx-crc-2-v-2-t-1', null, null, [['content_relations_count_with_by_version_type_suffix', [2, 2, 1], true]], ['ibx-crc-2-v-2-t-1'], 10], - ['loadRelationList', [2, 1, 0], 'ibx-crl-2-l-1-o-0-v--t-', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, null, null], true]], ['ibx-crl-2-l-1-o-0-v--t-'], $relationList], - ['loadRelationList', [2, 1, 0, 2], 'ibx-crl-2-l-1-o-0-v-2-t-', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, 2, null], true]], ['ibx-crl-2-l-1-o-0-v-2-t-'], $relationList], - ['loadRelationList', [2, 1, 0, null, 1], 'ibx-crl-2-l-1-o-0-v--t-1', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, null, 1], true]], ['ibx-crl-2-l-1-o-0-v--t-1'], $relationList], - ['loadRelationList', [2, 1, 0, 2, 1], 'ibx-crl-2-l-1-o-0-v-2-t-1', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, 2, 1], true]], ['ibx-crl-2-l-1-o-0-v-2-t-1'], $relationList], - ['load', [2, 1], 'ibx-c-2-1-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], $content], - ['load', [2, 1, ['eng-GB', 'eng-US']], 'ibx-c-2-1-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], $content], - ['load', [2], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], $content], - ['load', [2, null, ['eng-GB', 'eng-US']], 'ibx-c-2-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], $content], - ['loadContentList', [[2]], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], [2 => $content], true], - ['loadContentList', [[5], ['eng-GB', 'eng-US']], 'ibx-c-5-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], [5 => $content], true], - ['loadContentInfo', [2], 'ibx-ci-2', null, null, [['content_info', [], true]], ['ibx-ci'], $info], - ['loadContentInfoList', [[2]], 'ibx-ci-2', null, null, [['content_info', [], true]], ['ibx-ci'], [2 => $info], true], - ['loadContentInfoByRemoteId', ['3d8jrj'], 'ibx-cibri-3d8jrj', null, null, [['content_info_by_remote_id', [], true]], ['ibx-cibri'], $info], - ['loadRelation', [66], 'ibx-re-66', null, null, [['relation', [66], true]], ['ibx-re-66'], new SPIRelation()], - ['loadVersionInfo', [2, 1], 'ibx-cvi-2-1', null, null, [['content_version_info', [2], true]], ['ibx-cvi-2'], $version], - ['loadVersionInfo', [2], 'ibx-cvi-2', null, null, [['content_version_info', [2], true]], ['ibx-cvi-2'], $version], - ['listVersions', [2], 'ibx-c-2-vl', null, null, [['content_version_list', [2], true]], ['ibx-c-2-vl'], [$version]], - ['loadVersionInfoList', [[2]], 'ibx-cvi-2', null, null, [['content_version_info', [], true]], ['ibx-cvi'], [2 => $version], true], - ]; + // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi + yield 'countReverseRelations' => ['countReverseRelations', [2, null], 'ibx-crrc-2-t-', null, null, [['content_reverse_relations_count', [2, null], true]], ['ibx-crrc-2-t-'], 10]; + yield 'countReverseRelations_8' => ['countReverseRelations', [2, 8], 'ibx-crrc-2-t-8', null, null, [['content_reverse_relations_count', [2, 8], true]], ['ibx-crrc-2-t-8'], 10]; + yield 'countRelations' => ['countRelations', [2], 'ibx-crc-2-v--t-', null, null, [['content_relations_count_with_by_version_type_suffix', [2, null, null], true]], ['ibx-crc-2-v--t-'], 10]; + yield 'countRelations_2' => ['countRelations', [2, 2], 'ibx-crc-2-v-2-t-', null, null, [['content_relations_count_with_by_version_type_suffix', [2, 2, null], true]], ['ibx-crc-2-v-2-t-'], 10]; + yield 'countRelations_1' => ['countRelations', [2, null, 1], 'ibx-crc-2-v--t-1', null, null, [['content_relations_count_with_by_version_type_suffix', [2, null, 1], true]], ['ibx-crc-2-v--t-1'], 10]; + yield 'countRelations_2_1' => ['countRelations', [2, 2, 1], 'ibx-crc-2-v-2-t-1', null, null, [['content_relations_count_with_by_version_type_suffix', [2, 2, 1], true]], ['ibx-crc-2-v-2-t-1'], 10]; + yield 'loadRelationList' => ['loadRelationList', [2, 1, 0], 'ibx-crl-2-l-1-o-0-v--t-', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, null, null], true]], ['ibx-crl-2-l-1-o-0-v--t-'], $relationList]; + yield 'loadRelationList_2' => ['loadRelationList', [2, 1, 0, 2], 'ibx-crl-2-l-1-o-0-v-2-t-', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, 2, null], true]], ['ibx-crl-2-l-1-o-0-v-2-t-'], $relationList]; + yield 'loadRelationList_1' => ['loadRelationList', [2, 1, 0, null, 1], 'ibx-crl-2-l-1-o-0-v--t-1', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, null, 1], true]], ['ibx-crl-2-l-1-o-0-v--t-1'], $relationList]; + yield 'loadRelationList_2_1' => ['loadRelationList', [2, 1, 0, 2, 1], 'ibx-crl-2-l-1-o-0-v-2-t-1', null, null, [['content_relations_list_with_by_version_type_suffix', [2, 1, 0, 2, 1], true]], ['ibx-crl-2-l-1-o-0-v-2-t-1'], $relationList]; + yield 'load' => ['load', [2, 1], 'ibx-c-2-1-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], $content]; + yield 'load_translations' => ['load', [2, 1, ['eng-GB', 'eng-US']], 'ibx-c-2-1-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], $content]; + yield 'load_2' => ['load', [2], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], $content]; + yield 'load_translations_2' => ['load', [2, null, ['eng-GB', 'eng-US']], 'ibx-c-2-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], $content]; + yield 'loadContentList' => ['loadContentList', [[2]], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, null, null, [['content', [], true]], ['ibx-c'], [2 => $content], true]; + yield 'loadContentList_translations' => ['loadContentList', [[5], ['eng-GB', 'eng-US']], 'ibx-c-5-eng-GB|eng-US', null, null, [['content', [], true]], ['ibx-c'], [5 => $content], true]; + yield 'loadContentInfo' => ['loadContentInfo', [2], 'ibx-ci-2', null, null, [['content_info', [], true]], ['ibx-ci'], $info]; + yield 'loadContentInfoList' => ['loadContentInfoList', [[2]], 'ibx-ci-2', null, null, [['content_info', [], true]], ['ibx-ci'], [2 => $info], true]; + yield 'loadContentInfoByRemoteId' => ['loadContentInfoByRemoteId', ['3d8jrj'], 'ibx-cibri-3d8jrj', null, null, [['content_info_by_remote_id', [], true]], ['ibx-cibri'], $info]; + yield 'loadRelation' => ['loadRelation', [66], 'ibx-re-66', null, null, [['relation', [66], true]], ['ibx-re-66'], new SPIRelation()]; + yield 'loadVersionInfo_1' => ['loadVersionInfo', [2, 1], 'ibx-cvi-2-1', null, null, [['content_version_info', [2], true]], ['ibx-cvi-2'], $version]; + yield 'loadVersionInfo_2' => ['loadVersionInfo', [2], 'ibx-cvi-2', null, null, [['content_version_info', [2], true]], ['ibx-cvi-2'], $version]; + yield 'listVersions' => ['listVersions', [2], 'ibx-c-2-vl', null, null, [['content_version_list', [2], true]], ['ibx-c-2-vl'], [$version]]; + yield 'loadVersionInfoList' => ['loadVersionInfoList', [[2]], 'ibx-cvi-2', null, null, [['content_version_info', [], true]], ['ibx-cvi'], [2 => $version], true]; } - /** - * @return array - */ - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $info = new ContentInfo([ 'id' => 2, @@ -133,8 +119,7 @@ public function providerForCachedLoadMethodsMiss(): array $content = new Content(['fields' => [], 'versionInfo' => $version]); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi = false, array $additionalCalls - return [ - [ + yield 'countReverseRelations' => [ 'countReverseRelations', [2], 'ibx-crrc-2-t-', @@ -147,8 +132,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crrc-2-t-'], 10, - ], - [ + ]; + + yield 'countReverseRelations_with_type' => [ 'countReverseRelations', [2, 8], 'ibx-crrc-2-t-8', @@ -161,8 +147,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crrc-2-t-8'], 10, - ], - [ + ]; + + yield 'countRelations' => [ 'countRelations', [2], 'ibx-crc-2-v--t-', @@ -175,8 +162,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crc-2-v--t-'], 10, - ], - [ + ]; + + yield 'countRelations_with_version' => [ 'countRelations', [2, 3], 'ibx-crc-2-v-3-t-', @@ -189,8 +177,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crc-2-v-3-t-'], 10, - ], - [ + ]; + + yield 'countRelations_with_type' => [ 'countRelations', [2, null, 1], 'ibx-crc-2-v--t-1', @@ -203,8 +192,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crc-2-v--t-1'], 10, - ], - [ + ]; + + yield 'countRelations_with_version_and_type' => [ 'countRelations', [2, 3, 1], 'ibx-crc-2-v-3-t-', @@ -217,8 +207,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-crc-2-v-3-t-'], 10, - ], - [ + ]; + + yield 'load_with_version' => [ 'load', [2, 1], 'ibx-c-2-1-' . ContentHandler::ALL_TRANSLATIONS_KEY, @@ -233,8 +224,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-c'], $content, - ], - [ + ]; + + yield 'load_with_version_and_translations' => [ 'load', [2, 1, ['eng-GB', 'eng-US']], 'ibx-c-2-1-eng-GB|eng-US', @@ -249,8 +241,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-c'], $content, - ], - [ + ]; + + yield 'load_without_version' => [ 'load', [2], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, @@ -265,8 +258,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-c'], $content, - ], - [ + ]; + + yield 'load_with_translations' => [ 'load', [2, null, ['eng-GB', 'eng-US']], 'ibx-c-2-eng-GB|eng-US', @@ -281,8 +275,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-c'], $content, - ], - [ + ]; + + yield 'loadContentList' => [ 'loadContentList', [[2]], 'ibx-c-2-' . ContentHandler::ALL_TRANSLATIONS_KEY, @@ -298,8 +293,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-c'], [2 => $content], true, - ], - [ + ]; + + yield 'loadContentList_with_translations' => [ 'loadContentList', [[5], ['eng-GB', 'eng-US']], 'ibx-c-5-eng-GB|eng-US', @@ -315,8 +311,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-c'], [5 => $content], true, - ], - [ + ]; + + yield 'loadContentInfo' => [ 'loadContentInfo', [2], 'ibx-ci-2', @@ -329,8 +326,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ci'], $info, - ], - [ + ]; + + yield 'loadContentInfoList' => [ 'loadContentInfoList', [[2]], 'ibx-ci-2', @@ -344,8 +342,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-ci'], [2 => $info], true, - ], - [ + ]; + + yield 'loadContentInfoByRemoteId' => [ 'loadContentInfoByRemoteId', ['3d8jrj'], 'ibx-cibri-3d8jrj', [ @@ -357,8 +356,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cibri'], $info, - ], - [ + ]; + + yield 'loadVersionInfo_with_version' => [ 'loadVersionInfo', [2, 1], 'ibx-cvi-2-1', @@ -372,8 +372,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cvi-2'], $version, - ], - [ + ]; + + yield 'loadVersionInfo' => [ 'loadVersionInfo', [2], 'ibx-cvi-2', @@ -387,8 +388,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cvi-2'], $version, - ], - [ + ]; + + yield 'listVersions' => [ 'listVersions', [2], 'ibx-c-2-vl', @@ -403,8 +405,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-c-2-vl'], [$version], - ], - [ + ]; + + yield 'loadRelation' => [ 'loadRelation', [66], 'ibx-re-66', @@ -417,8 +420,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-re-66'], new SPIRelation(), - ], - [ + ]; + + yield 'loadVersionInfoList' => [ 'loadVersionInfoList', [[2]], 'ibx-cvi-2', @@ -433,7 +437,6 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-cvi'], [2 => $version], true, - ], ]; } diff --git a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php index 01084a7666..689c2a5ce4 100644 --- a/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php @@ -14,7 +14,7 @@ /** * Test case for Persistence\Cache\ContentLanguageHandler. */ -class ContentLanguageHandlerTest extends AbstractInMemoryCacheHandlerTest +class ContentLanguageHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -26,139 +26,119 @@ public function getHandlerClassName(): string return Handler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { $language = new SPILanguage(['id' => 5, 'languageCode' => 'eng-GB']); // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key - return [ + yield 'create' => [ + 'create', + [new SPILanguageCreateStruct()], + null, [ - 'create', - [new SPILanguageCreateStruct()], - null, - [ - ['language_list', [], true], - ], - null, - ['ibx-lal'], + ['language_list', [], true], ], + null, + ['ibx-lal'], + ]; + + yield 'update' => [ + 'update', + [$language], + null, [ - 'update', - [$language], - null, - [ - ['language_list', [], true], - ['language', [5], true], - ['language_code', ['eng-GB'], true], - ], - null, - ['ibx-lal', 'ibx-la-5', 'ibx-lac-eng-GB'], + ['language_list', [], true], + ['language', [5], true], + ['language_code', ['eng-GB'], true], ], + null, + ['ibx-lal', 'ibx-la-5', 'ibx-lac-eng-GB'], + ]; + + yield 'delete' => [ + 'delete', + [5], [ - 'delete', - [5], - [ - ['language', [5], false], - ], - null, - ['la-5'], + ['language', [5], false], ], + null, + ['la-5'], ]; } - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $object = new SPILanguage(['id' => 5, 'languageCode' => 'eng-GB']); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - ['load', [5], 'ibx-la-5', null, null, [['language', [], true]], ['ibx-la'], $object], - ['loadList', [[5]], 'ibx-la-5', null, null, [['language', [], true]], ['ibx-la'], [5 => $object], true], - ['loadAll', [], 'ibx-lal', null, null, [['language_list', [], true]], ['ibx-lal'], [5 => $object], false], - ['loadByLanguageCode', ['eng-GB'], 'ibx-lac-eng-GB', null, null, [['language_code', [], true]], ['ibx-lac'], $object], - ['loadListByLanguageCodes', [['eng-GB']], 'ibx-lac-eng-GB', null, null, [['language_code', [], true]], ['ibx-lac'], ['eng-GB' => $object], true], - ]; + yield 'load' => ['load', [5], 'ibx-la-5', null, null, [['language', [], true]], ['ibx-la'], $object]; + yield 'loadList' => ['loadList', [[5]], 'ibx-la-5', null, null, [['language', [], true]], ['ibx-la'], [5 => $object], true]; + yield 'loadAll' => ['loadAll', [], 'ibx-lal', null, null, [['language_list', [], true]], ['ibx-lal'], [5 => $object], false]; + yield 'loadByLanguageCode' => ['loadByLanguageCode', ['eng-GB'], 'ibx-lac-eng-GB', null, null, [['language_code', [], true]], ['ibx-lac'], $object]; + yield 'loadListByLanguageCodes' => ['loadListByLanguageCodes', [['eng-GB']], 'ibx-lac-eng-GB', null, null, [['language_code', [], true]], ['ibx-lac'], ['eng-GB' => $object], true]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $object = new SPILanguage(['id' => 5, 'languageCode' => 'eng-GB']); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - [ - 'load', - [5], - 'ibx-la-5', - [ - ['language', [5], false], - ], - ['la-5'], - [ - ['language', [], true], - ], - ['ibx-la'], - $object, - ], - [ - 'loadList', - [[5]], - 'ibx-la-5', - [ - ['language', [5], false], - ], - ['la-5'], - [ - ['language', [], true], - ], - ['ibx-la'], - [5 => $object], - true, - ], - [ - 'loadAll', - [], - 'ibx-lal', - [ - ['language', [5], false], - ], - ['la-5'], - [ - ['language_list', [], true], - ], - ['ibx-lal'], - [5 => $object], - false, - ], - [ - 'loadByLanguageCode', - ['eng-GB'], - 'ibx-lac-eng-GB', - [ - ['language', [5], false], - ], - ['la-5'], - [ - ['language_code', [], true], - ], - ['ibx-lac'], - $object, - ], - [ - 'loadListByLanguageCodes', - [['eng-GB']], - 'ibx-lac-eng-GB', - [ - ['language', [5], false], - ], - ['la-5'], - [ - ['language_code', [], true], - ], - ['ibx-lac'], - ['eng-GB' => $object], - true, - ], + yield 'load' => [ + 'load', + [5], + 'ibx-la-5', + [['language', [5], false]], + ['la-5'], + [['language', [], true]], + ['ibx-la'], + $object, + ]; + + yield 'loadList' => [ + 'loadList', + [[5]], + 'ibx-la-5', + [['language', [5], false]], + ['la-5'], + [['language', [], true]], + ['ibx-la'], + [5 => $object], + true, + ]; + + yield 'loadAll' => [ + 'loadAll', + [], + 'ibx-lal', + [['language', [5], false]], + ['la-5'], + [['language_list', [], true]], + ['ibx-lal'], + [5 => $object], + false, + ]; + + yield 'loadByLanguageCode' => [ + 'loadByLanguageCode', + ['eng-GB'], + 'ibx-lac-eng-GB', + [['language', [5], false]], + ['la-5'], + [['language_code', [], true]], + ['ibx-lac'], + $object, + ]; + + yield 'loadListByLanguageCodes' => [ + 'loadListByLanguageCodes', + [['eng-GB']], + 'ibx-lac-eng-GB', + [['language', [5], false]], + ['la-5'], + [['language_code', [], true]], + ['ibx-lac'], + ['eng-GB' => $object], + true, ]; } } diff --git a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php index 6c23fafd61..cf1b7a9513 100644 --- a/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php +++ b/tests/lib/Persistence/Cache/ContentTypeHandlerTest.php @@ -19,7 +19,7 @@ /** * Test case for Persistence\Cache\ContentTypeHandler. */ -class ContentTypeHandlerTest extends AbstractInMemoryCacheHandlerTest +class ContentTypeHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -31,221 +31,234 @@ public function getHandlerClassName(): string return SPIContentTypeHandler::class; } - /** - * @return array - */ - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { $groupUpdate = new SPITypeGroupUpdateStruct(['id' => 3, 'identifier' => 'media']); $typeUpdate = new SPITypeUpdateStruct(['identifier' => 'article', 'remoteId' => '34o9tj8394t']); // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['createGroup', [new SPITypeGroupCreateStruct()], null, [['content_type_group_list', [], true]], null, ['ibx-ctgl']], + yield 'createGroup' => ['createGroup', [new SPITypeGroupCreateStruct()], null, [['content_type_group_list', [], true]], null, ['ibx-ctgl']]; + + yield 'updateGroup' => [ + 'updateGroup', + [$groupUpdate], + null, [ - 'updateGroup', - [$groupUpdate], - null, - [ - ['content_type_group_list', [], true], - ['content_type_group', [3], true], - ['content_type_group_with_id_suffix', ['media'], true], - ], - null, - ['ibx-ctgl', 'ibx-ctg-3', 'ibx-ctg-media-bi'], + ['content_type_group_list', [], true], + ['content_type_group', [3], true], + ['content_type_group_with_id_suffix', ['media'], true], ], - ['deleteGroup', [3], [['type_group', [3], false]], null, ['tg-3']], - ['loadContentTypes', [3, 1]], // also listed for cached cases in providerForCachedLoadMethods - ['load', [5, 1]], // also listed for cached case in providerForCachedLoadMethods + null, + ['ibx-ctgl', 'ibx-ctg-3', 'ibx-ctg-media-bi'], + ]; + + yield 'deleteGroup' => ['deleteGroup', [3], [['type_group', [3], false]], null, ['tg-3']]; + yield 'loadContentTypes' => ['loadContentTypes', [3, 1]]; + yield 'load' => ['load', [5, 1]]; + + yield 'create' => [ + 'create', + [new SPITypeCreateStruct(['groupIds' => [2, 3]])], + null, [ - 'create', - [new SPITypeCreateStruct(['groupIds' => [2, 3]])], - null, - [ - ['content_type_list_by_group', [2], true], - ['content_type_list_by_group', [3], true], - ], - null, - ['ibx-ctlbg-2', 'ibx-ctlbg-3'], + ['content_type_list_by_group', [2], true], + ['content_type_list_by_group', [3], true], ], + null, + ['ibx-ctlbg-2', 'ibx-ctlbg-3'], + ]; + + yield 'update' => [ + 'update', + [5, 0, $typeUpdate], [ - 'update', - [5, 0, $typeUpdate], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], ], - ['update', [5, 1, $typeUpdate]], + null, + ['t-5', 'tm', 'cft-5'], + ]; + + yield 'update_version1' => ['update', [5, 1, $typeUpdate]]; + + yield 'delete' => [ + 'delete', + [5, 0], [ - 'delete', - [5, 0], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], ], - ['delete', [5, 1]], - ['createDraft', [10, 5]], + null, + ['t-5', 'tm', 'cft-5'], + ]; + + yield 'delete_version1' => ['delete', [5, 1]]; + yield 'createDraft' => ['createDraft', [10, 5]]; + + yield 'copy' => [ + 'copy', + [10, 5, 0], + null, [ - 'copy', - [10, 5, 0], - null, - [ - ['content_type_list_by_group', [1], true], - ['content_type_list_by_group', [2], true], - ], - null, - ['ibx-ctlbg-1', 'ibx-ctlbg-2'], - new SPIType(['groupIds' => [1, 2]]), + ['content_type_list_by_group', [1], true], + ['content_type_list_by_group', [2], true], ], - ['copy', [10, 5, 1], null, [['content_type_list_by_group', [3], true]], null, ['ibx-ctlbg-3'], new SPIType(['groupIds' => [3]])], - ['unlink', [3, 5, 0], [['type', [5], false]], null, ['t-5']], - ['unlink', [3, 5, 1]], + null, + ['ibx-ctlbg-1', 'ibx-ctlbg-2'], + new SPIType(['groupIds' => [1, 2]]), + ]; + + yield 'copy_version1' => ['copy', [10, 5, 1], null, [['content_type_list_by_group', [3], true]], null, ['ibx-ctlbg-3'], new SPIType(['groupIds' => [3]])]; + yield 'unlink' => ['unlink', [3, 5, 0], [['type', [5], false]], null, ['t-5']]; + yield 'unlink_version1' => ['unlink', [3, 5, 1]]; + + yield 'link' => [ + 'link', + [3, 5, 0], [ - 'link', - [3, 5, 0], - [ - ['type', [5], false], - ], - [ - ['content_type_list_by_group', [3], true], - ], - ['t-5'], - ['ibx-ctlbg-3'], + ['type', [5], false], ], - ['link', [3, 5, 1]], - ['getFieldDefinition', [7, 1]], - ['getFieldDefinition', [7, 0]], - ['getContentCount', [5]], [ - 'addFieldDefinition', - [5, 0, new SPITypeFieldDefinition()], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], + ['content_type_list_by_group', [3], true], ], - ['addFieldDefinition', [5, 1, new SPITypeFieldDefinition()]], + ['t-5'], + ['ibx-ctlbg-3'], + ]; + + yield 'link_version1' => ['link', [3, 5, 1]]; + yield 'getFieldDefinition' => ['getFieldDefinition', [7, 1]]; + yield 'getFieldDefinition_version0' => ['getFieldDefinition', [7, 0]]; + yield 'getContentCount' => ['getContentCount', [5]]; + + yield 'addFieldDefinition' => [ + 'addFieldDefinition', + [5, 0, new SPITypeFieldDefinition()], [ - 'removeFieldDefinition', - [5, 0, new SPITypeFieldDefinition(['id' => 7])], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], ], - ['removeFieldDefinition', [5, 1, new SPITypeFieldDefinition(['id' => 7])]], + null, + ['t-5', 'tm', 'cft-5'], + ]; + + yield 'addFieldDefinition_version1' => ['addFieldDefinition', [5, 1, new SPITypeFieldDefinition()]]; + + yield 'removeFieldDefinition' => [ + 'removeFieldDefinition', + [5, 0, new SPITypeFieldDefinition(['id' => 7])], [ - 'updateFieldDefinition', - [5, 0, new SPITypeFieldDefinition()], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], ], - ['updateFieldDefinition', [5, 1, new SPITypeFieldDefinition()]], + null, + ['t-5', 'tm', 'cft-5'], + ]; + + yield 'removeFieldDefinition_version1' => ['removeFieldDefinition', [5, 1, new SPITypeFieldDefinition(['id' => 7])]]; + + yield 'updateFieldDefinition' => [ + 'updateFieldDefinition', + [5, 0, new SPITypeFieldDefinition()], [ - 'removeContentTypeTranslation', - [5, 'eng-GB'], - [ - ['type', [5], false], - ['type_map', [], false], - ['content_fields_type', [5], false], - ], - null, - ['t-5', 'tm', 'cft-5'], - null, - new SPIType(), + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], ], - ['deleteByUserAndStatus', [12, 0], [['type_without_value', [], false]], null, ['t']], - ['deleteByUserAndStatus', [12, 1]], + null, + ['t-5', 'tm', 'cft-5'], ]; + + yield 'updateFieldDefinition_version1' => ['updateFieldDefinition', [5, 1, new SPITypeFieldDefinition()]]; + + yield 'removeContentTypeTranslation' => [ + 'removeContentTypeTranslation', + [5, 'eng-GB'], + [ + ['type', [5], false], + ['type_map', [], false], + ['content_fields_type', [5], false], + ], + null, + ['t-5', 'tm', 'cft-5'], + null, + new SPIType(), + ]; + + yield 'deleteByUserAndStatus' => ['deleteByUserAndStatus', [12, 0], [['type_without_value', [], false]], null, ['t']]; + yield 'deleteByUserAndStatus_version1' => ['deleteByUserAndStatus', [12, 1]]; } - /** - * @return array - */ - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $group = new SPITypeGroup(['id' => 3, 'identifier' => 'media']); $type = new SPIType(['id' => 5, 'identifier' => 'article', 'remoteId' => '34o9tj8394t']); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - ['loadGroup', [3], 'ibx-ctg-3', null, null, [['content_type_group', [], true]], ['ibx-ctg'], $group], - ['loadGroups', [[3]], 'ibx-ctg-3', null, null, [['content_type_group', [], true]], ['ibx-ctg'], [3 => $group], true], + yield 'loadGroup' => ['loadGroup', [3], 'ibx-ctg-3', null, null, [['content_type_group', [], true]], ['ibx-ctg'], $group]; + yield 'loadGroups' => ['loadGroups', [[3]], 'ibx-ctg-3', null, null, [['content_type_group', [], true]], ['ibx-ctg'], [3 => $group], true]; + + yield 'loadGroupByIdentifier' => [ + 'loadGroupByIdentifier', + ['content'], + 'ibx-ctg-content-bi', + null, + null, [ - 'loadGroupByIdentifier', - ['content'], - 'ibx-ctg-content-bi', - null, - null, - [ - ['content_type_group', [], true], - ['by_identifier_suffix', [], false], - ], - ['ibx-ctg', 'bi'], - $group, + ['content_type_group', [], true], + ['by_identifier_suffix', [], false], ], - ['loadAllGroups', [], 'ibx-ctgl', null, null, [['content_type_group_list', [], true]], ['ibx-ctgl'], [3 => $group]], - ['loadContentTypes', [3, 0], 'ibx-ctlbg-3', null, null, [['content_type_list_by_group', [3], true]], ['ibx-ctlbg-3'], [$type]], - ['loadContentTypesByFieldDefinitionIdentifier', [3, 0], 'ibx-ctlbfdi-3', null, null, [['content_type_list_by_field_definition_identifier', [3], true]], ['ibx-ctlbfdi-3'], [$type]], - ['loadContentTypeList', [[5]], 'ibx-ct-5', null, null, [['content_type', [], true]], ['ibx-ct'], [5 => $type], true], - ['load', [5, 0], 'ibx-ct-5', null, null, [['content_type', [], true]], ['ibx-ct'], $type], + ['ibx-ctg', 'bi'], + $group, + ]; + + yield 'loadAllGroups' => ['loadAllGroups', [], 'ibx-ctgl', null, null, [['content_type_group_list', [], true]], ['ibx-ctgl'], [3 => $group]]; + yield 'loadContentTypes' => ['loadContentTypes', [3, 0], 'ibx-ctlbg-3', null, null, [['content_type_list_by_group', [3], true]], ['ibx-ctlbg-3'], [$type]]; + yield 'loadContentTypesByFieldDefinitionIdentifier' => ['loadContentTypesByFieldDefinitionIdentifier', ['name'], 'ibx-ctlbfdi-name', null, null, [['content_type_list_by_field_definition_identifier', ['name'], true]], ['ibx-ctlbfdi-name'], [$type]]; + yield 'loadContentTypeList' => ['loadContentTypeList', [[5]], 'ibx-ct-5', null, null, [['content_type', [], true]], ['ibx-ct'], [5 => $type], true]; + yield 'load' => ['load', [5, 0], 'ibx-ct-5', null, null, [['content_type', [], true]], ['ibx-ct'], $type]; + + yield 'loadByIdentifier' => [ + 'loadByIdentifier', + ['article'], + 'ibx-ct-article-bi', + null, + null, [ - 'loadByIdentifier', - ['article'], - 'ibx-ct-article-bi', - null, - null, - [ - ['content_type', [], true], - ['by_identifier_suffix', [], false], - ], - ['ibx-ct', 'bi'], - $type, + ['content_type', [], true], + ['by_identifier_suffix', [], false], ], + ['ibx-ct', 'bi'], + $type, + ]; + + yield 'loadByRemoteId' => [ + 'loadByRemoteId', + ['f34tg45gf'], + 'ibx-ct-f34tg45gf-br', + null, + null, [ - 'loadByRemoteId', - ['f34tg45gf'], - 'ibx-ct-f34tg45gf-br', - null, - null, - [ - ['content_type', [], true], - ['by_remote_suffix', [], false], - ], - ['ibx-ct', 'br'], - $type, + ['content_type', [], true], + ['by_remote_suffix', [], false], ], - ['getSearchableFieldMap', [], 'ibx-ctfm', null, null, [['content_type_field_map', [], true]], ['ibx-ctfm'], [$type]], + ['ibx-ct', 'br'], + $type, ]; + + yield 'getSearchableFieldMap' => ['getSearchableFieldMap', [], 'ibx-ctfm', null, null, [['content_type_field_map', [], true]], ['ibx-ctfm'], [$type]]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $group = new SPITypeGroup(['id' => 3, 'identifier' => 'media']); $type = new SPIType(['id' => 5, 'identifier' => 'article', 'remoteId' => '34o9tj8394t']); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - [ + yield 'loadGroup' => [ 'loadGroup', [3], 'ibx-ctg-3', @@ -258,8 +271,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ctg'], $group, - ], - [ + ]; + + yield 'loadGroups' => [ 'loadGroups', [[3]], 'ibx-ctg-3', @@ -273,8 +287,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-ctg'], [3 => $group], true, - ], - [ + ]; + + yield 'loadGroupByIdentifier' => [ 'loadGroupByIdentifier', ['content'], 'ibx-ctg-content-bi', @@ -288,8 +303,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ctg', 'bi'], $group, - ], - [ + ]; + + yield 'loadAllGroups' => [ 'loadAllGroups', [], 'ibx-ctgl', @@ -302,8 +318,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ctgl'], [3 => $group], - ], - [ + ]; + + yield 'loadContentTypes' => [ 'loadContentTypes', [3, 0], 'ibx-ctlbg-3', @@ -318,8 +335,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ctlbg-3'], [$type], - ], - [ + ]; + + yield 'loadContentTypeList' => [ 'loadContentTypeList', [[5]], 'ibx-ct-5', @@ -334,8 +352,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-ct'], [5 => $type], true, - ], - [ + ]; + + yield 'load' => [ 'load', [5, 0], 'ibx-ct-5', @@ -349,8 +368,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ct'], $type, - ], - [ + ]; + + yield 'loadByIdentifier' => [ 'loadByIdentifier', ['article'], 'ibx-ct-article-bi', @@ -365,8 +385,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ct', 'bi'], $type, - ], - [ + ]; + + yield 'loadByRemoteId' => [ 'loadByRemoteId', ['f34tg45gf'], 'ibx-ct-f34tg45gf-br', @@ -381,8 +402,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ct', 'br'], $type, - ], - [ + ]; + + yield 'getSearchableFieldMap' => [ 'getSearchableFieldMap', [], 'ibx-ctfm', @@ -395,7 +417,6 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ctfm'], [$type], - ], ]; } diff --git a/tests/lib/Persistence/Cache/LocationHandlerTest.php b/tests/lib/Persistence/Cache/LocationHandlerTest.php index 65290fadb3..faca52ee02 100644 --- a/tests/lib/Persistence/Cache/LocationHandlerTest.php +++ b/tests/lib/Persistence/Cache/LocationHandlerTest.php @@ -15,7 +15,7 @@ /** * Test case for Persistence\Cache\LocationHandler. */ -class LocationHandlerTest extends AbstractInMemoryCacheHandlerTest +class LocationHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -27,65 +27,62 @@ public function getHandlerClassName(): string return SPILocationHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['copySubtree', [12, 45]], - ['move', [12, 45], [['location_path', [12], false]], null, ['lp-12']], - ['hide', [12], [['location_path', [12], false]], null, ['lp-12']], - ['unHide', [12], [['location_path', [12], false]], null, ['lp-12']], + yield 'copySubtree' => ['copySubtree', [12, 45]]; + yield 'move' => ['move', [12, 45], [['location_path', [12], false]], null, ['lp-12']]; + yield 'hide' => ['hide', [12], [['location_path', [12], false]], null, ['lp-12']]; + yield 'unHide' => ['unHide', [12], [['location_path', [12], false]], null, ['lp-12']]; + yield 'swap' => [ + 'swap', + [12, 45], [ - 'swap', - [12, 45], - [ - ['location', [12], false], - ['location', [45], false], - ], - null, - ['l-12', 'l-45'], + ['location', [12], false], + ['location', [45], false], ], - ['update', [new UpdateStruct(), 12], [['location', [12], false]], null, ['l-12']], + null, + ['l-12', 'l-45'], + ]; + yield 'update' => ['update', [new UpdateStruct(), 12], [['location', [12], false]], null, ['l-12']]; + yield 'create' => [ + 'create', + [new CreateStruct(['contentId' => 4, 'mainLocationId' => true])], [ - 'create', - [new CreateStruct(['contentId' => 4, 'mainLocationId' => true])], - [ - ['content', [4], false], - ['role_assignment_group_list', [4], false], - ], - null, - ['c-4', 'ragl-4'], + ['content', [4], false], + ['role_assignment_group_list', [4], false], ], + null, + ['c-4', 'ragl-4'], + ]; + yield 'create_not_main' => [ + 'create', + [new CreateStruct(['contentId' => 4, 'mainLocationId' => false])], [ - 'create', - [new CreateStruct(['contentId' => 4, 'mainLocationId' => false])], - [ - ['content', [4], false], - ['role_assignment_group_list', [4], false], - ], - null, - ['c-4', 'ragl-4'], + ['content', [4], false], + ['role_assignment_group_list', [4], false], ], - ['removeSubtree', [12], [['location_path', [12], false]], null, ['lp-12']], - ['deleteChildrenDrafts', [12], [['location_path', [12], false]], null, ['lp-12']], - ['setSectionForSubtree', [12, 2], [['location_path', [12], false]], null, ['lp-12']], - ['changeMainLocation', [4, 12], [['content', [4], false]], null, ['c-4']], - ['countLocationsByContent', [4]], + null, + ['c-4', 'ragl-4'], ]; + yield 'removeSubtree' => ['removeSubtree', [12], [['location_path', [12], false]], null, ['lp-12']]; + yield 'deleteChildrenDrafts' => ['deleteChildrenDrafts', [12], [['location_path', [12], false]], null, ['lp-12']]; + yield 'setSectionForSubtree' => ['setSectionForSubtree', [12, 2], [['location_path', [12], false]], null, ['lp-12']]; + yield 'changeMainLocation' => ['changeMainLocation', [4, 12], [['content', [4], false]], null, ['c-4']]; + yield 'countLocationsByContent' => ['countLocationsByContent', [4]]; } - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $location = new Location(['id' => 12]); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - ['load', [12], 'ibx-l-12-1', null, null, [['location', [], true]], ['ibx-l'], $location], - ['load', [12, ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', null, null, [['location', [], true]], ['ibx-l'], $location], - ['loadList', [[12]], 'ibx-l-12-1', null, null, [['location', [], true]], ['ibx-l'], [12 => $location], true], - ['loadList', [[12], ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', null, null, [['location', [], true]], ['ibx-l'], [12 => $location], true], - ['loadSubtreeIds', [12], 'ibx-ls-12', null, null, [['location_subtree', [], true]], ['ibx-ls'], [33, 44]], - [ + yield 'load' => ['load', [12], 'ibx-l-12-1', null, null, [['location', [], true]], ['ibx-l'], $location]; + yield 'load_with_languages' => ['load', [12, ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', null, null, [['location', [], true]], ['ibx-l'], $location]; + yield 'loadList' => ['loadList', [[12]], 'ibx-l-12-1', null, null, [['location', [], true]], ['ibx-l'], [12 => $location], true]; + yield 'loadList_with_languages' => ['loadList', [[12], ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', null, null, [['location', [], true]], ['ibx-l'], [12 => $location], true]; + yield 'loadSubtreeIds' => ['loadSubtreeIds', [12], 'ibx-ls-12', null, null, [['location_subtree', [], true]], ['ibx-ls'], [33, 44]]; + yield 'loadLocationsByContent_with_root' => [ 'loadLocationsByContent', [4, 12], 'ibx-cl-4-root-12', @@ -100,8 +97,8 @@ public function providerForCachedLoadMethodsHit(): array ], ['ibx-cl'], [$location], - ], - [ + ]; + yield 'loadLocationsByContent' => [ 'loadLocationsByContent', [4], 'ibx-cl-4', @@ -114,8 +111,8 @@ public function providerForCachedLoadMethodsHit(): array ], ['ibx-cl'], [$location], - ], - [ + ]; + yield 'loadParentLocationsForDraftContent' => [ 'loadParentLocationsForDraftContent', [4], 'ibx-cl-4-pfd', @@ -127,13 +124,12 @@ public function providerForCachedLoadMethodsHit(): array ], ['ibx-cl', '-pfd'], [$location], - ], - ['loadByRemoteId', ['34fe5y4'], 'ibx-lri-34fe5y4-1', null, null, [['location_remote_id', [], true]], ['ibx-lri'], $location], - ['loadByRemoteId', ['34fe5y4', ['eng-GB', 'arg-ES']], 'ibx-lri-34fe5y4-arg-ES|eng-GB|1', null, null, [['location_remote_id', [], true]], ['ibx-lri'], $location], ]; + yield 'loadByRemoteId' => ['loadByRemoteId', ['34fe5y4'], 'ibx-lri-34fe5y4-1', null, null, [['location_remote_id', [], true]], ['ibx-lri'], $location]; + yield 'loadByRemoteId_with_languages' => ['loadByRemoteId', ['34fe5y4', ['eng-GB', 'arg-ES']], 'ibx-lri-34fe5y4-arg-ES|eng-GB|1', null, null, [['location_remote_id', [], true]], ['ibx-lri'], $location]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $location = new Location( [ @@ -144,8 +140,7 @@ public function providerForCachedLoadMethodsMiss(): array ); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - [ + yield 'load' => [ 'load', [12], 'ibx-l-12-1', @@ -160,8 +155,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-l'], $location, - ], - [ + ]; + + yield 'load_with_languages' => [ 'load', [12, ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', @@ -176,8 +172,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-l'], $location, - ], - [ + ]; + + yield 'loadList' => [ 'loadList', [[12]], 'ibx-l-12-1', @@ -193,11 +190,11 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-l'], [12 => $location], true, - ], - [ + ]; + + yield 'loadList_with_languages' => [ 'loadList', - [[12], - ['eng-GB', 'bra-PG'], false, ], + [[12], ['eng-GB', 'bra-PG'], false], 'ibx-l-12-bra-PG|eng-GB|0', [ ['content', [15], false], @@ -211,8 +208,9 @@ public function providerForCachedLoadMethodsMiss(): array ['ibx-l'], [12 => $location], true, - ], - [ + ]; + + yield 'loadSubtreeIds' => [ 'loadSubtreeIds', [12], 'ibx-ls-12', @@ -230,8 +228,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-ls'], [33, 44], - ], - [ + ]; + + yield 'loadLocationsByContent_with_root' => [ 'loadLocationsByContent', [4, 12], 'ibx-cl-4-root-12', @@ -249,8 +248,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cl'], [$location], - ], - [ + ]; + + yield 'loadLocationsByContent' => [ 'loadLocationsByContent', [4], 'ibx-cl-4', @@ -266,8 +266,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cl'], [$location], - ], - [ + ]; + + yield 'loadParentLocationsForDraftContent' => [ 'loadParentLocationsForDraftContent', [4], 'ibx-cl-4-pfd', @@ -284,8 +285,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-cl', '-pfd'], [$location], - ], - [ + ]; + + yield 'loadByRemoteId' => [ 'loadByRemoteId', ['34fe5y4'], 'ibx-lri-34fe5y4-1', @@ -300,8 +302,9 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-lri'], $location, - ], - [ + ]; + + yield 'loadByRemoteId_with_languages' => [ 'loadByRemoteId', ['34fe5y4', ['eng-GB', 'arg-ES']], 'ibx-lri-34fe5y4-arg-ES|eng-GB|1', @@ -316,7 +319,6 @@ public function providerForCachedLoadMethodsMiss(): array ], ['ibx-lri'], $location, - ], ]; } } diff --git a/tests/lib/Persistence/Cache/NotificationHandlerTest.php b/tests/lib/Persistence/Cache/NotificationHandlerTest.php index bce80e052b..1216728d07 100644 --- a/tests/lib/Persistence/Cache/NotificationHandlerTest.php +++ b/tests/lib/Persistence/Cache/NotificationHandlerTest.php @@ -17,7 +17,7 @@ /** * Test case for Persistence\Cache\NotificationHandler. */ -class NotificationHandlerTest extends AbstractCacheHandlerTest +class NotificationHandlerTest extends AbstractCacheHandlerTestCase { /** * {@inheritdoc} @@ -38,7 +38,7 @@ public function getHandlerClassName(): string /** * {@inheritdoc} */ - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { $ownerId = 7; $notificationId = 5; @@ -48,69 +48,65 @@ public function providerForUnCachedMethods(): array ]); // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ + yield 'createNotification' => [ + 'createNotification', [ - 'createNotification', - [ - new CreateStruct(['ownerId' => $ownerId]), - ], - null, - [ - ['notification_count', [$ownerId], true], - ['notification_pending_count', [$ownerId], true], - ], - null, - [ - 'ibx-nc-' . $ownerId, - 'ibx-npc-' . $ownerId, - ], - new SPINotification(), + new CreateStruct(['ownerId' => $ownerId]), ], + null, [ - 'updateNotification', - [ - $notification, - new UpdateStruct(['isPending' => false]), - ], - null, - [ - ['notification', [$notificationId], true], - ['notification_pending_count', [$ownerId], true], - ], - null, - [ - 'ibx-n-' . $notificationId, - 'ibx-npc-' . $ownerId, - ], - new SPINotification(), + ['notification_count', [$ownerId], true], + ['notification_pending_count', [$ownerId], true], ], + null, [ - 'delete', - [ - $notification, - ], - null, - [ - ['notification', [$notificationId], true], - ['notification_count', [$ownerId], true], - ['notification_pending_count', [$ownerId], true], - ], - null, - [ - 'ibx-n-' . $notificationId, - 'ibx-nc-' . $ownerId, - 'ibx-npc-' . $ownerId, - ], + 'ibx-nc-' . $ownerId, + 'ibx-npc-' . $ownerId, ], + new SPINotification(), + ]; + + yield 'updateNotification' => [ + 'updateNotification', [ - 'loadUserNotifications', [$ownerId, 0, 25], null, null, null, null, [], + $notification, + new UpdateStruct(['isPending' => false]), ], + null, + [ + ['notification', [$notificationId], true], + ['notification_pending_count', [$ownerId], true], + ], + null, + [ + 'ibx-n-' . $notificationId, + 'ibx-npc-' . $ownerId, + ], + new SPINotification(), ]; + + yield 'delete' => [ + 'delete', + [ + $notification, + ], + null, + [ + ['notification', [$notificationId], true], + ['notification_count', [$ownerId], true], + ['notification_pending_count', [$ownerId], true], + ], + null, + [ + 'ibx-n-' . $notificationId, + 'ibx-nc-' . $ownerId, + 'ibx-npc-' . $ownerId, + ], + ]; + + yield 'loadUserNotifications' => ['loadUserNotifications', [$ownerId, 0, 25], null, null, null, null, []]; } - /** - * {@inheritdoc} - */ public function providerForCachedLoadMethodsHit(): array { $notificationId = 5; diff --git a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php index f21f35da45..0cf483e075 100644 --- a/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php +++ b/tests/lib/Persistence/Cache/ObjectStateHandlerTest.php @@ -15,7 +15,7 @@ /** * Test case for Persistence\Cache\ObjectStateHandler. */ -class ObjectStateHandlerTest extends AbstractCacheHandlerTest +class ObjectStateHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -27,19 +27,17 @@ public function getHandlerClassName(): string return SPIObjectStateHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['createGroup', [new SPIInputStruct()], null, [['state_group_all', [], true]], null, 'ibx-sga'], - ['updateGroup', [5, new SPIInputStruct()], [['state_group', [5], false]], null, ['sg-5']], - ['deleteGroup', [5], [['state_group', [5], false]], null, ['sg-5']], - ['create', [5, new SPIInputStruct()], null, [['state_list_by_group', [5], true]], [], 'ibx-slbg-5'], - ['update', [7, new SPIInputStruct()], [['state', [7], false]], null, ['s-7']], - ['setPriority', [7, 99], [['state', [7], false]], null, ['s-7']], - ['delete', [7], [['state', [7], false]], null, ['s-7']], - ['setContentState', [4, 5, 7], null, [['state_by_group_on_content', [5, 4], true]], [], 'ibx-sbg-5-oc-4'], - ]; + yield 'createGroup' => ['createGroup', [new SPIInputStruct()], null, [['state_group_all', [], true]], null, 'ibx-sga']; + yield 'updateGroup' => ['updateGroup', [5, new SPIInputStruct()], [['state_group', [5], false]], null, ['sg-5']]; + yield 'deleteGroup' => ['deleteGroup', [5], [['state_group', [5], false]], null, ['sg-5']]; + yield 'create' => ['create', [5, new SPIInputStruct()], null, [['state_list_by_group', [5], true]], [], 'ibx-slbg-5']; + yield 'update' => ['update', [7, new SPIInputStruct()], [['state', [7], false]], null, ['s-7']]; + yield 'setPriority' => ['setPriority', [7, 99], [['state', [7], false]], null, ['s-7']]; + yield 'delete' => ['delete', [7], [['state', [7], false]], null, ['s-7']]; + yield 'setContentState' => ['setContentState', [4, 5, 7], null, [['state_by_group_on_content', [5, 4], true]], [], 'ibx-sbg-5-oc-4']; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php index 6c1f017f4e..ae5d67ecf7 100644 --- a/tests/lib/Persistence/Cache/PersistenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceHandlerTest.php @@ -15,14 +15,8 @@ * * @covers \Ibexa\Core\Persistence\Cache\Handler */ -class PersistenceHandlerTest extends AbstractBaseHandlerTest +class PersistenceHandlerTest extends AbstractBaseHandlerTestCase { - public function testHandler(): void - { - self::assertInstanceOf(SPIPersistence\Handler::class, $this->persistenceCacheHandler); - self::assertInstanceOf(Cache\Handler::class, $this->persistenceCacheHandler); - } - public function testContentHandler(): void { $this->loggerMock->expects(self::never())->method(self::anything()); diff --git a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php index 3595df6593..83bc5893b3 100644 --- a/tests/lib/Persistence/Cache/PersistenceLoggerTest.php +++ b/tests/lib/Persistence/Cache/PersistenceLoggerTest.php @@ -11,15 +11,14 @@ use PHPUnit\Framework\TestCase; /** - * @covers \Ibexa\Core\Persistence\Cache\PersistenceLogger::getName + * @covers \Ibexa\Core\Persistence\Cache\PersistenceLogger */ class PersistenceLoggerTest extends TestCase { - /** @var \Ibexa\Core\Persistence\Cache\PersistenceLogger */ - protected $logger; + protected PersistenceLogger $logger; /** - * Setup the HandlerTest. + * Set up the HandlerTest. */ protected function setUp(): void { @@ -27,9 +26,6 @@ protected function setUp(): void $this->logger = new PersistenceLogger(); } - /** - * Tear down test (properties). - */ protected function tearDown(): void { unset($this->logger); @@ -46,9 +42,9 @@ public function testGetCalls(): void self::assertEquals([], $this->logger->getCalls()); } - public function testLogCall() + public function testLogCall(): PersistenceLogger { - self::assertNull($this->logger->logCall(__METHOD__)); + $this->logger->logCall(__METHOD__); $this->logger->logCall(__METHOD__); $this->logger->logCall(__METHOD__); $this->logger->logCall(__METHOD__, [33]); @@ -57,14 +53,22 @@ public function testLogCall() } /** - * @depends testGetCountValues - * - * @param \Ibexa\Core\Persistence\Cache\PersistenceLogger $logger + * @depends testLogCall + */ + public function testGetStats(PersistenceLogger $logger): PersistenceLogger + { + self::assertEquals(4, $logger->getStats()['uncached']); + + return $logger; + } + + /** + * @depends testGetStats */ - public function testGetCallValues($logger): void + public function testGetCallValues(PersistenceLogger $logger): void { $calls = $logger->getCalls(); - // As we don't care about the hash index we get the array values instead + // As we don't care about the hash index, we get the array values instead $calls = array_values($calls); $method = __CLASS__ . '::testLogCall'; diff --git a/tests/lib/Persistence/Cache/SectionHandlerTest.php b/tests/lib/Persistence/Cache/SectionHandlerTest.php index bb2e308716..27f0409827 100644 --- a/tests/lib/Persistence/Cache/SectionHandlerTest.php +++ b/tests/lib/Persistence/Cache/SectionHandlerTest.php @@ -13,7 +13,7 @@ /** * Test case for Persistence\Cache\SectionHandler. */ -class SectionHandlerTest extends AbstractCacheHandlerTest +class SectionHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -25,19 +25,17 @@ public function getHandlerClassName(): string return SPISectionHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['create', ['Standard', 'standard']], - ['update', [5, 'Standard', 'standard'], [['section', [5], false]], null, ['se-5']], - ['loadAll', []], - ['delete', [5], [['section', [5], false]], null, ['se-5']], - ['assign', [5, 42], [['content', [42], false]], null, ['c-42']], - ['assignmentsCount', [5]], - ['policiesCount', [5]], - ['countRoleAssignmentsUsingSection', [5]], - ]; + yield 'create' => ['create', ['Standard', 'standard']]; + yield 'update' => ['update', [5, 'Standard', 'standard'], [['section', [5], false]], null, ['se-5']]; + yield 'loadAll' => ['loadAll', []]; + yield 'delete' => ['delete', [5], [['section', [5], false]], null, ['se-5']]; + yield 'assign' => ['assign', [5, 42], [['content', [42], false]], null, ['c-42']]; + yield 'assignmentsCount' => ['assignmentsCount', [5]]; + yield 'policiesCount' => ['policiesCount', [5]]; + yield 'countRoleAssignmentsUsingSection' => ['countRoleAssignmentsUsingSection', [5]]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/SettingHandlerTest.php b/tests/lib/Persistence/Cache/SettingHandlerTest.php index 0dde64375a..b712643d05 100644 --- a/tests/lib/Persistence/Cache/SettingHandlerTest.php +++ b/tests/lib/Persistence/Cache/SettingHandlerTest.php @@ -13,7 +13,7 @@ /** * Test case for Persistence\Cache\SettingHandler. */ -class SettingHandlerTest extends AbstractCacheHandlerTest +class SettingHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -25,35 +25,33 @@ public function getHandlerClassName(): string return SettingHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - [ - 'create', - ['group_a1', 'identifier_b2', 'value_c3'], - null, - null, - null, - null, - new Setting(), - ], - [ - 'update', - ['group_a1', 'identifier_b2', 'update_value_c3'], - [['setting', ['group_a1', 'identifier_b2'], true]], - null, - ['ibx-set-group_a1-identifier_b2'], - null, - new Setting(), - ], - [ - 'delete', - ['group_a1', 'identifier_b2'], - [['setting', ['group_a1', 'identifier_b2'], true]], - null, - ['ibx-set-group_a1-identifier_b2'], - ], + yield 'create' => [ + 'create', + ['group_a1', 'identifier_b2', 'value_c3'], + null, + null, + null, + null, + new Setting(), + ]; + yield 'update' => [ + 'update', + ['group_a1', 'identifier_b2', 'update_value_c3'], + [['setting', ['group_a1', 'identifier_b2'], true]], + null, + ['ibx-set-group_a1-identifier_b2'], + null, + new Setting(), + ]; + yield 'delete' => [ + 'delete', + ['group_a1', 'identifier_b2'], + [['setting', ['group_a1', 'identifier_b2'], true]], + null, + ['ibx-set-group_a1-identifier_b2'], ]; } diff --git a/tests/lib/Persistence/Cache/TransactionHandlerTest.php b/tests/lib/Persistence/Cache/TransactionHandlerTest.php index d567798518..b9de1be5b9 100644 --- a/tests/lib/Persistence/Cache/TransactionHandlerTest.php +++ b/tests/lib/Persistence/Cache/TransactionHandlerTest.php @@ -12,7 +12,7 @@ /** * @covers \Ibexa\Core\Persistence\Cache\TransactionHandler */ -class TransactionHandlerTest extends AbstractCacheHandlerTest +class TransactionHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -24,13 +24,11 @@ public function getHandlerClassName(): string return TransactionHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array $arguments, array? $cacheTagGeneratingArguments, array? $cacheKeyGeneratingArguments, array? $tags, string? $key - return [ - ['beginTransaction', []], - ['commit', []], - ]; + yield 'beginTransaction' => ['beginTransaction', []]; + yield 'commit' => ['commit', []]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/TrashHandlerTest.php b/tests/lib/Persistence/Cache/TrashHandlerTest.php index 82bcdd74c2..58101b4e77 100644 --- a/tests/lib/Persistence/Cache/TrashHandlerTest.php +++ b/tests/lib/Persistence/Cache/TrashHandlerTest.php @@ -18,7 +18,7 @@ /** * Test case for Persistence\Cache\SectionHandler. */ -class TrashHandlerTest extends AbstractCacheHandlerTest +class TrashHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -30,12 +30,10 @@ public function getHandlerClassName(): string return TrashHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['loadTrashItem', [6]], - ]; + yield 'loadTrashItem' => ['loadTrashItem', [6]]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/URLHandlerTest.php b/tests/lib/Persistence/Cache/URLHandlerTest.php index 9a362a78fc..c6e3c1efac 100644 --- a/tests/lib/Persistence/Cache/URLHandlerTest.php +++ b/tests/lib/Persistence/Cache/URLHandlerTest.php @@ -12,7 +12,7 @@ use Ibexa\Contracts\Core\Persistence\URL\URLUpdateStruct; use Ibexa\Contracts\Core\Repository\Values\URL\URLQuery; -class URLHandlerTest extends AbstractCacheHandlerTest +class URLHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -24,14 +24,12 @@ public function getHandlerClassName(): string return SpiURLHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['find', [new URLQuery()]], - ['findUsages', [1]], - ['loadByUrl', ['http://google.com']], - ]; + yield 'find' => ['find', [new URLQuery()]]; + yield 'findUsages' => ['findUsages', [1]]; + yield 'loadByUrl' => ['loadByUrl', ['https://google.com'], null, null, null, null, new URL()]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php index c9c815db88..454d2a1728 100644 --- a/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlAliasHandlerTest.php @@ -13,7 +13,7 @@ /** * Test case for Persistence\Cache\UrlAliasHandler. */ -class UrlAliasHandlerTest extends AbstractInMemoryCacheHandlerTest +class UrlAliasHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -25,199 +25,193 @@ public function getHandlerClassName(): string return SPIUrlAliasHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ + yield 'publishUrlAliasForLocation' => [ + 'publishUrlAliasForLocation', + [44, 2, 'name', 'eng-GB', true, false], [ - 'publishUrlAliasForLocation', - [44, 2, 'name', 'eng-GB', true, false], - [ - ['url_alias_location', [44], false], - ['url_alias_location_path', [44], false], - ['url_alias', ['44-abc'], false], - ['url_alias_not_found', [], false], - ], - null, - ['urlal-44', 'urlalp-44', 'urla-44-abc', 'urlanf'], - null, - '44-abc', + ['url_alias_location', [44], false], + ['url_alias_location_path', [44], false], + ['url_alias', ['44-abc'], false], + ['url_alias_not_found', [], false], ], + null, + ['urlal-44', 'urlalp-44', 'urla-44-abc', 'urlanf'], + null, + '44-abc', + ]; + + yield 'createCustomUrlAlias' => [ + 'createCustomUrlAlias', + [44, '1/2/44', true, null, false], [ - 'createCustomUrlAlias', - [44, '1/2/44', true, null, false], - [ - ['url_alias_location', [44], false], - ['url_alias_location_path', [44], false], - ['url_alias_not_found', [], false], - ['url_alias', [5], false], - ], - null, - ['urlal-44', 'urlalp-44', 'urlanf', 'urla-5'], - null, - new UrlAlias(['id' => 5]), + ['url_alias_location', [44], false], + ['url_alias_location_path', [44], false], + ['url_alias_not_found', [], false], + ['url_alias', [5], false], ], - ['createGlobalUrlAlias', ['something', '1/2/44', true, null, false], [['url_alias_not_found', [], false]], null, ['urlanf']], - ['createGlobalUrlAlias', ['something', '1/2/44', true, 'eng-GB', false], [['url_alias_not_found', [], false]], null, ['urlanf']], - ['listGlobalURLAliases', ['eng-GB', 10, 50]], + null, + ['urlal-44', 'urlalp-44', 'urlanf', 'urla-5'], + null, + new UrlAlias(['id' => 5]), + ]; + + yield 'createGlobalUrlAlias' => ['createGlobalUrlAlias', ['something', '1/2/44', true, null, false], [['url_alias_not_found', [], false]], null, ['urlanf']]; + yield 'createGlobalUrlAliasWithLang' => ['createGlobalUrlAlias', ['something', '1/2/44', true, 'eng-GB', false], [['url_alias_not_found', [], false]], null, ['urlanf']]; + yield 'listGlobalURLAliases' => ['listGlobalURLAliases', ['eng-GB', 10, 50]]; + + yield 'removeURLAliases' => [ + 'removeURLAliases', + [[new UrlAlias(['id' => 5, 'type' => UrlAlias::LOCATION, 'isCustom' => true, 'destination' => 21])]], [ - 'removeURLAliases', - [[new UrlAlias(['id' => 5, 'type' => UrlAlias::LOCATION, 'isCustom' => true, 'destination' => 21])]], - [ - ['url_alias', [5], false], - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ['url_alias_custom', [21], false], - ], - null, - ['urla-5', 'urlal-21', 'urlalp-21', 'urlac-21'], + ['url_alias', [5], false], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], + ['url_alias_custom', [21], false], ], + null, + ['urla-5', 'urlal-21', 'urlalp-21', 'urlac-21'], + ]; + + yield 'locationMoved' => [ + 'locationMoved', + [21, 45, 12], [ - 'locationMoved', - [21, 45, 12], - [ - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ], - null, - ['urlal-21', 'urlalp-21'], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], ], + null, + ['urlal-21', 'urlalp-21'], + ]; + + yield 'locationCopied' => [ + 'locationCopied', + [21, 33, 12], [ - 'locationCopied', - [21, 33, 12], - [ - ['url_alias_location', [21], false], - ['url_alias_location', [33], false], - ], - null, - ['urlal-21', 'urlal-33'], + ['url_alias_location', [21], false], + ['url_alias_location', [33], false], ], + null, + ['urlal-21', 'urlal-33'], + ]; + + yield 'locationDeleted' => [ + 'locationDeleted', + [21], [ - 'locationDeleted', - [21], - [ - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ], - null, - ['urlal-21', 'urlalp-21'], - null, - [], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], ], + null, + ['urlal-21', 'urlalp-21'], + null, + [], + ]; + + yield 'locationSwapped' => [ + 'locationSwapped', + [21, 2, 33, 45], [ - 'locationSwapped', - [21, 2, 33, 45], - [ - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ['url_alias_location', [33], false], - ['url_alias_location_path', [33], false], - ], - null, - ['urlal-21', 'urlalp-21', 'urlal-33', 'urlalp-33'], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], + ['url_alias_location', [33], false], + ['url_alias_location_path', [33], false], ], + null, + ['urlal-21', 'urlalp-21', 'urlal-33', 'urlalp-33'], + ]; + + yield 'translationRemoved' => [ + 'translationRemoved', + [[21, 33], 'eng-GB'], [ - 'translationRemoved', - [[21, 33], 'eng-GB'], - [ - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ['url_alias_location', [33], false], - ['url_alias_location_path', [33], false], - ], - null, - ['urlal-21', 'urlalp-21', 'urlal-33', 'urlalp-33'], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], + ['url_alias_location', [33], false], + ['url_alias_location_path', [33], false], ], + null, + ['urlal-21', 'urlalp-21', 'urlal-33', 'urlalp-33'], + ]; + + yield 'archiveUrlAliasesForDeletedTranslations' => [ + 'archiveUrlAliasesForDeletedTranslations', + [21, 33, ['eng-GB']], [ - 'archiveUrlAliasesForDeletedTranslations', - [21, 33, ['eng-GB']], - [ - ['url_alias_location', [21], false], - ['url_alias_location_path', [21], false], - ], - null, - ['urlal-21', 'urlalp-21'], + ['url_alias_location', [21], false], + ['url_alias_location_path', [21], false], ], + null, + ['urlal-21', 'urlalp-21'], ]; } - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $object = new UrlAlias(['id' => 5]); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - ['listURLAliasesForLocation', [5], 'ibx-urlall-5', null, null, [['url_alias_location_list', [5], true]], ['ibx-urlall-5'], [$object]], - ['listURLAliasesForLocation', [5, true], 'ibx-urlall-5-c', null, null, [['url_alias_location_list_custom', [5], true]], ['ibx-urlall-5-c'], [$object]], - ['lookup', ['/Home'], 'ibx-urlau-_SHome', null, null, [['url_alias_url', ['_SHome'], true]], ['ibx-urlau-_SHome'], $object], - ['loadUrlAlias', [5], 'ibx-urla-5', null, null, [['url_alias', [5], true]], ['ibx-urla-5'], $object], - ]; + yield 'listURLAliasesForLocation' => ['listURLAliasesForLocation', [5], 'ibx-urlall-5', null, null, [['url_alias_location_list', [5], true]], ['ibx-urlall-5'], [$object]]; + yield 'listURLAliasesForLocationCustom' => ['listURLAliasesForLocation', [5, true], 'ibx-urlall-5-c', null, null, [['url_alias_location_list_custom', [5], true]], ['ibx-urlall-5-c'], [$object]]; + yield 'lookup' => ['lookup', ['/Home'], 'ibx-urlau-_SHome', null, null, [['url_alias_url', ['_SHome'], true]], ['ibx-urlau-_SHome'], $object]; + yield 'loadUrlAlias' => ['loadUrlAlias', [5], 'ibx-urla-5', null, null, [['url_alias', [5], true]], ['ibx-urla-5'], $object]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $object = new UrlAlias(['id' => 5]); // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - [ - 'listURLAliasesForLocation', - [5], - 'ibx-urlall-5', - [ - ['url_alias_location', [5], false], - ['url_alias', [5], false], - ], - ['urlal-5', 'urla-5'], - [ - ['url_alias_location_list', [5], true], - ], - ['ibx-urlall-5'], - [$object], - ], - [ - 'listURLAliasesForLocation', - [5, true], - 'ibx-urlall-5-c', - [ - ['url_alias_location', [5], false], - ['url_alias', [5], false], - ], - ['urlal-5', 'urla-5'], - [ - ['url_alias_location_list_custom', [5], true], - ], - ['ibx-urlall-5-c'], - [$object], - ], + yield 'listURLAliasesForLocation' => [ + 'listURLAliasesForLocation', + [5], + 'ibx-urlall-5', [ - 'lookup', - ['/Home'], - 'ibx-urlau-_SHome', - [ - ['url_alias', [5], false], - ], - ['urla-5'], - [ - ['url_alias_url', ['_SHome'], true], - ], - ['ibx-urlau-_SHome'], - $object, + ['url_alias_location', [5], false], + ['url_alias', [5], false], ], + ['urlal-5', 'urla-5'], + [['url_alias_location_list', [5], true]], + ['ibx-urlall-5'], + [$object], + ]; + + yield 'listURLAliasesForLocation_custom' => [ + 'listURLAliasesForLocation', + [5, true], + 'ibx-urlall-5-c', [ - 'loadUrlAlias', - [5], - 'ibx-urla-5', - [ - ['url_alias', [5], false], - ], - ['urla-5'], - [ - ['url_alias', [5], true], - ], - ['ibx-urla-5'], - $object, + ['url_alias_location', [5], false], + ['url_alias', [5], false], ], + ['urlal-5', 'urla-5'], + [['url_alias_location_list_custom', [5], true]], + ['ibx-urlall-5-c'], + [$object], + ]; + + yield 'lookup' => [ + 'lookup', + ['/Home'], + 'ibx-urlau-_SHome', + [['url_alias', [5], false]], + ['urla-5'], + [['url_alias_url', ['_SHome'], true]], + ['ibx-urlau-_SHome'], + $object, + ]; + + yield 'loadUrlAlias' => [ + 'loadUrlAlias', + [5], + 'ibx-urla-5', + [['url_alias', [5], false]], + ['urla-5'], + [['url_alias', [5], true]], + ['ibx-urla-5'], + $object, ]; } } diff --git a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php index 900a3ad2e7..c405f091ca 100644 --- a/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php +++ b/tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php @@ -10,7 +10,7 @@ use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard; use Ibexa\Contracts\Core\Persistence\Content\UrlWildcard\Handler as SpiUrlWildcardHandler; -class UrlWildcardHandlerTest extends AbstractCacheHandlerTest +class UrlWildcardHandlerTest extends AbstractCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -22,17 +22,15 @@ public function getHandlerClassName(): string return SpiUrlWildcardHandler::class; } - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { $wildcard = new UrlWildcard(['id' => 1]); // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ - ['create', ['/home/about', '/web3/some/page/link', true], [['url_wildcard_not_found', [], false]], null, ['urlwnf'], null, $wildcard], - ['remove', [1], [['url_wildcard', [1], false]], null, ['urlw-1']], - ['loadAll', [], null, null, null, null, [$wildcard]], - ['exactSourceUrlExists', ['/home/about'], null, null, null, null, true], - ]; + yield 'create' => ['create', ['/home/about', '/web3/some/page/link', true], [['url_wildcard_not_found', [], false]], null, ['urlwnf'], null, $wildcard]; + yield 'remove' => ['remove', [1], [['url_wildcard', [1], false]], null, ['urlw-1']]; + yield 'loadAll' => ['loadAll', [], null, null, null, null, [$wildcard]]; + yield 'exactSourceUrlExists' => ['exactSourceUrlExists', ['/home/about'], null, null, null, null, true]; } public function providerForCachedLoadMethodsHit(): array diff --git a/tests/lib/Persistence/Cache/UserHandlerTest.php b/tests/lib/Persistence/Cache/UserHandlerTest.php index ca30d0866d..96ed5ea548 100644 --- a/tests/lib/Persistence/Cache/UserHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserHandlerTest.php @@ -21,7 +21,7 @@ /** * Test case for Persistence\Cache\UserHandler. */ -class UserHandlerTest extends AbstractInMemoryCacheHandlerTest +class UserHandlerTest extends AbstractInMemoryCacheHandlerTestCase { public function getHandlerMethodName(): string { @@ -164,7 +164,7 @@ public function providerForUnCachedMethods(): array ]; } - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $user = new User(['id' => 14]); $role = new Role(['id' => 9]); @@ -172,103 +172,111 @@ public function providerForCachedLoadMethodsHit(): array $calls = [['locationHandler', Location\Handler::class, 'loadLocationsByContent', [new Location(['pathString' => '/1/2/43/'])]]]; // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ - ['load', [14], 'ibx-u-14', null, null, [['user', [], true]], ['ibx-u'], $user], - [ - 'loadByLogin', - ['admin'], - 'ibx-u-admin-bl', - null, - null, - [ - ['user', [], true], - ['by_login_suffix', [], false], - ], - ['ibx-u', 'bl'], - $user, - ], - [ - 'loadByEmail', - ['admin@link.invalid'], - 'ibx-u-admin_Alink.invalid-be', - null, - null, - [ - ['user', [], true], - ['by_email_suffix', [], false], - ], - ['ibx-u', 'be'], - $user, - ], + yield 'load' => ['load', [14], 'ibx-u-14', null, null, [['user', [], true]], ['ibx-u'], $user]; + + yield 'loadByLogin' => [ + 'loadByLogin', + ['admin'], + 'ibx-u-admin-bl', + null, + null, [ - 'loadUserByToken', - ['hash'], - 'ibx-u-hash-bak', - null, - null, - [ - ['user', [], true], - ['by_account_key_suffix', [], false], - ], - ['ibx-u', '-bak'], - $user, + ['user', [], true], + ['by_login_suffix', [], false], ], - ['loadRole', [9], 'ibx-r-9', null, null, [['role', [], true]], ['ibx-r'], $role], + ['ibx-u', 'bl'], + $user, + ]; + + yield 'loadByEmail' => [ + 'loadByEmail', + ['admin@link.invalid'], + 'ibx-u-admin_Alink.invalid-be', + null, + null, [ - 'loadRoleByIdentifier', - ['member'], - 'ibx-r-member-bi', - null, - null, - [ - ['role', [], true], - ['by_identifier_suffix', [], false], - ], - ['ibx-r', '-bi'], - $role, + ['user', [], true], + ['by_email_suffix', [], false], ], - ['loadRoleAssignment', [11], 'ibx-ra-11', null, null, [['role_assignment', [], true]], ['ibx-ra'], $roleAssignment], - ['loadRoleAssignmentsByRoleId', [$role->id], 'ibx-ra-9-bro', null, null, [['role_assignment_with_by_role_suffix', [9], true]], ['ibx-ra-9-bro'], [$roleAssignment]], + ['ibx-u', 'be'], + $user, + ]; + + yield 'loadUserByToken' => [ + 'loadUserByToken', + ['hash'], + 'ibx-u-hash-bak', + null, + null, [ - 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit', - [9, 0, 10], - 'ibx-ra-9-bro-0-10', - null, - null, - [['role_assignment_with_by_role_offset_limit_suffix', [9, 0, 10], true]], - ['ibx-ra-9-bro-0-10'], - [$roleAssignment], + ['user', [], true], + ['by_account_key_suffix', [], false], ], + ['ibx-u', '-bak'], + $user, + ]; + + yield 'loadRole' => ['loadRole', [9], 'ibx-r-9', null, null, [['role', [], true]], ['ibx-r'], $role]; + + yield 'loadRoleByIdentifier' => [ + 'loadRoleByIdentifier', + ['member'], + 'ibx-r-member-bi', + null, + null, [ - 'loadRoleAssignmentsByGroupId', - [14], - 'ibx-ra-14-bg', - null, - null, - [ - ['role_assignment_with_by_group_suffix', [14], true], - ], - ['ibx-ra-14-bg'], - [$roleAssignment], - false, - $calls, + ['role', [], true], + ['by_identifier_suffix', [], false], ], + ['ibx-r', '-bi'], + $role, + ]; + + yield 'loadRoleAssignment' => ['loadRoleAssignment', [11], 'ibx-ra-11', null, null, [['role_assignment', [], true]], ['ibx-ra'], $roleAssignment]; + + yield 'loadRoleAssignmentsByRoleId' => ['loadRoleAssignmentsByRoleId', [$role->id], 'ibx-ra-9-bro', null, null, [['role_assignment_with_by_role_suffix', [9], true]], ['ibx-ra-9-bro'], [$roleAssignment]]; + + yield 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit' => [ + 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit', + [9, 0, 10], + 'ibx-ra-9-bro-0-10', + null, + null, + [['role_assignment_with_by_role_offset_limit_suffix', [9, 0, 10], true]], + ['ibx-ra-9-bro-0-10'], + [$roleAssignment], + ]; + + yield 'loadRoleAssignmentsByGroupId' => [ + 'loadRoleAssignmentsByGroupId', + [14], + 'ibx-ra-14-bg', + null, + null, [ - 'loadRoleAssignmentsByGroupId', - [14, true], - 'ibx-ra-14-bgi', - null, - null, - [['role_assignment_with_by_group_inherited_suffix', [14], true]], - ['ibx-ra-14-bgi'], - [$roleAssignment], - false, - $calls, + ['role_assignment_with_by_group_suffix', [14], true], ], + ['ibx-ra-14-bg'], + [$roleAssignment], + false, + $calls, + ]; + + yield 'loadRoleAssignmentsByGroupIdWithInheritance' => [ + 'loadRoleAssignmentsByGroupId', + [14, true], + 'ibx-ra-14-bgi', + null, + null, + [['role_assignment_with_by_group_inherited_suffix', [14], true]], + ['ibx-ra-14-bgi'], + [$roleAssignment], + false, + $calls, ]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $user = new User(['id' => 14]); $role = new Role(['id' => 9]); @@ -276,194 +284,184 @@ public function providerForCachedLoadMethodsMiss(): array $calls = [['locationHandler', Location\Handler::class, 'loadLocationsByContent', [new Location(['pathString' => '/1/2/43/'])]]]; // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ + yield 'load' => [ + 'load', + [14], + 'ibx-u-14', [ - 'load', - [14], - 'ibx-u-14', - [ - ['content', [14], false], - ['user', [14], false], - ], - ['c-14', 'u-14'], - [ - ['user', [], true], - ], - ['ibx-u'], - $user, + ['content', [14], false], + ['user', [14], false], ], + ['c-14', 'u-14'], + [['user', [], true]], + ['ibx-u'], + $user, + ]; + + yield 'loadByLogin' => [ + 'loadByLogin', + ['admin'], + 'ibx-u-admin-bl', [ - 'loadByLogin', - ['admin'], - 'ibx-u-admin-bl', - [ - ['content', [14], false], - ['user', [14], false], - ], - ['c-14', 'u-14'], - [ - ['user', [], true], - ['by_login_suffix', [], false], - ], - ['ibx-u', 'bl'], - $user, + ['content', [14], false], + ['user', [14], false], ], + ['c-14', 'u-14'], [ - 'loadByEmail', - ['admin@link.invalid'], - 'ibx-u-admin_Alink.invalid-be', - [ - ['content', [14], false], - ['user', [14], false], - ], - ['c-14', 'u-14'], - [ - ['user', [], true], - ['by_email_suffix', [], false], - ], - ['ibx-u', 'be'], - $user, + ['user', [], true], + ['by_login_suffix', [], false], ], + ['ibx-u', 'bl'], + $user, + ]; + + yield 'loadByEmail' => [ + 'loadByEmail', + ['admin@link.invalid'], + 'ibx-u-admin_Alink.invalid-be', [ - 'loadUserByToken', - ['hash'], - 'ibx-u-hash-bak', - [ - ['content', [14], false], - ['user', [14], false], - ['user_with_account_key_suffix', [14], false], - ], - ['c-14', 'u-14', 'u-14-bak'], - [ - ['user', [], true], - ['by_account_key_suffix', [], false], - ], - ['ibx-u', '-bak'], - $user, + ['content', [14], false], + ['user', [14], false], ], + ['c-14', 'u-14'], [ - 'loadRole', - [9], - 'ibx-r-9', - [ - ['role', [9], false], - ], - ['r-9'], - [ - ['role', [], true], - ], - ['ibx-r'], - $role, + ['user', [], true], + ['by_email_suffix', [], false], ], + ['ibx-u', 'be'], + $user, + ]; + + yield 'loadUserByToken' => [ + 'loadUserByToken', + ['hash'], + 'ibx-u-hash-bak', [ - 'loadRoleByIdentifier', - ['member'], - 'ibx-r-member-bi', - [ - ['role', [9], false], - ], - ['r-9'], - [ - ['role', [], true], - ['by_identifier_suffix', [], false], - ], - ['ibx-r', '-bi'], - $role, + ['content', [14], false], + ['user', [14], false], + ['user_with_account_key_suffix', [14], false], ], + ['c-14', 'u-14', 'u-14-bak'], [ - 'loadRoleAssignment', - [11], - 'ibx-ra-11', - [ - ['role_assignment', [11], false], - ['role_assignment_group_list', [14], false], - ['role_assignment_role_list', [9], false], - ], - ['ra-11', 'ragl-14', 'rarl-9'], - [ - ['role_assignment', [], true], - ], - ['ibx-ra'], - $roleAssignment, + ['user', [], true], + ['by_account_key_suffix', [], false], ], + ['ibx-u', '-bak'], + $user, + ]; + + yield 'loadRole' => [ + 'loadRole', + [9], + 'ibx-r-9', + [['role', [9], false]], + ['r-9'], + [['role', [], true]], + ['ibx-r'], + $role, + ]; + + yield 'loadRoleByIdentifier' => [ + 'loadRoleByIdentifier', + ['member'], + 'ibx-r-member-bi', + [['role', [9], false]], + ['r-9'], [ - 'loadRoleAssignmentsByRoleId', - [9], - 'ibx-ra-9-bro', - [ - ['role_assignment_role_list', [9], false], - ['role', [9], false], - ['role_assignment', [11], false], - ['role_assignment_group_list', [14], false], - ['role_assignment_role_list', [9], false], - ], - ['rarl-9', 'r-9', 'ra-11', 'ragl-14', 'rarl-9'], - [ - ['role_assignment_with_by_role_suffix', [9], true], - ], - ['ibx-ra-9-bro'], - [$roleAssignment], + ['role', [], true], + ['by_identifier_suffix', [], false], ], + ['ibx-r', '-bi'], + $role, + ]; + + yield 'loadRoleAssignment' => [ + 'loadRoleAssignment', + [11], + 'ibx-ra-11', [ - 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit', - [9, 0, 10], - 'ibx-ra-9-bro-0-10', - [ - ['role_assignment_role_list', [9], false], - ['role', [9], false], - ['role_assignment', [11], false], - ['role_assignment_group_list', [14], false], - ['role_assignment_role_list', [9], false], - ], - ['rarl-9', 'r-9', 'ra-11', 'ragl-14', 'rarl-9'], - [ - ['role_assignment_with_by_role_offset_limit_suffix', [9, 0, 10], true], - ], - ['ibx-ra-9-bro-0-10'], - [$roleAssignment], + ['role_assignment', [11], false], + ['role_assignment_group_list', [14], false], + ['role_assignment_role_list', [9], false], ], + ['ra-11', 'ragl-14', 'rarl-9'], + [['role_assignment', [], true]], + ['ibx-ra'], + $roleAssignment, + ]; + + yield 'loadRoleAssignmentsByRoleId' => [ + 'loadRoleAssignmentsByRoleId', + [9], + 'ibx-ra-9-bro', [ - 'loadRoleAssignmentsByGroupId', - [14], - 'ibx-ra-14-bg', - [ - ['role_assignment_group_list', [14], false], - ['location_path', ['2'], false], - ['location_path', ['43'], false], - ['role_assignment', [11], false], - ['role_assignment_group_list', [14], false], - ['role_assignment_role_list', [9], false], - ], - ['ragl-14', 'lp-2', 'lp-43', 'ra-11', 'ragl-14', 'rarl-9'], - [ - ['role_assignment_with_by_group_suffix', [14], true], - ], - ['ibx-ra-14-bg'], - [$roleAssignment], - false, - $calls, + ['role_assignment_role_list', [9], false], + ['role', [9], false], + ['role_assignment', [11], false], + ['role_assignment_group_list', [14], false], + ['role_assignment_role_list', [9], false], ], + ['rarl-9', 'r-9', 'ra-11', 'ragl-14', 'rarl-9'], + [['role_assignment_with_by_role_suffix', [9], true]], + ['ibx-ra-9-bro'], + [$roleAssignment], + ]; + + yield 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit' => [ + 'loadRoleAssignmentsByRoleIdWithOffsetAndLimit', + [9, 0, 10], + 'ibx-ra-9-bro-0-10', [ - 'loadRoleAssignmentsByGroupId', - [14, true], - 'ibx-ra-14-bgi', - [ - ['role_assignment_group_list', [14], false], - ['location_path', ['2'], false], - ['location_path', ['43'], false], - ['role_assignment', [11], false], - ['role_assignment_group_list', [14], false], - ['role_assignment_role_list', [9], false], - ], - ['ragl-14', 'lp-2', 'lp-43', 'ra-11', 'ragl-14', 'rarl-9'], - [ - ['role_assignment_with_by_group_inherited_suffix', [14], true], - ], - ['ibx-ra-14-bgi'], - [$roleAssignment], - false, - $calls, + ['role_assignment_role_list', [9], false], + ['role', [9], false], + ['role_assignment', [11], false], + ['role_assignment_group_list', [14], false], + ['role_assignment_role_list', [9], false], + ], + ['rarl-9', 'r-9', 'ra-11', 'ragl-14', 'rarl-9'], + [['role_assignment_with_by_role_offset_limit_suffix', [9, 0, 10], true]], + ['ibx-ra-9-bro-0-10'], + [$roleAssignment], + ]; + + yield 'loadRoleAssignmentsByGroupId' => [ + 'loadRoleAssignmentsByGroupId', + [14], + 'ibx-ra-14-bg', + [ + ['role_assignment_group_list', [14], false], + ['location_path', ['2'], false], + ['location_path', ['43'], false], + ['role_assignment', [11], false], + ['role_assignment_group_list', [14], false], + ['role_assignment_role_list', [9], false], + ], + ['ragl-14', 'lp-2', 'lp-43', 'ra-11', 'ragl-14', 'rarl-9'], + [['role_assignment_with_by_group_suffix', [14], true]], + ['ibx-ra-14-bg'], + [$roleAssignment], + false, + $calls, + ]; + + yield 'loadRoleAssignmentsByGroupIdWithInheritance' => [ + 'loadRoleAssignmentsByGroupId', + [14, true], + 'ibx-ra-14-bgi', + [ + ['role_assignment_group_list', [14], false], + ['location_path', ['2'], false], + ['location_path', ['43'], false], + ['role_assignment', [11], false], + ['role_assignment_group_list', [14], false], + ['role_assignment_role_list', [9], false], ], + ['ragl-14', 'lp-2', 'lp-43', 'ra-11', 'ragl-14', 'rarl-9'], + [['role_assignment_with_by_group_inherited_suffix', [14], true]], + ['ibx-ra-14-bgi'], + [$roleAssignment], + false, + $calls, ]; } diff --git a/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php b/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php index 2225cd674e..1ef9226327 100644 --- a/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php +++ b/tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php @@ -15,7 +15,7 @@ /** * Test case for Persistence\Cache\UserPreferenceHandler. */ -class UserPreferenceHandlerTest extends AbstractInMemoryCacheHandlerTest +class UserPreferenceHandlerTest extends AbstractInMemoryCacheHandlerTestCase { /** * {@inheritdoc} @@ -33,98 +33,86 @@ public function getHandlerClassName(): string return SPIUserPreferenceHandler::class; } - /** - * {@inheritdoc} - */ - public function providerForUnCachedMethods(): array + public function providerForUnCachedMethods(): iterable { $userId = 7; $name = 'setting'; $userPreferenceCount = 10; // string $method, array $arguments, array? $tagGeneratingArguments, array? $keyGeneratingArguments, array? $tags, array? $key, ?mixed $returnValue - return [ + yield 'setUserPreference' => [ + 'setUserPreference', [ - 'setUserPreference', - [ - new UserPreferenceSetStruct([ - 'userId' => $userId, - 'name' => $name, - ]), - ], - null, - [ - ['user_preference_with_suffix', [$userId, $name], true], - ], - null, - [ - 'ibx-up-' . $userId . '-' . $name, - ], - new SPIUserPreference(), + new UserPreferenceSetStruct([ + 'userId' => $userId, + 'name' => $name, + ]), ], + null, [ - 'loadUserPreferences', [$userId, 0, 25], null, null, null, null, [], + ['user_preference_with_suffix', [$userId, $name], true], ], + null, + [ + 'ibx-up-' . $userId . '-' . $name, + ], + new SPIUserPreference(), + ]; + + yield 'loadUserPreferences' => ['loadUserPreferences', [$userId, 0, 25], null, null, null, null, []]; + + yield 'countUserPreferences' => [ + 'countUserPreferences', [ - 'countUserPreferences', - [ - $userId, - ], - null, - null, - null, - null, - $userPreferenceCount, + $userId, ], + null, + null, + null, + null, + $userPreferenceCount, ]; } - /** - * {@inheritdoc} - */ - public function providerForCachedLoadMethodsHit(): array + public function providerForCachedLoadMethodsHit(): iterable { $userId = 7; $name = 'setting'; // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ + yield 'getUserPreferenceByUserIdAndName' => [ + 'getUserPreferenceByUserIdAndName', [ - 'getUserPreferenceByUserIdAndName', - [ - $userId, - $name, - ], - 'ibx-up-' . $userId . '-' . $name, - null, - null, - [['user_preference', [], true]], - ['ibx-up'], - new SPIUserPreference(['userId' => $userId, 'name' => $name]), + $userId, + $name, ], + 'ibx-up-' . $userId . '-' . $name, + null, + null, + [['user_preference', [], true]], + ['ibx-up'], + new SPIUserPreference(['userId' => $userId, 'name' => $name]), ]; } - public function providerForCachedLoadMethodsMiss(): array + public function providerForCachedLoadMethodsMiss(): iterable { $userId = 7; $name = 'setting'; // string $method, array $arguments, string $key, array? $tagGeneratingArguments, array? $tagGeneratingResults, array? $keyGeneratingArguments, array? $keyGeneratingResults, mixed? $data, bool $multi - return [ + yield 'getUserPreferenceByUserIdAndName' => [ + 'getUserPreferenceByUserIdAndName', [ - 'getUserPreferenceByUserIdAndName', - [ - $userId, - $name, - ], - 'ibx-up-' . $userId . '-' . $name, - null, - null, - [['user_preference', [], true]], - ['ibx-up'], - new SPIUserPreference(['userId' => $userId, 'name' => $name]), + $userId, + $name, ], + 'ibx-up-' . $userId . '-' . $name, + null, + null, + [['user_preference', [], true]], + ['ibx-up'], + new SPIUserPreference(['userId' => $userId, 'name' => $name]), ]; } } From ec6eaccf2ac61937b19ddf9185d4f99592e33b68 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:06:21 +0200 Subject: [PATCH 114/185] IBX-9727: [Tests] Fixed strict types for MVC\Symfony layer tests --- .../MVC/Symfony/Controller/ControllerTest.php | 15 +-- .../LanguageSwitchListenerTest.php | 3 +- .../ImageAsset/ParameterProviderTest.php | 10 +- .../FieldType/User/ParameterProviderTest.php | 11 +- .../UserLanguagePreferenceProviderTest.php | 38 ++---- .../lib/MVC/Symfony/Routing/GeneratorTest.php | 9 +- .../Routing/RouteReferenceGeneratorTest.php | 6 +- .../Symfony/Routing/UrlAliasGeneratorTest.php | 43 +++---- .../Symfony/Routing/UrlAliasRouterTest.php | 117 +++++++----------- .../MVC/Symfony/Security/UserCheckerTest.php | 6 +- .../Symfony/Security/Voter/CoreVoterTest.php | 3 +- .../Security/Voter/ValueObjectVoterTest.php | 5 +- .../SiteAccess/Compound/CompoundAndTest.php | 8 +- .../SiteAccess/Compound/CompoundOrTest.php | 3 +- ...terBaseTest.php => RouterBaseTestCase.php} | 18 +-- .../SiteAccess/RouterHostElementTest.php | 2 +- .../SiteAccess/RouterHostPortURITest.php | 2 +- .../Symfony/SiteAccess/RouterHostTextTest.php | 2 +- .../SiteAccess/RouterPortHostURITest.php | 2 +- .../SiteAccess/RouterSpecialPortsTest.php | 2 +- .../lib/MVC/Symfony/SiteAccess/RouterTest.php | 2 +- .../SiteAccess/RouterURIElement2Test.php | 2 +- .../SiteAccess/RouterURIElementTest.php | 2 +- .../Symfony/SiteAccess/RouterURITextTest.php | 2 +- .../SiteAccess/SiteAccessServiceTest.php | 20 +-- ...est.php => BaseRenderStrategyTestCase.php} | 2 +- .../Symfony/Templating/GlobalHelperTest.php | 17 +-- .../Templating/RenderContentStrategyTest.php | 2 +- .../Templating/RenderLocationStrategyTest.php | 2 +- .../Twig/Extension/ContentExtensionTest.php | 77 +++++------- .../Extension/DataAttributesExtensionTest.php | 2 +- ...FieldRenderingExtensionIntegrationTest.php | 4 +- .../Twig/Extension/FileSizeExtensionTest.php | 7 +- .../FileSystemTwigIntegrationTestCase.php | 46 ++++--- .../Extension/QueryRenderingExtensionTest.php | 2 +- .../Twig/Extension/RenderExtensionTest.php | 2 +- .../Twig/Extension/RoutingExtensionTest.php | 2 +- .../Twig/Extension/UserExtensionTest.php | 2 +- .../Extension/UserPreferenceExtensionTest.php | 2 +- .../ibexa_render_content_query.test | 2 +- .../ibexa_render_content_query_esi.test | 2 +- .../ibexa_render_location_query.test | 2 +- .../ibexa_render_location_query_esi.test | 2 +- ...tViewTest.php => AbstractViewTestCase.php} | 26 ++-- .../View/Builder/ContentViewBuilderTest.php | 60 +++++---- .../lib/MVC/Symfony/View/ContentViewTest.php | 26 +--- .../MVC/Symfony/View/LoginFormViewTest.php | 5 +- .../View/Renderer/TemplateRendererTest.php | 14 +-- .../lib/MVC/Symfony/View/ViewManagerTest.php | 20 +-- 49 files changed, 278 insertions(+), 383 deletions(-) rename tests/lib/MVC/Symfony/SiteAccess/{RouterBaseTest.php => RouterBaseTestCase.php} (82%) rename tests/lib/MVC/Symfony/Templating/{BaseRenderStrategyTest.php => BaseRenderStrategyTestCase.php} (98%) rename tests/lib/MVC/Symfony/View/{AbstractViewTest.php => AbstractViewTestCase.php} (79%) diff --git a/tests/lib/MVC/Symfony/Controller/ControllerTest.php b/tests/lib/MVC/Symfony/Controller/ControllerTest.php index 27b2eb436e..d22e4fe414 100644 --- a/tests/lib/MVC/Symfony/Controller/ControllerTest.php +++ b/tests/lib/MVC/Symfony/Controller/ControllerTest.php @@ -21,21 +21,16 @@ */ class ControllerTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\Controller\Controller */ - protected MockObject $controller; + private Controller & MockObject $controller; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $templateEngineMock; - - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $containerMock; + private EngineInterface & MockObject $templateEngineMock; protected function setUp(): void { $this->templateEngineMock = $this->createMock(EngineInterface::class); - $this->containerMock = $this->createMock(ContainerInterface::class); - $this->controller = $this->getMockForAbstractClass(Controller::class, [$this->containerMock]); - $this->containerMock + $containerMock = $this->createMock(ContainerInterface::class); + $this->controller = $this->getMockForAbstractClass(Controller::class, [$containerMock]); + $containerMock ->expects(self::any()) ->method('get') ->with('templating') diff --git a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php index 94fa73d125..93f495c91e 100644 --- a/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php +++ b/tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php @@ -18,8 +18,7 @@ class LanguageSwitchListenerTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $translationHelper; + private TranslationHelper & MockObject $translationHelper; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php index 266f4b4dc7..c8b16e2cc0 100644 --- a/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php @@ -22,17 +22,13 @@ class ParameterProviderTest extends TestCase { - /** @var \Ibexa\Core\Repository\SiteAccessAware\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $repository; + private Repository & MockObject $repository; - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $permissionsResolver; + private PermissionResolver & MockObject $permissionsResolver; - /** @var \Ibexa\Core\MVC\Symfony\FieldType\ImageAsset\ParameterProvider */ private ParameterProvider $parameterProvider; - /** @var \Ibexa\Contracts\Core\Repository\FieldType|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $fieldType; + private FieldType & MockObject $fieldType; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php index 9d4ed32a11..773d1145e7 100644 --- a/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php +++ b/tests/lib/MVC/Symfony/FieldType/User/ParameterProviderTest.php @@ -8,8 +8,6 @@ namespace Ibexa\Tests\Core\MVC\Symfony\FieldType\User; -use DateInterval; -use DateTimeImmutable; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Ibexa\Contracts\Core\Repository\Values\User\PasswordInfo; @@ -21,15 +19,12 @@ class ParameterProviderTest extends TestCase { - private const EXAMPLE_USER_ID = 1; + private const int EXAMPLE_USER_ID = 1; - /** @var \Ibexa\Contracts\Core\Repository\UserService|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $userService; + private UserService & MockObject $userService; - /** @var \Ibexa\Contracts\Core\Repository\Values\User\User|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $user; + private User & MockObject $user; - /** @var \Ibexa\Core\MVC\Symfony\FieldType\User\ParameterProvider */ private ParameterProvider $parameterProvider; protected function setUp(): void diff --git a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php index 48a2b4d3ef..bc3a78b7b4 100644 --- a/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php +++ b/tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php @@ -21,18 +21,13 @@ class UserLanguagePreferenceProviderTest extends TestCase { - private const LOCALE_FALLBACK = 'en'; - private const LANGUAGE_PREFERENCE_NAME = 'language'; - private const LANGUAGE_PREFERENCE_VALUE = 'no'; + private const string LOCALE_FALLBACK = 'en'; + private const string LANGUAGE_PREFERENCE_NAME = 'language'; + private const string LANGUAGE_PREFERENCE_VALUE = 'no'; - /** @var \Ibexa\Core\MVC\Symfony\Locale\UserLanguagePreferenceProviderInterface */ private UserLanguagePreferenceProvider $userLanguagePreferenceProvider; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\HttpFoundation\RequestStack */ - private MockObject $requestStackMock; - - /** @var \Ibexa\Contracts\Core\Repository\UserPreferenceService */ - private MockObject $userPreferenceServiceMock; + private RequestStack & MockObject $requestStackMock; protected function setUp(): void { @@ -43,15 +38,15 @@ protected function setUp(): void 'value' => self::LANGUAGE_PREFERENCE_VALUE, ]); - $this->userPreferenceServiceMock = $this->createMock(UserPreferenceService::class); - $this->userPreferenceServiceMock + $userPreferenceServiceMock = $this->createMock(UserPreferenceService::class); + $userPreferenceServiceMock ->method('getUserPreference') ->with(self::LANGUAGE_PREFERENCE_NAME) ->willReturn($userLanguagePreference); $this->userLanguagePreferenceProvider = new UserLanguagePreferenceProvider( $this->requestStackMock, - $this->userPreferenceServiceMock, + $userPreferenceServiceMock, $this->getLanguageCodesMap(), self::LOCALE_FALLBACK ); @@ -60,10 +55,10 @@ protected function setUp(): void /** * @dataProvider providerForTestGetPreferredLanguages * - * @param array $userLanguages - * @param array $expectedEzLanguageCodes + * @param array $userLanguages + * @param array $expectedLanguageCodes */ - public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguages, array $expectedEzLanguageCodes): void + public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguages, array $expectedLanguageCodes): void { $request = new Request(); $request->headers = new HeaderBag( @@ -81,7 +76,7 @@ public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguage $userPreferenceServiceMock ->method('getUserPreference') ->with(self::LANGUAGE_PREFERENCE_NAME) - ->will(self::throwException(new NotFoundException('User Preference', self::LANGUAGE_PREFERENCE_NAME))); + ->willThrowException(new NotFoundException('User Preference', self::LANGUAGE_PREFERENCE_NAME)); $userLanguagePreferenceProvider = new UserLanguagePreferenceProvider( $this->requestStackMock, @@ -91,7 +86,7 @@ public function testGetPreferredLanguagesWithoutUserLanguage(array $userLanguage ); self::assertEquals( - $expectedEzLanguageCodes, + $expectedLanguageCodes, $userLanguagePreferenceProvider->getPreferredLanguages() ); } @@ -116,16 +111,9 @@ public function testGetPreferredLanguagesWithUserPreferredLanguage(array $userLa ->method('getCurrentRequest') ->willReturn($request); - $userLanguagePreferenceProvider = new UserLanguagePreferenceProvider( - $this->requestStackMock, - $this->userPreferenceServiceMock, - $this->getLanguageCodesMap(), - self::LOCALE_FALLBACK - ); - self::assertEquals( $expectedEzLanguageCodes, - $userLanguagePreferenceProvider->getPreferredLanguages() + $this->userLanguagePreferenceProvider->getPreferredLanguages() ); } diff --git a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php index 218bc3c99a..4a3ec092a8 100644 --- a/tests/lib/MVC/Symfony/Routing/GeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/GeneratorTest.php @@ -20,14 +20,11 @@ class GeneratorTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $generator; + private Generator & MockObject $generator; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessRouter; + private SiteAccessRouterInterface & MockObject $siteAccessRouter; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $logger; + private LoggerInterface & MockObject $logger; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php index 0ef6218ae3..de11a3dd3a 100644 --- a/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php @@ -20,8 +20,7 @@ class RouteReferenceGeneratorTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $dispatcher; + private EventDispatcherInterface & MockObject $dispatcher; protected function setUp(): void { @@ -111,9 +110,6 @@ public function testGenerate(string|Location $resource, array $params): void public function testGenerateNullResourceWithoutRoute(): void { - $currentRouteName = 'my_route'; - $currentRouteParams = ['foo' => 'bar']; - $request = new Request(); $requestStack = new RequestStack(); $requestStack->push($request); diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php index a562cf6974..7306b3d94f 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php @@ -28,30 +28,21 @@ class UrlAliasGeneratorTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $repository; + private URLAliasService & MockObject $urlAliasService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlAliasService; + private LocationService & MockObject $locationService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $locationService; + private RouterInterface & MockObject $router; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $router; + private LoggerInterface & MockObject $logger; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $logger; + private SiteAccessRouterInterface & MockObject $siteAccessRouter; + + private ConfigResolverInterface & MockObject $configResolver; /** @var \Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator */ private UrlAliasGenerator $urlAliasGenerator; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $siteAccessRouter; - - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; - protected function setUp(): void { parent::setUp(); @@ -60,10 +51,11 @@ protected function setUp(): void $this->siteAccessRouter = $this->createMock(SiteAccessRouterInterface::class); $this->configResolver = $this->createMock(ConfigResolverInterface::class); $repositoryClass = Repository::class; - $this->repository = $repository = $this + /** @var \Ibexa\Core\Repository\Repository&\PHPUnit\Framework\MockObject\MockObject $repository */ + $repository = $this ->getMockBuilder($repositoryClass) ->disableOriginalConstructor() - ->setMethods( + ->onlyMethods( array_diff( get_class_methods($repositoryClass), ['sudo'] @@ -72,18 +64,15 @@ protected function setUp(): void ->getMock(); $this->urlAliasService = $this->createMock(URLAliasService::class); $this->locationService = $this->createMock(LocationService::class); - $this->repository - ->expects(self::any()) + $repository ->method('getURLAliasService') - ->will(self::returnValue($this->urlAliasService)); - $this->repository - ->expects(self::any()) + ->willReturn($this->urlAliasService); + $repository ->method('getLocationService') - ->will(self::returnValue($this->locationService)); + ->willReturn($this->locationService); $repository - ->expects(self::any()) ->method('getPermissionResolver') - ->will(self::returnValue($this->getPermissionResolverMock())); + ->willReturn($this->getPermissionResolverMock()); $urlAliasCharmap = [ '"' => '%22', @@ -92,7 +81,7 @@ protected function setUp(): void '>' => '%3E', ]; $this->urlAliasGenerator = new UrlAliasGenerator( - $this->repository, + $repository, $this->router, $this->configResolver, $urlAliasCharmap diff --git a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php index 2f008b5850..46c054a984 100644 --- a/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php +++ b/tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php @@ -12,7 +12,6 @@ use Ibexa\Contracts\Core\Repository\URLAliasService; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; -use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\Base\Exceptions\NotFoundException; use Ibexa\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator; use Ibexa\Core\MVC\Symfony\Routing\UrlAliasRouter; @@ -21,69 +20,52 @@ use Ibexa\Core\MVC\Symfony\View\Manager as ViewManager; use Ibexa\Core\Repository\Repository; use Ibexa\Core\Repository\Values\Content\Location; +use InvalidArgumentException; +use LogicException; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; +use RuntimeException; +use stdClass; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Exception\RouteNotFoundException; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RouteCollection; -use Symfony\Component\Routing\RouterInterface; class UrlAliasRouterTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $repository; + protected Repository & MockObject $repository; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $urlAliasService; + protected URLAliasService & MockObject $urlAliasService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $locationService; + protected LocationService & MockObject $locationService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $contentService; + protected ContentService & MockObject $contentService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $urlALiasGenerator; + protected UrlAliasGenerator & MockObject $urlAliasGenerator; - protected $requestContext; + protected RequestContext $requestContext; - /** @var \Ibexa\Core\MVC\Symfony\Routing\UrlAliasRouter */ - protected $router; + protected UrlAliasRouter $router; protected function setUp(): void { parent::setUp(); - $repositoryClass = Repository::class; - $this->repository = $repository = $this - ->getMockBuilder($repositoryClass) - ->disableOriginalConstructor() - ->setMethods( - array_diff( - get_class_methods($repositoryClass), - ['sudo'] - ) - ) - ->getMock(); + $this->repository = $this->createMock(Repository::class); $this->urlAliasService = $this->createMock(URLAliasService::class); $this->locationService = $this->createMock(LocationService::class); $this->contentService = $this->createMock(ContentService::class); - $this->urlALiasGenerator = $this - ->getMockBuilder(UrlAliasGenerator::class) - ->setConstructorArgs( - [ - $repository, - $this->createMock(RouterInterface::class), - $this->createMock(ConfigResolverInterface::class), - ] - ) - ->getMock(); + $this->urlAliasGenerator = $this->createMock(UrlAliasGenerator::class); $this->requestContext = new RequestContext(); - $this->router = $this->getRouter($this->locationService, $this->urlAliasService, $this->contentService, $this->urlALiasGenerator, $this->requestContext); + $this->router = $this->getRouter( + $this->locationService, + $this->urlAliasService, + $this->contentService, + $this->urlAliasGenerator, + $this->requestContext + ); } /** @@ -104,7 +86,7 @@ public function testRequestContext(): void { self::assertSame($this->requestContext, $this->router->getContext()); $newContext = new RequestContext(); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('setRequestContext') ->with($newContext); @@ -114,7 +96,7 @@ public function testRequestContext(): void public function testMatch(): void { - $this->expectException(\RuntimeException::class); + $this->expectException(RuntimeException::class); $this->router->match('/foo'); } @@ -122,7 +104,7 @@ public function testMatch(): void /** * @dataProvider providerTestSupports */ - public function testSupports(Location|\stdClass|string $routeReference, bool $isSupported): void + public function testSupports(Location|stdClass|string $routeReference, bool $isSupported): void { self::assertSame($isSupported, $this->router->supports($routeReference)); } @@ -131,17 +113,12 @@ public function providerTestSupports(): array { return [ [new Location(), true], - [new \stdClass(), false], + [new stdClass(), false], [UrlAliasRouter::URL_ALIAS_ROUTE_NAME, true], ['some_route_name', false], ]; } - public function testGetRouteCollection(): void - { - self::assertInstanceOf(RouteCollection::class, $this->router->getRouteCollection()); - } - /** * @param $pathInfo * @@ -181,7 +158,7 @@ public function testMatchRequestLocation(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -211,7 +188,7 @@ public function testMatchRequestLocationWithCaseRedirect(): void ] ); $request = $this->getRequestByPathInfo($pathInfo); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -221,7 +198,7 @@ public function testMatchRequestLocationWithCaseRedirect(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -253,7 +230,7 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded(): void ] ); $request = $this->getRequestByPathInfo($pathInfo); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -263,7 +240,7 @@ public function testMatchRequestLocationWrongCaseUriPrefixExcluded(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -294,7 +271,7 @@ public function testMatchRequestLocationCorrectCaseUriPrefixExcluded(): void ] ); $request = $this->getRequestByPathInfo($pathInfo); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -304,7 +281,7 @@ public function testMatchRequestLocationCorrectCaseUriPrefixExcluded(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -345,12 +322,12 @@ public function testMatchRequestLocationHistory(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($destinationLocation) ->will(self::returnValue($newPathInfo)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue($destinationLocation)); @@ -389,7 +366,7 @@ public function testMatchRequestLocationCustom(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue(new Location(['contentInfo' => new ContentInfo(['id' => 456])]))); @@ -430,19 +407,19 @@ public function testMatchRequestLocationCustomForward(): void ->method('lookup') ->with($pathInfo) ->will(self::returnValue($urlAlias)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->with($destinationId) ->will( self::returnValue($destinationLocation) ); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($destinationLocation) ->will(self::returnValue($newPathInfo)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('loadLocation') ->will(self::returnValue($destinationLocation)); @@ -542,7 +519,7 @@ public function testMatchRequestResourceWithCaseRedirect(): void ] ); $request = $this->getRequestByPathInfo($pathInfo); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -628,7 +605,7 @@ public function testMatchRequestVirtualWithCaseRedirect(): void ] ); $request = $this->getRequestByPathInfo($pathInfo); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('isUriPrefixExcluded') ->with($pathInfo) @@ -664,7 +641,7 @@ public function testGenerateWithRouteObject(): void $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $generatedLink = '/foo/bar'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) @@ -684,16 +661,16 @@ public function testGenerateWithRouteObject(): void public function testGenerateNoLocation(): void { - $this->expectException(\InvalidArgumentException::class); + $this->expectException(InvalidArgumentException::class); $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, ['foo' => 'bar']); } public function testGenerateInvalidLocation(): void { - $this->expectException(\LogicException::class); + $this->expectException(LogicException::class); - $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, ['location' => new \stdClass()]); + $this->router->generate(UrlAliasRouter::URL_ALIAS_ROUTE_NAME, ['location' => new stdClass()]); } public function testGenerateWithLocationId(): void @@ -708,7 +685,7 @@ public function testGenerateWithLocationId(): void ->method('loadLocation') ->with($locationId) ->will(self::returnValue($location)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) @@ -730,7 +707,7 @@ public function testGenerateWithLocationAsParameter(): void $parameters = ['some' => 'thing']; $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH; $generatedLink = '/foo/bar'; - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) @@ -764,7 +741,7 @@ public function testGenerateWithContentId(): void ->method('loadLocation') ->with($contentInfo->mainLocationId) ->will(self::returnValue($location)); - $this->urlALiasGenerator + $this->urlAliasGenerator ->expects(self::once()) ->method('generate') ->with($location, $parameters, $referenceType) @@ -781,7 +758,7 @@ public function testGenerateWithContentId(): void public function testGenerateWithContentIdWithMissingMainLocation(): void { - $this->expectException(\LogicException::class); + $this->expectException(LogicException::class); $contentId = 456; $contentInfo = new ContentInfo(['id' => $contentId, 'mainLocationId' => null]); diff --git a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php index 504ba21ab4..3d415ed4d2 100644 --- a/tests/lib/MVC/Symfony/Security/UserCheckerTest.php +++ b/tests/lib/MVC/Symfony/Security/UserCheckerTest.php @@ -25,12 +25,10 @@ final class UserCheckerTest extends TestCase { - private const EXAMPLE_USER_ID = 14; + private const int EXAMPLE_USER_ID = 14; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $userServiceMock; + private UserService & MockObject $userServiceMock; - /** @var \Ibexa\Core\MVC\Symfony\Security\UserChecker */ private UserChecker $userChecker; protected function setUp(): void diff --git a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php index a98c03b74c..c801c06fb7 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php @@ -19,8 +19,7 @@ class CoreVoterTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $permissionResolver; + private PermissionResolver & MockObject $permissionResolver; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php index 140e35b84b..8f2a734e89 100644 --- a/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php +++ b/tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php @@ -19,8 +19,7 @@ class ValueObjectVoterTest extends TestCase { - /** @var \Ibexa\Core\Repository\Permission\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $permissionResolver; + private PermissionResolver & MockObject $permissionResolver; protected function setUp(): void { @@ -31,7 +30,7 @@ protected function setUp(): void /** * @dataProvider supportsAttributeProvider */ - public function testSupportsAttribute(string|Attribute|\stdClass|array $attribute, bool $expectedResult): void + public function testSupportsAttribute(mixed $attribute, bool $expectedResult): void { $voter = new ValueObjectVoter($this->permissionResolver); self::assertSame($expectedResult, $voter->supportsAttribute($attribute)); diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php index 692ba53a3c..63db1fe238 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php @@ -20,8 +20,7 @@ class CompoundAndTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $matcherBuilder; + private MatcherBuilderInterface & MockObject $matcherBuilder; protected function setUp(): void { @@ -29,10 +28,7 @@ protected function setUp(): void $this->matcherBuilder = $this->createMock(MatcherBuilderInterface::class); } - /** - * @return \Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Compound\LogicalAnd - */ - public function testConstruct() + public function testConstruct(): LogicalAnd { return $this->buildMatcher(); } diff --git a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php index cdeb4e41ee..47d2d38759 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php @@ -20,8 +20,7 @@ class CompoundOrTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject */ - private MockObject $matcherBuilder; + private MatcherBuilderInterface & MockObject $matcherBuilder; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTestCase.php similarity index 82% rename from tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php rename to tests/lib/MVC/Symfony/SiteAccess/RouterBaseTestCase.php index f772e3253b..fed2c5a574 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterBaseTestCase.php @@ -14,19 +14,18 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use PHPUnit\Framework\TestCase; -abstract class RouterBaseTest extends TestCase +abstract class RouterBaseTestCase extends TestCase { - protected const UNDEFINED_SA_NAME = 'undefined_sa'; - protected const ENV_SA_NAME = 'env_sa'; - protected const HEADERBASED_SA_NAME = 'headerbased_sa'; + protected const string UNDEFINED_SA_NAME = 'undefined_sa'; + protected const string ENV_SA_NAME = 'env_sa'; + protected const string HEADERBASED_SA_NAME = 'headerbased_sa'; - protected const DEFAULT_SA_NAME = 'default_sa'; + protected const string DEFAULT_SA_NAME = 'default_sa'; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\MatcherBuilder */ - protected $matcherBuilder; + protected MatcherBuilder $matcherBuilder; /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface */ - protected $siteAccessProvider; + protected SiteAccess\SiteAccessProviderInterface $siteAccessProvider; protected function setUp(): void { @@ -54,6 +53,9 @@ public function testMatch(SimplifiedRequest $request, string $siteAccess): void $router->setSiteAccess(); } + /** + * @phpstan-return list + */ abstract public function matchProvider(): array; abstract protected function createRouter(): Router; diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php index a6449ec02e..2618ba059e 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php @@ -14,7 +14,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterHostElementTest extends RouterBaseTest +class RouterHostElementTest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php index 19638f827a..39a6131f68 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php @@ -13,7 +13,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterHostPortURITest extends RouterBaseTest +class RouterHostPortURITest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php index 21d8d68355..f53a5797ee 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php @@ -12,7 +12,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterHostTextTest extends RouterBaseTest +class RouterHostTextTest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php index 4dcb716075..05b8ad065c 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php @@ -11,7 +11,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterPortHostURITest extends RouterBaseTest +class RouterPortHostURITest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php index 9071ee3efb..5d822ff242 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php @@ -12,7 +12,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterSpecialPortsTest extends RouterBaseTest +class RouterSpecialPortsTest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php index 85d518b4fd..e598f79a89 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterTest.php @@ -17,7 +17,7 @@ use Psr\Log\LoggerInterface; use Symfony\Component\HttpFoundation\Request; -class RouterTest extends RouterBaseTest +class RouterTest extends RouterBaseTestCase { protected function tearDown(): void { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php index 23fd89dcfe..f2871bf728 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php @@ -13,7 +13,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterURIElement2Test extends RouterBaseTest +class RouterURIElement2Test extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php index 3a58e7be8e..252c10945f 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php @@ -13,7 +13,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterURIElementTest extends RouterBaseTest +class RouterURIElementTest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php index af7c668888..518075aff6 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php @@ -12,7 +12,7 @@ use Ibexa\Core\MVC\Symfony\SiteAccess\Router; use Psr\Log\LoggerInterface; -class RouterURITextTest extends RouterBaseTest +class RouterURITextTest extends RouterBaseTestCase { public function matchProvider(): array { diff --git a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php index 641a145765..699e61bf33 100644 --- a/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php +++ b/tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php @@ -20,23 +20,20 @@ class SiteAccessServiceTest extends TestCase { - private const EXISTING_SA_NAME = 'existing_sa'; - private const UNDEFINED_SA_NAME = 'undefined_sa'; - private const SA_GROUP = 'group'; + private const string EXISTING_SA_NAME = 'existing_sa'; + private const string UNDEFINED_SA_NAME = 'undefined_sa'; + private const string SA_GROUP = 'group'; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess\SiteAccessProviderInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $provider; + private SiteAccessProviderInterface & MockObject $provider; - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; + private ConfigResolverInterface & MockObject $configResolver; - /** @var \Ibexa\Core\MVC\Symfony\SiteAccess */ private SiteAccess $siteAccess; - /** @var \ArrayIterator */ + /** @var \ArrayIterator */ private ArrayIterator $availableSiteAccesses; - /** @var array */ + /** @phpstan-var list */ private array $configResolverParameters; protected function setUp(): void @@ -148,6 +145,9 @@ private function getAvailableSitAccesses(array $siteAccessNames): ArrayIterator return new ArrayIterator($availableSitAccesses); } + /** + * @phpstan-return list + */ private function getConfigResolverParameters(): array { return [ diff --git a/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php b/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTestCase.php similarity index 98% rename from tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php rename to tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTestCase.php index 6475e76f06..62cc3db176 100644 --- a/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/BaseRenderStrategyTestCase.php @@ -23,7 +23,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; -abstract class BaseRenderStrategyTest extends TestCase +abstract class BaseRenderStrategyTestCase extends TestCase { /** * @phpstan-param class-string<\Ibexa\Contracts\Core\MVC\Templating\BaseRenderStrategy> $typeClass diff --git a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php index 6f93b233e2..15a1fa8b45 100644 --- a/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php +++ b/tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php @@ -24,22 +24,17 @@ class GlobalHelperTest extends TestCase { /** @var \Ibexa\Core\MVC\Symfony\Templating\GlobalHelper */ - protected $helper; + protected GlobalHelper $helper; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $container; + protected ContainerInterface & MockObject $container; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $locationService; + protected LocationService & MockObject $locationService; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $configResolver; + protected ConfigResolverInterface & MockObject $configResolver; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $router; + protected RouterInterface & MockObject $router; - /** @var \PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $translationHelper; + protected TranslationHelper & MockObject $translationHelper; protected function setUp(): void { diff --git a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php index 03a46c3ce3..e6468d3f90 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php @@ -19,7 +19,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; -class RenderContentStrategyTest extends BaseRenderStrategyTest +class RenderContentStrategyTest extends BaseRenderStrategyTestCase { public function testUnsupportedValueObject(): void { diff --git a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php index 0b2c55b949..3c8ad17576 100644 --- a/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php +++ b/tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php @@ -19,7 +19,7 @@ use Symfony\Component\HttpKernel\Controller\ControllerReference; use Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface; -class RenderLocationStrategyTest extends BaseRenderStrategyTest +class RenderLocationStrategyTest extends BaseRenderStrategyTestCase { public function testUnsupportedValueObject(): void { diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php index 92fae1be58..e1e04b337f 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php @@ -29,12 +29,11 @@ /** * Integration tests for ContentExtension templates. * - * Tests ContentExtension in context of site with "fre-FR, eng-US" configured as languages. + * Tests ContentExtension in the context of the site with "fre-FR", "eng-US" configured as languages. */ class ContentExtensionTest extends FileSystemTwigIntegrationTestCase { - /** @var \Ibexa\Contracts\Core\Repository\ContentTypeService|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $fieldHelperMock = null; + private FieldHelper & MockObject $fieldHelperMock; /** @var array */ private array $fieldDefinitions = []; @@ -42,7 +41,7 @@ class ContentExtensionTest extends FileSystemTwigIntegrationTestCase /** @var int[] */ private array $identityMap = []; - public function getExtensions() + public function getExtensions(): array { $this->fieldHelperMock = $this->createMock(FieldHelper::class); $configResolver = $this->getConfigResolverMock(); @@ -62,7 +61,7 @@ public function getExtensions() ]; } - public function getFixturesDir() + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/content_functions/'; } @@ -94,8 +93,8 @@ protected function getContent(string $contentTypeIdentifier, array $fieldsData, 'identifier' => $fieldInfo['fieldDefIdentifier'], 'id' => $fieldInfo['id'], 'fieldTypeIdentifier' => $fieldTypeIdentifier, - 'names' => isset($fieldInfo['fieldDefNames']) ? $fieldInfo['fieldDefNames'] : [], - 'descriptions' => isset($fieldInfo['fieldDefDescriptions']) ? $fieldInfo['fieldDefDescriptions'] : [], + 'names' => $fieldInfo['fieldDefNames'] ?? [], + 'descriptions' => $fieldInfo['fieldDefDescriptions'] ?? [], ] ); unset($fieldInfo['fieldDefNames'], $fieldInfo['fieldDefDescriptions']); @@ -143,23 +142,21 @@ protected function getContentAwareObject(string $contentTypeIdentifier, array $f return $mock; } - private function getConfigResolverMock(): MockObject + private function getConfigResolverMock(): ConfigResolverInterface & MockObject { $mock = $this->createMock(ConfigResolverInterface::class); // Signature: ConfigResolverInterface->getParameter( $paramName, $namespace = null, $scope = null ) $mock->expects(self::any()) ->method('getParameter') - ->will( - self::returnValueMap( + ->willReturnMap( + [ [ - [ - 'languages', - null, - null, - ['fre-FR', 'eng-US'], - ], - ] - ) + 'languages', + null, + null, + ['fre-FR', 'eng-US'], + ], + ] ); return $mock; @@ -182,48 +179,40 @@ protected function getField($isEmpty): Field $this->fieldHelperMock ->expects(self::once()) ->method('isFieldEmpty') - ->will(self::returnValue($isEmpty)); + ->willReturn($isEmpty); return $field; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryMock(): MockObject + protected function getRepositoryMock(): Repository & MockObject { $mock = $this->createMock(Repository::class); - $mock->expects(self::any()) + $mock ->method('getContentTypeService') - ->will(self::returnValue($this->getContentTypeServiceMock())); + ->willReturn($this->getContentTypeServiceMock()); return $mock; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject - */ - protected function getContentTypeServiceMock(): MockObject + protected function getContentTypeServiceMock(): ContentTypeService & MockObject { $mock = $this->createMock(ContentTypeService::class); - $mock->expects(self::any()) + $mock ->method('loadContentType') - ->will( - self::returnCallback( - function ($contentTypeId): ContentType { - return new ContentType( - [ - 'identifier' => $contentTypeId, - 'mainLanguageCode' => 'fre-FR', - 'fieldDefinitions' => new FieldDefinitionCollection( - $this->fieldDefinitions[$contentTypeId] - ), - ] - ); - } - ) + ->willReturnCallback( + function ($contentTypeId): ContentType { + return new ContentType( + [ + 'identifier' => $contentTypeId, + 'mainLanguageCode' => 'fre-FR', + 'fieldDefinitions' => new FieldDefinitionCollection( + $this->fieldDefinitions[$contentTypeId] + ), + ] + ); + } ); return $mock; diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php index 7a48b05db1..e64d51445f 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/DataAttributesExtensionTest.php @@ -20,7 +20,7 @@ public function getExtensions(): array ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/filters'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php index 315214b13d..77a2f6b1af 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php @@ -30,7 +30,7 @@ class FieldRenderingExtensionIntegrationTest extends FileSystemTwigIntegrationTe { private array $fieldDefinitions = []; - public function getExtensions() + public function getExtensions(): array { $configResolver = $this->getConfigResolverMock(); $twig = $this->createMock(Environment::class); @@ -56,7 +56,7 @@ public function getExtensions() ]; } - public function getFixturesDir() + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/field_rendering_functions/'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php index 41c266954d..ec2910f6c3 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php @@ -62,17 +62,14 @@ public function getLocale(): array return [$this->locale]; } - /** - * @return array - */ - protected function getExtensions() + protected function getExtensions(): array { return [ new FileSizeExtension($this->getTranslatorInterfaceMock(), $this->suffixes, $this->getConfigResolverInterfaceMock(), $this->getLocaleConverterInterfaceMock()), ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/functions/ibexa_file_size'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php index 7be71fe133..af15555801 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php @@ -11,10 +11,10 @@ use PHPUnit\Framework\Constraint\Exception as PHPUnitException; use Twig\Environment; use Twig\Error\Error; -use Twig\Error\SyntaxError; use Twig\Loader\ArrayLoader; use Twig\Loader\ChainLoader; use Twig\Loader\FilesystemLoader; +use Twig\Source; use Twig\Test\IntegrationTestCase; /** @@ -27,12 +27,25 @@ abstract class FileSystemTwigIntegrationTestCase extends IntegrationTestCase /** * Overrides the default implementation to use the chain loader so that * templates used internally are correctly loaded. + * + * @param string $file + * @param string $message + * @param string $condition + * @param array $templates + * @param string|false $exception + * @param array $outputs + * @param string $deprecation + * + * @throws \Throwable + * @throws \Twig\Error\Error */ - protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation = '') + protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation = ''): void { if ($condition) { + $ret = ''; eval('$ret = ' . $condition . ';'); - if (!$ret) { + /** @phpstan-ignore empty.variable */ + if (empty($ret)) { self::markTestSkipped($condition); } } @@ -41,7 +54,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e $loader = new ChainLoader( [ new ArrayLoader($templates), - new FilesystemLoader($this->getFixturesDir()), + new FilesystemLoader($this->getFixturesDirectory()), ] ); // end changes @@ -74,13 +87,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e return; } - if ($e instanceof SyntaxError) { - $e->setTemplateFile($file); - - throw $e; - } - - throw new Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e); + throw $this->buildTwigErrorFromException($e, $file); } try { @@ -97,11 +104,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e return; } - if ($e instanceof SyntaxError) { - $e->setTemplateFile($file); - } else { - $e = new Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $file, $e); - } + $e = $this->buildTwigErrorFromException($e, $file); $output = trim( sprintf('%s: %s', get_class($e), $e->getMessage()) @@ -118,7 +121,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e $expected = trim($match[3], "\n "); - if ($expected != $output) { + if ($expected !== $output) { echo 'Compiled template that failed:'; foreach (array_keys($templates) as $name) { @@ -132,4 +135,13 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e self::assertEquals($expected, $output, $message . ' (in ' . $file . ')'); } } + + private function buildTwigErrorFromException(Exception $e, string $file): Error + { + $code = file_get_contents($file); + self::assertNotFalse($code, sprintf('Unable to load "%s".', $file)); + $source = new Source($code, basename($file), $file); + + return new Error(sprintf('%s: %s', get_class($e), $e->getMessage()), -1, $source, $e); + } } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php index e1222921de..77d022d721 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/QueryRenderingExtensionTest.php @@ -27,7 +27,7 @@ protected function getExtensions(): array ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/query_rendering_functions/'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtensionTest.php index 1de91a5351..4c22941c5c 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RenderExtensionTest.php @@ -55,7 +55,7 @@ protected function getExtensions(): array ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/render'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php index 970e5a09e7..c20bb287b5 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php @@ -38,7 +38,7 @@ protected function getExtensions(): array ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/routing_functions'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserExtensionTest.php index 4c7aeef798..19be4dde71 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserExtensionTest.php @@ -76,7 +76,7 @@ public function getUser(int $id, bool $isCurrent = false): User return $this->users[$id]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/user_functions'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceExtensionTest.php b/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceExtensionTest.php index 4430dd47df..b838ff7b67 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceExtensionTest.php +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceExtensionTest.php @@ -45,7 +45,7 @@ public function load(string $class): ?RuntimeExtensionInterface ]; } - protected function getFixturesDir(): string + protected static function getFixturesDirectory(): string { return __DIR__ . '/_fixtures/user_preference_functions'; } diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test index 822184519a..da62c0b631 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query.test @@ -13,7 +13,6 @@ return array() array ( 0 => \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( - 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( 'options' => @@ -28,6 +27,7 @@ array ( 'query' => array ( ), + 'controller' => 'ibexa_query_render::renderQuery', )), 1 => 'inline', 2 => diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test index 9f3842ced1..f9fb174c49 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_content_query_esi.test @@ -13,7 +13,6 @@ return array() array ( 0 => \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( - 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( 'options' => @@ -28,6 +27,7 @@ array ( 'query' => array ( ), + 'controller' => 'ibexa_query_render::renderQuery', )), 1 => 'esi', 2 => diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test index ce86af76b4..0a46a98a69 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query.test @@ -13,7 +13,6 @@ return array() array ( 0 => \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( - 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( 'options' => @@ -28,6 +27,7 @@ array ( 'query' => array ( ), + 'controller' => 'ibexa_query_render::renderQuery', )), 1 => 'inline', 2 => diff --git a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test index 24872ce331..a27e8d5175 100644 --- a/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test +++ b/tests/lib/MVC/Symfony/Templating/Twig/Extension/_fixtures/query_rendering_functions/ibexa_render_location_query_esi.test @@ -13,7 +13,6 @@ return array() array ( 0 => \Symfony\Component\HttpKernel\Controller\ControllerReference::__set_state(array( - 'controller' => 'ibexa_query_render::renderQuery', 'attributes' => array ( 'options' => @@ -28,6 +27,7 @@ array ( 'query' => array ( ), + 'controller' => 'ibexa_query_render::renderQuery', )), 1 => 'esi', 2 => diff --git a/tests/lib/MVC/Symfony/View/AbstractViewTest.php b/tests/lib/MVC/Symfony/View/AbstractViewTestCase.php similarity index 79% rename from tests/lib/MVC/Symfony/View/AbstractViewTest.php rename to tests/lib/MVC/Symfony/View/AbstractViewTestCase.php index 324ee6133f..31bb028933 100644 --- a/tests/lib/MVC/Symfony/View/AbstractViewTest.php +++ b/tests/lib/MVC/Symfony/View/AbstractViewTestCase.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\MVC\Symfony\View; +use Closure; use Ibexa\Core\Base\Exceptions\InvalidArgumentType; use Ibexa\Core\MVC\Symfony\View\View; use InvalidArgumentException; @@ -16,14 +17,17 @@ /** * @covers \Ibexa\Core\MVC\Symfony\View\View */ -abstract class AbstractViewTest extends TestCase +abstract class AbstractViewTestCase extends TestCase { - abstract protected function createViewUnderTest($template = null, array $parameters = [], $viewType = 'full'): View; + /** + * @param array $parameters + */ + abstract protected function createViewUnderTest(string|Closure $template = null, array $parameters = [], string $viewType = 'full'): View; /** * Returns parameters that are always returned by this view. * - * @return array + * @return array */ protected function getAlwaysAvailableParams(): array { @@ -87,9 +91,11 @@ public function testGetParameterFail(View $view): void /** * @dataProvider goodTemplateIdentifierProvider * - * @param string|callable $templateIdentifier + * @phpstan-param string|(\Closure(array):string) $templateIdentifier + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ - public function testSetTemplateIdentifier($templateIdentifier): void + public function testSetTemplateIdentifier(string|Closure $templateIdentifier): void { $contentView = $this->createViewUnderTest(); $contentView->setTemplateIdentifier($templateIdentifier); @@ -97,6 +103,9 @@ public function testSetTemplateIdentifier($templateIdentifier): void self::assertSame($templateIdentifier, $contentView->getTemplateIdentifier()); } + /** + * @phpstan-return list):string)}> + */ public function goodTemplateIdentifierProvider(): array { return [ @@ -111,10 +120,8 @@ static function (): string { /** * @dataProvider badTemplateIdentifierProvider - * - * @param mixed $badTemplateIdentifier */ - public function testSetTemplateIdentifierWrongType($badTemplateIdentifier): void + public function testSetTemplateIdentifierWrongType(mixed $badTemplateIdentifier): void { $this->expectException(InvalidArgumentType::class); @@ -122,6 +129,9 @@ public function testSetTemplateIdentifierWrongType($badTemplateIdentifier): void $contentView->setTemplateIdentifier($badTemplateIdentifier); } + /** + * @phpstan-return list + */ public function badTemplateIdentifierProvider(): array { return [ diff --git a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php index 9cf237b227..3c981d6750 100644 --- a/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php +++ b/tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php @@ -37,55 +37,47 @@ */ class ContentViewBuilderTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $repository; + private const string VIEW_CONTENT_CONTROLLER = 'ibexa_content::viewContent'; + private const string EMBED_CONTENT_CONTROLLER = 'ibexa_content::embedAction'; + private const string VIEW_ACTION_CONTROLLER = 'ibexa_content::viewAction'; - /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $viewConfigurator; + private Repository & MockObject $repository; - /** @var \Ibexa\Core\MVC\Symfony\View\ParametersInjector|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $parametersInjector; + private ParametersInjector & MockObject $parametersInjector; - /** @var \Ibexa\Core\Helper\ContentInfoLocationLoader|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $contentInfoLocationLoader; + private PermissionResolver & MockObject $permissionResolver; - /** @var \Ibexa\Core\MVC\Symfony\View\Builder\ContentViewBuilder|\PHPUnit\Framework\MockObject\MockObject */ - private ContentViewBuilder $contentViewBuilder; - - /** @var \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $permissionResolver; + private RequestStack & MockObject $requestStack; - /** @var \Symfony\Component\HttpFoundation\RequestStack|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $requestStack; + private ContentViewBuilder $contentViewBuilder; protected function setUp(): void { $this->repository = $this ->getMockBuilder(Repository::class) ->disableOriginalConstructor() - ->setMethods([ + ->onlyMethods([ 'sudo', 'getPermissionResolver', 'getLocationService', 'getContentService', ]) ->getMock(); - $this->viewConfigurator = $this->getMockBuilder(Configurator::class)->getMock(); + $viewConfigurator = $this->getMockBuilder(Configurator::class)->getMock(); $this->parametersInjector = $this->getMockBuilder(ParametersInjector::class)->getMock(); - $this->contentInfoLocationLoader = $this->getMockBuilder(ContentInfoLocationLoader::class)->getMock(); + $contentInfoLocationLoader = $this->getMockBuilder(ContentInfoLocationLoader::class)->getMock(); $this->permissionResolver = $this->getMockBuilder(PermissionResolver::class)->getMock(); $this->requestStack = $this->getMockBuilder(RequestStack::class)->getMock(); $this->repository - ->expects(self::any()) ->method('getPermissionResolver') ->willReturn($this->permissionResolver); $this->contentViewBuilder = new ContentViewBuilder( $this->repository, - $this->viewConfigurator, + $viewConfigurator, $this->parametersInjector, $this->requestStack, - $this->contentInfoLocationLoader + $contentInfoLocationLoader ); } @@ -99,7 +91,7 @@ public function testBuildViewWithoutLocationIdAndContentId(): void { $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, ]; $this->expectException(InvalidArgumentException::class); @@ -111,7 +103,7 @@ public function testBuildViewWithInvalidLocationId(): void { $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'locationId' => 865, ]; @@ -129,7 +121,7 @@ public function testBuildViewWithHiddenLocation(): void { $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'locationId' => 2, ]; @@ -161,7 +153,7 @@ public function testBuildViewWithoutContentReadPermission(): void $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'locationId' => 2, ]; @@ -201,7 +193,7 @@ public function testBuildEmbedViewWithoutContentViewEmbedPermission(): void $parameters = [ 'viewType' => 'embed', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'locationId' => 2, ]; @@ -238,7 +230,7 @@ public function testBuildEmbedViewWithNullMainRequest(): void $parameters = [ 'viewType' => 'embed', - '_controller' => 'ibexa_content::embedAction', + '_controller' => self::EMBED_CONTENT_CONTROLLER, 'contentId' => $contentId, ]; @@ -274,7 +266,7 @@ public function testBuildEmbedViewWithNotNullMainRequest(): void $parameters = [ 'viewType' => 'embed', - '_controller' => 'ibexa_content::embedAction', + '_controller' => self::EMBED_CONTENT_CONTROLLER, 'contentId' => $contentId, ]; @@ -328,7 +320,7 @@ public function testBuildViewWithContentWhichDoesNotBelongToLocation(): void $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'locationId' => 2, ]; @@ -348,6 +340,9 @@ public function testBuildViewWithContentWhichDoesNotBelongToLocation(): void $this->contentViewBuilder->buildView($parameters); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception + */ public function testBuildViewWithTranslatedContentWithoutLocation(): void { $contentInfo = new ContentInfo(['id' => 120, 'mainLanguageCode' => 'eng-GB']); @@ -359,7 +354,7 @@ public function testBuildViewWithTranslatedContentWithoutLocation(): void $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content:viewContent', + '_controller' => self::VIEW_CONTENT_CONTROLLER, 'contentId' => 120, 'languageCode' => 'eng-GB', ]; @@ -389,6 +384,9 @@ public function testBuildViewWithTranslatedContentWithoutLocation(): void self::assertEquals($expectedView, $this->contentViewBuilder->buildView($parameters)); } + /** + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception + */ public function testBuildView(): void { $contentInfo = new ContentInfo(['id' => 120]); @@ -411,7 +409,7 @@ public function testBuildView(): void $parameters = [ 'viewType' => 'full', - '_controller' => 'ibexa_content::viewAction', + '_controller' => self::VIEW_ACTION_CONTROLLER, 'locationId' => 2, ]; diff --git a/tests/lib/MVC/Symfony/View/ContentViewTest.php b/tests/lib/MVC/Symfony/View/ContentViewTest.php index de2bea42be..4fe94f2f8f 100644 --- a/tests/lib/MVC/Symfony/View/ContentViewTest.php +++ b/tests/lib/MVC/Symfony/View/ContentViewTest.php @@ -8,7 +8,7 @@ namespace Ibexa\Tests\Core\MVC\Symfony\View; -use Ibexa\Core\Base\Exceptions\InvalidArgumentType; +use Closure; use Ibexa\Core\MVC\Symfony\View\ContentView; use Ibexa\Core\MVC\Symfony\View\View; @@ -17,7 +17,7 @@ * * @covers \Ibexa\Core\MVC\Symfony\View\ContentView */ -class ContentViewTest extends AbstractViewTest +class ContentViewTest extends AbstractViewTestCase { /** * Params that are always returned by this view. @@ -27,7 +27,7 @@ class ContentViewTest extends AbstractViewTest /** * @dataProvider constructProvider */ - public function testConstruct(string|\Closure $templateIdentifier, array $params): void + public function testConstruct(string|Closure $templateIdentifier, array $params): void { $contentView = new ContentView($templateIdentifier, $params); self::assertSame($templateIdentifier, $contentView->getTemplateIdentifier()); @@ -56,25 +56,9 @@ static function (): bool { } /** - * @dataProvider constructFailProvider + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ - public function testConstructFail(int|\stdClass|array $templateIdentifier): void - { - $this->expectException(InvalidArgumentType::class); - - new ContentView($templateIdentifier); - } - - public function constructFailProvider(): array - { - return [ - [123], - [new \stdClass()], - [[1, 2, 3]], - ]; - } - - protected function createViewUnderTest($template = null, array $parameters = [], $viewType = 'full'): View + protected function createViewUnderTest(string|Closure $template = null, array $parameters = [], $viewType = 'full'): View { return new ContentView($template, $parameters, $viewType); } diff --git a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php index 8807043809..3f0820f94c 100644 --- a/tests/lib/MVC/Symfony/View/LoginFormViewTest.php +++ b/tests/lib/MVC/Symfony/View/LoginFormViewTest.php @@ -8,6 +8,7 @@ namespace Ibexa\Tests\Core\MVC\Symfony\View; +use Closure; use Ibexa\Core\MVC\Symfony\View\LoginFormView; use Ibexa\Core\MVC\Symfony\View\View; use Symfony\Component\Security\Core\Exception\AuthenticationException; @@ -15,7 +16,7 @@ /** * @group mvc */ -final class LoginFormViewTest extends AbstractViewTest +final class LoginFormViewTest extends AbstractViewTestCase { public function testSetLastUsername(): void { @@ -37,7 +38,7 @@ public function testSetLastAuthenticationError(): void self::assertEquals($exception, $view->getLastAuthenticationException()); } - protected function createViewUnderTest($template = null, array $parameters = [], $viewType = 'full'): View + protected function createViewUnderTest(string|Closure $template = null, array $parameters = [], $viewType = 'full'): View { return new LoginFormView($template, $parameters, $viewType); } diff --git a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php index 4c4b4838c2..a8fadde641 100644 --- a/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php +++ b/tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php @@ -19,14 +19,11 @@ class TemplateRendererTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\View\Renderer\TemplateRenderer */ private TemplateRenderer $renderer; - /** @var \Twig\Environment|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $templateEngineMock; + private Environment & MockObject $templateEngineMock; - /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $eventDispatcherMock; + private EventDispatcherInterface & MockObject $eventDispatcherMock; protected function setUp(): void { @@ -69,13 +66,8 @@ public function testRenderNoViewTemplate(): void $this->renderer->render($this->createView()); } - /** - * @return \Ibexa\Core\MVC\Symfony\View\View - */ protected function createView(): ContentView { - $view = new ContentView(); - - return $view; + return new ContentView(); } } diff --git a/tests/lib/MVC/Symfony/View/ViewManagerTest.php b/tests/lib/MVC/Symfony/View/ViewManagerTest.php index a869577535..4050c41218 100644 --- a/tests/lib/MVC/Symfony/View/ViewManagerTest.php +++ b/tests/lib/MVC/Symfony/View/ViewManagerTest.php @@ -28,23 +28,15 @@ */ class ViewManagerTest extends TestCase { - /** @var \Ibexa\Core\MVC\Symfony\View\Manager */ private Manager $viewManager; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Twig\Environment */ - private MockObject $templateEngineMock; + private Environment & MockObject $templateEngineMock; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Symfony\Component\EventDispatcher\EventDispatcherInterface */ - private MockObject $eventDispatcherMock; + private Repository & MockObject $repositoryMock; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\Repository */ - private MockObject $repositoryMock; + private ConfigResolverInterface & MockObject $configResolverMock; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - private MockObject $configResolverMock; - - /** @var \Ibexa\Core\MVC\Symfony\View\Configurator|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $viewConfigurator; + private Configurator & MockObject $viewConfigurator; private string $viewBaseLayout = 'IbexaCoreBundle::viewbase.html.twig'; @@ -52,13 +44,13 @@ protected function setUp(): void { parent::setUp(); $this->templateEngineMock = $this->createMock(Environment::class); - $this->eventDispatcherMock = $this->createMock(EventDispatcherInterface::class); + $eventDispatcherMock = $this->createMock(EventDispatcherInterface::class); $this->repositoryMock = $this->createMock(Repository::class); $this->configResolverMock = $this->createMock(ConfigResolverInterface::class); $this->viewConfigurator = $this->createMock(Configurator::class); $this->viewManager = new Manager( $this->templateEngineMock, - $this->eventDispatcherMock, + $eventDispatcherMock, $this->repositoryMock, $this->configResolverMock, $this->viewBaseLayout, From 2cedbef42038887c28605977eb57b2bb5ab542ae Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Thu, 24 Apr 2025 18:06:55 +0200 Subject: [PATCH 115/185] IBX-9727: [Tests] Fixed strict types for QueryType tests --- tests/lib/Query/QueryFactoryTest.php | 8 ++--- .../BuiltIn/AbstractQueryTypeTest.php | 31 ++++++------------- .../BuiltIn/SortSpec/SortSpecLexerTest.php | 3 ++ 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/tests/lib/Query/QueryFactoryTest.php b/tests/lib/Query/QueryFactoryTest.php index d80e85b38c..f9052f833d 100644 --- a/tests/lib/Query/QueryFactoryTest.php +++ b/tests/lib/Query/QueryFactoryTest.php @@ -17,17 +17,15 @@ final class QueryFactoryTest extends TestCase { - private const EXAMPLE_QUERY_TYPE = 'Example'; - private const EXAMPLE_QUERY_PARAMS = [ + private const string EXAMPLE_QUERY_TYPE = 'Example'; + private const array EXAMPLE_QUERY_PARAMS = [ 'foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', ]; - /** @var \Ibexa\Core\QueryType\QueryTypeRegistry|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $queryTypeRegistry; + private QueryTypeRegistry & MockObject $queryTypeRegistry; - /** @var \Ibexa\Core\Query\QueryFactory */ private QueryFactory $queryFactory; protected function setUp(): void diff --git a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php index e06d458768..afd421ba15 100644 --- a/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php +++ b/tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php @@ -15,24 +15,13 @@ use Ibexa\Core\QueryType\BuiltIn\SortClausesFactoryInterface; use Ibexa\Core\QueryType\QueryType; use Ibexa\Core\Repository\Values\Content\Location; -use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; abstract class AbstractQueryTypeTest extends TestCase { - protected const ROOT_LOCATION_ID = 2; - protected const ROOT_LOCATION_PATH_STRING = '/1/2/'; + protected const int ROOT_LOCATION_ID = 2; + protected const string ROOT_LOCATION_PATH_STRING = '/1/2/'; - /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $repository; - - /** @var \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $configResolver; - - /** @var \Ibexa\Core\QueryType\BuiltIn\SortClausesFactoryInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $sortClausesFactory; - - /** @var \Ibexa\Core\QueryType\QueryType */ private QueryType $queryType; protected function setUp(): void @@ -48,21 +37,21 @@ protected function setUp(): void ->with(self::ROOT_LOCATION_ID) ->willReturn($rootLocation); - $this->repository = $this->createMock(Repository::class); - $this->repository->method('getLocationService')->willReturn($locationService); + $repository = $this->createMock(Repository::class); + $repository->method('getLocationService')->willReturn($locationService); - $this->configResolver = $this->createMock(ConfigResolverInterface::class); - $this->configResolver + $configResolver = $this->createMock(ConfigResolverInterface::class); + $configResolver ->method('getParameter') ->with('content.tree_root.location_id') ->willReturn(self::ROOT_LOCATION_ID); - $this->sortClausesFactory = $this->createMock(SortClausesFactoryInterface::class); + $sortClausesFactory = $this->createMock(SortClausesFactoryInterface::class); $this->queryType = $this->createQueryType( - $this->repository, - $this->configResolver, - $this->sortClausesFactory + $repository, + $configResolver, + $sortClausesFactory ); } diff --git a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php index bb7d8c41fa..155f9c1584 100644 --- a/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php +++ b/tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php @@ -25,6 +25,9 @@ public function testTokenize(string $input, iterable $expectedTokens): void self::assertEquals($expectedTokens, $lexer->getAll()); } + /** + * @return iterable}> + */ public function dataProviderForTokenize(): iterable { yield 'keyword: asc' => [ From c9a22f3f09eace3b614f6601facfde9ba419e4b8 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 16:42:11 +0200 Subject: [PATCH 116/185] IBX-9727: [Tests] Implemented InvocationMocker to replace at() calls --- tests/lib/PHPUnit/InvocationMocker.php | 96 ++++++++++++++++++++++ tests/lib/PHPUnit/InvocationMockerTest.php | 76 +++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 tests/lib/PHPUnit/InvocationMocker.php create mode 100644 tests/lib/PHPUnit/InvocationMockerTest.php diff --git a/tests/lib/PHPUnit/InvocationMocker.php b/tests/lib/PHPUnit/InvocationMocker.php new file mode 100644 index 0000000000..091ef53857 --- /dev/null +++ b/tests/lib/PHPUnit/InvocationMocker.php @@ -0,0 +1,96 @@ +expects(['argument1 a', 'argument2 a'], 'returnValue a'); + * $mocker->expects(['argument1 b', 'argument2 b'], 'returnValue b'); + * + * $mock = $this->createMock(MyInterface::class); + * $mock + * ->expects(self::exactly($mocker->getExpectedInvocationCount())) + * ->method('methodName') + * ->willReturnCallback($mocker); + * ``` + */ +final class InvocationMocker implements Stringable +{ + /** @phpstan-var list, returnValue: mixed}> */ + private array $invocationMap = []; + + private int $currentInvocationIndex = 0; + + public function __construct(private readonly string $methodName) + { + } + + /** + * @phpstan-param list $arguments + */ + public function expect(array $arguments, mixed $returnValue): void + { + $this->invocationMap[] = [ + 'arguments' => $arguments, + 'returnValue' => $returnValue, + ]; + } + + /** + * @phpstan-return int<0, max> + */ + public function getExpectedInvocationCount(): int + { + return count($this->invocationMap); + } + + /** + * @throws \PHPUnit\Framework\AssertionFailedError + * @throws \JsonException + */ + public function __invoke(): mixed + { + if (!isset($this->invocationMap[$this->currentInvocationIndex])) { + Assert::fail("Failed to find $this->methodName invocation at $this->currentInvocationIndex index"); + } + $invocation = $this->invocationMap[$this->currentInvocationIndex]; + + $args = func_get_args(); + Assert::assertSame( + $invocation['arguments'], + $args, + sprintf( + 'Expected %s to be invoked with %s arguments but got %s at %d index', + $this->methodName, + json_encode($invocation['arguments'], JSON_THROW_ON_ERROR), + json_encode($args, JSON_THROW_ON_ERROR), + $this->currentInvocationIndex + ) + ); + ++$this->currentInvocationIndex; + + return $invocation['returnValue']; + } + + public function __toString(): string + { + return sprintf('%s invocation mocker', $this->methodName); + } +} diff --git a/tests/lib/PHPUnit/InvocationMockerTest.php b/tests/lib/PHPUnit/InvocationMockerTest.php new file mode 100644 index 0000000000..369a4bd829 --- /dev/null +++ b/tests/lib/PHPUnit/InvocationMockerTest.php @@ -0,0 +1,76 @@ +expect([1, 2, 3], 42); + + self::assertSame(42, $invocationMocker(1, 2, 3)); + } + + /** + * @phpstan-return iterable + */ + public function getDataForFailedAssertions(): iterable + { + yield 'too many invocations' => [ + static function () { + $invocationMocker = new InvocationMocker('testMethod'); + $invocationMocker->expect([1, 2, 3], 42); + $invocationMocker(1, 2, 3); + $invocationMocker(1, 2, 3); + }, + 'Failed to find testMethod invocation at 1 index', + ]; + + yield 'invocation with incorrect arguments' => [ + static function () { + $invocationMocker = new InvocationMocker('testMethod'); + $invocationMocker->expect(['foo'], null); + $invocationMocker(1, 5, 3); + }, + 'Expected testMethod to be invoked with ["foo"] arguments but got [1,5,3] at 0 index', + ]; + } + + /** + * @dataProvider getDataForFailedAssertions + */ + public function testExpectThrowsAssertionFailedError(callable $invocation, string $expectedMessage): void + { + $this->expectException(AssertionFailedError::class); + $this->expectExceptionMessage($expectedMessage); + + $invocation(); + } + + public function testGetExpectedInvocationCount(): void + { + $invocationMocker = new InvocationMocker('testMethod'); + self::assertSame(0, $invocationMocker->getExpectedInvocationCount()); + + $invocationMocker->expect([1, 2, 3], 42); + $invocationMocker->expect([5, 7, 9], 55); + + self::assertSame(2, $invocationMocker->getExpectedInvocationCount()); + } +} From 01adc6f87cb3bbd13149a2e6693e5512a79c6ef4 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 14:28:27 +0200 Subject: [PATCH 117/185] IBX-9727: [Tests] Fixed strict types and refactored PermissionTest class --- .../Service/Mock/PermissionTest.php | 1269 +++++++++-------- 1 file changed, 635 insertions(+), 634 deletions(-) diff --git a/tests/lib/Repository/Service/Mock/PermissionTest.php b/tests/lib/Repository/Service/Mock/PermissionTest.php index 395d26d9e1..7f48e74134 100644 --- a/tests/lib/Repository/Service/Mock/PermissionTest.php +++ b/tests/lib/Repository/Service/Mock/PermissionTest.php @@ -13,187 +13,201 @@ use Ibexa\Contracts\Core\Persistence\User\RoleAssignment; use Ibexa\Contracts\Core\Repository\Repository; use Ibexa\Contracts\Core\Repository\Values\User\Limitation; +use Ibexa\Contracts\Core\Repository\Values\User\Policy as APIPolicy; use Ibexa\Contracts\Core\Repository\Values\ValueObject; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\Base\Exceptions\InvalidArgumentValue; use Ibexa\Core\Base\Exceptions\NotFound\LimitationNotFoundException; use Ibexa\Core\Repository\Permission\PermissionResolver; -use Ibexa\Core\Repository\Repository as CoreRepository; +use Ibexa\Core\Repository\Values\User\Policy as CorePolicy; use Ibexa\Core\Repository\Values\User\UserReference; +use Ibexa\Tests\Core\PHPUnit\InvocationMocker; use Ibexa\Tests\Core\Repository\Service\Mock\Base as BaseServiceMockTest; use PHPUnit\Framework\MockObject\MockObject; /** * Mock test case for PermissionResolver. - * - * @todo Move to "Tests/Permission/" */ -class PermissionTest extends BaseServiceMockTest +final class PermissionTest extends BaseServiceMockTest { - public function providerForTestHasAccessReturnsTrue(): array + protected UserReference & MockObject $userReferenceMock; + + /** + * @phpstan-return iterable, + * 1: array + * }> + */ + public function providerForTestHasAccessReturnsTrue(): iterable { - return [ + yield [ [ - [ - 25 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'dummy-limitation'], - ['dummy-module2', 'dummy-function2', 'dummy-limitation2'], - ], - 25 - ), - 26 => $this->createRole( - [ - ['*', 'dummy-function', 'dummy-limitation'], - ], - 26 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 25, - ] - ), - new RoleAssignment( - [ - 'roleId' => 26, - ] - ), - ], + 25 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'dummy-limitation'], + ['dummy-module2', 'dummy-function2', 'dummy-limitation2'], + ], + 25 + ), + 26 => self::createRole( + [ + ['*', 'dummy-function', 'dummy-limitation'], + ], + 26 + ), ], [ - [ - 27 => $this->createRole( - [ - ['dummy-module', '*', 'dummy-limitation'], - ], - 27 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 27, - ] - ), - ], + new RoleAssignment( + [ + 'roleId' => 25, + ] + ), + new RoleAssignment( + [ + 'roleId' => 26, + ] + ), ], + ]; + + yield [ [ - [ - 28 => $this->createRole( - [ - ['dummy-module', 'dummy-function', '*'], - ], - 28 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 28, - ] - ), - ], + 27 => self::createRole( + [ + ['dummy-module', '*', 'dummy-limitation'], + ], + 27 + ), + ], + [ + new RoleAssignment( + [ + 'roleId' => 27, + ] + ), + ], + ]; + + yield [ + [ + 28 => self::createRole( + [ + ['dummy-module', 'dummy-function', '*'], + ], + 28 + ), + ], + [ + new RoleAssignment( + [ + 'roleId' => 28, + ] + ), ], ]; } /** - * Test for the hasAccess() method. - * * @dataProvider providerForTestHasAccessReturnsTrue + * + * @param array $roles + * @param array $roleAssignments + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testHasAccessReturnsTrue(array $roles, array $roleAssignments): void { - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ + /** @var \Ibexa\Contracts\Core\Persistence\User\Handler&\PHPUnit\Framework\MockObject\MockObject $userHandlerMock */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $mockedService = $this->getPermissionResolverMock(null); + $mockedService = $this->getPermissionResolverMock(); $userHandlerMock ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') ->with(self::equalTo(10), self::equalTo(true)) - ->will(self::returnValue($roleAssignments)); - - foreach ($roleAssignments as $at => $roleAssignment) { - $userHandlerMock - ->expects(self::at($at + 1)) - ->method('loadRole') - ->with($roleAssignment->roleId) - ->will(self::returnValue($roles[$roleAssignment->roleId])); - } + ->willReturn($roleAssignments); + + $userHandlerMock + ->expects(self::exactly(count($roleAssignments))) + ->method('loadRole') + ->willReturnCallback(static fn (int $roleId): Role => $roles[$roleId]); $result = $mockedService->hasAccess('dummy-module', 'dummy-function'); self::assertTrue($result); } - public function providerForTestHasAccessReturnsFalse(): array + /** + * @phpstan-return iterable, + * 1: array + * }> + */ + public function providerForTestHasAccessReturnsFalse(): iterable { - return [ - [[], []], + yield [[], []]; + + yield [ [ - [ - 29 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'dummy-limitation'], - ], - 29 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 29, - ] - ), - ], + 29 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'dummy-limitation'], + ], + 29 + ), ], [ - [ - 30 => $this->createRole( - [ - ['dummy-module', '*', 'dummy-limitation'], - ], - 30 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 30, - ] - ), - ], + new RoleAssignment( + [ + 'roleId' => 29, + ] + ), + ], + ]; + + yield [ + [ + 30 => self::createRole( + [ + ['dummy-module', '*', 'dummy-limitation'], + ], + 30 + ), + ], + [ + new RoleAssignment( + [ + 'roleId' => 30, + ] + ), ], ]; } /** - * Test for the hasAccess() method. - * * @dataProvider providerForTestHasAccessReturnsFalse + * + * @param array $roles + * @param array $roleAssignments + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testHasAccessReturnsFalse(array $roles, array $roleAssignments): void { - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ + /** @var \Ibexa\Contracts\Core\Persistence\User\Handler&\PHPUnit\Framework\MockObject\MockObject $userHandlerMock */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $service = $this->getPermissionResolverMock(null); + $service = $this->getPermissionResolverMock(); $userHandlerMock ->expects(self::once()) ->method('loadRoleAssignmentsByGroupId') ->with(self::equalTo(10), self::equalTo(true)) - ->will(self::returnValue($roleAssignments)); - - foreach ($roleAssignments as $at => $roleAssignment) { - $userHandlerMock - ->expects(self::at($at + 1)) - ->method('loadRole') - ->with($roleAssignment->roleId) - ->will(self::returnValue($roles[$roleAssignment->roleId])); - } + ->willReturn($roleAssignments); + + $userHandlerMock + ->expects(self::exactly(count($roleAssignments))) + ->method('loadRole') + ->willReturnCallback(static fn (int $roleId): Role => $roles[$roleId]); $result = $service->hasAccess('dummy-module2', 'dummy-function2'); @@ -202,17 +216,18 @@ public function testHasAccessReturnsFalse(array $roles, array $roleAssignments): /** * Test for the sudo() & hasAccess() method. + * + * @throws \Exception */ public function testHasAccessReturnsFalseButSudoSoTrue(): void { - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ + /** @var \Ibexa\Contracts\Core\Persistence\User\Handler&\PHPUnit\Framework\MockObject\MockObject $userHandlerMock */ $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $service = $this->getPermissionResolverMock(null); + $service = $this->getPermissionResolverMock(); $repositoryMock = $this->getRepositoryMock(); $repositoryMock - ->expects(self::any()) ->method('getPermissionResolver') - ->will(self::returnValue($service)); + ->willReturn($service); $userHandlerMock ->expects(self::never()) @@ -229,430 +244,268 @@ static function (Repository $repo) { } /** - * @return array + * @phpstan-return iterable< + * array{ + * 0: array, + * 1: array + * }> */ - public function providerForTestHasAccessReturnsPermissionSets(): array + public function providerForTestHasAccessReturnsPermissionSets(): iterable { - return [ + yield 'single role, no limitations' => [ [ - [ - 31 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'test-limitation'], - ], - 31 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - ], + 31 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'test-limitation'], + ], + 31 + ), ], [ - [ - 31 => $this->createRole( + new RoleAssignment( + [ + 'roleId' => 31, + ] + ), + ], + ]; + + yield 'multiple roles, no limitations' => [ + [ + 31 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'test-limitation'], + ], + 31 + ), + 32 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'test-limitation2'], + ], + 32 + ), + ], + [ + new RoleAssignment( + [ + 'roleId' => 31, + ] + ), + new RoleAssignment( + [ + 'roleId' => 32, + ] + ), + ], + ]; + + yield 'role with subtree limitation' => [ + [ + 32 => self::createRole( + [ [ - ['dummy-module', 'dummy-function', 'test-limitation'], + 'dummy-module', 'dummy-function', [ + 'Subtree' => [ + '/1/2/', + ], ], - 31 - ), - 32 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'test-limitation2'], ], - 32 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - new RoleAssignment( - [ - 'roleId' => 32, - ] - ), - ], + ], + 32 + ), + ], + [ + new RoleAssignment( + [ + 'roleId' => 32, + 'limitationIdentifier' => 'Subtree', + 'values' => ['/1/2/'], + ] + ), + ], + ]; + + yield 'role with all permissions and subtree limitation' => [ + [ + 33 => self::createRole([['*', '*', '*']], 33), + ], + [ + new RoleAssignment( + [ + 'roleId' => 33, + 'limitationIdentifier' => 'Subtree', + 'values' => ['/1/2/'], + ] + ), ], ]; } /** - * Test for the hasAccess() method. - * * @dataProvider providerForTestHasAccessReturnsPermissionSets + * + * @param array $roles + * @param array $roleAssignments + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testHasAccessReturnsPermissionSets(array $roles, array $roleAssignments): void { - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ - $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $roleDomainMapper = $this->getRoleDomainMapperMock(['buildDomainPolicyObject']); - $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); - - $permissionResolverMock - ->expects(self::once()) - ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(14))); - - $userHandlerMock - ->expects(self::once()) - ->method('loadRoleAssignmentsByGroupId') - ->with(self::isType('integer'), self::equalTo(true)) - ->will(self::returnValue($roleAssignments)); - - foreach ($roleAssignments as $at => $roleAssignment) { - $userHandlerMock - ->expects(self::at($at + 1)) - ->method('loadRole') - ->with($roleAssignment->roleId) - ->will(self::returnValue($roles[$roleAssignment->roleId])); - } - - $permissionSets = []; - $count = 0; - /* @var $roleAssignments \Ibexa\Contracts\Core\Persistence\User\RoleAssignment[] */ - foreach ($roleAssignments as $i => $roleAssignment) { - $permissionSet = ['limitation' => null]; - foreach ($roles[$roleAssignment->roleId]->policies as $k => $policy) { - $policyName = 'policy-' . $i . '-' . $k; - $return = self::returnValue($policyName); - $permissionSet['policies'][] = $policyName; - - $roleDomainMapper - ->expects(self::at($count++)) - ->method('buildDomainPolicyObject') - ->with($policy) - ->will($return); - } + $permissionResolverMock = $this->mockPermissionResolverForPermissionSetsTests($roleAssignments, $roles); - if (!empty($permissionSet['policies'])) { - $permissionSets[] = $permissionSet; - } - } - - /* @var $repositoryMock \Ibexa\Core\Repository\Repository */ self::assertEquals( - $permissionSets, + $this->buildExpectedPermissionSets($roles, $roleAssignments), $permissionResolverMock->hasAccess('dummy-module', 'dummy-function') ); } /** - * @return array + * @phpstan-return iterable, + * 1: array + * }> */ - public function providerForTestHasAccessReturnsLimitationNotFoundException(): array + public function providerForTestHasAccessReturnsLimitationNotFoundException(): iterable { - return [ + yield 'single role with not found limitation' => [ [ - [ - 31 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'notfound'], - ], - 31 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - ], + 31 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'notfound'], + ], + 31 + ), ], [ - [ - 31 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'test-limitation'], - ], - 31 - ), - 32 => $this->createRole( - [ - ['dummy-module', 'dummy-function', 'notfound'], - ], - 32 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - new RoleAssignment( - [ - 'roleId' => 32, - ] - ), - ], + new RoleAssignment( + [ + 'roleId' => 31, + ] + ), ], ]; - } - - /** - * Test for the hasAccess() method. - * - * @dataProvider providerForTestHasAccessReturnsLimitationNotFoundException - */ - public function testHasAccessReturnsLimitationNotFoundException(array $roles, array $roleAssignments): void - { - $this->expectException(LimitationNotFoundException::class); - - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ - $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $roleDomainMapper = $this->getRoleDomainMapperMock(); - $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); - - $permissionResolverMock - ->expects(self::once()) - ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(14))); - - $userHandlerMock - ->expects(self::once()) - ->method('loadRoleAssignmentsByGroupId') - ->with(self::isType('integer'), self::equalTo(true)) - ->will(self::returnValue($roleAssignments)); - - foreach ($roleAssignments as $at => $roleAssignment) { - $userHandlerMock - ->expects(self::at($at + 1)) - ->method('loadRole') - ->with($roleAssignment->roleId) - ->will(self::returnValue($roles[$roleAssignment->roleId])); - } - - $count = 0; - /* @var $roleAssignments \Ibexa\Contracts\Core\Persistence\User\RoleAssignment[] */ - foreach ($roleAssignments as $i => $roleAssignment) { - $permissionSet = ['limitation' => null]; - foreach ($roles[$roleAssignment->roleId]->policies as $k => $policy) { - $policyName = 'policy-' . $i . '-' . $k; - if ($policy->limitations === 'notfound') { - $return = self::throwException(new LimitationNotFoundException('notfound')); - } else { - $return = self::returnValue($policyName); - $permissionSet['policies'][] = $policyName; - } - - $roleDomainMapper - ->expects(self::at($count++)) - ->method('buildDomainPolicyObject') - ->with($policy) - ->will($return); - - if ($policy->limitations === 'notfound') { - break 2; // no more execution after exception - } - } - } - $permissionResolverMock->hasAccess('dummy-module', 'dummy-function'); - } - - /** - * @return array - */ - public function providerForTestHasAccessReturnsInvalidArgumentValueException(): array - { - return [ + yield 'multiple roles with not found limitation' => [ [ - [ - 31 => $this->createRole( - [ - ['test-module', 'test-function', '*'], - ], - 31 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - ], + 31 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'test-limitation'], + ], + 31 + ), + 32 => self::createRole( + [ + ['dummy-module', 'dummy-function', 'notfound'], + ], + 32 + ), ], [ - [ - 31 => $this->createRole( - [ - ['other-module', 'test-function', '*'], - ], - 31 - ), - 32 => $this->createRole( - [ - ['test-module', 'other-function', '*'], - ], - 32 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 31, - ] - ), - new RoleAssignment( - [ - 'roleId' => 32, - ] - ), - ], + new RoleAssignment( + [ + 'roleId' => 31, + ] + ), + new RoleAssignment( + [ + 'roleId' => 32, + ] + ), ], ]; } /** - * Test for the hasAccess() method. + * @dataProvider providerForTestHasAccessReturnsLimitationNotFoundException * - * @dataProvider providerForTestHasAccessReturnsInvalidArgumentValueException + * @param array $roles + * @param array $roleAssignments + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function testHasAccessReturnsInvalidArgumentValueException(array $roles, array $roleAssignments): void + public function testHasAccessReturnsLimitationNotFoundException(array $roles, array $roleAssignments): void { - $this->expectException(InvalidArgumentValue::class); - - $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); + $permissionResolverMock = $this->mockPermissionResolverForPermissionSetsTests($roleAssignments, $roles); - /** @var $role \Ibexa\Contracts\Core\Persistence\User\Role */ - foreach ($roles as $role) { - /** @var $policy \Ibexa\Contracts\Core\Persistence\User\Policy */ - foreach ($role->policies as $policy) { - $permissionResolverMock->hasAccess($policy->module, $policy->function); - } - } + $this->expectException(LimitationNotFoundException::class); + $permissionResolverMock->hasAccess('dummy-module', 'dummy-function'); } - public function providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation(): array + /** + * @phpstan-return iterable + * }> + */ + public function providerForTestHasAccessReturnsInvalidArgumentValueException(): iterable { - return [ + yield 'single role with all limitations' => [ [ - [ - 32 => $this->createRole( - [ - [ - 'dummy-module', 'dummy-function', [ - 'Subtree' => [ - '/1/2/', - ], - ], - ], - ], - 32 - ), - ], - [ - new RoleAssignment( - [ - 'roleId' => 32, - 'limitationIdentifier' => 'Subtree', - 'values' => ['/1/2/'], - ] - ), - ], + 31 => self::createRole( + [ + ['test-module', 'test-function', '*'], + ], + 31 + ), ], + ]; + + yield 'multiple roles with all limitations' => [ [ - [ - 33 => $this->createRole([['*', '*', '*']], 33), - ], - [ - new RoleAssignment( - [ - 'roleId' => 33, - 'limitationIdentifier' => 'Subtree', - 'values' => ['/1/2/'], - ] - ), - ], + 31 => self::createRole( + [ + ['other-module', 'test-function', '*'], + ], + 31 + ), + 32 => self::createRole( + [ + ['test-module', 'other-function', '*'], + ], + 32 + ), ], ]; } /** - * Test for the hasAccess() method. + * @dataProvider providerForTestHasAccessReturnsInvalidArgumentValueException * - * @dataProvider providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation + * @param array $roles + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ - public function testHasAccessReturnsPermissionSetsWithRoleLimitation(array $roles, array $roleAssignments): void + public function testHasAccessReturnsInvalidArgumentValueException(array $roles): void { - /** @var $userHandlerMock \PHPUnit\Framework\MockObject\MockObject */ - $userHandlerMock = $this->getPersistenceMock()->userHandler(); - $limitationTypeMock = $this->createMock(Type::class); - $limitationService = $this->getLimitationServiceMock(); - $roleDomainMapper = $this->getRoleDomainMapperMock(); $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); - $permissionResolverMock - ->expects(self::once()) - ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(14))); - - $userHandlerMock - ->expects(self::once()) - ->method('loadRoleAssignmentsByGroupId') - ->with(self::isType('integer'), self::equalTo(true)) - ->will(self::returnValue($roleAssignments)); - - foreach ($roleAssignments as $at => $roleAssignment) { - $userHandlerMock - ->expects(self::at($at + 1)) - ->method('loadRole') - ->with($roleAssignment->roleId) - ->will(self::returnValue($roles[$roleAssignment->roleId])); - } - - $permissionSets = []; - /** @var $roleAssignments \Ibexa\Contracts\Core\Persistence\User\RoleAssignment[] */ - foreach ($roleAssignments as $i => $roleAssignment) { - $permissionSet = []; - foreach ($roles[$roleAssignment->roleId]->policies as $k => $policy) { - $policyName = "policy-{$i}-{$k}"; - $permissionSet['policies'][] = $policyName; - $roleDomainMapper - ->expects(self::at($k)) - ->method('buildDomainPolicyObject') - ->with($policy) - ->will(self::returnValue($policyName)); + $exceptionThrown = false; + foreach ($roles as $role) { + foreach ($role->policies as $policy) { + try { + $permissionResolverMock->hasAccess($policy->module, $policy->function); + self::fail( + sprintf( + 'Expected %s exception for %s/%s policy', + InvalidArgumentValue::class, + $policy->module, + $policy->function + ) + ); + } catch (InvalidArgumentValue) { + $exceptionThrown = true; + } } - - $permissionSet['limitation'] = "limitation-{$i}"; - $limitationTypeMock - ->expects(self::at($i)) - ->method('buildValue') - ->with($roleAssignment->values) - ->will(self::returnValue($permissionSet['limitation'])); - $limitationService - ->expects(self::any()) - ->method('getLimitationType') - ->with($roleAssignment->limitationIdentifier) - ->will(self::returnValue($limitationTypeMock)); - - $permissionSets[] = $permissionSet; } - self::assertEquals( - $permissionSets, - $permissionResolverMock->hasAccess('dummy-module', 'dummy-function') - ); + self::assertTrue($exceptionThrown, sprintf('Expected %s exception to be thrown', InvalidArgumentValue::class)); } /** * Returns Role stub. * - * @param array $policiesData - * @param mixed $roleId - * - * @return \Ibexa\Contracts\Core\Persistence\User\Role + * @phpstan-param list}> $policiesData */ - private function createRole(array $policiesData, $roleId = null): Role + private static function createRole(array $policiesData, int $roleId): Role { $policies = []; foreach ($policiesData as $policyData) { @@ -673,21 +526,28 @@ private function createRole(array $policiesData, $roleId = null): Role ); } - public function providerForTestCanUserSimple(): array + /** + * @phpstan-return iterable, + * 1: bool + * }> + */ + public function providerForTestCanUserSimple(): iterable { - return [ - [true, true], - [false, false], - [[], false], - ]; + yield [true, true]; + yield [false, false]; + yield [[], false]; } /** - * Test for the canUser() method. - * * Tests execution paths with permission sets equaling to boolean value or empty array. * * @dataProvider providerForTestCanUserSimple + * + * @param bool|array $permissionSets + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testCanUserSimple(bool|array $permissionSets, bool $result): void { @@ -697,9 +557,8 @@ public function testCanUserSimple(bool|array $permissionSets, bool $result): voi ->expects(self::once()) ->method('hasAccess') ->with(self::equalTo('test-module'), self::equalTo('test-function')) - ->will(self::returnValue($permissionSets)); + ->willReturn($permissionSets); - /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ $valueObject = $this->getMockForAbstractClass(ValueObject::class); self::assertEquals( @@ -709,9 +568,9 @@ public function testCanUserSimple(bool|array $permissionSets, bool $result): voi } /** - * Test for the canUser() method. + * Tests an execution path with a permission set defining no limitations. * - * Tests execution path with permission set defining no limitations. + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\Exception */ public function testCanUserWithoutLimitations(): void { @@ -722,16 +581,12 @@ public function testCanUserWithoutLimitations(): void ] ); - $policyMock = $this->getMockBuilder(Policy::class) - ->setMethods(['getLimitations']) - ->setConstructorArgs([]) - ->disableOriginalConstructor() - ->getMock(); - + $policyMock = $this->createMock(APIPolicy::class); $policyMock ->expects(self::once()) ->method('getLimitations') - ->will(self::returnValue('*')); + ->willReturn([]); + $permissionSets = [ [ 'limitation' => null, @@ -742,14 +597,13 @@ public function testCanUserWithoutLimitations(): void ->expects(self::once()) ->method('hasAccess') ->with(self::equalTo('test-module'), self::equalTo('test-function')) - ->will(self::returnValue($permissionSets)); + ->willReturn($permissionSets); $permissionResolverMock ->expects(self::once()) ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(14))); + ->willReturn(new UserReference(14)); - /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ $valueObject = $this->getMockForAbstractClass(ValueObject::class); self::assertTrue( @@ -763,133 +617,137 @@ public function testCanUserWithoutLimitations(): void } /** - * @return array + * @return list + * }> */ private function getPermissionSetsMock(): array { $roleLimitationMock = $this->createMock(Limitation::class); $roleLimitationMock - ->expects(self::any()) ->method('getIdentifier') - ->will(self::returnValue('test-role-limitation-identifier')); + ->willReturn('test-role-limitation-identifier'); $policyLimitationMock = $this->createMock(Limitation::class); $policyLimitationMock - ->expects(self::any()) ->method('getIdentifier') - ->will(self::returnValue('test-policy-limitation-identifier')); - - $policyMock = $this->getMockBuilder(Policy::class) - ->setMethods(['getLimitations']) - ->setConstructorArgs([]) - ->getMock(); + ->willReturn('test-policy-limitation-identifier'); + $policyMock = $this->createMock(APIPolicy::class); $policyMock - ->expects(self::any()) ->method('getLimitations') - ->will(self::returnValue([$policyLimitationMock, $policyLimitationMock])); + ->willReturn([$policyLimitationMock, $policyLimitationMock]); $permissionSet = [ 'limitation' => clone $roleLimitationMock, 'policies' => [$policyMock, $policyMock], ]; - $permissionSets = [$permissionSet, $permissionSet]; - return $permissionSets; + return [$permissionSet, $permissionSet]; } /** - * Provides evaluation results for two permission sets, each with a role limitation and two policies, - * with two limitations per policy. - * - * @return array + * @phpstan-return iterable, + * 1: array>>, + * 2: bool + * }> */ - public function providerForTestCanUserComplex(): array + public function providerForTestCanUserComplex(): iterable { - return [ + yield [ + [true, true], [ - [true, true], [ - [ - [true, true], - [true, true], - ], - [ - [true, true], - [true, true], - ], + [true, true], + [true, true], + ], + [ + [true, true], + [true, true], ], - true, ], + true, + ]; + + yield [ + [false, false], [ - [false, false], [ - [ - [true, true], - [true, true], - ], - [ - [true, true], - [true, true], - ], + [true, true], + [true, true], + ], + [ + [true, true], + [true, true], ], - false, ], + false, + ]; + + yield [ + [false, true], [ - [false, true], [ - [ - [true, true], - [true, true], - ], - [ - [true, true], - [true, true], - ], + [true, true], + [true, true], + ], + [ + [true, true], + [true, true], ], - true, ], + true, + ]; + + yield [ + [false, true], [ - [false, true], [ - [ - [true, true], - [true, true], - ], - [ - [true, false], - [true, true], - ], + [true, true], + [true, true], + ], + [ + [true, false], + [true, true], ], - true, ], + true, + ]; + + yield [ + [true, false], [ - [true, false], [ - [ - [true, false], - [false, true], - ], - [ - [true, true], - [true, true], - ], + [true, false], + [false, true], + ], + [ + [true, true], + [true, true], ], - false, ], + false, ]; } /** - * Test for the canUser() method. - * * Tests execution paths with permission sets containing limitations. * * @dataProvider providerForTestCanUserComplex + * + * @param array $roleLimitationEvaluations + * @param array>> $policyLimitationEvaluations + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\BadStateException */ - public function testCanUserComplex(array $roleLimitationEvaluations, array $policyLimitationEvaluations, bool $userCan): void - { - /** @var $valueObject \Ibexa\Contracts\Core\Repository\Values\ValueObject */ + public function testCanUserComplex( + array $roleLimitationEvaluations, + array $policyLimitationEvaluations, + bool $userCan + ): void { $valueObject = $this->createMock(ValueObject::class); $limitationServiceMock = $this->getLimitationServiceMock(); $permissionResolverMock = $this->getPermissionResolverMock( @@ -904,63 +762,53 @@ public function testCanUserComplex(array $roleLimitationEvaluations, array $poli ->expects(self::once()) ->method('hasAccess') ->with(self::equalTo('test-module'), self::equalTo('test-function')) - ->will(self::returnValue($permissionSets)); + ->willReturn($permissionSets); $userRef = new UserReference(14); $permissionResolverMock ->expects(self::once()) ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(14))); + ->willReturn(new UserReference(14)); - $invocation = 0; - for ($i = 0; $i < count($permissionSets); ++$i) { + $getLimitationTypeInvocationMocker = new InvocationMocker('getLimitationType'); + $permissionSetCount = count($permissionSets); + for ($i = 0; $i < $permissionSetCount; ++$i) { $limitation = $this->createMock(Type::class); $limitation ->expects(self::once()) ->method('evaluate') ->with($permissionSets[$i]['limitation'], $userRef, $valueObject, [$valueObject]) - ->will(self::returnValue($roleLimitationEvaluations[$i])); - $limitationServiceMock - ->expects(self::at($invocation++)) - ->method('getLimitationType') - ->with('test-role-limitation-identifier') - ->will(self::returnValue($limitation)); + ->willReturn($roleLimitationEvaluations[$i]); + + $getLimitationTypeInvocationMocker->expect(['test-role-limitation-identifier'], $limitation); if (!$roleLimitationEvaluations[$i]) { continue; } - for ($j = 0; $j < count($permissionSets[$i]['policies']); ++$j) { - /** @var $policy \Ibexa\Contracts\Core\Repository\Values\User\Policy */ - $policy = $permissionSets[$i]['policies'][$j]; - $limitations = $policy->getLimitations(); - for ($k = 0; $k < count($limitations); ++$k) { - $limitationsPass = true; - $limitation = $this->createMock(Type::class); - $limitation - ->expects(self::once()) - ->method('evaluate') - ->with($limitations[$k], $userRef, $valueObject, [$valueObject]) - ->will(self::returnValue($policyLimitationEvaluations[$i][$j][$k])); - $limitationServiceMock - ->expects(self::at($invocation++)) - ->method('getLimitationType') - ->with('test-policy-limitation-identifier') - ->will(self::returnValue($limitation)); - - if (!$policyLimitationEvaluations[$i][$j][$k]) { - $limitationsPass = false; - break; - } - } + $policyCount = count($permissionSets[$i]['policies']); + for ($j = 0; $j < $policyCount; ++$j) { + $limitationsPass = $this->mockEvaluateCallsUntilLimitationPass( + $permissionSets[$i]['policies'][$j], + $userRef, + $valueObject, + $policyLimitationEvaluations[$i][$j], + $getLimitationTypeInvocationMocker + ); - /** @var $limitationsPass */ if ($limitationsPass) { break 2; } } } + $limitationServiceMock + ->expects(self::exactly($getLimitationTypeInvocationMocker->getExpectedInvocationCount())) + ->method('getLimitationType') + ->willReturnCallback( + $getLimitationTypeInvocationMocker + ); + self::assertEquals( $userCan, $permissionResolverMock->canUser( @@ -974,16 +822,18 @@ public function testCanUserComplex(array $roleLimitationEvaluations, array $poli /** * Test for the setCurrentUserReference() and getCurrentUserReference() methods. + * + * @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException */ public function testSetAndGetCurrentUserReference(): void { - $permissionResolverMock = $this->getPermissionResolverMock(null); + $permissionResolverMock = $this->getPermissionResolverMock(); $userReferenceMock = $this->getUserReferenceMock(); $userReferenceMock ->expects(self::once()) ->method('getUserId') - ->will(self::returnValue(42)); + ->willReturn(42); $permissionResolverMock->setCurrentUserReference($userReferenceMock); @@ -998,19 +848,19 @@ public function testSetAndGetCurrentUserReference(): void */ public function testGetCurrentUserReferenceReturnsAnonymousUser(): void { - $permissionResolverMock = $this->getPermissionResolverMock(null); + $permissionResolverMock = $this->getPermissionResolverMock(); self::assertEquals(new UserReference(10), $permissionResolverMock->getCurrentUserReference()); } - protected ?MockObject $permissionResolverMock = null; + protected PermissionResolver & MockObject $permissionResolverMock; /** - * @return \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject + * @param string[] $methods */ - protected function getPermissionResolverMock($methods = []) + protected function getPermissionResolverMock(array $methods = []): PermissionResolver & MockObject { - if ($this->permissionResolverMock === null) { + if (!isset($this->permissionResolverMock)) { $configResolverMock = $this->createMock(ConfigResolverInterface::class); $configResolverMock ->method('getParameter') @@ -1019,7 +869,7 @@ protected function getPermissionResolverMock($methods = []) $this->permissionResolverMock = $this ->getMockBuilder(PermissionResolver::class) - ->setMethods($methods) + ->onlyMethods($methods) ->setConstructorArgs( [ $this->getRoleDomainMapperMock(), @@ -1052,32 +902,183 @@ protected function getPermissionResolverMock($methods = []) return $this->permissionResolverMock; } - protected ?MockObject $userReferenceMock = null; - - protected function getUserReferenceMock() + protected function getUserReferenceMock(): UserReference & MockObject { - if ($this->userReferenceMock === null) { + if (!isset($this->userReferenceMock)) { $this->userReferenceMock = $this->createMock(UserReference::class); } return $this->userReferenceMock; } - protected ?MockObject $repositoryMock = null; + private function buildCoreAPIPolicyFromPersistenceValue(Policy $persistencePolicy): APIPolicy + { + $limitationMocks = []; + if (is_array($persistencePolicy->limitations)) { + foreach (array_keys($persistencePolicy->limitations) as $limitationIdentifier) { + $limitationMock = $this->createMock(Limitation::class); + $limitationMock->method('getIdentifier')->willReturn($limitationIdentifier); + $limitationMocks[] = $limitationMock; + } + } elseif ($persistencePolicy->limitations === 'notfound') { + throw new LimitationNotFoundException('notfound'); + } + + return new CorePolicy( + [ + 'id' => $persistencePolicy->id, + 'roleId' => $persistencePolicy->roleId, + 'module' => $persistencePolicy->module, + 'function' => $persistencePolicy->function, + 'limitations' => $limitationMocks, + ] + ); + } /** - * @return \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject + * @param array $roles + * @param array $roleAssignments + * + * @phpstan-return list + * }> */ - protected function getRepositoryMock(): Repository + private function buildExpectedPermissionSets(array $roles, array $roleAssignments): array { - if ($this->repositoryMock === null) { - $this->repositoryMock = $this - ->getMockBuilder(CoreRepository::class) - ->onlyMethods(['getPermissionResolver']) - ->disableOriginalConstructor() - ->getMock(); + $roleAssignmentLimitationMap = []; + $permissionSets = []; + foreach ($roleAssignments as $roleAssignment) { + $roleAssignmentLimitation = $this->buildExpectedRoleAssignmentLimitation($roleAssignment); + if ($roleAssignmentLimitation !== null) { + $roleAssignmentLimitationMap[$roleAssignment->limitationIdentifier] = $roleAssignmentLimitation; + } + + $permissionSet = ['limitation' => $roleAssignmentLimitation]; + foreach ($roles[$roleAssignment->roleId]->policies as $persistencePolicy) { + $permissionSet['policies'][] = $this->buildCoreAPIPolicyFromPersistenceValue($persistencePolicy); + } + + if (!empty($permissionSet['policies'])) { + $permissionSets[] = $permissionSet; + } + } + + $limitationService = $this->getLimitationServiceMock(); + $limitationService + ->expects(self::exactly(count($roleAssignmentLimitationMap))) + ->method('getLimitationType') + ->willReturnCallback( + function (string $identifier) use ($roleAssignmentLimitationMap): Type { + $limitationStub = $roleAssignmentLimitationMap[$identifier]; + $limitationTypeMock = $this->createMock(Type::class); + $limitationTypeMock + ->method('buildValue') + ->willReturn($limitationStub); + + return $limitationTypeMock; + } + ); + + return $permissionSets; + } + + private function buildExpectedRoleAssignmentLimitation(RoleAssignment $roleAssignment): ?Limitation + { + if (empty($roleAssignment->values) || empty($roleAssignment->limitationIdentifier)) { + return null; } - return $this->repositoryMock; + return new class($roleAssignment->limitationIdentifier, $roleAssignment->values) extends Limitation { + private string $identifier; + + /** + * @param mixed[] $limitationValues + */ + public function __construct(string $identifier, array $limitationValues) + { + $this->identifier = $identifier; + $this->limitationValues = $limitationValues; + parent::__construct(); + } + + public function getIdentifier(): string + { + return $this->identifier; + } + }; + } + + /** + * @param array $policyLimitationEvaluations + */ + private function mockEvaluateCallsUntilLimitationPass( + APIPolicy $policy, + UserReference $userRef, + ValueObject $valueObject, + array $policyLimitationEvaluations, + InvocationMocker $getLimitationTypeInvocationMocker + ): bool { + $limitations = iterator_to_array($policy->getLimitations()); + $limitationCount = count($limitations); + $limitationsPass = false; + for ($k = 0; $k < $limitationCount; ++$k) { + $limitationsPass = true; + $limitation1 = $this->createMock(Type::class); + $limitation1 + ->expects(self::once()) + ->method('evaluate') + ->with($limitations[$k], $userRef, $valueObject, [$valueObject]) + ->willReturn($policyLimitationEvaluations[$k]); + + $getLimitationTypeInvocationMocker->expect(['test-policy-limitation-identifier'], $limitation1); + + if (!$policyLimitationEvaluations[$k]) { + $limitationsPass = false; + break; + } + } + + return $limitationsPass; + } + + /** + * @param array $roles + * @param array $roleAssignments + */ + private function mockPermissionResolverForPermissionSetsTests( + array $roleAssignments, + array $roles + ): MockObject & PermissionResolver { + /** @var \Ibexa\Contracts\Core\Persistence\User\Handler&\PHPUnit\Framework\MockObject\MockObject $userHandlerMock */ + $userHandlerMock = $this->getPersistenceMock()->userHandler(); + $roleDomainMapper = $this->getRoleDomainMapperMock(); + $permissionResolverMock = $this->getPermissionResolverMock(['getCurrentUserReference']); + + $permissionResolverMock + ->expects(self::once()) + ->method('getCurrentUserReference') + ->willReturn(new UserReference(14)); + + $userHandlerMock + ->expects(self::once()) + ->method('loadRoleAssignmentsByGroupId') + ->with(self::isType('integer'), self::equalTo(true)) + ->willReturn($roleAssignments); + + $userHandlerMock + ->expects(self::exactly(count($roleAssignments))) + ->method('loadRole') + ->willReturnCallback(static fn (int $roleId): Role => $roles[$roleId]); + + $roleDomainMapper + ->method('buildDomainPolicyObject') + ->willReturnCallback( + fn (Policy $persistencePolicy): APIPolicy => $this->buildCoreAPIPolicyFromPersistenceValue( + $persistencePolicy + ) + ); + + return $permissionResolverMock; } } From 22940583cf8df871a2ba8642e510aa0305e9932a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 17:22:05 +0200 Subject: [PATCH 118/185] IBX-9727: [Tests] Fixed strict types for Service\Mocks tests --- tests/lib/Repository/Service/Mock/Base.php | 204 +++++------ .../Service/Mock/ContentDomainMapperTest.php | 5 +- .../Repository/Service/Mock/ContentTest.php | 316 +----------------- .../Service/Mock/RelationProcessorTest.php | 9 - .../lib/Repository/Service/Mock/RoleTest.php | 8 +- .../Repository/Service/Mock/SearchTest.php | 12 +- 6 files changed, 103 insertions(+), 451 deletions(-) diff --git a/tests/lib/Repository/Service/Mock/Base.php b/tests/lib/Repository/Service/Mock/Base.php index 9dbfea1349..0636c26002 100644 --- a/tests/lib/Repository/Service/Mock/Base.php +++ b/tests/lib/Repository/Service/Mock/Base.php @@ -11,9 +11,11 @@ use Ibexa\Contracts\Core\Persistence\Filter\Location\Handler as LocationFilteringHandler; use Ibexa\Contracts\Core\Persistence\Handler; use Ibexa\Contracts\Core\Persistence\TransactionHandler; +use Ibexa\Contracts\Core\Repository\FieldTypeService as APIFieldTypeService; use Ibexa\Contracts\Core\Repository\LanguageResolver; use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\PasswordHashService; +use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\PermissionService; use Ibexa\Contracts\Core\Repository\Repository as APIRepository; use Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy; @@ -49,19 +51,15 @@ */ abstract class Base extends TestCase { - private ?Repository $repository = null; + private Repository $repository; - /** @var \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $repositoryMock = null; + protected APIRepository & MockObject $repositoryMock; - /** @var \Ibexa\Contracts\Core\Repository\PermissionService|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $permissionServiceMock = null; + private PermissionService & MockObject $permissionServiceMock; - /** @var \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $persistenceMock = null; + private Handler & MockObject $persistenceMock; - /** @var \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $thumbnailStrategyMock = null; + private ThumbnailStrategy & MockObject $thumbnailStrategyMock; /** * The Content / Location / Search ... handlers for the persistence / Search / .. handler mocks. @@ -72,45 +70,42 @@ abstract class Base extends TestCase */ private array $spiMockHandlers = []; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper */ - private ?MockObject $contentTypeDomainMapperMock = null; + private ContentTypeDomainMapper & MockObject $contentTypeDomainMapperMock; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentDomainMapper */ - private ?MockObject $contentDomainMapperMock = null; + private ContentDomainMapper & MockObject $contentDomainMapperMock; - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Permission\LimitationService */ - private ?MockObject $limitationServiceMock = null; + private LimitationService & MockObject $limitationServiceMock; - /** @var \Ibexa\Contracts\Core\Repository\LanguageResolver|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $languageResolverMock = null; + private LanguageResolver & MockObject $languageResolverMock; - /** @var \Ibexa\Core\Repository\Mapper\RoleDomainMapper|\PHPUnit\Framework\MockObject\MockObject */ - protected ?MockObject $roleDomainMapperMock = null; + protected RoleDomainMapper & MockObject $roleDomainMapperMock; - /** @var \Ibexa\Core\Repository\Mapper\ContentMapper|\PHPUnit\Framework\MockObject\MockObject */ - protected $contentMapperMock; + protected ContentMapper & MockObject $contentMapperMock; - /** @var \Ibexa\Contracts\Core\Repository\Validator\ContentValidator|\PHPUnit\Framework\MockObject\MockObject */ - protected $contentValidatorStrategyMock; + protected ContentValidator & MockObject $contentValidatorStrategyMock; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Content\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $contentFilteringHandlerMock = null; + private ContentFilteringHandler & MockObject $contentFilteringHandlerMock; - /** @var \Ibexa\Contracts\Core\Persistence\Filter\Location\Handler|\PHPUnit\Framework\MockObject\MockObject */ - private ?MockObject $locationFilteringHandlerMock = null; + private LocationFilteringHandler & MockObject $locationFilteringHandlerMock; - private TransactionHandler&MockObject $transactionHandlerMock; + private TransactionHandler & MockObject $transactionHandlerMock; + + protected FieldTypeService & MockObject $fieldTypeServiceMock; + + protected FieldTypeRegistry & MockObject $fieldTypeRegistryMock; + + protected EventDispatcherInterface & MockObject $eventDispatcher; + + private RelationProcessor & MockObject $relationProcessorMock; /** - * Get Real repository with mocked dependencies. - * - * @param array $serviceSettings If set then non shared instance of Repository is returned + * Get a Real repository with mocked dependencies. * - * @return \Ibexa\Contracts\Core\Repository\Repository + * @param array> $serviceSettings If set then non-shared instance of Repository is returned */ - protected function getRepository(array $serviceSettings = []) + protected function getRepository(array $serviceSettings = []): APIRepository { - if ($this->repository === null || !empty($serviceSettings)) { + if (!isset($this->repository) || !empty($serviceSettings)) { $repository = new Repository( $this->getPersistenceMock(), $this->getSPIMockHandler('Search\\Handler'), @@ -147,12 +142,7 @@ protected function getRepository(array $serviceSettings = []) return $this->repository; } - protected ?MockObject $fieldTypeServiceMock = null; - - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\FieldTypeService - */ - protected function getFieldTypeServiceMock() + protected function getFieldTypeServiceMock(): APIFieldTypeService & MockObject { if (!isset($this->fieldTypeServiceMock)) { $this->fieldTypeServiceMock = $this->createMock(FieldTypeService::class); @@ -161,12 +151,7 @@ protected function getFieldTypeServiceMock() return $this->fieldTypeServiceMock; } - protected ?MockObject $fieldTypeRegistryMock = null; - - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\FieldType\FieldTypeRegistry - */ - protected function getFieldTypeRegistryMock() + protected function getFieldTypeRegistryMock(): MockObject & FieldTypeRegistry { if (!isset($this->fieldTypeRegistryMock)) { $this->fieldTypeRegistryMock = $this->createMock(FieldTypeRegistry::class); @@ -175,12 +160,7 @@ protected function getFieldTypeRegistryMock() return $this->fieldTypeRegistryMock; } - protected EventDispatcherInterface $eventDispatcher; - - /** - * @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface&\PHPUnit\Framework\MockObject\MockObject - */ - protected function getEventDispatcher(): EventDispatcherInterface + protected function getEventDispatcher(): EventDispatcherInterface & MockObject { if (!isset($this->eventDispatcher)) { $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); @@ -189,10 +169,7 @@ protected function getEventDispatcher(): EventDispatcherInterface return $this->eventDispatcher; } - /** - * @return \Ibexa\Contracts\Core\Repository\Strategy\ContentThumbnail\ThumbnailStrategy|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getThumbnailStrategy() + protected function getThumbnailStrategy(): ThumbnailStrategy & MockObject { if (!isset($this->thumbnailStrategyMock)) { $this->thumbnailStrategyMock = $this->createMock(ThumbnailStrategy::class); @@ -201,10 +178,7 @@ protected function getThumbnailStrategy() return $this->thumbnailStrategyMock; } - /** - * @return \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryMock() + protected function getRepositoryMock(): APIRepository & MockObject { if (!isset($this->repositoryMock)) { $this->repositoryMock = $this->createMock(APIRepository::class); @@ -213,18 +187,12 @@ protected function getRepositoryMock() return $this->repositoryMock; } - /** - * @return \Ibexa\Contracts\Core\Repository\PermissionResolver|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getPermissionResolverMock() + protected function getPermissionResolverMock(): PermissionResolver & MockObject { return $this->getPermissionServiceMock(); } - /** - * @return \Ibexa\Contracts\Core\Repository\PermissionService|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getPermissionServiceMock(): PermissionService + protected function getPermissionServiceMock(): PermissionService & MockObject { if (!isset($this->permissionServiceMock)) { $this->permissionServiceMock = $this->createMock(PermissionService::class); @@ -233,10 +201,7 @@ protected function getPermissionServiceMock(): PermissionService return $this->permissionServiceMock; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentDomainMapper - */ - protected function getContentDomainMapperMock(): MockObject + protected function getContentDomainMapperMock(): ContentDomainMapper & MockObject { if (!isset($this->contentDomainMapperMock)) { $this->contentDomainMapperMock = $this->createMock(ContentDomainMapper::class); @@ -245,10 +210,7 @@ protected function getContentDomainMapperMock(): MockObject return $this->contentDomainMapperMock; } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Mapper\ContentTypeDomainMapper - */ - protected function getContentTypeDomainMapperMock() + protected function getContentTypeDomainMapperMock(): ContentTypeDomainMapper & MockObject { if (!isset($this->contentTypeDomainMapperMock)) { $this->contentTypeDomainMapperMock = $this->createMock(ContentTypeDomainMapper::class); @@ -257,65 +219,60 @@ protected function getContentTypeDomainMapperMock() return $this->contentTypeDomainMapperMock; } - /** - * Returns a persistence Handler mock. - * - * @return \Ibexa\Contracts\Core\Persistence\Handler|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getPersistenceMock() + protected function getPersistenceMock(): Handler & MockObject { if (!isset($this->persistenceMock)) { $this->persistenceMock = $this->createMock(Handler::class); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('contentHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('contentTypeHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Type\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Type\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('contentLanguageHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Language\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Language\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('locationHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Location\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Location\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('objectStateHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\ObjectState\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\ObjectState\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('trashHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Location\\Trash\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Location\\Trash\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('userHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('User\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('User\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('sectionHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\Section\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\Section\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('urlAliasHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\UrlAlias\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\UrlAlias\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('urlWildcardHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('Content\\UrlWildcard\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('Content\\UrlWildcard\\Handler')); - $this->persistenceMock->expects(self::any()) + $this->persistenceMock ->method('urlWildcardHandler') - ->will(self::returnValue($this->getPersistenceMockHandler('URL\\Handler'))); + ->willReturn($this->getPersistenceMockHandler('URL\\Handler')); } return $this->persistenceMock; } - protected function getTransactionHandlerMock(): MockObject&TransactionHandler + protected function getTransactionHandlerMock(): MockObject & TransactionHandler { if (!isset($this->transactionHandlerMock)) { $this->transactionHandlerMock = $this->createMock(TransactionHandler::class); @@ -324,9 +281,13 @@ protected function getTransactionHandlerMock(): MockObject&TransactionHandler return $this->transactionHandlerMock; } - protected function getRelationProcessorMock() + protected function getRelationProcessorMock(): RelationProcessor & MockObject { - return $this->createMock(RelationProcessor::class); + if (!isset($this->relationProcessorMock)) { + $this->relationProcessorMock = $this->createMock(RelationProcessor::class); + } + + return $this->relationProcessorMock; } /** @@ -353,10 +314,8 @@ protected function getSPIMockHandler($handler) * Returns a persistence Handler mock. * * @param string $handler For instance "Content\Type\Handler", must be relative to "Ibexa\Contracts\Core\Persistence" - * - * @return \PHPUnit\Framework\MockObject\MockObject */ - protected function getPersistenceMockHandler($handler) + protected function getPersistenceMockHandler(string $handler): MockObject { return $this->getSPIMockHandler("Persistence\\{$handler}"); } @@ -386,21 +345,18 @@ protected function getStubbedUser($id) ); } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Permission\LimitationService - */ - protected function getLimitationServiceMock(): MockObject + protected function getLimitationServiceMock(): LimitationService & MockObject { - if ($this->limitationServiceMock === null) { + if (!isset($this->limitationServiceMock)) { $this->limitationServiceMock = $this->createMock(LimitationService::class); } return $this->limitationServiceMock; } - protected function getLanguageResolverMock(): LanguageResolver + protected function getLanguageResolverMock(): LanguageResolver & MockObject { - if ($this->languageResolverMock === null) { + if (!isset($this->languageResolverMock)) { $this->languageResolverMock = $this->createMock(LanguageResolver::class); } @@ -409,12 +365,10 @@ protected function getLanguageResolverMock(): LanguageResolver /** * @param string[] $methods - * - * @return \Ibexa\Core\Repository\Mapper\RoleDomainMapper|\PHPUnit\Framework\MockObject\MockObject */ - protected function getRoleDomainMapperMock(array $methods = []): RoleDomainMapper + protected function getRoleDomainMapperMock(array $methods = []): RoleDomainMapper & MockObject { - if ($this->roleDomainMapperMock === null) { + if (!isset($this->roleDomainMapperMock)) { $mockBuilder = $this->getMockBuilder(RoleDomainMapper::class); if (!empty($methods)) { $mockBuilder->onlyMethods($methods); @@ -455,18 +409,18 @@ protected function getContentValidatorStrategy(): ContentValidator return new ContentValidatorStrategy($validators); } - protected function getContentFilteringHandlerMock(): ContentFilteringHandler + protected function getContentFilteringHandlerMock(): ContentFilteringHandler & MockObject { - if (null === $this->contentFilteringHandlerMock) { + if (!isset($this->contentFilteringHandlerMock)) { $this->contentFilteringHandlerMock = $this->createMock(ContentFilteringHandler::class); } return $this->contentFilteringHandlerMock; } - private function getLocationFilteringHandlerMock(): LocationFilteringHandler + private function getLocationFilteringHandlerMock(): LocationFilteringHandler & MockObject { - if (null === $this->locationFilteringHandlerMock) { + if (!isset($this->locationFilteringHandlerMock)) { $this->locationFilteringHandlerMock = $this->createMock(LocationFilteringHandler::class); } diff --git a/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php b/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php index 2d5fb51e45..d1bf2b2c71 100644 --- a/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php +++ b/tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php @@ -18,7 +18,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location as APILocation; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchHit; use Ibexa\Contracts\Core\Repository\Values\Content\Search\SearchResult; -use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo as APIVersionInfo; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Repository\Mapper\ContentDomainMapper; use Ibexa\Core\Repository\ProxyFactory\ProxyDomainMapperInterface; @@ -52,9 +51,7 @@ public function testBuildVersionInfo(SPIVersionInfo $spiVersionInfo): void $languageHandlerMock = $this->getLanguageHandlerMock(); $languageHandlerMock->expects(self::never())->method('load'); - $versionInfo = $this->getContentDomainMapper()->buildVersionInfoDomainObject($spiVersionInfo); - - self::assertInstanceOf(APIVersionInfo::class, $versionInfo); + $this->getContentDomainMapper()->buildVersionInfoDomainObject($spiVersionInfo); } public function testBuildLocationWithContentForRootLocation(): void diff --git a/tests/lib/Repository/Service/Mock/ContentTest.php b/tests/lib/Repository/Service/Mock/ContentTest.php index 5afd13c66f..9f06bf9558 100644 --- a/tests/lib/Repository/Service/Mock/ContentTest.php +++ b/tests/lib/Repository/Service/Mock/ContentTest.php @@ -30,6 +30,7 @@ use Ibexa\Contracts\Core\Repository\LocationService as APILocationService; use Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface; use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Repository as APIRepository; use Ibexa\Contracts\Core\Repository\Values\Content\Content as APIContent; use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct as APIContentCreateStruct; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; @@ -48,7 +49,6 @@ use Ibexa\Core\FieldType\Value; use Ibexa\Core\Repository\Collector\ContentCollector; use Ibexa\Core\Repository\ContentService; -use Ibexa\Core\Repository\Helper\RelationProcessor; use Ibexa\Core\Repository\Values\Content\Content; use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; @@ -63,20 +63,17 @@ /** * Mock test case for Content service. + * + * @covers \Ibexa\Contracts\Core\Repository\ContentService */ class ContentTest extends BaseServiceMockTest { - private const EMPTY_FIELD_VALUE = 'empty'; + private const string EMPTY_FIELD_VALUE = 'empty'; - /** - * Test for the __construct() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::__construct - */ public function testConstructor(): void { $repositoryMock = $this->getRepositoryMock(); - /** @var \Ibexa\Contracts\Core\Persistence\Handler $persistenceHandlerMock */ + /** @var \Ibexa\Contracts\Core\Persistence\Handler&\PHPUnit\Framework\MockObject\MockObject $persistenceHandlerMock */ $persistenceHandlerMock = $this->getPersistenceMockHandler('Handler'); $contentDomainMapperMock = $this->getContentDomainMapperMock(); $relationProcessorMock = $this->getRelationProcessorMock(); @@ -107,11 +104,6 @@ public function testConstructor(): void ); } - /** - * Test for the loadVersionInfo() method, of published version. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById - */ public function testLoadVersionInfoById(): void { $contentServiceMock = $this->getPartlyMockedContentService(['loadContentInfo']); @@ -156,11 +148,7 @@ public function testLoadVersionInfoById(): void } /** - * Test for the loadVersionInfo() method, of a draft. - * * @depends testLoadVersionInfoById - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById */ public function testLoadVersionInfoByIdAndVersionNumber(): void { @@ -204,11 +192,6 @@ public function testLoadVersionInfoByIdAndVersionNumber(): void self::assertEquals($versionInfoMock, $result); } - /** - * Test for the loadVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById - */ public function testLoadVersionInfoByIdThrowsNotFoundException(): void { $this->expectException(NotFoundException::class); @@ -237,11 +220,6 @@ public function testLoadVersionInfoByIdThrowsNotFoundException(): void $contentServiceMock->loadVersionInfoById(42, 24); } - /** - * Test for the loadVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById - */ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion(): void { $this->expectException(UnauthorizedException::class); @@ -282,11 +260,6 @@ public function testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVe $contentServiceMock->loadVersionInfoById(42, 24); } - /** - * Test for the loadVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById - */ public function testLoadVersionInfoByIdPublishedVersion(): void { $contentServiceMock = $this->getPartlyMockedContentService(); @@ -327,11 +300,6 @@ public function testLoadVersionInfoByIdPublishedVersion(): void self::assertEquals($versionInfoMock, $result); } - /** - * Test for the loadVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfoById - */ public function testLoadVersionInfoByIdNonPublishedVersion(): void { $contentServiceMock = $this->getPartlyMockedContentService(); @@ -373,15 +341,11 @@ public function testLoadVersionInfoByIdNonPublishedVersion(): void } /** - * Test for the loadVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadVersionInfo - * - * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoById - * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdThrowsNotFoundException - * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion - * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdPublishedVersion - * @depends Ibexa\Tests\Core\Repository\Service\Mock\ContentTest::testLoadVersionInfoByIdNonPublishedVersion + * @depends testLoadVersionInfoById + * @depends testLoadVersionInfoByIdThrowsNotFoundException + * @depends testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion + * @depends testLoadVersionInfoByIdPublishedVersion + * @depends testLoadVersionInfoByIdNonPublishedVersion */ public function testLoadVersionInfo(): void { @@ -704,11 +668,6 @@ public function testInternalLoadContentByRemoteIdNotFound(): void $contentService->internalLoadContentByRemoteId($remoteId, $languages, $versionNo); } - /** - * Test for the loadContentByContentInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByContentInfo - */ public function testLoadContentByContentInfo(): void { $versionInfo = $this->createMock(APIVersionInfo::class); @@ -746,11 +705,6 @@ public function testLoadContentByContentInfo(): void self::assertEquals($content, $result); } - /** - * Test for the loadContentByVersionInfo() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::loadContentByVersionInfo - */ public function testLoadContentByVersionInfo(): void { $expectedResult = $this->createMock(Content::class); @@ -784,11 +738,6 @@ public function testLoadContentByVersionInfo(): void self::assertEquals($expectedResult, $result); } - /** - * Test for the deleteContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent - */ public function testDeleteContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -833,11 +782,6 @@ public function testDeleteContentThrowsUnauthorizedException(): void $contentService->deleteContent($contentInfo); } - /** - * Test for the deleteContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent - */ public function testDeleteContent(): void { $repository = $this->getRepositoryMock(); @@ -909,11 +853,6 @@ public function testDeleteContent(): void $contentService->deleteContent($contentInfo); } - /** - * Test for the deleteContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteContent - */ public function testDeleteContentWithRollback(): void { $this->expectException(Exception::class); @@ -972,11 +911,6 @@ public function testDeleteContentWithRollback(): void $contentService->deleteContent($contentInfo); } - /** - * Test for the deleteVersion() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::deleteVersion - */ public function testDeleteVersionThrowsBadStateExceptionLastVersion(): void { $this->expectException(BadStateException::class); @@ -1033,8 +967,6 @@ public function testDeleteVersionThrowsBadStateExceptionLastVersion(): void /** * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet(): void { @@ -1047,8 +979,6 @@ public function testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeN /** * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet(): void { @@ -1056,16 +986,11 @@ public function testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet $this->expectExceptionMessage('Argument \'$contentCreateStruct\' is invalid: the \'contentType\' property must be set'); $mockedService = $this->getPartlyMockedContentService(); - $mockedService->createContent( - new ContentCreateStruct(['mainLanguageCode' => 'eng-US']), - [] - ); + $mockedService->createContent(new ContentCreateStruct(['mainLanguageCode' => 'eng-US'])); } /** * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ public function testCreateContentThrowsUnauthorizedException(): void { @@ -1076,14 +1001,13 @@ public function testCreateContentThrowsUnauthorizedException(): void $permissionResolver = $this->getPermissionResolverMock(); $permissionResolver->expects(self::once()) ->method('getCurrentUserReference') - ->will(self::returnValue(new UserReference(169))); + ->willReturn(new UserReference(169)); $mockedService = $this->getPartlyMockedContentService(); $contentTypeServiceMock = $this->getContentTypeServiceMock(); $contentType = new ContentType( [ 'id' => 123, - 'fieldDefinitions' => [], ] ); $contentCreateStruct = new ContentCreateStruct( @@ -1098,11 +1022,11 @@ public function testCreateContentThrowsUnauthorizedException(): void $contentTypeServiceMock->expects(self::once()) ->method('loadContentType') ->with(self::equalTo(123)) - ->will(self::returnValue($contentType)); + ->willReturn($contentType); $repositoryMock->expects(self::once()) ->method('getContentTypeService') - ->will(self::returnValue($contentTypeServiceMock)); + ->willReturn($contentTypeServiceMock); $permissionResolver->expects(self::once()) ->method('canUser') @@ -1111,7 +1035,7 @@ public function testCreateContentThrowsUnauthorizedException(): void self::equalTo('create'), self::isInstanceOf(get_class($contentCreateStruct)), self::equalTo([]) - )->will(self::returnValue(false)); + )->willReturn(false); $mockedService->createContent( new ContentCreateStruct( @@ -1119,15 +1043,13 @@ public function testCreateContentThrowsUnauthorizedException(): void 'mainLanguageCode' => 'eng-US', 'contentType' => $contentType, ] - ), - [] + ) ); } /** * Test for the createContent() method. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent * * @exceptionMessage Argument '$contentCreateStruct' is invalid: Another content with remoteId 'faraday' exists */ @@ -1147,7 +1069,6 @@ public function testCreateContentThrowsInvalidArgumentExceptionDuplicateRemoteId $contentType = new ContentType( [ 'id' => 123, - 'fieldDefinitions' => [], ] ); $contentCreateStruct = new ContentCreateStruct( @@ -1523,16 +1444,8 @@ public function providerForTestCreateContentNonRedundantFieldSet1(): array } /** - * Test for the createContent() method. - * * Testing the simplest use case. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::cloneField - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentNonRedundantFieldSet1 */ public function testCreateContentNonRedundantFieldSet1(string $mainLanguageCode, array $structFields, array $spiFields): void @@ -1626,16 +1539,8 @@ public function providerForTestCreateContentNonRedundantFieldSet2(): array } /** - * Test for the createContent() method. - * * Testing multiple languages with multiple translatable fields with empty default value. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::cloneField - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentNonRedundantFieldSet2 */ public function testCreateContentNonRedundantFieldSet2(string $mainLanguageCode, array $structFields, array $spiFields): void @@ -1839,16 +1744,8 @@ protected function fixturesForTestCreateContentNonRedundantFieldSetComplex(): ar } /** - * Test for the createContent() method. - * * Testing multiple languages with multiple translatable fields with empty default value. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::cloneField - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentNonRedundantFieldSetComplex */ public function testCreateContentNonRedundantFieldSetComplex(string $mainLanguageCode, array $structFields, array $spiFields): void @@ -1894,11 +1791,6 @@ public function providerForTestCreateContentWithInvalidLanguage(): array } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentWithInvalidLanguage */ public function testCreateContentWithInvalidLanguage(string $mainLanguageCode, array $structFields): void @@ -2091,12 +1983,6 @@ public function providerForTestCreateContentThrowsContentValidationExceptionFiel } /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition */ public function testCreateContentThrowsContentValidationExceptionFieldDefinition(string $mainLanguageCode, array $structFields): void @@ -2130,12 +2016,6 @@ public function providerForTestCreateContentThrowsContentValidationExceptionTran } /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionTranslation */ public function testCreateContentThrowsContentValidationExceptionTranslation(string $mainLanguageCode, array $structFields): void @@ -2311,12 +2191,6 @@ public function providerForTestCreateContentThrowsContentValidationExceptionRequ } /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionRequiredField */ public function testCreateContentRequiredField( @@ -2499,12 +2373,6 @@ public function providerForTestCreateContentThrowsContentFieldValidationExceptio } /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentThrowsContentFieldValidationException */ public function testCreateContentThrowsContentFieldValidationException($mainLanguageCode, array $structFields): void @@ -2594,11 +2462,6 @@ static function ($object) use ($that, $contentCreateStruct): string { /** * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::buildSPILocationCreateStructs - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent */ public function testCreateContentWithLocations(): void { @@ -2731,14 +2594,6 @@ public function testCreateContentWithLocations(): void $mockedService->createContent($contentCreateStruct, $locationCreateStructs); } - /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::buildSPILocationCreateStructs - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - */ public function testCreateContentWithLocationsDuplicateUnderParent(): void { $this->expectException(InvalidArgumentException::class); @@ -2900,14 +2755,6 @@ static function ($valueString): ValueStub { ); } - /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - */ public function testCreateContentObjectStates(): void { $spiFields = [ @@ -3007,13 +2854,6 @@ public function testCreateContentObjectStates(): void } /** - * Test for the createContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForCreate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::createContent - * * @dataProvider providerForTestCreateContentThrowsContentValidationExceptionTranslation */ public function testCreateContentWithRollback(): void @@ -3070,10 +2910,6 @@ public function providerForTestUpdateContentThrowsBadStateException(): array } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentThrowsBadStateException */ public function testUpdateContentThrowsBadStateException(int $status): void @@ -3121,11 +2957,6 @@ public function testUpdateContentThrowsBadStateException(int $status): void $mockedService->updateContent($versionInfo, $contentUpdateStruct); } - /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - */ public function testUpdateContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -3606,14 +3437,6 @@ public function providerForTestUpdateContentNonRedundantFieldSet1(): array } /** - * Test for the updateContent() method. - * - * Testing the simplest use case. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet1 */ public function testUpdateContentNonRedundantFieldSet1(?string $initialLanguageCode, array $structFields, array $spiFields): void @@ -3820,14 +3643,8 @@ public function providerForTestUpdateContentNonRedundantFieldSet2(): array } /** - * Test for the updateContent() method. - * * Testing with translatable field. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet2 */ public function testUpdateContentNonRedundantFieldSet2(?string $initialLanguageCode, array $structFields, array $spiFields): void @@ -4083,14 +3900,8 @@ public function providerForTestUpdateContentNonRedundantFieldSet3(): array } /** - * Test for the updateContent() method. - * * Testing with new language and untranslatable field. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet3 */ public function testUpdateContentNonRedundantFieldSet3(string $initialLanguageCode, array $structFields, array $spiFields): void @@ -4389,13 +4200,8 @@ public function providerForTestUpdateContentNonRedundantFieldSet4(): array } /** - * Test for the updateContent() method. - * * Testing with empty values. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent * * @dataProvider providerForTestUpdateContentNonRedundantFieldSet4 */ @@ -4770,19 +4576,13 @@ protected function fixturesForTestUpdateContentNonRedundantFieldSetComplex(): ar } /** - * Test for the updateContent() method. - * * Testing more complex cases. * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentNonRedundantFieldSetComplex */ public function testUpdateContentNonRedundantFieldSetComplex(string $initialLanguageCode, array $structFields, array $spiFields): void { - list($existingFields, $fieldDefinitions) = $this->fixturesForTestUpdateContentNonRedundantFieldSetComplex(); + [$existingFields, $fieldDefinitions] = $this->fixturesForTestUpdateContentNonRedundantFieldSetComplex(); $this->assertForTestUpdateContentNonRedundantFieldSet( $initialLanguageCode, @@ -4824,11 +4624,6 @@ public function providerForTestUpdateContentWithInvalidLanguage(): array } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentWithInvalidLanguage */ public function testUpdateContentWithInvalidLanguage(string $initialLanguageCode, array $structFields): void @@ -5100,12 +4895,6 @@ public function providerForTestUpdateContentThrowsContentValidationExceptionFiel } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition */ public function testUpdateContentThrowsContentValidationExceptionFieldDefinition(string $initialLanguageCode, array $structFields): void @@ -5139,12 +4928,6 @@ public function providerForTestUpdateContentThrowsContentValidationExceptionTran } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentThrowsContentValidationExceptionTranslation */ public function testUpdateContentThrowsContentValidationExceptionTranslation(string $initialLanguageCode, array $structFields): void @@ -5269,12 +5052,6 @@ public function providerForTestUpdateContentRequiredField(): array } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentRequiredField */ public function testUpdateContentRequiredField( @@ -5494,12 +5271,6 @@ public function providerForTestUpdateContentThrowsContentFieldValidationExceptio } /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - * * @dataProvider providerForTestUpdateContentThrowsContentFieldValidationException */ public function testUpdateContentThrowsContentFieldValidationException( @@ -5529,13 +5300,6 @@ public function testUpdateContentThrowsContentFieldValidationException( } } - /** - * Test for the updateContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getLanguageCodesForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::mapFieldsForUpdate - * @covers \Ibexa\Contracts\Core\Repository\ContentService::updateContent - */ public function testUpdateContentTransactionRollback(): void { $this->expectException(Exception::class); @@ -5594,11 +5358,6 @@ public function testUpdateContentTransactionRollback(): void $this->partlyMockedContentService->updateContent($versionInfo, $contentUpdateStruct); } - /** - * Test for the copyContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent - */ public function testCopyContentThrowsUnauthorizedException(): void { $this->expectException(UnauthorizedException::class); @@ -5643,13 +5402,6 @@ public function testCopyContentThrowsUnauthorizedException(): void $contentService->copyContent($contentInfo, $locationCreateStruct); } - /** - * Test for the copyContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion - */ public function testCopyContent(): void { $repositoryMock = $this->getRepositoryMock(); @@ -5780,13 +5532,6 @@ public function testCopyContent(): void $contentService->copyContent($contentInfoMock, $locationCreateStruct, null); } - /** - * Test for the copyContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion - */ public function testCopyContentWithVersionInfo(): void { $repositoryMock = $this->getRepositoryMock(); @@ -5908,13 +5653,6 @@ public function testCopyContentWithVersionInfo(): void $contentService->copyContent($contentInfoMock, $locationCreateStruct, $versionInfoMock); } - /** - * Test for the copyContent() method. - * - * @covers \Ibexa\Contracts\Core\Repository\ContentService::copyContent - * @covers \Ibexa\Contracts\Core\Repository\ContentService::getDefaultObjectStates - * @covers \Ibexa\Contracts\Core\Repository\ContentService::internalPublishVersion - */ public function testCopyContentWithRollback(): void { $this->expectException(Exception::class); @@ -6217,20 +5955,6 @@ protected function mockPublishUrlAliasesForContent(APIContent $content) ->with(123, 456, ['eng-GB']); } - protected ?MockObject $relationProcessorMock = null; - - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Repository\Helper\RelationProcessor - */ - protected function getRelationProcessorMock() - { - if (!isset($this->relationProcessorMock)) { - $this->relationProcessorMock = $this->createMock(RelationProcessor::class); - } - - return $this->relationProcessorMock; - } - /** * @var \PHPUnit\Framework\MockObject\MockObject * &\Ibexa\Contracts\Core\Repository\NameSchema\NameSchemaServiceInterface @@ -6319,14 +6043,10 @@ protected function getPartlyMockedContentService(array $methods = null, int $gra return $this->partlyMockedContentService; } - /** - * @return \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryMock(): Repository + protected function getRepositoryMock(): APIRepository & MockObject { $repositoryMock = parent::getRepositoryMock(); $repositoryMock - ->expects(self::any()) ->method('getPermissionResolver') ->willReturn($this->getPermissionResolverMock()); diff --git a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php index ad0679aa6d..5c922c9dbe 100644 --- a/tests/lib/Repository/Service/Mock/RelationProcessorTest.php +++ b/tests/lib/Repository/Service/Mock/RelationProcessorTest.php @@ -15,7 +15,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Relation; use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\FieldType\Value; -use Ibexa\Core\Repository\FieldTypeService; use Ibexa\Core\Repository\Helper\RelationProcessor; use Ibexa\Core\Repository\Values\Content\Relation as RelationValue; use Ibexa\Core\Repository\Values\ContentType\FieldDefinition; @@ -680,12 +679,4 @@ protected function getPartlyMockedRelationProcessor(array $methods = null): Mock ) ->getMock(); } - - /** - * @return \PHPUnit\Framework\MockObject\MockObject - */ - protected function getFieldTypeServiceMock(): MockObject - { - return $this->createMock(FieldTypeService::class); - } } diff --git a/tests/lib/Repository/Service/Mock/RoleTest.php b/tests/lib/Repository/Service/Mock/RoleTest.php index 7786226631..b6801c77c8 100644 --- a/tests/lib/Repository/Service/Mock/RoleTest.php +++ b/tests/lib/Repository/Service/Mock/RoleTest.php @@ -14,7 +14,7 @@ use Ibexa\Contracts\Core\Repository\Exceptions\BadStateException; use Ibexa\Contracts\Core\Repository\Exceptions\LimitationValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException; -use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Repository as APIRepository; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\Repository\Values\User\Limitation\RoleLimitation; use Ibexa\Contracts\Core\Repository\Values\User\PolicyCreateStruct; @@ -1084,14 +1084,10 @@ protected function getPartlyMockedRoleService( return $this->partlyMockedRoleService; } - /** - * @return \Ibexa\Contracts\Core\Repository\Repository|\PHPUnit\Framework\MockObject\MockObject - */ - protected function getRepositoryMock(): Repository + protected function getRepositoryMock(): APIRepository & MockObject { $repositoryMock = parent::getRepositoryMock(); $repositoryMock - ->expects(self::any()) ->method('getPermissionResolver') ->willReturn($this->getPermissionResolverMock()); diff --git a/tests/lib/Repository/Service/Mock/SearchTest.php b/tests/lib/Repository/Service/Mock/SearchTest.php index a7ec089a11..52017c9fb0 100644 --- a/tests/lib/Repository/Service/Mock/SearchTest.php +++ b/tests/lib/Repository/Service/Mock/SearchTest.php @@ -12,6 +12,7 @@ use Ibexa\Contracts\Core\Persistence\Content\Location as SPILocation; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\PermissionCriterionResolver as APIPermissionCriterionResolver; use Ibexa\Contracts\Core\Repository\Values\Content\Content; use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Contracts\Core\Repository\Values\Content\LocationQuery; @@ -35,11 +36,7 @@ */ class SearchTest extends BaseServiceMockTest { - protected $repositoryMock; - - protected $contentDomainMapperMock; - - protected ?MockObject $permissionsCriterionResolverMock = null; + protected APIPermissionCriterionResolver & MockObject $permissionsCriterionResolverMock; /** * Test for the __construct() method. @@ -939,10 +936,7 @@ public function testFindLocationsWithDefaultQueryValues(): void ); } - /** - * @return \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Contracts\Core\Repository\PermissionCriterionResolver - */ - protected function getPermissionCriterionResolverMock() + protected function getPermissionCriterionResolverMock(): APIPermissionCriterionResolver & MockObject { if (!isset($this->permissionsCriterionResolverMock)) { $this->permissionsCriterionResolverMock = $this From c26642034c9a4aa65c563a6aa7902d202cfada92 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:20:06 +0200 Subject: [PATCH 119/185] IBX-9727: [Tests] Fixed strict types for Repository\Validator tests --- .../Repository/Validator/TargetContentValidatorTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/lib/Repository/Validator/TargetContentValidatorTest.php b/tests/lib/Repository/Validator/TargetContentValidatorTest.php index 3ae1e67376..64d288c86c 100644 --- a/tests/lib/Repository/Validator/TargetContentValidatorTest.php +++ b/tests/lib/Repository/Validator/TargetContentValidatorTest.php @@ -17,13 +17,10 @@ final class TargetContentValidatorTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Persistence\Content\Handler|\PHPUnit_Framework_MockObject_MockObject */ - private MockObject $contentHandler; + private Content\Handler & MockObject $contentHandler; - /** @var \Ibexa\Contracts\Core\Persistence\Content\Type\Handler|\PHPUnit_Framework_MockObject_MockObject */ - private MockObject $contentTypeHandler; + private Content\Type\Handler & MockObject $contentTypeHandler; - /** @var \Ibexa\Core\Repository\Validator\TargetContentValidator */ private TargetContentValidator $targetContentValidator; public function setUp(): void From 09d749e07ccd79de32cad7f8aaf7b6dfbf8bfe71 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 17:25:09 +0200 Subject: [PATCH 120/185] IBX-9727: [Tests] Fixed strict types for Content Location Mapper tests --- .../ContentLocationMapper/DecoratedLocationServiceTest.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php index db40899cd3..220c68cff1 100644 --- a/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php +++ b/tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php @@ -19,14 +19,11 @@ class DecoratedLocationServiceTest extends TestCase { - /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\DecoratedLocationService */ private DecoratedLocationService $locationService; - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private MockObject $innerLocationService; + private ApiLocationService & MockObject $innerLocationService; - /** @var \Ibexa\Core\Repository\Mapper\ContentLocationMapper\ContentLocationMapper */ - private MockObject $mapper; + private ContentLocationMapper & MockObject $mapper; protected function setUp(): void { From 9b4de6b8b00201e6c6665a212a2b2cc36a6f4bf2 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 17:26:36 +0200 Subject: [PATCH 121/185] IBX-9727: [Tests] Fixed strict types for PermissionAwareLocationResolver tests --- .../LocationResolver/PermissionAwareLocationResolverTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php index 9701e31b4a..8390e93122 100644 --- a/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php +++ b/tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php @@ -23,10 +23,8 @@ */ final class PermissionAwareLocationResolverTest extends TestCase { - /** @var \Ibexa\Contracts\Core\Repository\LocationService */ - private MockObject $locationService; + private LocationService & MockObject $locationService; - /** @var \Ibexa\Core\Repository\LocationResolver\LocationResolver */ private PermissionAwareLocationResolver $locationResolver; public function setUp(): void From d86d94cbe7b146f68c2e2c1cd42256a2b94fb318 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 17:28:13 +0200 Subject: [PATCH 122/185] IBX-9727: [Tests] Fixed strict types for BatchIteratorAdapter tests --- ...hAdapterTest.php => AbstractSearchAdapterTestCase.php} | 8 ++++---- .../BatchIteratorAdapter/ContentInfoSearchAdapterTest.php | 4 ++-- .../BatchIteratorAdapter/ContentSearchAdapterTest.php | 4 ++-- .../BatchIteratorAdapter/LocationSearchAdapterTest.php | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) rename tests/lib/Repository/Iterator/BatchIteratorAdapter/{AbstractSearchAdapterTest.php => AbstractSearchAdapterTestCase.php} (93%) diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTestCase.php similarity index 93% rename from tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php rename to tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTestCase.php index 14b5186ac5..16ef584d01 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/AbstractSearchAdapterTestCase.php @@ -21,15 +21,15 @@ * * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService */ -abstract class AbstractSearchAdapterTest extends TestCase +abstract class AbstractSearchAdapterTestCase extends TestCase { - protected const EXAMPLE_LANGUAGE_FILTER = [ + protected const array EXAMPLE_LANGUAGE_FILTER = [ 'languages' => ['eng-GB', 'pol-PL'], 'useAlwaysAvailable' => true, ]; - protected const EXAMPLE_OFFSET = 7; - protected const EXAMPLE_LIMIT = 13; + protected const int EXAMPLE_OFFSET = 7; + protected const int EXAMPLE_LIMIT = 13; final public function testFetch(): void { diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php index cf761fd26e..7ea57f0526 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentInfoSearchAdapterTest.php @@ -14,9 +14,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query; /** - * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTest<\Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo> + * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTestCase<\Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo> */ -final class ContentInfoSearchAdapterTest extends AbstractSearchAdapterTest +final class ContentInfoSearchAdapterTest extends AbstractSearchAdapterTestCase { protected function createAdapterUnderTest( SearchService $searchService, diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php index 6319549771..1cc862f6c7 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/ContentSearchAdapterTest.php @@ -16,9 +16,9 @@ /** * @phpstan-import-type TSearchLanguageFilter from \Ibexa\Contracts\Core\Repository\SearchService * - * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTest<\Ibexa\Contracts\Core\Repository\Values\Content\Content> + * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTestCase<\Ibexa\Contracts\Core\Repository\Values\Content\Content> */ -final class ContentSearchAdapterTest extends AbstractSearchAdapterTest +final class ContentSearchAdapterTest extends AbstractSearchAdapterTestCase { protected function createAdapterUnderTest( SearchService $searchService, diff --git a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php index 8b083a1121..ac011dc7d6 100644 --- a/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php +++ b/tests/lib/Repository/Iterator/BatchIteratorAdapter/LocationSearchAdapterTest.php @@ -15,9 +15,9 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query; /** - * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTest<\Ibexa\Contracts\Core\Repository\Values\Content\Location> + * @extends \Ibexa\Tests\Core\Repository\Iterator\BatchIteratorAdapter\AbstractSearchAdapterTestCase<\Ibexa\Contracts\Core\Repository\Values\Content\Location> */ -final class LocationSearchAdapterTest extends AbstractSearchAdapterTest +final class LocationSearchAdapterTest extends AbstractSearchAdapterTestCase { protected function createAdapterUnderTest( SearchService $searchService, From 4b57affb2723e38bedee3e18c49ebc5e2ee501d7 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 17:58:34 +0200 Subject: [PATCH 123/185] IBX-9727: [Tests] Added `Case` suffix to Event layer AbstractServiceTest --- ...AbstractServiceTest.php => AbstractServiceTestCase.php} | 7 ++++++- tests/lib/Event/BookmarkServiceTest.php | 2 +- tests/lib/Event/ContentServiceTest.php | 2 +- tests/lib/Event/ContentTypeServiceTest.php | 2 +- tests/lib/Event/LanguageServiceTest.php | 2 +- tests/lib/Event/LocationServiceTest.php | 2 +- tests/lib/Event/NotificationServiceTest.php | 2 +- tests/lib/Event/ObjectStateServiceTest.php | 2 +- tests/lib/Event/RoleServiceTest.php | 2 +- tests/lib/Event/SectionServiceTest.php | 2 +- tests/lib/Event/SettingServiceTest.php | 2 +- tests/lib/Event/TrashServiceTest.php | 2 +- tests/lib/Event/URLAliasServiceTest.php | 2 +- tests/lib/Event/URLServiceTest.php | 2 +- tests/lib/Event/URLWildcardServiceTest.php | 2 +- tests/lib/Event/UserPreferenceServiceTest.php | 2 +- tests/lib/Event/UserServiceTest.php | 2 +- 17 files changed, 22 insertions(+), 17 deletions(-) rename tests/lib/Event/{AbstractServiceTest.php => AbstractServiceTestCase.php} (86%) diff --git a/tests/lib/Event/AbstractServiceTest.php b/tests/lib/Event/AbstractServiceTestCase.php similarity index 86% rename from tests/lib/Event/AbstractServiceTest.php rename to tests/lib/Event/AbstractServiceTestCase.php index 1746c4f719..9ee2f33e08 100644 --- a/tests/lib/Event/AbstractServiceTest.php +++ b/tests/lib/Event/AbstractServiceTestCase.php @@ -14,7 +14,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; use Symfony\Component\Stopwatch\Stopwatch; -abstract class AbstractServiceTest extends TestCase +abstract class AbstractServiceTestCase extends TestCase { public function getEventDispatcher(string $beforeEventName, string $eventName): TraceableEventDispatcher { @@ -28,6 +28,11 @@ public function getEventDispatcher(string $beforeEventName, string $eventName): ); } + /** + * @param array $listeners + * + * @return array + */ public function getListenersStack(array $listeners): array { $stack = []; diff --git a/tests/lib/Event/BookmarkServiceTest.php b/tests/lib/Event/BookmarkServiceTest.php index c1a6d9df8a..2602318bd3 100644 --- a/tests/lib/Event/BookmarkServiceTest.php +++ b/tests/lib/Event/BookmarkServiceTest.php @@ -15,7 +15,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Location; use Ibexa\Core\Event\BookmarkService; -class BookmarkServiceTest extends AbstractServiceTest +class BookmarkServiceTest extends AbstractServiceTestCase { public function testCreateBookmarkEvents(): void { diff --git a/tests/lib/Event/ContentServiceTest.php b/tests/lib/Event/ContentServiceTest.php index bc42d49b8b..df3dfba09e 100644 --- a/tests/lib/Event/ContentServiceTest.php +++ b/tests/lib/Event/ContentServiceTest.php @@ -45,7 +45,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Core\Event\ContentService; -class ContentServiceTest extends AbstractServiceTest +class ContentServiceTest extends AbstractServiceTestCase { public function testDeleteContentEvents(): void { diff --git a/tests/lib/Event/ContentTypeServiceTest.php b/tests/lib/Event/ContentTypeServiceTest.php index 5a0e9757ac..07d307dab1 100644 --- a/tests/lib/Event/ContentTypeServiceTest.php +++ b/tests/lib/Event/ContentTypeServiceTest.php @@ -51,7 +51,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\User; use Ibexa\Core\Event\ContentTypeService; -class ContentTypeServiceTest extends AbstractServiceTest +class ContentTypeServiceTest extends AbstractServiceTestCase { public function testAddFieldDefinitionEvents(): void { diff --git a/tests/lib/Event/LanguageServiceTest.php b/tests/lib/Event/LanguageServiceTest.php index 11c03eda5b..f932a2519c 100644 --- a/tests/lib/Event/LanguageServiceTest.php +++ b/tests/lib/Event/LanguageServiceTest.php @@ -22,7 +22,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LanguageCreateStruct; use Ibexa\Core\Event\LanguageService; -class LanguageServiceTest extends AbstractServiceTest +class LanguageServiceTest extends AbstractServiceTestCase { public function testDeleteLanguageEvents(): void { diff --git a/tests/lib/Event/LocationServiceTest.php b/tests/lib/Event/LocationServiceTest.php index 97cd7ff581..57f2a0f42f 100644 --- a/tests/lib/Event/LocationServiceTest.php +++ b/tests/lib/Event/LocationServiceTest.php @@ -30,7 +30,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\LocationUpdateStruct; use Ibexa\Core\Event\LocationService; -class LocationServiceTest extends AbstractServiceTest +class LocationServiceTest extends AbstractServiceTestCase { public function testCopySubtreeEvents(): void { diff --git a/tests/lib/Event/NotificationServiceTest.php b/tests/lib/Event/NotificationServiceTest.php index 7d5834bb0f..291fd52076 100644 --- a/tests/lib/Event/NotificationServiceTest.php +++ b/tests/lib/Event/NotificationServiceTest.php @@ -20,7 +20,7 @@ use Ibexa\Contracts\Core\Repository\Values\Notification\Notification; use Ibexa\Core\Event\NotificationService; -class NotificationServiceTest extends AbstractServiceTest +class NotificationServiceTest extends AbstractServiceTestCase { public function testCreateNotificationEvents(): void { diff --git a/tests/lib/Event/ObjectStateServiceTest.php b/tests/lib/Event/ObjectStateServiceTest.php index e5ae2c3c9f..d5f90c7d51 100644 --- a/tests/lib/Event/ObjectStateServiceTest.php +++ b/tests/lib/Event/ObjectStateServiceTest.php @@ -33,7 +33,7 @@ use Ibexa\Contracts\Core\Repository\Values\ObjectState\ObjectStateUpdateStruct; use Ibexa\Core\Event\ObjectStateService; -class ObjectStateServiceTest extends AbstractServiceTest +class ObjectStateServiceTest extends AbstractServiceTestCase { public function testSetContentStateEvents(): void { diff --git a/tests/lib/Event/RoleServiceTest.php b/tests/lib/Event/RoleServiceTest.php index 32ecfb674d..201193ce23 100644 --- a/tests/lib/Event/RoleServiceTest.php +++ b/tests/lib/Event/RoleServiceTest.php @@ -45,7 +45,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\UserGroup; use Ibexa\Core\Event\RoleService; -class RoleServiceTest extends AbstractServiceTest +class RoleServiceTest extends AbstractServiceTestCase { public function testPublishRoleDraftEvents(): void { diff --git a/tests/lib/Event/SectionServiceTest.php b/tests/lib/Event/SectionServiceTest.php index 06028b7a30..e9ce41136b 100644 --- a/tests/lib/Event/SectionServiceTest.php +++ b/tests/lib/Event/SectionServiceTest.php @@ -25,7 +25,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\SectionUpdateStruct; use Ibexa\Core\Event\SectionService; -class SectionServiceTest extends AbstractServiceTest +class SectionServiceTest extends AbstractServiceTestCase { public function testAssignSectionEvents(): void { diff --git a/tests/lib/Event/SettingServiceTest.php b/tests/lib/Event/SettingServiceTest.php index fd43334955..317179a93f 100644 --- a/tests/lib/Event/SettingServiceTest.php +++ b/tests/lib/Event/SettingServiceTest.php @@ -20,7 +20,7 @@ use Ibexa\Core\Event\SettingService; use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher; -class SettingServiceTest extends AbstractServiceTest +class SettingServiceTest extends AbstractServiceTestCase { public function testUpdateSettingEvents(): void { diff --git a/tests/lib/Event/TrashServiceTest.php b/tests/lib/Event/TrashServiceTest.php index 3ce79912c9..321f4b71b4 100644 --- a/tests/lib/Event/TrashServiceTest.php +++ b/tests/lib/Event/TrashServiceTest.php @@ -22,7 +22,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\TrashItem; use Ibexa\Core\Event\TrashService; -class TrashServiceTest extends AbstractServiceTest +class TrashServiceTest extends AbstractServiceTestCase { public function testEmptyTrashEvents(): void { diff --git a/tests/lib/Event/URLAliasServiceTest.php b/tests/lib/Event/URLAliasServiceTest.php index a307e03486..e88888e26e 100644 --- a/tests/lib/Event/URLAliasServiceTest.php +++ b/tests/lib/Event/URLAliasServiceTest.php @@ -20,7 +20,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\URLAlias; use Ibexa\Core\Event\URLAliasService; -class URLAliasServiceTest extends AbstractServiceTest +class URLAliasServiceTest extends AbstractServiceTestCase { public function testCreateGlobalUrlAliasEvents(): void { diff --git a/tests/lib/Event/URLServiceTest.php b/tests/lib/Event/URLServiceTest.php index cbb4f12675..6f87aed72a 100644 --- a/tests/lib/Event/URLServiceTest.php +++ b/tests/lib/Event/URLServiceTest.php @@ -14,7 +14,7 @@ use Ibexa\Contracts\Core\Repository\Values\URL\URLUpdateStruct; use Ibexa\Core\Event\URLService; -class URLServiceTest extends AbstractServiceTest +class URLServiceTest extends AbstractServiceTestCase { public function testUpdateUrlEvents(): void { diff --git a/tests/lib/Event/URLWildcardServiceTest.php b/tests/lib/Event/URLWildcardServiceTest.php index 06478562d7..d1f54df2db 100644 --- a/tests/lib/Event/URLWildcardServiceTest.php +++ b/tests/lib/Event/URLWildcardServiceTest.php @@ -21,7 +21,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\URLWildcardUpdateStruct; use Ibexa\Core\Event\URLWildcardService; -class URLWildcardServiceTest extends AbstractServiceTest +class URLWildcardServiceTest extends AbstractServiceTestCase { /** * @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException diff --git a/tests/lib/Event/UserPreferenceServiceTest.php b/tests/lib/Event/UserPreferenceServiceTest.php index ca531bcd22..50d634bae1 100644 --- a/tests/lib/Event/UserPreferenceServiceTest.php +++ b/tests/lib/Event/UserPreferenceServiceTest.php @@ -12,7 +12,7 @@ use Ibexa\Contracts\Core\Repository\UserPreferenceService as UserPreferenceServiceInterface; use Ibexa\Core\Event\UserPreferenceService; -class UserPreferenceServiceTest extends AbstractServiceTest +class UserPreferenceServiceTest extends AbstractServiceTestCase { public function testSetUserPreferenceEvents(): void { diff --git a/tests/lib/Event/UserServiceTest.php b/tests/lib/Event/UserServiceTest.php index c09850926c..5c7e860a1d 100644 --- a/tests/lib/Event/UserServiceTest.php +++ b/tests/lib/Event/UserServiceTest.php @@ -37,7 +37,7 @@ use Ibexa\Contracts\Core\Repository\Values\User\UserUpdateStruct; use Ibexa\Core\Event\UserService; -class UserServiceTest extends AbstractServiceTest +class UserServiceTest extends AbstractServiceTestCase { public function testUpdateUserGroupEvents(): void { From 26b83cb4610c100a76699a8ab7eacce654f60094 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:00:55 +0200 Subject: [PATCH 124/185] IBX-9727: [Tests] Fixed strict types for ImageConverterTest --- .../Converter/ImageConverterTest.php | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php index 8ffcd66e50..40e924e16f 100644 --- a/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php @@ -14,40 +14,34 @@ use Ibexa\Core\IO\UrlRedecoratorInterface; use Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter; use Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition; -use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; final class ImageConverterTest extends TestCase { - private const MIME_TYPES = [ + private const array MIME_TYPES = [ 'image/png', 'image/jpeg', ]; - private const MIME_TYPES_STORAGE_VALUE = '["image\/png","image\/jpeg"]'; + private const string MIME_TYPES_STORAGE_VALUE = '["image\/png","image\/jpeg"]'; - /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter */ private ImageConverter $imageConverter; - /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlRedecorator; - - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; - protected function setUp(): void { - $this->ioService = $this->createMock(IOServiceInterface::class); - $this->urlRedecorator = $this->createMock(UrlRedecoratorInterface::class); + $ioService = $this->createMock(IOServiceInterface::class); + $urlRedecorator = $this->createMock(UrlRedecoratorInterface::class); $this->imageConverter = new ImageConverter( - $this->ioService, - $this->urlRedecorator + $ioService, + $urlRedecorator ); } /** * @dataProvider dataProviderForTestToStorageFieldDefinition + * + * @throws \JsonException */ public function testToStorageFieldDefinition( FieldDefinition $fieldDefinition, @@ -63,6 +57,14 @@ public function testToStorageFieldDefinition( ); } + /** + * @return iterable< + * string, + * array{ + * 0: \Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition, + * 1: \Ibexa\Core\Persistence\Legacy\Content\StorageFieldDefinition + * }> + */ public function dataProviderForTestToStorageFieldDefinition(): iterable { yield 'No validators' => [ From 543fba630f7fb54fe97e295a4cc7081ce60d7329 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:21:05 +0200 Subject: [PATCH 125/185] IBX-9727: Fixed strict types for PermissionResolver --- src/lib/Repository/Permission/PermissionResolver.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/Repository/Permission/PermissionResolver.php b/src/lib/Repository/Permission/PermissionResolver.php index 1c570c6926..713e317415 100644 --- a/src/lib/Repository/Permission/PermissionResolver.php +++ b/src/lib/Repository/Permission/PermissionResolver.php @@ -203,9 +203,9 @@ public function canUser(string $module, string $function, ValueObject $object, a $limitations = $policy->getLimitations(); /* - * Return true if policy gives full access (aka no limitations) + * Return true if a policy gives full access (aka no limitations) */ - if ($limitations === '*') { + if (empty($limitations)) { return true; } @@ -280,8 +280,8 @@ public function lookupLimitations( foreach ($permissionSet['policies'] as $policy) { $policyLimitations = $policy->getLimitations(); - /** Return empty array if policy gives full access (aka no limitations) */ - if ($policyLimitations === '*') { + /** Return an empty array if a policy gives full access (aka no limitations) */ + if (empty($policyLimitations)) { return new LookupLimitationResult(true); } From a2bddb9596567f8a2af75b36d8075a30d10facaa Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:22:11 +0200 Subject: [PATCH 126/185] IBX-9727: Fixed strict types and naming in domain mapper classes --- .../Repository/Mapper/ContentDomainMapper.php | 31 ++++------ .../Repository/Mapper/RoleDomainMapper.php | 59 ++++++++----------- 2 files changed, 36 insertions(+), 54 deletions(-) diff --git a/src/lib/Repository/Mapper/ContentDomainMapper.php b/src/lib/Repository/Mapper/ContentDomainMapper.php index d15890f3f8..4fead4ab8d 100644 --- a/src/lib/Repository/Mapper/ContentDomainMapper.php +++ b/src/lib/Repository/Mapper/ContentDomainMapper.php @@ -107,7 +107,7 @@ public function buildContentDomainObject( ContentType $contentType, array $prioritizedLanguages = [], string $fieldAlwaysAvailableLanguage = null - ): Content { + ): APIContent { $prioritizedFieldLanguageCode = null; if (!empty($prioritizedLanguages)) { $availableFieldLanguageMap = array_fill_keys($spiContent->versionInfo->languageCodes, true); @@ -293,31 +293,20 @@ public function buildDomainFields( } /** - * Builds a VersionInfo domain object from value object returned from persistence. - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $spiVersionInfo - * @param array $prioritizedLanguages + * Builds a VersionInfo domain object from a value object returned from persistence. * - * @return \Ibexa\Core\Repository\Values\Content\VersionInfo + * @param string[] $prioritizedLanguages */ - public function buildVersionInfoDomainObject(SPIVersionInfo $spiVersionInfo, array $prioritizedLanguages = []): VersionInfo + public function buildVersionInfoDomainObject(SPIVersionInfo $spiVersionInfo, array $prioritizedLanguages = []): APIVersionInfo { // Map SPI statuses to API - switch ($spiVersionInfo->status) { - case SPIVersionInfo::STATUS_ARCHIVED: - $status = APIVersionInfo::STATUS_ARCHIVED; - break; - - case SPIVersionInfo::STATUS_PUBLISHED: - $status = APIVersionInfo::STATUS_PUBLISHED; - break; - - case SPIVersionInfo::STATUS_DRAFT: - default: - $status = APIVersionInfo::STATUS_DRAFT; - } + $status = match ($spiVersionInfo->status) { + SPIVersionInfo::STATUS_ARCHIVED => APIVersionInfo::STATUS_ARCHIVED, + SPIVersionInfo::STATUS_PUBLISHED => APIVersionInfo::STATUS_PUBLISHED, + default => APIVersionInfo::STATUS_DRAFT, + }; - // Find prioritised language among names + // Find prioritized language among names $prioritizedNameLanguageCode = null; foreach ($prioritizedLanguages as $prioritizedLanguage) { if (isset($spiVersionInfo->names[$prioritizedLanguage])) { diff --git a/src/lib/Repository/Mapper/RoleDomainMapper.php b/src/lib/Repository/Mapper/RoleDomainMapper.php index ab661a3824..b7ec79de17 100644 --- a/src/lib/Repository/Mapper/RoleDomainMapper.php +++ b/src/lib/Repository/Mapper/RoleDomainMapper.php @@ -7,11 +7,12 @@ namespace Ibexa\Core\Repository\Mapper; -use Ibexa\Contracts\Core\Persistence\User\Policy as SPIPolicy; -use Ibexa\Contracts\Core\Persistence\User\Role as SPIRole; -use Ibexa\Contracts\Core\Persistence\User\RoleAssignment as SPIRoleAssignment; -use Ibexa\Contracts\Core\Persistence\User\RoleCopyStruct as SPIRoleCopyStruct; -use Ibexa\Contracts\Core\Persistence\User\RoleCreateStruct as SPIRoleCreateStruct; +use Ibexa\Contracts\Core\Persistence\User\Policy as PersistencePolicy; +use Ibexa\Contracts\Core\Persistence\User\Role as PersistenceRole; +use Ibexa\Contracts\Core\Persistence\User\RoleAssignment as PersistenceRoleAssignment; +use Ibexa\Contracts\Core\Persistence\User\RoleCopyStruct as PersistenceRoleCopyStruct; +use Ibexa\Contracts\Core\Persistence\User\RoleCreateStruct as PersistenceRoleCreateStruct; +use Ibexa\Contracts\Core\Repository\Values\User\Policy as APIPolicy; use Ibexa\Contracts\Core\Repository\Values\User\Role as APIRole; use Ibexa\Contracts\Core\Repository\Values\User\RoleCopyStruct as APIRoleCopyStruct; use Ibexa\Contracts\Core\Repository\Values\User\RoleCreateStruct as APIRoleCreateStruct; @@ -26,7 +27,7 @@ use Ibexa\Core\Repository\Values\User\UserRoleAssignment; /** - * Internal service to map Role objects between API and SPI values. + * Internal service to map Role objects between API and Persistence values. * * @internal Meant for internal use by Repository. */ @@ -43,13 +44,9 @@ public function __construct(LimitationService $limitationService) } /** - * Maps provided SPI Role value object to API Role value object. - * - * @param \Ibexa\Contracts\Core\Persistence\User\Role $role - * - * @return \Ibexa\Contracts\Core\Repository\Values\User\Role + * Maps provided Persistence Role value object to API Role value object. */ - public function buildDomainRoleObject(SPIRole $role): Role + public function buildDomainRoleObject(PersistenceRole $role): APIRole { $rolePolicies = []; foreach ($role->policies as $spiPolicy) { @@ -74,7 +71,7 @@ public function buildDomainRoleObject(SPIRole $role): Role * * @return \Ibexa\Contracts\Core\Repository\Values\User\RoleDraft */ - public function buildDomainRoleDraftObject(SPIRole $spiRole): RoleDraft + public function buildDomainRoleDraftObject(PersistenceRole $spiRole): RoleDraft { return new RoleDraft( [ @@ -84,13 +81,9 @@ public function buildDomainRoleDraftObject(SPIRole $spiRole): RoleDraft } /** - * Maps provided SPI Policy value object to API Policy value object. - * - * @param \Ibexa\Contracts\Core\Persistence\User\Policy $spiPolicy - * - * @return \Ibexa\Contracts\Core\Repository\Values\User\Policy|\Ibexa\Contracts\Core\Repository\Values\User\PolicyDraft + * Maps provided Persistence Policy value object to API Policy value object. */ - public function buildDomainPolicyObject(SPIPolicy $spiPolicy): Policy|PolicyDraft + public function buildDomainPolicyObject(PersistencePolicy $spiPolicy): APIPolicy { $policyLimitations = []; if ($spiPolicy->module !== '*' && $spiPolicy->function !== '*' && $spiPolicy->limitations !== '*') { @@ -109,7 +102,7 @@ public function buildDomainPolicyObject(SPIPolicy $spiPolicy): Policy|PolicyDraf ] ); - // Original ID is set on SPI policy, which means that it's a draft. + // Original ID is set on a persistence policy object, which means that it's a draft. if ($spiPolicy->originalId) { $policy = new PolicyDraft(['innerPolicy' => $policy, 'originalId' => $spiPolicy->originalId]); } @@ -118,7 +111,7 @@ public function buildDomainPolicyObject(SPIPolicy $spiPolicy): Policy|PolicyDraf } /** - * Builds the API UserRoleAssignment object from provided SPI RoleAssignment object. + * Builds the API UserRoleAssignment object from a provided Persistence RoleAssignment object. * * @param \Ibexa\Contracts\Core\Persistence\User\RoleAssignment $spiRoleAssignment * @param \Ibexa\Contracts\Core\Repository\Values\User\User $user @@ -126,7 +119,7 @@ public function buildDomainPolicyObject(SPIPolicy $spiPolicy): Policy|PolicyDraf * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserRoleAssignment */ - public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, User $user, APIRole $role): UserRoleAssignment + public function buildDomainUserRoleAssignmentObject(PersistenceRoleAssignment $spiRoleAssignment, User $user, APIRole $role): UserRoleAssignment { $limitation = null; if (!empty($spiRoleAssignment->limitationIdentifier)) { @@ -147,7 +140,7 @@ public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAs } /** - * Builds the API UserGroupRoleAssignment object from provided SPI RoleAssignment object. + * Builds the API UserGroupRoleAssignment object from provided Persistence RoleAssignment object. * * @param \Ibexa\Contracts\Core\Persistence\User\RoleAssignment $spiRoleAssignment * @param \Ibexa\Contracts\Core\Repository\Values\User\UserGroup $userGroup @@ -155,7 +148,7 @@ public function buildDomainUserRoleAssignmentObject(SPIRoleAssignment $spiRoleAs * * @return \Ibexa\Contracts\Core\Repository\Values\User\UserGroupRoleAssignment */ - public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role): UserGroupRoleAssignment + public function buildDomainUserGroupRoleAssignmentObject(PersistenceRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role): UserGroupRoleAssignment { $limitation = null; if (!empty($spiRoleAssignment->limitationIdentifier)) { @@ -176,13 +169,13 @@ public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiR } /** - * Creates SPI Role create struct from provided API role create struct. + * Creates Persistence Role create struct from provided API role create struct. */ - public function buildPersistenceRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct): SPIRoleCreateStruct + public function buildPersistenceRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct): PersistenceRoleCreateStruct { $policiesToCreate = $this->fillRoleStructWithPolicies($roleCreateStruct); - return new SPIRoleCreateStruct( + return new PersistenceRoleCreateStruct( [ 'identifier' => $roleCreateStruct->identifier, 'policies' => $policiesToCreate, @@ -191,13 +184,13 @@ public function buildPersistenceRoleCreateStruct(APIRoleCreateStruct $roleCreate } /** - * Creates SPI Role copy struct from provided API role copy struct. + * Creates Persistence Role copy struct from provided API role copy struct. */ - public function buildPersistenceRoleCopyStruct(APIRoleCopyStruct $roleCopyStruct, int $clonedId, int $status): SPIRoleCopyStruct + public function buildPersistenceRoleCopyStruct(APIRoleCopyStruct $roleCopyStruct, int $clonedId, int $status): PersistenceRoleCopyStruct { $policiesToCopy = $this->fillRoleStructWithPolicies($roleCopyStruct); - return new SPIRoleCopyStruct( + return new PersistenceRoleCopyStruct( [ 'clonedId' => $clonedId, 'newIdentifier' => $roleCopyStruct->newIdentifier, @@ -222,7 +215,7 @@ protected function fillRoleStructWithPolicies(APIRoleCreateStruct $struct): arra } /** - * Creates SPI Policy value object from provided module, function and limitations. + * Creates a Persistence Policy value object from the provided module, function and limitations. * * @param string $module * @param string $function @@ -230,7 +223,7 @@ protected function fillRoleStructWithPolicies(APIRoleCreateStruct $struct): arra * * @return \Ibexa\Contracts\Core\Persistence\User\Policy */ - public function buildPersistencePolicyObject($module, $function, array $limitations): SPIPolicy + public function buildPersistencePolicyObject($module, $function, array $limitations): PersistencePolicy { $limitationsToCreate = '*'; if ($module !== '*' && $function !== '*' && !empty($limitations)) { @@ -240,7 +233,7 @@ public function buildPersistencePolicyObject($module, $function, array $limitati } } - return new SPIPolicy( + return new PersistencePolicy( [ 'module' => $module, 'function' => $function, From 0ab34bf67e38aa954a35f6a133e8ada6a94340b9 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 18:22:53 +0200 Subject: [PATCH 127/185] IBX-9727: [Tests] Fixed strict types for Legacy persistence layer tests --- .../Legacy/Bookmark/HandlerTest.php | 8 +++--- .../FieldValue/Converter/RelationListTest.php | 3 +-- .../Converter/SerializableConverterTest.php | 14 +++++----- .../Legacy/Content/LocationHandlerTest.php | 20 +++++--------- .../Converter/ImageConverterTest.php | 7 ++--- .../Legacy/Notification/HandlerTest.php | 9 +++---- .../Persistence/Legacy/URL/HandlerTest.php | 27 +++++++++---------- .../Legacy/UserPreference/HandlerTest.php | 9 +++---- 8 files changed, 37 insertions(+), 60 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php index 52c7d0c561..e9cd0d2c41 100644 --- a/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php @@ -18,13 +18,11 @@ class HandlerTest extends TestCase { - public const BOOKMARK_ID = 7; + public const int BOOKMARK_ID = 7; - /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $gateway; + private Gateway & MockObject $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $mapper; + private Mapper & MockObject $mapper; /** @var \Ibexa\Core\Persistence\Legacy\Bookmark\Handler */ private Handler $handler; diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php index ff50d4e8cd..dabcd1940e 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php @@ -22,8 +22,7 @@ */ class RelationListTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject|\Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\RelationListConverter */ - protected MockObject $converter; + private RelationListConverter & MockObject $converter; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php index cd3d026064..dd869057eb 100644 --- a/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php +++ b/tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverterTest.php @@ -24,18 +24,16 @@ */ class SerializableConverterTest extends TestCase { - private const EXAMPLE_DATA = [ + private ValueSerializerInterface & MockObject $serializer; + + private SerializableConverter $converter; + + private const array EXAMPLE_DATA = [ 'foo' => 'foo', 'bar' => 'bar', ]; - private const EXAMPLE_JSON = '{"foo":"foo","bar":"bar"}'; - - /** @var \Ibexa\Contracts\Core\FieldType\ValueSerializerInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $serializer; - - /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\SerializableConverter */ - private SerializableConverter $converter; + private const string EXAMPLE_JSON = '{"foo":"foo","bar":"bar"}'; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php index 63d2630a86..55a3ad2e90 100644 --- a/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php @@ -32,38 +32,30 @@ class LocationHandlerTest extends TestCase { /** * Mocked location gateway instance. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Gateway */ - protected MockObject $locationGateway; + protected Gateway & MockObject $locationGateway; /** * Mocked location mapper instance. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Location\Mapper */ - protected MockObject $locationMapper; + protected Mapper & MockObject $locationMapper; /** * Mocked content handler instance. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\Handler */ - protected MockObject $contentHandler; + protected ContentHandler & MockObject $contentHandler; /** * Mocked object state handler instance. - * - * @var \Ibexa\Core\Persistence\Legacy\Content\ObjectState\Handler|\PHPUnit\Framework\MockObject\MockObject */ - protected ?MockObject $objectStateHandler = null; + protected ObjectStateHandler & MockObject $objectStateHandler; /** * Mocked Tree handler instance. * - * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler|\PHPUnit\Framework\MockObject\MockObject + * @var \Ibexa\Core\Persistence\Legacy\Content\TreeHandler&\PHPUnit\Framework\MockObject\MockObject */ - protected MockObject $treeHandler; + protected TreeHandler & MockObject $treeHandler; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php index 58c5105a9b..dda4177bcd 100644 --- a/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php +++ b/tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php @@ -20,14 +20,11 @@ final class ImageConverterTest extends TestCase { - /** @var \Ibexa\Core\Persistence\Legacy\Content\FieldValue\Converter\ImageConverter */ private ImageConverter $imageConverter; - /** @var \Ibexa\Core\IO\UrlRedecoratorInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $urlRedecorator; + private UrlRedecoratorInterface & MockObject $urlRedecorator; - /** @var \Ibexa\Core\IO\IOServiceInterface|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $ioService; + private IOServiceInterface & MockObject $ioService; protected function setUp(): void { diff --git a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php index b6a2ebc55a..047ce72962 100644 --- a/tests/lib/Persistence/Legacy/Notification/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/Notification/HandlerTest.php @@ -23,15 +23,12 @@ */ class HandlerTest extends TestCase { - public const NOTIFICATION_ID = 1; + public const int NOTIFICATION_ID = 1; - /** @var \Ibexa\Core\Persistence\Legacy\Notification\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $gateway; + private Gateway & MockObject $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\Notification\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $mapper; + private Mapper & MockObject $mapper; - /** @var \Ibexa\Core\Persistence\Legacy\Notification\Handler */ private Handler $handler; protected function setUp(): void diff --git a/tests/lib/Persistence/Legacy/URL/HandlerTest.php b/tests/lib/Persistence/Legacy/URL/HandlerTest.php index 57d3fc78ec..1ebbe0193d 100644 --- a/tests/lib/Persistence/Legacy/URL/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/URL/HandlerTest.php @@ -21,13 +21,12 @@ class HandlerTest extends TestCase { - /** @var \Ibexa\Core\Persistence\Legacy\URL\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $gateway; + private const string TEST_URL = 'http://ibexa.co'; - /** @var \Ibexa\Core\Persistence\Legacy\URL\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $mapper; + private Gateway & MockObject $gateway; + + private Mapper & MockObject $mapper; - /** @var \Ibexa\Core\Persistence\Legacy\URL\Handler */ private Handler $handler; protected function setUp(): void @@ -41,7 +40,7 @@ protected function setUp(): void public function testUpdateUrl(): void { $urlUpdateStruct = new URLUpdateStruct(); - $url = $this->getUrl(1, 'http://ibexa.co'); + $url = $this->getUrl(); $this->mapper ->expects(self::once()) @@ -72,7 +71,7 @@ public function testFind(): void 'rows' => [ [ 'id' => 1, - 'url' => 'http://ibexa.co', + 'url' => self::TEST_URL, ], ], ]; @@ -80,7 +79,7 @@ public function testFind(): void $expected = [ 'count' => 1, 'items' => [ - $this->getUrl(1, 'http://ibexa.co'), + $this->getUrl(), ], ]; @@ -122,7 +121,7 @@ public function testLoadByIdWithoutUrlData(): void public function testLoadByIdWithUrlData(): void { - $url = $this->getUrl(1, 'http://ibexa.co'); + $url = $this->getUrl(); $this->gateway ->expects(self::once()) @@ -143,7 +142,7 @@ public function testLoadByUrlWithoutUrlData(): void { $this->expectException(NotFoundException::class); - $url = 'http://ibexa.co'; + $url = self::TEST_URL; $this->gateway ->expects(self::once()) @@ -162,7 +161,7 @@ public function testLoadByUrlWithoutUrlData(): void public function testLoadByUrlWithUrlData(): void { - $url = $this->getUrl(1, 'http://ibexa.co'); + $url = $this->getUrl(); $this->gateway ->expects(self::once()) @@ -193,11 +192,11 @@ public function testFindUsages(): void self::assertEquals($ids, $this->handler->findUsages($url->id)); } - private function getUrl(int $id = 1, string $urlAddr = 'http://ibexa.co'): URL + private function getUrl(): URL { $url = new URL(); - $url->id = $id; - $url->url = $url; + $url->id = 1; + $url->url = self::TEST_URL; return $url; } diff --git a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php index b87e53d465..0f9e4684c8 100644 --- a/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php +++ b/tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php @@ -21,15 +21,12 @@ */ class HandlerTest extends TestCase { - public const USER_PREFERENCE_ID = 1; + public const int USER_PREFERENCE_ID = 1; - /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Gateway|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $gateway; + private Gateway & MockObject $gateway; - /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Mapper|\PHPUnit\Framework\MockObject\MockObject */ - private MockObject $mapper; + private Mapper & MockObject $mapper; - /** @var \Ibexa\Core\Persistence\Legacy\UserPreference\Handler */ private Handler $handler; protected function setUp(): void From d906cf3b0b25c0fc40d669e3a88e48eac0eabb61 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 19:12:24 +0200 Subject: [PATCH 128/185] IBX-9727: Fixed strict types for MVC layer Controller --- src/lib/MVC/Symfony/Controller/Controller.php | 40 ++++++------------- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/src/lib/MVC/Symfony/Controller/Controller.php b/src/lib/MVC/Symfony/Controller/Controller.php index 32caf0fc09..786869ce64 100644 --- a/src/lib/MVC/Symfony/Controller/Controller.php +++ b/src/lib/MVC/Symfony/Controller/Controller.php @@ -14,12 +14,13 @@ use Psr\Log\LoggerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcher; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Component\Templating\EngineInterface; use Symfony\Contracts\Service\ServiceSubscriberInterface; -use Symfony\Component\Templating\TemplateReferenceInterface; abstract class Controller implements ServiceSubscriberInterface { @@ -32,13 +33,8 @@ public function __construct(ContainerInterface $container) /** * Returns value for $parameterName and fallbacks to $defaultValue if not defined. - * - * @param string $parameterName - * @param mixed $defaultValue - * - * @return mixed */ - public function getParameter($parameterName, $defaultValue = null) + public function getParameter(string $parameterName, mixed $defaultValue = null): mixed { if ($this->getConfigResolver()->hasParameter($parameterName)) { return $this->getConfigResolver()->getParameter($parameterName); @@ -49,12 +45,8 @@ public function getParameter($parameterName, $defaultValue = null) /** * Checks if $parameterName is defined. - * - * @param string $parameterName - * - * @return bool */ - public function hasParameter(string $parameterName) + public function hasParameter(string $parameterName): bool { return $this->getConfigResolver()->hasParameter($parameterName); } @@ -62,7 +54,7 @@ public function hasParameter(string $parameterName) /** * @return \Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface */ - public function getConfigResolver() + public function getConfigResolver(): ConfigResolverInterface { return $this->container->get('ibexa.config.resolver'); } @@ -76,7 +68,7 @@ public function getConfigResolver() * * @return \Symfony\Component\HttpFoundation\Response */ - public function render(string|TemplateReferenceInterface $view, array $parameters = [], Response $response = null) + public function render(string $view, array $parameters = [], Response $response = null) { if (!isset($response)) { $response = new Response(); @@ -87,18 +79,12 @@ public function render(string|TemplateReferenceInterface $view, array $parameter return $response; } - /** - * @return \Symfony\Component\Templating\EngineInterface - */ - public function getTemplateEngine() + public function getTemplateEngine(): EngineInterface { return $this->container->get('templating'); } - /** - * @return \Psr\Log\LoggerInterface|null - */ - public function getLogger() + public function getLogger(): ?LoggerInterface { return $this->container->get('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE); } @@ -106,7 +92,7 @@ public function getLogger() /** * @return \Ibexa\Contracts\Core\Repository\Repository */ - public function getRepository() + public function getRepository(): Repository { return $this->container->get('ibexa.api.repository'); } @@ -114,7 +100,7 @@ public function getRepository() /** * @return \Symfony\Component\HttpFoundation\Request */ - public function getRequest() + public function getRequest(): Request { return $this->container->get('request_stack')->getCurrentRequest(); } @@ -122,19 +108,19 @@ public function getRequest() /** * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface */ - public function getEventDispatcher() + public function getEventDispatcher(): EventDispatcherInterface { return $this->container->get('event_dispatcher'); } /** - * Checks if current user has granted access to provided attribute. + * Checks if the current user has granted access to the provided attribute. * * @param \Ibexa\Core\MVC\Symfony\Security\Authorization\Attribute $attribute * * @return bool */ - public function isGranted(AuthorizationAttribute $attribute) + public function isGranted(AuthorizationAttribute $attribute): bool { return $this->container->get('security.authorization_checker')->isGranted($attribute); } From 0164ac20c56718f793327fd0d22bd5f9fc49d122 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 25 Apr 2025 21:05:13 +0200 Subject: [PATCH 129/185] IBX-9811: Dropped doctrine/dbal resolved issue from PHPStan config --- phpstan.neon.dist | 5 ----- 1 file changed, 5 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4bf0b4b982..c448982be5 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -8,11 +8,6 @@ parameters: level: 8 treatPhpDocTypesAsCertain: false ignoreErrors: - - - message: "#^Cannot call method (fetchOne|fetchColumn|fetchAllAssociative|fetchAssociative|fetchAllKeyValue|fetchFirstColumn|rowCount)\\(\\) on Doctrine\\\\DBAL\\\\ForwardCompatibility\\\\Result\\|int\\|string\\.$#" - paths: - - src/* - - tests/* - message: "#^Cannot call method warning\\(\\) on Psr\\\\Log\\\\LoggerInterface\\|null\\.$#" paths: From e6de2a6d7c92dd1eee1fd789d5f97845ce2f7358 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Wed, 16 Apr 2025 17:42:33 +0200 Subject: [PATCH 130/185] [PHPStan] Removed resolved issues from the baseline --- phpstan-baseline.neon | 58374 ++++++---------------------------------- 1 file changed, 8433 insertions(+), 49941 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 56cc1b4873..8678789eb0 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -12,18 +12,6 @@ parameters: count: 1 path: src/bundle/Core/ApiLoader/RepositoryFactory.php - - - message: '#^Method Ibexa\\Bundle\\Core\\ApiLoader\\SearchEngineFactory\:\:registerSearchEngine\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/ApiLoader/SearchEngineFactory.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\ApiLoader\\SearchEngineIndexerFactory\:\:registerSearchEngineIndexer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/ApiLoader/SearchEngineIndexerFactory.php - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\CheckURLsCommand\:\:getTotalCount\(\) should return int but returns int\|null\.$#' identifier: return.type @@ -90,12 +78,6 @@ parameters: count: 1 path: src/bundle/Core/Command/NormalizeImagesPathsCommand.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\NormalizeImagesPathsCommand\:\:updateImagePathsToNormalize\(\) has parameter \$imageData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Command/NormalizeImagesPathsCommand.php - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\NormalizeImagesPathsCommand\:\:updateImagePathsToNormalize\(\) has parameter \$imagePathsToNormalize with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -174,18 +156,6 @@ parameters: count: 1 path: src/bundle/Core/Command/ReindexCommand.php - - - message: '#^Property Ibexa\\Bundle\\Core\\Command\\ReindexCommand\:\:\$phpPath \(string\) does not accept string\|false\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Command/ReindexCommand.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Command\\ReindexCommand\:\:\$phpPath \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Command/ReindexCommand.php - - message: '#^Call to an undefined method Symfony\\Component\\Console\\Helper\\HelperInterface\:\:ask\(\)\.$#' identifier: method.notFound @@ -216,102 +186,12 @@ parameters: count: 1 path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:dateStringToTimestamp\(\) has parameter \$dateString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:getTimestampBasedFields\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:processTimestamps\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:updateTimestampToUTC\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:validateTimezone\(\) should return string but returns int\.$#' - identifier: return.type - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - message: '#^Parameter \#1 \$env of method Symfony\\Component\\Process\\Process\:\:setEnv\(\) expects array\, array\ given\.$#' identifier: argument.type count: 1 path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - message: '#^Parameter \#1 \$messages of method Symfony\\Component\\Console\\Output\\OutputInterface\:\:writeln\(\) expects iterable\\|string, int given\.$#' - identifier: argument.type - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Parameter \#2 \$value of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:set\(\) expects string, int given\.$#' - identifier: argument.type - count: 2 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:\$from \(string\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:\$phpPath \(string\) does not accept string\|false\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Command\\UpdateTimestampsToUTCCommand\:\:\$to \(string\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Command/UpdateTimestampsToUTCCommand.php - - - - message: '#^Cannot cast Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string to int\.$#' - identifier: cast.int - count: 1 - path: src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Command\\VirtualFieldDuplicateFixCommand\:\:getDuplicatedAttributesBatch\(\) should return array\ but returns array\\>\.$#' - identifier: return.type - count: 1 - path: src/bundle/Core/Command/VirtualFieldDuplicateFixCommand.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\BinaryContentDownloadPass\:\:addCall\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\BinaryContentDownloadPass\:\:addCall\(\) has parameter \$targetServiceName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/BinaryContentDownloadPass.php - - message: '#^Argument of an invalid type array\|bool\|float\|int\|string\|null supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable @@ -324,30 +204,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Compiler/EntityManagerFactoryServiceLocatorPass.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\ImaginePass\:\:processReduceNoiseFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\ImaginePass\:\:processReduceNoiseFilter\(\) has parameter \$driver with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\ImaginePass\:\:processSwirlFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\ImaginePass\:\:processSwirlFilter\(\) has parameter \$driver with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/ImaginePass.php - - message: '#^Argument of an invalid type array\|bool\|float\|int\|string\|null supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable @@ -360,12 +216,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\InjectEntityManagerMappingsPass\:\:createMetadataDriverDefinition\(\) has parameter \$driverType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Compiler/InjectEntityManagerMappingsPass.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Compiler\\InjectEntityManagerMappingsPass\:\:getEntityMapForConfigurationService\(\) has parameter \$entityMappings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -450,60 +300,12 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPass.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addHttpCacheSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addImageMagickSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addImagePlaceholderSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addRepositoriesSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addRouterSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:addSiteaccessSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:setSiteAccessConfigurationFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:setSiteAccessConfigurationFilters\(\) has parameter \$filters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration.php - - - message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:\$siteAccessConfigurationFilters \(array\\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration.php - - message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\:\:\$suggestionCollector is never read, only written\.$#' identifier: property.onlyWritten @@ -528,12 +330,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ChainConfigResolver\:\:addResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ChainConfigResolver.php - - message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge expects array, Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface given\.$#' identifier: argument.type @@ -612,18 +408,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParser\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParser\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParser\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -642,54 +426,12 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParser\:\:setConfigParsers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigParser.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:__construct\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) has parameter \$paramName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) should return string but empty return statement found\.$#' - identifier: return.empty - count: 4 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:logTooEarlyLoadedListIfNeeded\(\) should return string but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:setUndefinedStrategy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\:\:warnAboutTooEarlyLoadedParams\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php - - message: '#^Offset ''function'' on array\{function\: string, line\?\: int, file\?\: string, class\?\: class\-string, type\?\: ''\-\>''\|''\:\:'', args\?\: array\, object\?\: object\} in isset\(\) always exists and is not nullable\.$#' identifier: isset.offset @@ -792,18 +534,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/FieldTypeParserInterface.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\AbstractFieldTypeParser\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/AbstractFieldTypeParser.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Common\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Common\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -816,18 +546,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/Common.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Content\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Content\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Content.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Content\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -840,36 +558,12 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAsset.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:addComplexParametersDependencies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:addComplexParametersDependencies\(\) has parameter \$parameter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:addComplexParametersDependencies\(\) has parameter \$scope with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IO\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -900,12 +594,6 @@ parameters: count: 3 path: src/bundle/Core/DependencyInjection/Configuration/Parser/IO.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Image\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Image\:\:mapConfig\(\) has no return type specified\.$#' identifier: missingType.return @@ -924,18 +612,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/Image.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Languages\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Languages\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Languages.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Languages\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -990,18 +666,6 @@ parameters: count: 5 path: src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Templates\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Templates\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\Templates\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1014,48 +678,18 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/Templates.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TwigVariablesParser\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TwigVariablesParser\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TwigVariablesParser\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/TwigVariablesParser.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\UrlChecker\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\UrlChecker\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\UrlChecker\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Parser/UrlChecker.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\UserContentTypeIdentifier\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/UserContentTypeIdentifier.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\UserContentTypeIdentifier\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1074,18 +708,6 @@ parameters: count: 2 path: src/bundle/Core/DependencyInjection/Configuration/Parser/View.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\View\:\:addSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/View.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\View\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Parser/View.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\View\:\:mapConfig\(\) has parameter \$scopeSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1128,66 +750,24 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfig\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfigArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfigArray\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapSetting\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setAvailableSiteAccessGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setAvailableSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setContextualizer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setGroupsBySiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setGroupsBySiteAccess\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1272,24 +852,12 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:mapConfigArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:mapConfigArray\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:mapReservedScopeArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:mapReservedScopeArray\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1356,54 +924,18 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setAvailableSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setAvailableSiteAccesses\(\) has parameter \$availableSiteAccesses with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setContainer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setContextualParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setGroupsBySiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setGroupsBySiteAccess\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setNamespace\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\:\:setSiteAccessNodeName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/Contextualizer.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, array\|bool\|float\|int\|string\|null given\.$#' identifier: argument.type @@ -1530,12 +1062,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/HookableConfigurationMapperInterface.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\Collector\\SuggestionCollector\:\:addSuggestion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollector.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\Collector\\SuggestionCollectorAwareInterface\:\:setSuggestionCollector\(\) has no return type specified\.$#' identifier: missingType.return @@ -1572,24 +1098,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestion\:\:setMandatory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestion\:\:setMessage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestion\:\:setSuggestion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestion.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestion\:\:setSuggestion\(\) has parameter \$suggestion with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1656,168 +1164,60 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:addConfigParser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:addDefaultSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:addDefaultSettings\(\) has parameter \$files with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:addPolicyProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:addSiteAccessConfigurationFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:buildPolicyMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleCache\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleCache\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleHelpers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleHelpers\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleImage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleImage\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleLocale\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleLocale\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleRouting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleRouting\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleSessionLoading\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleTemplating\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleUrlChecker\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleUrlChecker\(\) has parameter \$config with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleUrlWildcards\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleUrlWildcards\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:prependTranslatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerOrmConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerRepositoriesConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerRepositoriesConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerSiteAccessConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerSiteAccessConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1830,12 +1230,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerUrlAliasConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:registerUrlAliasConfiguration\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1878,36 +1272,18 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - - message: '#^Property Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:\$mainRepositoryConfigParser \(Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\RepositoryConfigParser\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php - - message: '#^Cannot access offset \(int\|string\) on array\|bool\|float\|int\|string\|null\.$#' identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilder\:\:addConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilder\:\:addConfig\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilder\:\:addResource\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilder.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilder\:\:policyExists\(\) has parameter \$policyMap with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1926,12 +1302,6 @@ parameters: count: 1 path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/PolicyProviderInterface.php - - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\YamlPolicyProvider\:\:addPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProvider.php - - message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\YamlPolicyProvider\:\:getFiles\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -1950,36 +1320,12 @@ parameters: count: 1 path: src/bundle/Core/Entity/EntityManagerFactory.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListener\:\:registerContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListener\:\:registerLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListener\:\:reindex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/BackgroundIndexingTerminateListener.php - - message: '#^Cannot call method getName\(\) on Symfony\\Component\\Console\\Command\\Command\|null\.$#' identifier: method.nonObject count: 1 path: src/bundle/Core/EventListener/BackwardCompatibleCommandListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\CacheViewResponseListener\:\:configureCache\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/CacheViewResponseListener.php - - message: '#^Parameter \#2 \$values of method Symfony\\Component\\HttpFoundation\\ResponseHeaderBag\:\:set\(\) expects array\\|string\|null, int given\.$#' identifier: argument.type @@ -1992,24 +1338,12 @@ parameters: count: 1 path: src/bundle/Core/EventListener/ConfigScopeListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener\:\:setViewProviders\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ConfigScopeListener.php - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener\:\:setViewProviders\(\) has parameter \$viewProviders with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/EventListener/ConfigScopeListener.php - - - message: '#^Property Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener\:\:\$configResolvers \(array\\) does not accept iterable\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/EventListener/ConfigScopeListener.php - - message: '#^Cannot access property \$matchingType on Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' identifier: property.nonObject @@ -2022,30 +1356,12 @@ parameters: count: 3 path: src/bundle/Core/EventListener/ConsoleCommandListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConsoleCommandListener\:\:onConsoleCommand\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ConsoleCommandListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConsoleCommandListener\:\:setDebug\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ConsoleCommandListener.php - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConsoleCommandListener\:\:setDebug\(\) has parameter \$debug with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/EventListener/ConsoleCommandListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ConsoleCommandListener\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ConsoleCommandListener.php - - message: '#^Parameter \#1 \$siteAccess of class Ibexa\\Core\\MVC\\Symfony\\Event\\ScopeChangeEvent constructor expects Ibexa\\Core\\MVC\\Symfony\\SiteAccess, Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null given\.$#' identifier: argument.type @@ -2058,66 +1374,24 @@ parameters: count: 1 path: src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListener\:\:onRouteReferenceGeneration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ContentDownloadRouteReferenceListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ExceptionListener\:\:onKernelException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ExceptionListener.php - - message: '#^Parameter \#1 \$exception of method Ibexa\\Bundle\\Core\\EventListener\\ExceptionListener\:\:getTranslatedMessage\(\) expects Exception, Ibexa\\Core\\Base\\Translatable&Throwable given\.$#' identifier: argument.type count: 1 path: src/bundle/Core/EventListener/ExceptionListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\IndexRequestListener\:\:onKernelRequestIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/IndexRequestListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\OriginalRequestListener\:\:onKernelRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/OriginalRequestListener.php - - message: '#^Cannot access property \$attributes on Symfony\\Component\\HttpFoundation\\Request\|null\.$#' identifier: property.nonObject count: 1 path: src/bundle/Core/EventListener/PreviewRequestListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\RejectExplicitFrontControllerRequestsListener\:\:onKernelRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListener.php - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:__construct\(\) has parameter \$defaultSiteAccess with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/EventListener/RequestEventListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:onKernelRequestForward\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/RequestEventListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:onKernelRequestRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/RequestEventListener.php - - message: '#^Property Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:\$configResolver is never read, only written\.$#' identifier: property.onlyWritten @@ -2130,18 +1404,6 @@ parameters: count: 1 path: src/bundle/Core/EventListener/RequestEventListener.php - - - message: '#^Property Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:\$logger \(Psr\\Log\\LoggerInterface\) does not accept Psr\\Log\\LoggerInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/EventListener/RequestEventListener.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:\$logger \(Psr\\Log\\LoggerInterface\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: src/bundle/Core/EventListener/RequestEventListener.php - - message: '#^Property Ibexa\\Bundle\\Core\\EventListener\\RequestEventListener\:\:\$router is never read, only written\.$#' identifier: property.onlyWritten @@ -2166,18 +1428,6 @@ parameters: count: 1 path: src/bundle/Core/EventListener/RoutingListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\RoutingListener\:\:onSiteAccessMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/RoutingListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\SessionInitByPostListener\:\:onSiteAccessMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/SessionInitByPostListener.php - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\SiteAccessListener\:\:generateViewParametersArray\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -2190,12 +1440,6 @@ parameters: count: 1 path: src/bundle/Core/EventListener/SiteAccessListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ViewControllerListener\:\:getController\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ViewControllerListener.php - - message: '#^Parameter \#1 \$controller of method Symfony\\Component\\HttpKernel\\Event\\ControllerEvent\:\:setController\(\) expects callable\(\)\: mixed, \(callable\(\)\: mixed\)\|false given\.$#' identifier: argument.type @@ -2214,18 +1458,6 @@ parameters: count: 1 path: src/bundle/Core/EventListener/ViewControllerListener.php - - - message: '#^Method Ibexa\\Bundle\\Core\\EventListener\\ViewRendererListener\:\:renderView\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventListener/ViewRendererListener.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\EventSubscriber\\CrowdinRequestLocaleSubscriber\:\:setInContextAcceptLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriber.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:createArticleDraft\(\) has no return type specified\.$#' identifier: missingType.return @@ -2304,120 +1536,36 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/BasicContentContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:mapContentPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/BasicContentContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:mapContentPath\(\) has parameter \$path with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Features/Context/BasicContentContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:publishDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/BasicContentContext.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:\$contentPaths has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/bundle/Core/Features/Context/BasicContentContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:getDefaultSiteaccessName\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iExpectItToBeExecutedWithIt\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iExpectItToBeExecutedWithTheDefaultOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iExpectItToBeExecutedWithTheSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iExpectItToBeExecutedWithTheSiteaccess\(\) has parameter \$siteaccess with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunAConsoleScript\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunAConsoleScriptWithIt\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunAConsoleScriptWithSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunAConsoleScriptWithSiteaccess\(\) has parameter \$siteaccessOption with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunTheCommand\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunTheCommand\(\) has parameter \$command with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:iRunTheCommand\(\) has parameter \$siteaccess with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:thereIsADefaultSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:thereIsADefaultSiteaccess\(\) has parameter \$expectedSiteaccessName with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:thereIsASiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:thereIsASiteaccess\(\) has parameter \$default with no type specified\.$#' identifier: missingType.parameter @@ -2430,24 +1578,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:thereIsASiteaccessThatIsNotTheDefaultOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Property Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:\$it type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/Features/Context/ConsoleContext.php - - - message: '#^Property Ibexa\\Bundle\\Core\\Features\\Context\\ConsoleContext\:\:\$scriptOutput has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/bundle/Core/Features/Context/ConsoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentContext\:\:createContentItem\(\) has parameter \$fields with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -2472,18 +1608,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ContentContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentContext\:\:iCreateADraftOfAnExistingContentItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentContext\:\:iCreateAnFolderDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentContext\:\:updateDraft\(\) has no return type specified\.$#' identifier: missingType.return @@ -2520,42 +1644,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:gatherContexts\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:iCreateDraftOfContentTypeWithCustomLocationController\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:iModifyAFieldFromTheDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:iPreviewThisDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:iSeeAPreviewOfTheCurrentDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentPreviewContext\:\:theOutputIsValid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentPreviewContext.php - - message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' identifier: argument.type @@ -2592,36 +1680,18 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ContentTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeDoesntExistsByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeDoesntExistsByIdentifier\(\) has parameter \$identifier with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ContentTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeExistsByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeExistsByIdentifier\(\) has parameter \$identifier with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ContentTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeExistsByIdentifierOnGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:assertContentTypeExistsByIdentifierOnGroup\(\) has parameter \$groupIdentifier with no type specified\.$#' identifier: missingType.parameter @@ -2652,12 +1722,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ContentTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:ensureContentTypeDoesntExist\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ContentTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ContentTypeContext\:\:ensureContentTypeDoesntExist\(\) has parameter \$identifier with no type specified\.$#' identifier: missingType.parameter @@ -2706,66 +1770,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/ContentTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:anAccessDeniedExceptionIsThrown\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:anAccessDeniedExceptionIsThrown\(\) has parameter \$exceptionString with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/ExceptionContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:anExceptionIsThrownDuringAnHTTPRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:iAmLoggedIn\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:iAmNotLoggedIn\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:itIsConvertedToAnSymfonyComponentSecurityCoreExceptionAccessDeniedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\ExceptionContext\:\:theLoginFormIsShown\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/ExceptionContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:addValueConstraint\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:associateFieldToContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createAndPublishContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createAndPublishContent\(\) has parameter \$field with no type specified\.$#' identifier: missingType.parameter @@ -2778,12 +1788,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContentOfThisType\(\) has no return type specified\.$#' identifier: missingType.return @@ -2802,12 +1806,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContentOfThisTypeWithProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContentOfThisTypeWithProperties\(\) has parameter \$fieldType with no type specified\.$#' identifier: missingType.parameter @@ -2820,12 +1818,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContentTypeWithFieldType\(\) has no return type specified\.$#' identifier: missingType.return @@ -2862,36 +1854,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:getActualFieldPosition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:getFieldContentState\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:publishContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:setFieldContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/FieldTypeContext.php - - message: '#^PHPDoc tag @param has invalid value \(mixed The field value\)\: Unexpected token "The", expected variable at offset 173 on line 6$#' identifier: phpDoc.parseError @@ -2952,24 +1920,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/QueryControllerContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAreAssignedToTheTwigVariable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/QueryControllerContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAreAssignedToTheTwigVariable\(\) has parameter \$twigVariableName with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/QueryControllerContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAssignedToTheTwigVariableIsAObject\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/QueryControllerContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAssignedToTheTwigVariableIsAObject\(\) has parameter \$className with no type specified\.$#' identifier: missingType.parameter @@ -2982,12 +1938,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/QueryControllerContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAssignedToTheTwigVariableIsAObjectAndHasLimitAndCountParams\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/QueryControllerContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\QueryControllerContext\:\:theQueryResultsAssignedToTheTwigVariableIsAObjectAndHasLimitAndCountParams\(\) has parameter \$pageLimit with no type specified\.$#' identifier: missingType.parameter @@ -3006,24 +1956,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/QueryControllerContext.php - - - message: '#^Interface Ibexa\\Contracts\\Core\\Repository\\RoleService referenced with incorrect case\: Ibexa\\Contracts\\Core\\Repository\\roleService\.$#' - identifier: interface.nameCase - count: 1 - path: src/bundle/Core/Features/Context/RoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:getRole\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role\|null\.$#' identifier: return.type count: 1 path: src/bundle/Core/Features/Context/RoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:iDontSeeRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/RoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:iDontSeeRole\(\) has parameter \$name with no type specified\.$#' identifier: missingType.parameter @@ -3036,36 +1974,18 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/RoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:iSeeRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/RoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:iSeeRole\(\) has parameter \$name with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/RoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:noAssginedPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/RoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:noAssginedPolicies\(\) has parameter \$name with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/RoleContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:noAssigneGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/RoleContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\RoleContext\:\:noAssigneGroups\(\) has parameter \$name with no type specified\.$#' identifier: missingType.parameter @@ -3078,24 +1998,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExist\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExist\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExistInGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExistInGroup\(\) has parameter \$parentGroup with no type specified\.$#' identifier: missingType.parameter @@ -3108,36 +2016,18 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExistInGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameDoesntExistInGroups\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExists\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExistsInGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExistsInGroup\(\) has parameter \$parentGroup with no type specified\.$#' identifier: missingType.parameter @@ -3150,12 +2040,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExistsWithFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:assertUserWithNameExistsWithFields\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter @@ -3192,12 +2076,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:ensureUserDoesntExist\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:ensureUserExists\(\) invoked with 2 parameters, 3\-4 required\.$#' identifier: arguments.count @@ -3216,24 +2094,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iDontHaveUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iDontHaveUser\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iDontHaveUserInGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iDontHaveUserInGroup\(\) has parameter \$parentGroup with no type specified\.$#' identifier: missingType.parameter @@ -3246,24 +2112,12 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveTheFollowingUsers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUser\(\) has parameter \$username with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUser\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUserInGroup\(\) has parameter \$parentGroupName with no type specified\.$#' identifier: missingType.parameter @@ -3276,12 +2130,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUserInGroup\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUserWithUsernameEmailAndPassword\(\) has parameter \$email with no type specified\.$#' identifier: missingType.parameter @@ -3300,12 +2148,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUserWithUsernameEmailAndPassword\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/bundle/Core/Features/Context/UserContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\UserContext\:\:iHaveUserWithUsernameEmailAndPasswordInGroup\(\) has parameter \$email with no type specified\.$#' identifier: missingType.parameter @@ -3360,12 +2202,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/UserContext.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\YamlConfigurationContext\:\:addConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Features/Context/YamlConfigurationContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Features\\Context\\YamlConfigurationContext\:\:addConfiguration\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3390,12 +2226,6 @@ parameters: count: 1 path: src/bundle/Core/Features/Context/YamlConfigurationContext.php - - - message: '#^Property Ibexa\\Bundle\\Core\\Features\\Context\\YamlConfigurationContext\:\:\$platformConfigurationFilePath has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/bundle/Core/Features/Context/YamlConfigurationContext.php - - message: '#^Method Ibexa\\Bundle\\Core\\Fragment\\DirectFragmentRenderer\:\:getArguments\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3420,12 +2250,6 @@ parameters: count: 1 path: src/bundle/Core/Fragment/DirectFragmentRenderer.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Fragment\\FragmentListenerFactory\:\:buildFragmentListener\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Fragment/FragmentListenerFactory.php - - message: '#^Method Ibexa\\Bundle\\Core\\Fragment\\FragmentListenerFactory\:\:buildFragmentListener\(\) has parameter \$fragmentListenerClass with no type specified\.$#' identifier: missingType.parameter @@ -3438,12 +2262,6 @@ parameters: count: 1 path: src/bundle/Core/Fragment/FragmentListenerFactory.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Fragment\\FragmentListenerFactory\:\:setRequestStack\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Fragment/FragmentListenerFactory.php - - message: '#^Method Ibexa\\Bundle\\Core\\Fragment\\InlineFragmentRenderer\:\:setFragmentPath\(\) has parameter \$path with no type specified\.$#' identifier: missingType.parameter @@ -3456,18 +2274,6 @@ parameters: count: 1 path: src/bundle/Core/Fragment/InlineFragmentRenderer.php - - - message: '#^Trait Ibexa\\Bundle\\Core\\Fragment\\SiteAccessSerializationTrait is used zero times and is not analysed\.$#' - identifier: trait.unused - count: 1 - path: src/bundle/Core/Fragment/SiteAccessSerializationTrait.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\AliasCleaner\:\:removeAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/AliasCleaner.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\AliasGenerator\:\:getVariation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3504,24 +2310,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Cache\\AliasGeneratorDecorator\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\Cache\\AliasGeneratorDecorator\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\:\:\$name \(string\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property - count: 2 - path: src/bundle/Core/Imagine/Cache/AliasGeneratorDecorator.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Cache\\Resolver\\RelativeResolver\:\:rewriteUrl\(\) has parameter \$url with no type specified\.$#' identifier: missingType.parameter @@ -3552,18 +2340,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/Filter/AbstractFilter.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\AbstractFilter\:\:setOption\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/Filter/AbstractFilter.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\AbstractFilter\:\:setOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/Filter/AbstractFilter.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\AbstractFilter\:\:setOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3576,48 +2352,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/Filter/AbstractFilter.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:all\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:get\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:getVariationFilters\(\) has parameter \$configuredVariations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:getVariationFilters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:getVariationPostProcessors\(\) has parameter \$configuredVariations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:getVariationPostProcessors\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterConfiguration\:\:setConfigResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/Filter/FilterConfiguration.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\FilterInterface\:\:getOptions\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3666,102 +2400,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/Filter/Imagick/SwirlFilter.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/BorderFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/CropFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\FilterLoaderWrapped\:\:setInnerLoader\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/FilterLoaderWrapped.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\GrayscaleFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ReduceNoiseFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightDownOnlyFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthDownOnlyFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoader\:\:load\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\IORepositoryResolver\:\:remove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\IORepositoryResolver\:\:store\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/IORepositoryResolver.php - - message: '#^Parameter \#2 \$data of function fwrite expects string, string\|false given\.$#' identifier: argument.type @@ -3780,12 +2418,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/PlaceholderAliasGenerator.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderAliasGenerator\:\:setPlaceholderProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/PlaceholderAliasGenerator.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderAliasGenerator\:\:setPlaceholderProvider\(\) has parameter \$options with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3804,12 +2436,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorConfigurator\:\:configure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/PlaceholderAliasGeneratorConfigurator.php - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorConfigurator\:\:\$providersConfig type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3888,30 +2514,12 @@ parameters: count: 1 path: src/bundle/Core/Imagine/PlaceholderProvider/RemoteProvider.php - - - message: '#^Cannot access offset string on Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProvider\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 3 - path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistry\:\:__construct\(\) has parameter \$providers with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistry\:\:addProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistry\:\:\$providers \(Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProvider\) does not accept array\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\Variation\\ImagineAwareAliasGenerator\:\:getVariation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -3936,24 +2544,12 @@ parameters: count: 1 path: src/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGenerator.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\IOVariationPurger\:\:purge\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\IOVariationPurger\:\:purge\(\) has parameter \$aliasNames with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\IOVariationPurger\:\:setLogger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/IOVariationPurger.php - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\IOVariationPurger\:\:\$logger \(Psr\\Log\\LoggerInterface\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -3972,24 +2568,12 @@ parameters: count: 1 path: src/bundle/Core/Imagine/VariationPurger/ImageFileRowReader.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurger\:\:purge\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurger\:\:purge\(\) has parameter \$aliasNames with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurger\:\:setLogger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurger.php - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurger\:\:\$imageFileList \(Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileList\) does not accept Iterator\.$#' identifier: assign.propertyType @@ -4008,30 +2592,6 @@ parameters: count: 1 path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileRowReader\:\:getCount\(\) should return int but returns int\|string\.$#' - identifier: return.type - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileRowReader\:\:init\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileRowReader\:\:\$statement \(Doctrine\\DBAL\\Driver\\Statement\) does not accept Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php - - - - message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileRowReader\:\:\$statement type has no value type specified in iterable type Doctrine\\DBAL\\Driver\\Statement\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileRowReader.php - - message: '#^Method Ibexa\\Bundle\\Core\\Matcher\\ServiceAwareMatcherFactory\:\:__construct\(\) has parameter \$matchConfig with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -4128,30 +2688,12 @@ parameters: count: 1 path: src/bundle/Core/URLChecker/Handler/AbstractURLHandler.php - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\Handler\\HTTPHandler\:\:doValidate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/URLChecker/Handler/HTTPHandler.php - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\Handler\\HTTPHandler\:\:getOptions\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/bundle/Core/URLChecker/Handler/HTTPHandler.php - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\Handler\\HTTPHandler\:\:isSuccessful\(\) has parameter \$statusCode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/URLChecker/Handler/HTTPHandler.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\Handler\\HTTPHandler\:\:validate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/URLChecker/Handler/HTTPHandler.php - - message: '#^Parameter \#1 \$handle of function curl_getinfo expects CurlHandle, resource given\.$#' identifier: argument.type @@ -4164,24 +2706,12 @@ parameters: count: 1 path: src/bundle/Core/URLChecker/Handler/MailToHandler.php - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\Handler\\MailToHandler\:\:validate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/URLChecker/Handler/MailToHandler.php - - message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' identifier: method.nonObject count: 1 path: src/bundle/Core/URLChecker/URLChecker.php - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\URLChecker\:\:check\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/URLChecker/URLChecker.php - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\URLChecker\:\:fetchUrls\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -4206,30 +2736,12 @@ parameters: count: 1 path: src/bundle/Core/URLChecker/URLHandlerInterface.php - - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\URLHandlerRegistry\:\:addHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/URLChecker/URLHandlerRegistry.php - - message: '#^Method Ibexa\\Bundle\\Core\\URLChecker\\URLHandlerRegistryInterface\:\:addHandler\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/bundle/Core/URLChecker/URLHandlerRegistryInterface.php - - - message: '#^Method Ibexa\\Bundle\\Core\\Variation\\PathResolver\:\:resolve\(\) has parameter \$path with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Variation/PathResolver.php - - - - message: '#^Method Ibexa\\Bundle\\Core\\Variation\\PathResolver\:\:resolve\(\) has parameter \$variation with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/Core/Variation/PathResolver.php - - message: '#^Parameter \#1 \$path of method Ibexa\\Contracts\\Core\\Variation\\VariationPathGenerator\:\:getVariationPath\(\) expects string, string\|null given\.$#' identifier: argument.type @@ -4242,18 +2754,6 @@ parameters: count: 1 path: src/bundle/Core/Variation/VariationHandlerResolver.php - - - message: '#^Method Ibexa\\Bundle\\Core\\View\\Provider\\Configured\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Core/View/Provider/Configured.php - - - - message: '#^Method Ibexa\\Bundle\\Debug\\Collector\\IbexaCoreCollector\:\:addCollector\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/Debug/Collector/IbexaCoreCollector.php - - message: '#^Method Ibexa\\Bundle\\Debug\\Collector\\IbexaCoreCollector\:\:addCollector\(\) has parameter \$panelTemplate with no type specified\.$#' identifier: missingType.parameter @@ -4290,12 +2790,6 @@ parameters: count: 1 path: src/bundle/Debug/Collector/PersistenceCacheCollector.php - - - message: '#^Method Ibexa\\Bundle\\IO\\ApiLoader\\HandlerRegistry\:\:setHandlersMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/ApiLoader/HandlerRegistry.php - - message: '#^Method Ibexa\\Bundle\\IO\\ApiLoader\\HandlerRegistry\:\:setHandlersMap\(\) has parameter \$handlersMap with no type specified\.$#' identifier: missingType.parameter @@ -4344,144 +2838,36 @@ parameters: count: 1 path: src/bundle/IO/Command/MigrateFilesCommand.php - - - message: '#^Method Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:migrateFiles\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/Command/MigrateFilesCommand.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:outputConfiguredHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/Command/MigrateFilesCommand.php - - message: '#^Parameter \#2 \$max of class Symfony\\Component\\Console\\Helper\\ProgressBar constructor expects int, int\|null given\.$#' identifier: argument.type count: 1 path: src/bundle/IO/Command/MigrateFilesCommand.php - - - message: '#^Parameter \#3 \$toMetadataHandlerIdentifier of method Ibexa\\Bundle\\IO\\Migration\\MigrationHandlerInterface\:\:setIODataHandlersByIdentifiers\(\) expects string, int\|string given\.$#' - identifier: argument.type - count: 2 - path: src/bundle/IO/Command/MigrateFilesCommand.php - - - - message: '#^Parameter \#4 \$toBinarydataHandlerIdentifier of method Ibexa\\Bundle\\IO\\Migration\\MigrationHandlerInterface\:\:setIODataHandlersByIdentifiers\(\) expects string, int\|string given\.$#' - identifier: argument.type - count: 2 - path: src/bundle/IO/Command/MigrateFilesCommand.php - - message: '#^Strict comparison using \=\=\= between \(float\|int\) and null will always evaluate to false\.$#' identifier: identical.alwaysFalse count: 1 path: src/bundle/IO/Command/MigrateFilesCommand.php - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:__construct\(\) has parameter \$binarydataHandlerFactories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:__construct\(\) has parameter \$metadataHandlerFactories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:getFactory\(\) has parameter \$factories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:processHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:processHandlers\(\) has parameter \$configuredHandlers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:processHandlers\(\) has parameter \$factories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Parameter \#3 \$configuredHandlers of method Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:processHandlers\(\) expects array, array\|bool\|float\|int\|string\|null given\.$#' - identifier: argument.type - count: 2 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$binarydataHandlerFactories \(ArrayObject&iterable\\) does not accept ArrayObject\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$binarydataHandlerFactories with generic class ArrayObject does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$metadataHandlerFactories \(ArrayObject&iterable\\) does not accept ArrayObject\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass\:\:\$metadataHandlerFactories with generic class ArrayObject does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php - - message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#' identifier: method.notFound count: 1 path: src/bundle/IO/DependencyInjection/Configuration.php - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:addHandlersSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/Configuration.php - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:addHandlersSection\(\) has parameter \$factories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' identifier: missingType.generics count: 1 path: src/bundle/IO/DependencyInjection/Configuration.php - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:setBinarydataHandlerFactories\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/Configuration.php - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:setBinarydataHandlerFactories\(\) has parameter \$factories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' identifier: missingType.generics count: 1 path: src/bundle/IO/DependencyInjection/Configuration.php - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:setMetadataHandlerFactories\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/Configuration.php - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\Configuration\:\:setMetadataHandlerFactories\(\) has parameter \$factories with generic class ArrayObject but does not specify its types\: TKey, TValue$#' identifier: missingType.generics @@ -4512,66 +2898,6 @@ parameters: count: 1 path: src/bundle/IO/DependencyInjection/Configuration.php - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\:\:addConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\:\:configureHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\:\:configureHandler\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\Flysystem\:\:addConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\Flysystem\:\:configureHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\Flysystem\:\:configureHandler\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\MetadataHandler\\LegacyDFSCluster\:\:addConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\MetadataHandler\\LegacyDFSCluster\:\:configureHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\MetadataHandler\\LegacyDFSCluster\:\:configureHandler\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\EventListener\\StreamFileListener\:\:onKernelRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/EventListener/StreamFileListener.php - - message: '#^Parameter \#2 \$offset of class LimitIterator constructor expects int, int\|null given\.$#' identifier: argument.type @@ -4596,48 +2922,18 @@ parameters: count: 1 path: src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php - - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileIterator\\LegacyStorageFileIterator\:\:fetchRow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/Migration/FileLister/FileIterator/LegacyStorageFileIterator.php - - message: '#^Interface Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileIteratorInterface extends generic interface Iterator but does not specify its types\: TKey, TValue$#' identifier: missingType.generics count: 1 path: src/bundle/IO/Migration/FileLister/FileIteratorInterface.php - - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileRowReader\\LegacyStorageFileRowReader\:\:getCount\(\) should return int but returns int\|string\.$#' - identifier: return.type - count: 1 - path: src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php - - - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileRowReader\\LegacyStorageFileRowReader\:\:init\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php - - message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' identifier: argument.type count: 1 path: src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php - - - message: '#^Property Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileRowReader\\LegacyStorageFileRowReader\:\:\$statement \(Doctrine\\DBAL\\Driver\\Statement\) does not accept Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileRowReader\\LegacyStorageFileRowReader\:\:\$statement type has no value type specified in iterable type Doctrine\\DBAL\\Driver\\Statement\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/IO/Migration/FileLister/FileRowReader/LegacyStorageFileRowReader.php - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\FileLister\\FileRowReaderInterface\:\:init\(\) has no return type specified\.$#' identifier: missingType.return @@ -4686,24 +2982,12 @@ parameters: count: 1 path: src/bundle/IO/Migration/MigrationHandler.php - - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:logError\(\) has parameter \$message with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/IO/Migration/MigrationHandler.php - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:logInfo\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/bundle/IO/Migration/MigrationHandler.php - - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:logInfo\(\) has parameter \$message with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/IO/Migration/MigrationHandler.php - - message: '#^Method Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:logMissingFile\(\) has no return type specified\.$#' identifier: missingType.return @@ -4728,18 +3012,6 @@ parameters: count: 1 path: src/bundle/IO/Migration/MigrationHandler.php - - - message: '#^Property Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:\$logger \(Psr\\Log\\LoggerInterface\) does not accept Psr\\Log\\LoggerInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/bundle/IO/Migration/MigrationHandler.php - - - - message: '#^Property Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:\$logger \(Psr\\Log\\LoggerInterface\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: src/bundle/IO/Migration/MigrationHandler.php - - message: '#^Property Ibexa\\Bundle\\IO\\Migration\\MigrationHandler\:\:\$toBinarydataHandler \(Ibexa\\Core\\IO\\IOBinarydataHandler\) does not accept object\.$#' identifier: assign.propertyType @@ -4770,78 +3042,6 @@ parameters: count: 1 path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - message: '#^Call to method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:checkParameters\(\) on a separate line has no effect\.$#' - identifier: method.resultUnused - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:__construct\(\) has parameter \$installers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:cacheClear\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:checkCreateDatabase\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:checkParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:checkPermissions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:executeCommand\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:getInstaller\(\) has parameter \$type with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:getInstaller\(\) should return Ibexa\\Bundle\\RepositoryInstaller\\Installer\\Installer but returns false\.$#' - identifier: return.type - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Command\\InstallPlatformCommand\:\:indexData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Strict comparison using \=\=\= between bool and 1 will always evaluate to false\.$#' - identifier: identical.alwaysFalse - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 1 - path: src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Event\\Subscriber\\BuildSchemaSubscriber\:\:getSubscribedEvents\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -4854,18 +3054,6 @@ parameters: count: 1 path: src/bundle/RepositoryInstaller/Installer/CoreInstaller.php - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Installer\\CoreInstaller\:\:importData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Installer/CoreInstaller.php - - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Installer\\CoreInstaller\:\:importSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Installer/CoreInstaller.php - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Installer\\DbBasedInstaller\:\:copyConfigurationFile\(\) has no return type specified\.$#' identifier: missingType.return @@ -4890,12 +3078,6 @@ parameters: count: 1 path: src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php - - - message: '#^Method Ibexa\\Bundle\\RepositoryInstaller\\Installer\\DbBasedInstaller\:\:setOutput\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/bundle/RepositoryInstaller/Installer/DbBasedInstaller.php - - message: '#^Parameter \#1 \$array of function array_filter expects array, list\\|false given\.$#' identifier: argument.type @@ -5118,24 +3300,6 @@ parameters: count: 1 path: src/contracts/FieldType/Generic/Type.php - - - message: '#^Method Ibexa\\Contracts\\Core\\FieldType\\ValidationError\:\:setTarget\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/contracts/FieldType/ValidationError.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\FieldType\\ValidationError\\AbstractValidationError\:\:__construct\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/contracts/FieldType/ValidationError/AbstractValidationError.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\FieldType\\ValidationError\\AbstractValidationError\:\:\$parameters type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/contracts/FieldType/ValidationError/AbstractValidationError.php - - message: '#^Method Ibexa\\Contracts\\Core\\FieldType\\ValueSerializerInterface\:\:decode\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -5184,12 +3348,6 @@ parameters: count: 1 path: src/contracts/FieldType/ValueSerializerInterface.php - - - message: '#^Method Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:setInputStream\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/contracts/IO/BinaryFileCreateStruct.php - - message: '#^Method Ibexa\\Contracts\\Core\\Limitation\\Target\\Builder\\VersionBuilder\:\:translateToAnyLanguageOf\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -5424,24 +3582,6 @@ parameters: count: 1 path: src/contracts/Persistence/Content/Type/Handler.php - - - message: '#^PHPDoc tag @param for parameter \$contentTypeId with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType - count: 1 - path: src/contracts/Persistence/Content/Type/Handler.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$fieldDefinitionId$#' - identifier: parameter.notFound - count: 1 - path: src/contracts/Persistence/Content/Type/Handler.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\:\:\$pathData type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/contracts/Persistence/Content/UrlAlias.php - - message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:archiveUrlAliasesForDeletedTranslations\(\) has no return type specified\.$#' identifier: missingType.return @@ -5736,48 +3876,12 @@ parameters: count: 1 path: src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCopyContentEvent\:\:getVersionInfo\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCopyContentEvent\:\:\$versionInfo \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCopyContentEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentDraftEvent\:\:getContentDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\|null\.$#' identifier: return.type count: 1 path: src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentDraftEvent\:\:getCreator\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentDraftEvent\:\:getVersionInfo\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentDraftEvent\:\:\$creator \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentDraftEvent\:\:\$versionInfo \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/BeforeCreateContentDraftEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\BeforeCreateContentEvent\:\:__construct\(\) has parameter \$fieldIdentifiersToValidate with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -5886,42 +3990,6 @@ parameters: count: 1 path: src/contracts/Repository/Events/Content/BeforeUpdateContentMetadataEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CopyContentEvent\:\:getVersionInfo\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/CopyContentEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CopyContentEvent\:\:\$versionInfo \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/CopyContentEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CreateContentDraftEvent\:\:getCreator\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/CreateContentDraftEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CreateContentDraftEvent\:\:getVersionInfo\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Content/CreateContentDraftEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CreateContentDraftEvent\:\:\$creator \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/CreateContentDraftEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CreateContentDraftEvent\:\:\$versionInfo \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Content/CreateContentDraftEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Content\\CreateContentEvent\:\:__construct\(\) has parameter \$fieldIdentifiersToValidate with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -6006,18 +4074,6 @@ parameters: count: 1 path: src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\BeforeCopyContentTypeEvent\:\:getCreator\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\BeforeCopyContentTypeEvent\:\:\$creator \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/ContentType/BeforeCopyContentTypeEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\BeforeCreateContentTypeDraftEvent\:\:getContentTypeDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\|null\.$#' identifier: return.type @@ -6060,18 +4116,6 @@ parameters: count: 1 path: src/contracts/Repository/Events/ContentType/BeforeRemoveContentTypeTranslationEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\CopyContentTypeEvent\:\:getCreator\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\CopyContentTypeEvent\:\:\$creator \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/ContentType/CopyContentTypeEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\ContentType\\CreateContentTypeEvent\:\:__construct\(\) has parameter \$contentTypeGroups with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -6210,66 +4254,12 @@ parameters: count: 1 path: src/contracts/Repository/Events/ObjectState/SetPriorityOfObjectStateEvent.php - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\AddPolicyByRoleDraftEvent\:\:\$updatedRoleDraft has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/contracts/Repository/Events/Role/AddPolicyByRoleDraftEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\AssignRoleToUserEvent\:\:getRoleLimitation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\AssignRoleToUserEvent\:\:\$roleLimitation \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Role/AssignRoleToUserEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\AssignRoleToUserGroupEvent\:\:getRoleLimitation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\AssignRoleToUserGroupEvent\:\:\$roleLimitation \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Role/AssignRoleToUserGroupEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeAddPolicyByRoleDraftEvent\:\:getUpdatedRoleDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft\|null\.$#' identifier: return.type count: 1 path: src/contracts/Repository/Events/Role/BeforeAddPolicyByRoleDraftEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeAssignRoleToUserEvent\:\:getRoleLimitation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeAssignRoleToUserEvent\:\:\$roleLimitation \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Role/BeforeAssignRoleToUserEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeAssignRoleToUserGroupEvent\:\:getRoleLimitation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeAssignRoleToUserGroupEvent\:\:\$roleLimitation \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Role/BeforeAssignRoleToUserGroupEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Role\\BeforeCopyRoleEvent\:\:getCopiedRole\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role\|null\.$#' identifier: return.type @@ -6366,30 +4356,6 @@ parameters: count: 1 path: src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Trash\\BeforeRecoverEvent\:\:getNewParentLocation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Trash\\BeforeRecoverEvent\:\:\$newParentLocation \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Trash/BeforeRecoverEvent.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\Trash\\RecoverEvent\:\:getNewParentLocation\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/contracts/Repository/Events/Trash/RecoverEvent.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\Trash\\RecoverEvent\:\:\$newParentLocation \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Events/Trash/RecoverEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\URL\\BeforeUpdateUrlEvent\:\:getUpdatedUrl\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL but returns Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\|null\.$#' identifier: return.type @@ -7080,12 +5046,6 @@ parameters: count: 1 path: src/contracts/Repository/Events/User/DeleteUserGroupEvent.php - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Events\\User\\UpdateUserGroupEvent\:\:\$updatedUserGroup has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/contracts/Repository/Events/User/UpdateUserGroupEvent.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Events\\UserPreference\\BeforeSetUserPreferenceEvent\:\:__construct\(\) has parameter \$userPreferenceSetStructs with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -7512,12 +5472,6 @@ parameters: count: 1 path: src/contracts/Repository/Values/Content/Query/Criterion/MapLocationDistance.php - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\Operator\\Specifications\:\:\$operator has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/contracts/Repository/Values/Content/Query/Criterion/Operator/Specifications.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\Operator\\Specifications\:\:\$valueCount \(int\) does not accept int\|null\.$#' identifier: assign.propertyType @@ -7566,12 +5520,6 @@ parameters: count: 1 path: src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\RangeAggregationResult\:\:\$entries \(array\\) does not accept iterable\\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php - - message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\TermAggregationResult implements generic interface IteratorAggregate but does not specify its types\: TKey, TValue$#' identifier: missingType.generics @@ -7590,12 +5538,6 @@ parameters: count: 1 path: src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\TermAggregationResult\:\:\$entries \(array\\) does not accept iterable\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResult\\TermAggregationResultEntry\:\:__construct\(\) has parameter \$key with no type specified\.$#' identifier: missingType.parameter @@ -7854,18 +5796,6 @@ parameters: count: 1 path: src/contracts/Search/Handler.php - - - message: '#^Call to an undefined method Symfony\\Component\\HttpKernel\\KernelInterface\:\:getFixtures\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/contracts/Test/IbexaKernelTestCase.php - - - - message: '#^Call to an undefined method Symfony\\Component\\HttpKernel\\KernelInterface\:\:getSchemaFiles\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/contracts/Test/IbexaKernelTestCase.php - - message: '#^Call to an undefined method object\:\:import\(\)\.$#' identifier: method.notFound @@ -7920,126 +5850,6 @@ parameters: count: 1 path: src/contracts/Test/Persistence/Fixture/YamlFixture.php - - - message: '#^Binary operation "\." between non\-falsy\-string and array\|bool\|float\|int\|string\|null results in an error\.$#' - identifier: binaryOp.invalid - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Call to an undefined method object\:\:clear\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Call to an undefined method object\:\:contentLanguageHandler\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Call to an undefined method object\:\:contentTypeHandler\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:cleanupVarDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:cleanupVarDir\(\) has parameter \$sourceDir with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:clearInternalCaches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:externalBuildContainer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:getDatabaseConnection\(\) should return Doctrine\\DBAL\\Connection but returns object\.$#' - identifier: return.type - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:getInstallationDir\(\) should return string but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$cachePool \\Psr\\Cache\\CacheItemPoolInterface\)\: Unexpected token "\$cachePool", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$handler \\Ibexa\\Core\\Persistence\\Legacy\\Handler\)\: Unexpected token "\$handler", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$connection \(Doctrine\\DBAL\\Connection\) does not accept object\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$repositoryReference has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$db \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$dsn \(string\) does not accept string\|false\.$#' - identifier: assign.propertyType - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$initialDataFixture \(Ibexa\\Contracts\\Core\\Test\\Persistence\\Fixture\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$ioRootDir \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$postInsertStatements is unused\.$#' - identifier: property.unused - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - - - message: '#^Static property Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\\Legacy\:\:\$serviceContainer \(Ibexa\\Core\\Base\\ServiceContainer\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/contracts/Test/Repository/SetupFactory/Legacy.php - - message: '#^Method Ibexa\\Contracts\\Core\\Variation\\VariationHandler\:\:getVariation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8112,18 +5922,6 @@ parameters: count: 1 path: src/lib/Base/Container/Compiler/TaggedServiceIdsIterator/BackwardCompatibleIterator.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/BadStateException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/BadStateException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8136,18 +5934,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/BadStateException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/BadStateException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/BadStateException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\BadStateException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8166,18 +5952,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/BadStateException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8190,18 +5964,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentFieldValidationException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8226,18 +5988,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentFieldValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8250,18 +6000,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeFieldDefinitionValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8286,18 +6024,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8310,18 +6036,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentTypeValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentTypeValidationException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8346,18 +6060,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8370,18 +6072,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ContentValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ContentValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ContentValidationException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8406,18 +6096,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ForbiddenException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ForbiddenException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ForbiddenException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8430,18 +6108,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ForbiddenException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ForbiddenException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/ForbiddenException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\ForbiddenException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8460,18 +6126,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/ForbiddenException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/InvalidArgumentException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/InvalidArgumentException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8484,18 +6138,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/InvalidArgumentException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/InvalidArgumentException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/InvalidArgumentException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8520,18 +6162,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/InvalidArgumentType.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/LimitationValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/LimitationValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8544,18 +6174,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/LimitationValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/LimitationValidationException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/LimitationValidationException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8574,18 +6192,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/LimitationValidationException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/MissingClass.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/MissingClass.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8598,18 +6204,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/MissingClass.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/MissingClass.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/MissingClass.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\MissingClass\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8628,18 +6222,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/MissingClass.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8652,18 +6234,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\FieldTypeNotFoundException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8682,18 +6252,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFound/FieldTypeNotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8706,18 +6264,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFound\\LimitationNotFoundException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8736,18 +6282,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFound/LimitationNotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8760,18 +6294,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFoundException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/NotFoundException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\NotFoundException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8790,18 +6312,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/NotFoundException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/TokenExpiredException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/TokenExpiredException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8814,18 +6324,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/TokenExpiredException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/TokenExpiredException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/TokenExpiredException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\TokenExpiredException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8850,18 +6348,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/UnauthorizedException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/UnauthorizedException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/UnauthorizedException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8874,18 +6360,6 @@ parameters: count: 1 path: src/lib/Base/Exceptions/UnauthorizedException.php - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/UnauthorizedException.php - - - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Exceptions/UnauthorizedException.php - - message: '#^Method Ibexa\\Core\\Base\\Exceptions\\UnauthorizedException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -8934,12 +6408,6 @@ parameters: count: 1 path: src/lib/Base/ServiceContainer.php - - - message: '#^Method Ibexa\\Core\\Base\\ServiceContainer\:\:getRepository\(\) should return Ibexa\\Contracts\\Core\\Repository\\Repository but returns object\.$#' - identifier: return.type - count: 1 - path: src/lib/Base/ServiceContainer.php - - message: '#^Method Ibexa\\Core\\Base\\ServiceContainer\:\:initializeContainer\(\) has no return type specified\.$#' identifier: missingType.return @@ -9018,12 +6486,6 @@ parameters: count: 1 path: src/lib/Base/Translatable.php - - - message: '#^Method Ibexa\\Core\\Base\\Utils\\DeprecationWarner\:\:log\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Base/Utils/DeprecationWarner.php - - message: '#^Method Ibexa\\Core\\Base\\Utils\\DeprecationWarnerInterface\:\:log\(\) has no return type specified\.$#' identifier: missingType.return @@ -9066,12 +6528,6 @@ parameters: count: 1 path: src/lib/Event/UserService.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Author\\AuthorCollection\:\:removeAuthorsById\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Author/AuthorCollection.php - - message: '#^Method Ibexa\\Core\\FieldType\\Author\\AuthorCollection\:\:removeAuthorsById\(\) has parameter \$authorIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -9126,48 +6582,18 @@ parameters: count: 1 path: src/lib/FieldType/Author/Value.php - - - message: '#^Class Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:deleteFieldData\(\) should return bool but empty return statement found\.$#' - identifier: return.empty - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:removeOldFile\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:setDownloadUrlGenerator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - message: '#^Parameter \#2 \$versionNo of method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:removeOldFile\(\) expects string, int given\.$#' identifier: argument.type @@ -9186,156 +6612,6 @@ parameters: count: 1 path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:countFileReferences\(\) has parameter \$files with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:countFileReferences\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:getFileReferenceData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:getReferencedFiles\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:getReferencedFiles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:removeFileReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:removeFileReferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:removeFileReferences\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\:\:storeFileReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:countFileReferences\(\) has parameter \$files with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:countFileReferences\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:getFileReferenceData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:getPropertyMapping\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:getReferencedFiles\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:getReferencedFiles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:removeFileReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:removeFileReferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:removeFileReferences\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:setFetchColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:setInsertColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:setUpdateColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:storeNewFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\\DoctrineStorage\:\:updateFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - - - message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' - identifier: argument.type - count: 1 - path: src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php - - message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' identifier: argument.type @@ -9420,24 +6696,6 @@ parameters: count: 1 path: src/lib/FieldType/BinaryBase/Value.php - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryFile\\BinaryFileStorage\\Gateway\\DoctrineStorage\:\:getPropertyMapping\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryFile\\BinaryFileStorage\\Gateway\\DoctrineStorage\:\:setFetchColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\BinaryFile\\BinaryFileStorage\\Gateway\\DoctrineStorage\:\:setInsertColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php - - message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\BinaryBase\\Value\:\:\$downloadCount\.$#' identifier: property.notFound @@ -9630,18 +6888,6 @@ parameters: count: 2 path: src/lib/FieldType/FieldType.php - - - message: '#^Method Ibexa\\Core\\FieldType\\FieldType\:\:applyDefaultSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/FieldType.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\FieldType\:\:applyDefaultValidatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/FieldType.php - - message: '#^Method Ibexa\\Core\\FieldType\\FieldType\:\:checkValueStructure\(\) has no return type specified\.$#' identifier: missingType.return @@ -9678,12 +6924,6 @@ parameters: count: 1 path: src/lib/FieldType/FieldType.php - - - message: '#^Method Ibexa\\Core\\FieldType\\FieldType\:\:setTransformationProcessor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/FieldType.php - - message: '#^Method Ibexa\\Core\\FieldType\\FieldType\:\:validate\(\) has Ibexa\\Contracts\\Core\\Repository\\Exceptions\\InvalidArgumentException in PHPDoc @throws tag but it''s not thrown\.$#' identifier: throws.unusedType @@ -9714,18 +6954,6 @@ parameters: count: 2 path: src/lib/FieldType/ISBN/Type.php - - - message: '#^Binary operation "\*" between int\<\-3, 3\> and non\-empty\-string results in an error\.$#' - identifier: binaryOp.invalid - count: 1 - path: src/lib/FieldType/ISBN/Type.php - - - - message: '#^Binary operation "\*" between int\ and non\-empty\-string results in an error\.$#' - identifier: binaryOp.invalid - count: 1 - path: src/lib/FieldType/ISBN/Type.php - - message: '#^Binary operation "\*" between non\-empty\-string and int\<1, 10\> results in an error\.$#' identifier: binaryOp.invalid @@ -9744,18 +6972,6 @@ parameters: count: 1 path: src/lib/FieldType/ISBN/Type.php - - - message: '#^Parameter \#1 \$isbnNr of method Ibexa\\Core\\FieldType\\ISBN\\Type\:\:validateISBN13Checksum\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/FieldType/ISBN/Type.php - - - - message: '#^Parameter \#1 \$isbnNr of method Ibexa\\Core\\FieldType\\ISBN\\Type\:\:validateISBNChecksum\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/FieldType/ISBN/Type.php - - message: '#^Parameter \#1 \$string of function strlen expects string, string\|null given\.$#' identifier: argument.type @@ -9768,60 +6984,12 @@ parameters: count: 1 path: src/lib/FieldType/Image/AliasCleanerInterface.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:deleteBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/Legacy.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/Legacy.php - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:newBinaryCreateStructFromUploadedFile\(\) has parameter \$uploadedFile with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/Image/IO/Legacy.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:setPrefix\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/Legacy.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:setPrefixes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/Legacy.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\OptionsProvider\:\:getDraftImagesDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/OptionsProvider.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\OptionsProvider\:\:getPublishedImagesDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/OptionsProvider.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\OptionsProvider\:\:getStorageDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/OptionsProvider.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\IO\\OptionsProvider\:\:getVarDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/IO/OptionsProvider.php - - message: '#^Cannot access offset ''id'' on array\|bool\|float\|int\|string\.$#' identifier: offsetAccess.nonOffsetAccessible @@ -9846,156 +7014,18 @@ parameters: count: 1 path: src/lib/FieldType/Image/ImageStorage.php - - - message: '#^Class Ibexa\\Core\\FieldType\\Image\\ImageStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/Image/ImageStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/Image/ImageStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/FieldType/Image/ImageStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/ImageStorage.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, array\|bool\|float\|int\|string given\.$#' identifier: argument.type count: 1 path: src/lib/FieldType/Image/ImageStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:extractFilesFromXml\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:extractFilesFromXml\(\) has parameter \$xml with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:getAllVersionsImageXmlForFieldId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:getImagesData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:getXmlForImages\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:getXmlForImages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:removeImageReferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\:\:storeImageReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway.php - - - - message: '#^Cannot access property \$childNodes on DOMElement\|null\.$#' - identifier: property.nonObject - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Cannot call method getAttribute\(\) on DOMElement\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Cannot call method hasAttribute\(\) on DOMElement\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:extractFilesFromXml\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:getAllVersionsImageXmlForFieldId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:getImagesData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:getXmlForImages\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:getXmlForImages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:storeImageReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Parameter \#1 \$select of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:select\(\) expects array\\|string\|null, int given\.$#' - identifier: argument.type - count: 2 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\Image\\ImageStorage\\Gateway\\DoctrineStorage\:\:\$fieldNameMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\Image\\ImageThumbnailProxyStrategy\:\:getThumbnail\(\) never returns null so it can be removed from the return type\.$#' identifier: return.unusedType @@ -10122,120 +7152,6 @@ parameters: count: 1 path: src/lib/FieldType/ImageAsset/Type.php - - - message: '#^Class Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:deleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:deleteFieldData\(\) has parameter \$fieldId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:deleteFieldData\(\) has parameter \$versionNo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:storeFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\:\:storeFieldData\(\) has parameter \$contentTypeId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway.php - - - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:assignKeywords\(\) has parameter \$keywordMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:deleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:deleteOrphanedKeywords\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:getAssignedKeywords\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:storeFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\)\: Unexpected token "\\n \* ", expected variable at offset 137 on line 4$#' - identifier: phpDoc.parseError - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - - - message: '#^Parameter \#1 \$keywordsToInsert of method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:insertKeywords\(\) expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: src/lib/FieldType/Keyword/KeywordStorage/Gateway/DoctrineStorage.php - - message: '#^Parameter \#2 \$versionNo of method Ibexa\\Core\\FieldType\\Keyword\\KeywordStorage\\Gateway\\DoctrineStorage\:\:deleteFieldData\(\) expects int, int\|null given\.$#' identifier: argument.type @@ -10278,90 +7194,12 @@ parameters: count: 1 path: src/lib/FieldType/Keyword/Type.php - - - message: '#^Class Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/MapLocation/MapLocationStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\:\:deleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\:\:getFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:deleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:getFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:getFieldData\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:loadFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:storeNewFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\\Gateway\\DoctrineStorage\:\:updateFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/MapLocation/MapLocationStorage/Gateway/DoctrineStorage.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$address\.$#' identifier: property.notFound @@ -10410,30 +7248,6 @@ parameters: count: 1 path: src/lib/FieldType/MapLocation/Value.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Media\\MediaStorage\\Gateway\\DoctrineStorage\:\:getPropertyMapping\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Media\\MediaStorage\\Gateway\\DoctrineStorage\:\:setFetchColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Media\\MediaStorage\\Gateway\\DoctrineStorage\:\:setInsertColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Media\\MediaStorage\\Gateway\\DoctrineStorage\:\:setUpdateColumns\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Media/MediaStorage/Gateway/DoctrineStorage.php - - message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\BinaryBase\\Value\:\:\$autoplay\.$#' identifier: property.notFound @@ -10488,12 +7302,6 @@ parameters: count: 1 path: src/lib/FieldType/Media/Type.php - - - message: '#^Property Ibexa\\Core\\FieldType\\Media\\Type\:\:\$availableTypes has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/FieldType/Media/Type.php - - message: '#^Property Ibexa\\Core\\FieldType\\Media\\Type\:\:\$settingsSchema type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -10518,24 +7326,12 @@ parameters: count: 1 path: src/lib/FieldType/Null/Type.php - - - message: '#^Method Ibexa\\Core\\FieldType\\NullStorage\:\:copyLegacyField\(\) should return bool\|null but empty return statement found\.$#' - identifier: return.empty - count: 1 - path: src/lib/FieldType/NullStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\NullStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/NullStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\NullStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/NullStorage.php - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\|bool\|float\|int\|string\|null given\.$#' identifier: argument.type @@ -10668,12 +7464,6 @@ parameters: count: 1 path: src/lib/FieldType/Time/Type.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Time\\Value\:\:fromTimestamp\(\) should return static\(Ibexa\\Core\\FieldType\\Time\\Value\) but returns Ibexa\\Core\\FieldType\\Time\\Value\.$#' - identifier: return.type - count: 1 - path: src/lib/FieldType/Time/Value.php - - message: '#^Unsafe usage of new static\(\)\.$#' identifier: new.static @@ -10722,102 +7512,18 @@ parameters: count: 2 path: src/lib/FieldType/Url/UrlStorage.php - - - message: '#^Class Ibexa\\Core\\FieldType\\Url\\UrlStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/Url/UrlStorage.php - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/FieldType/Url/UrlStorage.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/FieldType/Url/UrlStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Url/UrlStorage.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:\$logger \(Psr\\Log\\LoggerInterface\) does not accept Psr\\Log\\LoggerInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/FieldType/Url/UrlStorage.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:\$logger \(Psr\\Log\\LoggerInterface\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/FieldType/Url/UrlStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\:\:getIdUrlMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\:\:getUrlIdMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\:\:linkUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\:\:unlinkUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\\DoctrineStorage\:\:getIdUrlMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\\DoctrineStorage\:\:getUrlIdMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\\DoctrineStorage\:\:linkUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Url/UrlStorage/Gateway/DoctrineStorage.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$login\.$#' identifier: property.notFound count: 1 path: src/lib/FieldType/User/Type.php - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$passwordHashType\.$#' - identifier: property.notFound - count: 1 - path: src/lib/FieldType/User/Type.php - - message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Value\:\:\$passwordHash\.$#' identifier: property.notFound @@ -10914,120 +7620,12 @@ parameters: count: 1 path: src/lib/FieldType/User/Type.php - - - message: '#^Class Ibexa\\Core\\FieldType\\User\\UserStorage extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: src/lib/FieldType/User/UserStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/User/UserStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\:\:getFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:convertColumnsToProperties\(\) has parameter \$databaseValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:convertColumnsToProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:fetchUserData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:fetchUserSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:getFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:getPropertyMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:\$defaultValues type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\ValidationError\:\:__construct\(\) has parameter \$target with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/FieldType/ValidationError.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\ValidationError\:\:__construct\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/ValidationError.php - - - - message: '#^Method Ibexa\\Core\\FieldType\\ValidationError\:\:setTarget\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/ValidationError.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\ValidationError\:\:\$plural \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/FieldType/ValidationError.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\ValidationError\:\:\$plural \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/FieldType/ValidationError.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\ValidationError\:\:\$values type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/FieldType/ValidationError.php - - message: '#^Method Ibexa\\Core\\FieldType\\Validator\:\:getConstraintsSchema\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/FieldType/Validator.php - - - message: '#^Method Ibexa\\Core\\FieldType\\Validator\:\:initializeWithConstraints\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/FieldType/Validator.php - - message: '#^Method Ibexa\\Core\\FieldType\\Validator\:\:initializeWithConstraints\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11172,30 +7770,6 @@ parameters: count: 1 path: src/lib/FieldType/ValueSerializer/SymfonySerializerAdapter.php - - - message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:setPreviewActive\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Helper/ContentPreviewHelper.php - - - - message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:setPreviewedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Helper/ContentPreviewHelper.php - - - - message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:setPreviewedLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Helper/ContentPreviewHelper.php - - - - message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Helper/ContentPreviewHelper.php - - message: '#^Property Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:\$originalSiteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' identifier: assign.propertyType @@ -11220,12 +7794,6 @@ parameters: count: 1 path: src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php - - - message: '#^Method Ibexa\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsList\:\:getGroups\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsList.php - - message: '#^Property Ibexa\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsList\:\:\$groups type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11274,12 +7842,6 @@ parameters: count: 1 path: src/lib/Helper/TranslationHelper.php - - - message: '#^Property Ibexa\\Core\\Helper\\TranslationHelper\:\:\$logger \(Psr\\Log\\LoggerInterface\) does not accept Psr\\Log\\LoggerInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Helper/TranslationHelper.php - - message: '#^Property Ibexa\\Core\\Helper\\TranslationHelper\:\:\$siteAccessesByLanguage type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11412,132 +7974,18 @@ parameters: count: 1 path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentBinaryDataHandler.php - - - message: '#^Method Ibexa\\Core\\IO\\IOBinarydataHandler\\SiteAccessDependentMetadataHandler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOBinarydataHandler\\SiteAccessDependentMetadataHandler\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOBinarydataHandler\\SiteAccessDependentMetadataHandler\:\:deleteDirectory\(\) has parameter \$spiPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php - - message: '#^Method Ibexa\\Core\\IO\\IOBinarydataHandler\\SiteAccessDependentMetadataHandler\:\:getHandler\(\) should return Ibexa\\Core\\IO\\IOMetadataHandler but returns object\.$#' identifier: return.type count: 1 path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php - - - message: '#^Method Ibexa\\Core\\IO\\IOBinarydataHandler\\SiteAccessDependentMetadataHandler\:\:getMimeType\(\) has parameter \$spiBinaryFileId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\:\:deleteDirectory\(\) has parameter \$spiPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\:\:getMimeType\(\) has parameter \$spiBinaryFileId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOMetadataHandler.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler/Flysystem.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler/Flysystem.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\:\:deleteDirectory\(\) has parameter \$spiPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOMetadataHandler/Flysystem.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\:\:getMimeType\(\) has parameter \$spiBinaryFileId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOMetadataHandler/Flysystem.php - - message: '#^Parameter \#2 \$e of class Ibexa\\Core\\IO\\Exception\\IOException constructor expects Exception\|null, League\\Flysystem\\FilesystemException given\.$#' identifier: argument.type count: 2 path: src/lib/IO/IOMetadataHandler/Flysystem.php - - - message: '#^Cannot access offset ''datatype'' on array\\|false\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:getMimeType\(\) has parameter \$spiBinaryFileId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:mapArrayToSPIBinaryFile\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Property Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:\$urlDecorator \(Ibexa\\Core\\IO\\UrlDecorator\) does not accept Ibexa\\Core\\IO\\UrlDecorator\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - - - message: '#^Property Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:\$urlDecorator \(Ibexa\\Core\\IO\\UrlDecorator\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 2 - path: src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php - - message: '#^Method Ibexa\\Core\\IO\\IOService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11550,30 +7998,12 @@ parameters: count: 1 path: src/lib/IO/IOService.php - - - message: '#^Method Ibexa\\Core\\IO\\IOService\:\:deleteBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOService.php - - - - message: '#^Method Ibexa\\Core\\IO\\IOService\:\:deleteDirectory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOService.php - - message: '#^Method Ibexa\\Core\\IO\\IOService\:\:newBinaryCreateStructFromUploadedFile\(\) has parameter \$uploadedFile with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/IO/IOService.php - - - message: '#^Method Ibexa\\Core\\IO\\IOService\:\:setPrefix\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/IOService.php - - message: '#^Parameter \#1 \$buffer of method Ibexa\\Contracts\\Core\\IO\\MimeTypeDetector\:\:getFromBuffer\(\) expects string, string\|false given\.$#' identifier: argument.type @@ -11640,30 +8070,12 @@ parameters: count: 1 path: src/lib/IO/TolerantIOService.php - - - message: '#^Method Ibexa\\Core\\IO\\TolerantIOService\:\:deleteBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/TolerantIOService.php - - - - message: '#^Method Ibexa\\Core\\IO\\TolerantIOService\:\:logMissingFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/TolerantIOService.php - - message: '#^Method Ibexa\\Core\\IO\\TolerantIOService\:\:logMissingFile\(\) has parameter \$id with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/IO/TolerantIOService.php - - - message: '#^Method Ibexa\\Core\\IO\\TolerantIOService\:\:setLogger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/IO/TolerantIOService.php - - message: '#^Property Ibexa\\Contracts\\Core\\IO\\BinaryFile\:\:\$uri \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -11694,30 +8106,12 @@ parameters: count: 1 path: src/lib/IO/UrlDecorator/Prefix.php - - - message: '#^Method Ibexa\\Core\\Limitation\\BlockingLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/BlockingLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\BlockingLimitationType\:\:evaluate\(\) has Ibexa\\Contracts\\Core\\Repository\\Exceptions\\BadStateException in PHPDoc @throws tag but it''s not thrown\.$#' identifier: throws.unusedType count: 1 path: src/lib/Limitation/BlockingLimitationType.php - - - message: '#^Return type \(void\) of method Ibexa\\Core\\Limitation\\ChangeOwnerLimitationType\:\:valueSchema\(\) should be compatible with return type \(array\\|int\) of method Ibexa\\Contracts\\Core\\Limitation\\Type\:\:valueSchema\(\)$#' - identifier: method.childReturnType - count: 1 - path: src/lib/Limitation/ChangeOwnerLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\ContentTypeLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ContentTypeLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluator\:\:evaluate\(\) never returns null so it can be removed from the return type\.$#' identifier: return.unusedType @@ -11766,18 +8160,6 @@ parameters: count: 1 path: src/lib/Limitation/LanguageLimitationType.php - - - message: '#^Property Ibexa\\Core\\Limitation\\LanguageLimitationType\:\:\$versionTargetEvaluators \(array\\) does not accept iterable\\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Limitation/LanguageLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\LocationLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/LocationLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\LocationLimitationType\:\:evaluateForContentCreateStruct\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11802,18 +8184,6 @@ parameters: count: 1 path: src/lib/Limitation/MemberOfLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\NewObjectStateLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/NewObjectStateLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\NewSectionLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/NewSectionLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\NewSectionLimitationType\:\:doEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11838,12 +8208,6 @@ parameters: count: 1 path: src/lib/Limitation/NewSectionLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\ObjectStateLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ObjectStateLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\ObjectStateLimitationType\:\:getObjectStateIdsToVerify\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11862,84 +8226,18 @@ parameters: count: 1 path: src/lib/Limitation/ObjectStateLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\OwnerLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/OwnerLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\ParentContentTypeLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ParentContentTypeLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\ParentContentTypeLimitationType\:\:evaluateForContentCreateStruct\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Limitation/ParentContentTypeLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\ParentDepthLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ParentDepthLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\ParentDepthLimitationType\:\:evaluateForContentCreateStruct\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Limitation/ParentDepthLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\ParentOwnerLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ParentOwnerLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\ParentUserGroupLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/ParentUserGroupLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\SectionLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/SectionLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\SectionLimitationType\:\:evaluate\(\) should return bool but returns null\.$#' - identifier: return.type - count: 1 - path: src/lib/Limitation/SectionLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\SiteAccessLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/SiteAccessLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\StatusLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/StatusLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\SubtreeLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/SubtreeLimitationType.php - - - - message: '#^Method Ibexa\\Core\\Limitation\\SubtreeLimitationType\:\:evaluate\(\) should return bool but returns null\.$#' - identifier: return.type - count: 2 - path: src/lib/Limitation/SubtreeLimitationType.php - - message: '#^Method Ibexa\\Core\\Limitation\\SubtreeLimitationType\:\:evaluateForContentCreateStruct\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -11958,12 +8256,6 @@ parameters: count: 1 path: src/lib/Limitation/TargetOnlyLimitationType.php - - - message: '#^Method Ibexa\\Core\\Limitation\\UserGroupLimitationType\:\:acceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Limitation/UserGroupLimitationType.php - - message: '#^PHPDoc tag @var does not specify variable name\.$#' identifier: varTag.noVariable @@ -11994,42 +8286,12 @@ parameters: count: 1 path: src/lib/MVC/Exception/ParameterNotFoundException.php - - - message: '#^Method Ibexa\\Core\\MVC\\RepositoryAware\:\:setRepository\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/RepositoryAware.php - - message: '#^Method Ibexa\\Core\\MVC\\RepositoryAwareInterface\:\:setRepository\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/MVC/RepositoryAwareInterface.php - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\Component\\Serializer\\AbstractPropertyWhitelistNormalizer extends @final class Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer\.$#' - identifier: class.extendsFinalByPhpDoc - count: 1 - path: src/lib/MVC/Symfony/Component/Serializer/AbstractPropertyWhitelistNormalizer.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\Component\\Serializer\\MapNormalizer extends @final class Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer\.$#' - identifier: class.extendsFinalByPhpDoc - count: 1 - path: src/lib/MVC/Symfony/Component/Serializer/MapNormalizer.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\Component\\Serializer\\SimplifiedRequestNormalizer extends @final class Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer\.$#' - identifier: class.extendsFinalByPhpDoc - count: 1 - path: src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Component\\Serializer\\SimplifiedRequestNormalizer\:\:supportsNormalization\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/Component/Serializer/SimplifiedRequestNormalizer.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\ConfigDumperInterface\:\:dump\(\) has no return type specified\.$#' identifier: missingType.return @@ -12042,24 +8304,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/ConfigDumperInterface.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\QueryController\:\:runPagingQuery\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Controller/Content/QueryController.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\QueryController\:\:runQuery\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Controller/Content/QueryController.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\ViewController\:\:handleViewException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Controller/Content/ViewController.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\ViewController\:\:handleViewException\(\) has parameter \$contentId with no type specified\.$#' identifier: missingType.parameter @@ -12072,12 +8316,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Controller/Content/ViewController.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\ViewController\:\:handleViewException\(\) has parameter \$params with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Controller/Content/ViewController.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\ViewController\:\:handleViewException\(\) has parameter \$viewType with no type specified\.$#' identifier: missingType.parameter @@ -12156,12 +8394,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Controller/QueryRenderController.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\SecurityController\:\:loginAction\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Controller/SecurityController.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Event\\APIContentExceptionEvent\:\:__construct\(\) has parameter \$contentMeta with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -12174,36 +8406,18 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Event\\APIContentExceptionEvent\:\:setContentView\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Event\\APIContentExceptionEvent\:\:\$contentMeta type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Event\\APIContentExceptionEvent\:\:\$contentView \(Ibexa\\Core\\MVC\\Symfony\\View\\View\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Event\\PostSiteAccessMatchEvent\:\:__construct\(\) has parameter \$requestType with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/MVC/Symfony/Event/PostSiteAccessMatchEvent.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Event\\RouteReferenceGenerationEvent\:\:setRouteReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Event/RouteReferenceGenerationEvent.php - - message: '#^Call to an undefined method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:getContent\(\)\.$#' identifier: method.notFound @@ -12228,12 +8442,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriber.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListener\:\:onRouteReferenceGeneration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/EventListener/LanguageSwitchListener.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\ExpressionLanguage\\TwigVariableProviderExtension\:\:hasParameterProvider\(\) has parameter \$variables with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -12294,24 +8502,12 @@ parameters: count: 1 path: src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProvider\:\:setRequestStack\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProvider.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderInterface\:\:getViewParameters\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/FieldType/View/ParameterProviderInterface.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderRegistry\:\:setParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistry.php - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderRegistry\:\:\$providers has no type specified\.$#' identifier: missingType.property @@ -12420,12 +8616,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Matcher/ContentBased/Depth.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroup\:\:matchContentTypeId\(\) has parameter \$contentTypeId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroup.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationRemote\:\:matchContentInfo\(\) should return bool but return statement is missing\.$#' identifier: return.missing @@ -12444,12 +8634,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentType\:\:loadParentLocation\(\) has parameter \$locationId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentType.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentType\:\:loadParentLocation\(\) should return Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\Location but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\.$#' identifier: return.type @@ -12480,24 +8664,12 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValued\:\:setMatchingConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValued\:\:\$values type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/Matcher/ContentBased/MultipleValued.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAlias\:\:setMatchingConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' identifier: argument.type @@ -12546,12 +8718,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\Generator\\RouteReferenceGenerator\:\:setRequestStack\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/Generator/RouteReferenceGenerator.php - - message: '#^Parameter \#2 \$request of class Ibexa\\Core\\MVC\\Symfony\\Event\\RouteReferenceGenerationEvent constructor expects Symfony\\Component\\HttpFoundation\\Request, Symfony\\Component\\HttpFoundation\\Request\|null given\.$#' identifier: argument.type @@ -12582,36 +8748,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/RouteReference.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\RouteReference\:\:has\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/RouteReference.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\RouteReference\:\:has\(\) has parameter \$parameterName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Routing/RouteReference.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\RouteReference\:\:remove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/RouteReference.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\RouteReference\:\:set\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/RouteReference.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\RouteReference\:\:setRoute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/RouteReference.php - - message: '#^Method Symfony\\Component\\HttpFoundation\\ParameterBag\:\:get\(\) invoked with 3 parameters, 1\-2 required\.$#' identifier: arguments.count @@ -12624,66 +8760,24 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setHeaders\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setHeaders\(\) has parameter \$headers with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setHost\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setLanguages\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setPathinfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setPort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setQueryParams\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setQueryParams\(\) has parameter \$queryParams with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\:\:setScheme\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php - - message: '#^Unsafe usage of new static\(\)\.$#' identifier: new.static @@ -12774,276 +8868,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher.php - - - - message: '#^Access to undefined constant static\(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\)\:\:NAME\.$#' - identifier: classConstant.notFound - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:__construct\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:setMatcherBuilder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:setSubMatchers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:\$config type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:\$matchersMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\\LogicalAnd\:\:reverseMatch\(\) should return Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\VersatileMatcher\|null but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalAnd.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\\LogicalOr\:\:reverseMatch\(\) should return Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\VersatileMatcher\|null but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Compound/LogicalOr.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\CompoundInterface\:\:setMatcherBuilder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\CompoundInterface\:\:setSubMatchers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/CompoundInterface.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:__construct\(\) has parameter \$elementNumber with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:getHostElements\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:\$hostElements \(array\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:\$hostElements is never written, only read\.$#' - identifier: property.onlyRead - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:\$hostElements type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostElement\:\:\$request \(Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/HostElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:__construct\(\) has parameter \$map with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:getReverseMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:getReverseMap\(\) has parameter \$defaultSiteAccess with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:setMapKey\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:\$map type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\:\:\$reverseMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Host\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Host.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Port\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map/Port.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\URI\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Map/URI.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Regex\:\:match\(\) should return string\|false but returns bool\|string\.$#' - identifier: return.type - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Regex\:\:setMatchElement\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Regex\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Regex\:\:\$itemNumber \(string\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Regex\:\:\$matchedSiteAccess \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:__construct\(\) has parameter \$elementNumber with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:getURIElements\(\) has LogicException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:getURIElements\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:\$request \(Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:\$uriElements \(array\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:\$uriElements is never written, only read\.$#' - identifier: property.onlyRead - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIElement\:\:\$uriElements type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Matcher/URIElement.php - - message: '#^Call to an undefined method object\:\:setRequest\(\)\.$#' identifier: method.notFound @@ -13068,12 +8892,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProvider\:\:\$providers \(array\\) does not accept iterable\\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProvider.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider\:\:getSiteAccesses\(\) return type has no value type specified in iterable type Traversable\.$#' identifier: missingType.iterableValue @@ -13110,12 +8928,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess/Router.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Router\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/Router.php - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Router\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' identifier: assign.propertyType @@ -13152,30 +8964,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/SiteAccess/SiteAccessProviderInterface.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessService\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessService\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property - count: 1 - path: src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13188,18 +8976,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/Exception/InvalidResponseException.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Exception\\InvalidResponseException\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13284,12 +9060,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/GlobalHelper.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\GlobalHelper\:\:setRequestStack\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/GlobalHelper.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\RenderContentStrategy\:\:render\(\) should return string but returns string\|false\.$#' identifier: return.type @@ -13338,12 +9108,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/RenderStrategy.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\RenderStrategy\:\:\$strategies \(array\\) does not accept iterable\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/Templating/RenderStrategy.php - - message: '#^Cannot access property \$fieldTypeIdentifier on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' identifier: property.nonObject @@ -13356,12 +9120,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension\:\:getContentType\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension\:\:getFirstFilledImageFieldIdentifier\(\) has no return type specified\.$#' identifier: missingType.return @@ -13380,18 +9138,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension\:\:getTranslatedFieldDefinitionDescription\(\) should return string\|null but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension\:\:getTranslatedFieldDefinitionName\(\) should return string\|null but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php - - message: '#^Parameter \#1 \$content of method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension\:\:getContentType\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\|Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject given\.$#' identifier: argument.type @@ -13476,30 +9222,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtension\:\:\$configResolver has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtension\:\:\$localeConverter has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtension\:\:\$suffixes has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtension\:\:\$translator has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ImageExtension\:\:getImageVariation\(\) should return Ibexa\\Contracts\\Core\\Variation\\Values\\Variation\|null but return statement is missing\.$#' identifier: return.missing @@ -13620,12 +9342,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\FieldBlockRenderer\:\:setTwig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\FieldBlockRenderer\:\:sortResources\(\) has parameter \$resources with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13644,36 +9360,18 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Templating/Twig/FieldBlockRenderer.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\CatalogueMapperFileWriter\:\:hasEnglishCatalogue\(\) has parameter \$foreignFilePath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\CatalogueMapperFileWriter\:\:loadEnglishCatalogue\(\) has parameter \$domain with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\CatalogueMapperFileWriter\:\:loadEnglishCatalogue\(\) has parameter \$foreignFilePath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\CatalogueMapperFileWriter\:\:loadEnglishCatalogue\(\) has parameter \$format with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\CatalogueMapperFileWriter\:\:write\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Translation/CatalogueMapperFileWriter.php - - message: '#^Access to an undefined property PhpParser\\Node\:\:\$args\.$#' identifier: property.notFound @@ -13686,12 +9384,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\ExceptionMessageTemplateFileVisitor\:\:isIgnore\(\) has parameter \$node with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/Translation/ExceptionMessageTemplateFileVisitor.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\ExceptionMessageTemplateFileVisitor\:\:visitPhpFile\(\) has parameter \$ast with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13734,12 +9426,6 @@ parameters: count: 2 path: src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Translation\\ValidationErrorFileVisitor\:\:setLogger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php - - message: '#^Parameter \#1 \$desc of method JMS\\TranslationBundle\\Model\\Message\:\:setDesc\(\) expects string, string\|null given\.$#' identifier: argument.type @@ -13752,24 +9438,6 @@ parameters: count: 2 path: src/lib/MVC/Symfony/Translation/ValidationErrorFileVisitor.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:__construct\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:getConfigHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13782,12 +9450,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/BaseView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:getViewType\(\) has no return type specified\.$#' identifier: missingType.return @@ -13800,66 +9462,18 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/BaseView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setCacheEnabled\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setCacheEnabled\(\) has parameter \$cacheEnabled with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/MVC/Symfony/View/BaseView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setConfigHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setConfigHash\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/View/BaseView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setControllerReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setResponse\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setTemplateIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setViewType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/BaseView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:setViewType\(\) has parameter \$viewType with no type specified\.$#' identifier: missingType.parameter @@ -13890,12 +9504,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder\:\:loadLocation\(\) has parameter \$locationId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder\:\:\$defaultTemplates is unused\.$#' identifier: property.unused @@ -13908,36 +9516,12 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder\:\:\$locationLoader \(Ibexa\\Core\\Helper\\ContentInfoLocationLoader\) does not accept Ibexa\\Core\\Helper\\ContentInfoLocationLoader\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder\:\:\$locationLoader \(Ibexa\\Core\\Helper\\ContentInfoLocationLoader\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ParametersFilter\\RequestAttributes\:\:addRequestAttributes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/Builder/ParametersFilter/RequestAttributes.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\Registry\\ControllerMatch\:\:__construct\(\) has parameter \$viewBuilders with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\Registry\\ControllerMatch\:\:addToRegistry\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/Builder/Registry/ControllerMatch.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ViewBuilder\:\:buildView\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -13962,12 +9546,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/Configurator.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Configurator\\ViewProvider\:\:configure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/Configurator/ViewProvider.php - - message: '#^Parameter \#1 \$config of method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:setConfigHash\(\) expects array, array\|null given\.$#' identifier: argument.type @@ -13980,30 +9558,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/ContentView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ContentView\:\:setContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ContentView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ContentView\:\:setIsEmbed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ContentView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ContentView\:\:setLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ContentView.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\CustomLocationControllerChecker\:\:addViewProviders\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\CustomLocationControllerChecker\:\:usesCustomController\(\) has parameter \$viewMode with no type specified\.$#' identifier: missingType.parameter @@ -14052,18 +9606,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/LoginFormView.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\LoginFormView\:\:getLastUsername\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/MVC/Symfony/View/LoginFormView.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\View\\LoginFormView\:\:\$lastUsername \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/View/LoginFormView.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Manager\:\:__construct\(\) has parameter \$viewBaseLayout with no type specified\.$#' identifier: missingType.parameter @@ -14094,12 +9636,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/Manager.php - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\View\\Manager\:\:\$logger \(Psr\\Log\\LoggerInterface\) does not accept Psr\\Log\\LoggerInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/MVC/Symfony/View/Manager.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\:\:injectViewParameters\(\) has no return type specified\.$#' identifier: missingType.return @@ -14112,54 +9648,18 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/ParametersInjector.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\CustomParameters\:\:injectCustomParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/CustomParameters.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\EmbedObjectParameters\:\:injectEmbedObjectParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/EmbedObjectParameters.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\EventDispatcherInjector\:\:injectViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\EventDispatcherInjector\:\:injectViewParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/View/ParametersInjector/EventDispatcherInjector.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\NoLayout\:\:injectCustomParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/NoLayout.php - - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\ValueObjectsIds\:\:injectValueObjectsIds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/ValueObjectsIds.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\ViewbaseLayout\:\:__construct\(\) has parameter \$viewbaseLayout with no type specified\.$#' identifier: missingType.parameter count: 1 path: src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ParametersInjector\\ViewbaseLayout\:\:injectViewbaseLayout\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/ParametersInjector/ViewbaseLayout.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Provider\\Configured\:\:buildContentView\(\) has parameter \$viewConfig with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -14172,12 +9672,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/Provider/Configured.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Provider\\Registry\:\:setViewProviders\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/MVC/Symfony/View/Provider/Registry.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\Provider\\Registry\:\:setViewProviders\(\) has parameter \$viewProviders with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -14196,24 +9690,12 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/View.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/View.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:getConfigHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/MVC/Symfony/View/View.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/View.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:getViewType\(\) has no return type specified\.$#' identifier: missingType.return @@ -14244,12 +9726,6 @@ parameters: count: 1 path: src/lib/MVC/Symfony/View/View.php - - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/MVC/Symfony/View/View.php - - message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:setResponse\(\) has no return type specified\.$#' identifier: missingType.return @@ -14418,24 +9894,12 @@ parameters: count: 1 path: src/lib/Persistence/Cache/AbstractInMemoryHandler.php - - - message: '#^Property Ibexa\\Core\\Persistence\\Cache\\AbstractInMemoryHandler\:\:\$cacheIndicesValidator \(Ibexa\\Core\\Persistence\\Cache\\CacheIndicesValidatorInterface\) does not accept Ibexa\\Core\\Persistence\\Cache\\CacheIndicesValidatorInterface\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Persistence/Cache/AbstractInMemoryHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\BookmarkHandler\:\:loadByUserIdAndLocationId\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Persistence/Cache/BookmarkHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentHandler\:\:deleteTranslationFromContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/ContentHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentHandler\:\:getCacheTagsForVersion\(\) has parameter \$tags with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -14568,12 +10032,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/ContentTypeHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentTypeHandler\:\:publish\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/ContentTypeHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentTypeHandler\:\:unlink\(\) has no return type specified\.$#' identifier: missingType.return @@ -14586,12 +10044,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/ContentTypeHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentTypeHandler\:\:updateFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/ContentTypeHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ContentTypeHandler\:\:updateGroup\(\) has no return type specified\.$#' identifier: missingType.return @@ -14652,12 +10104,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorInterface.php - - - message: '#^Binary operation "\+" between float\|string and float results in an error\.$#' - identifier: binaryOp.invalid - count: 1 - path: src/lib/Persistence/Cache/InMemory/InMemoryCache.php - - message: '#^Property Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache\:\:\$cache \(array\\) does not accept array\\|object\>\.$#' identifier: assign.propertyType @@ -14670,12 +10116,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/LocationHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:changeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/LocationHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:copySubtree\(\) has parameter \$newOwnerId with no type specified\.$#' identifier: missingType.parameter @@ -14748,24 +10188,12 @@ parameters: count: 1 path: src/lib/Persistence/Cache/LocationHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:setSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/LocationHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:unHide\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Cache/LocationHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/LocationHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\ObjectStateHandler\:\:delete\(\) has no return type specified\.$#' identifier: missingType.return @@ -14820,48 +10248,12 @@ parameters: count: 1 path: src/lib/Persistence/Cache/ObjectStateHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:collectCacheCallData\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:collectCacheCallData\(\) has parameter \$method with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:collectCacheCallData\(\) has parameter \$trimmedBacktrace with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:getCalls\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:getLoadedUnCachedHandlers\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:getSimpleCallTrace\(\) has parameter \$backtrace with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Persistence/Cache/PersistenceLogger.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:getStats\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:logCacheHit\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -14886,18 +10278,6 @@ parameters: count: 2 path: src/lib/Persistence/Cache/PersistenceLogger.php - - - message: '#^Property Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:\$calls type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:\$unCachedHandlers type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Cache/PersistenceLogger.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\SectionHandler\:\:assign\(\) has no return type specified\.$#' identifier: missingType.return @@ -14910,24 +10290,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/SectionHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\TransactionHandler\:\:beginTransaction\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/TransactionHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\TransactionHandler\:\:commit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/TransactionHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\TransactionHandler\:\:rollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/TransactionHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\URLHandler\:\:find\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -14946,12 +10308,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/UrlAliasHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlAliasHandler\:\:archiveUrlAliasesForDeletedTranslations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UrlAliasHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlAliasHandler\:\:archiveUrlAliasesForDeletedTranslations\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -15000,30 +10356,12 @@ parameters: count: 1 path: src/lib/Persistence/Cache/UrlAliasHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlAliasHandler\:\:repairBrokenUrlAliasesForLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UrlAliasHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlAliasHandler\:\:translationRemoved\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UrlAliasHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlWildcardHandler\:\:find\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Persistence/Cache/UrlWildcardHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UrlWildcardHandler\:\:remove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UrlWildcardHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:assignRole\(\) has no return type specified\.$#' identifier: missingType.return @@ -15036,18 +10374,6 @@ parameters: count: 1 path: src/lib/Persistence/Cache/UserHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UserHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:deletePolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UserHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:deleteRole\(\) has no return type specified\.$#' identifier: missingType.return @@ -15108,24 +10434,12 @@ parameters: count: 1 path: src/lib/Persistence/Cache/UserHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UserHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:updatePolicy\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Cache/UserHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:updateRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Cache/UserHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Cache\\UserHandler\:\:updateUserToken\(\) has no return type specified\.$#' identifier: missingType.return @@ -15150,78 +10464,6 @@ parameters: count: 1 path: src/lib/Persistence/FieldTypeRegistry.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\:\:loadBookmarkDataByUserIdAndLocationId\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\:\:loadBookmarkDataByUserIdAndLocationId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\:\:loadUserBookmarks\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabase\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabase\:\:loadBookmarkDataById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabase\:\:loadBookmarkDataByUserIdAndLocationId\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabase\:\:loadBookmarkDataByUserIdAndLocationId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabase\:\:loadUserBookmarks\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\ExceptionConversion\:\:loadBookmarkDataByUserIdAndLocationId\(\) has parameter \$locationId with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\ExceptionConversion\:\:loadBookmarkDataByUserIdAndLocationId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\ExceptionConversion\:\:loadUserBookmarks\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Bookmark/Gateway/ExceptionConversion.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Handler\:\:loadByUserIdAndLocationId\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue @@ -15270,42 +10512,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:createNewFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:deleteFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:deleteTranslationFromContentFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:deleteTranslationFromVersionFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:getFieldMap\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:loadExternalFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:updateCopiedField\(\) has no return type specified\.$#' identifier: missingType.return @@ -15318,12 +10530,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:updateFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldHandler.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -15378,30 +10584,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - message: '#^Parameter \#1 \$authorValue of method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorConverter\:\:generateXmlString\(\) expects array, array\|bool\|float\|int\|string\|null given\.$#' identifier: argument.type @@ -15420,78 +10602,18 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\BinaryFileConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\BinaryFileConverter\:\:toFieldValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\BinaryFileConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\BinaryFileConverter\:\:toStorageValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/BinaryFileConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryConverter.php - - message: '#^Parameter \#2 \$array of function implode expects array\|null, array\|bool\|float\|int\|string given\.$#' identifier: argument.type @@ -15528,84 +10650,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeConverter.php - - message: '#^Cannot access offset ''timestamp'' on array\|bool\|float\|int\|string\.$#' identifier: offsetAccess.nonOffsetAccessible count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/DateConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\EmailAddressConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\EmailAddressConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\EmailAddressConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\EmailAddressConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataText1 \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType @@ -15630,30 +10680,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/EmailAddressConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\FloatConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\FloatConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\FloatConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\FloatConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php - - message: '#^Parameter \#1 \$minValue of method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\FloatConverter\:\:getStorageDefValidatorState\(\) expects int\|null, float given\.$#' identifier: argument.type @@ -15684,30 +10710,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/FloatConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataText1 \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType @@ -15732,24 +10734,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageAssetConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageAssetConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageAssetConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageAssetConverter.php - - message: '#^Cannot access property \$documentElement on DOMDocument\|null\.$#' identifier: property.nonObject @@ -15822,54 +10812,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageConverter\:\:parseLegacyXml\(\) should return array but returns null\.$#' - identifier: return.type - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ImageConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php - - message: '#^Parameter \#1 \$string of function htmlspecialchars expects string, int given\.$#' identifier: argument.type count: 2 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/ImageConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\IntegerConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\IntegerConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\IntegerConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\IntegerConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/IntegerConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt3 \(int\) does not accept array\|bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType @@ -15888,24 +10836,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' identifier: missingType.return count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType @@ -15930,78 +10866,12 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MapLocationConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/MapLocationConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\NullConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\NullConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\NullConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\NullConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/NullConverter.php - - message: '#^Cannot call method getElementsByTagName\(\) on DOMElement\|null\.$#' identifier: method.nonObject count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php - - message: '#^Parameter \#2 \$value of method DOMElement\:\:setAttribute\(\) expects string, bool given\.$#' identifier: argument.type @@ -16026,12 +10896,6 @@ parameters: count: 2 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - message: '#^Cannot call method getElementsByTagName\(\) on DOMElement\|null\.$#' identifier: method.nonObject @@ -16062,30 +10926,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - message: '#^Parameter \#2 \$value of method DOMElement\:\:setAttribute\(\) expects string, bool given\.$#' identifier: argument.type @@ -16116,30 +10956,6 @@ parameters: count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionConverter.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\FieldDefinition\:\:\$mainLanguageCode \(string\) in isset\(\) is not nullable\.$#' identifier: isset.property @@ -16201,53876 +11017,17552 @@ parameters: path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/SerializableConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataText \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' + identifier: assign.propertyType count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept bool\|float\|int\|string\|null\.$#' + identifier: assign.propertyType count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt1 \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataText \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataText1 \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept bool\|float\|int\|string\|null\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataText \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockConverter.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept bool\|float\|int\|string\|null\.$#' + identifier: assign.propertyType count: 1 path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept array\|bool\|float\|int\|string\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineConverter\:\:toStorageValue\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt1 \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) does not accept null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:__construct\(\) has parameter \$converterMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataText1 \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:\$converterMap type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataText \(string\) does not accept array\|bool\|float\|int\|string\|null\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$alwaysAvailable \(bool\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept bool\|float\|int\|string\|null\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$alwaysAvailable \(bool\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineConverter.php + path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$mainLanguageId \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php + path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Result of \|\| is always true\.$#' + identifier: booleanOr.alwaysTrue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php + path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:loadContentInfoList\(\) has parameter \$contentIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php + path: src/lib/Persistence/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeConverter\:\:toStorageValue\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:updatePathIdentificationString\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php + path: src/lib/Persistence/Legacy/Content/Handler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept array\|bool\|float\|int\|string\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#1 \$contentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:load\(\) expects int, int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeConverter.php + path: src/lib/Persistence/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlConverter\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$mainLanguageId \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php + path: src/lib/Persistence/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlConverter\:\:toFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:load\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlConverter\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadAll\(\) should return array\ but returns array\\|object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlConverter\:\:toStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadByLanguageCode\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlConverter.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) does not accept null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/Converter/UserConverter.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:__construct\(\) has parameter \$converterMap with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:storeCache\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:register\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php + message: '#^Parameter \#1 \$languages of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:storeCache\(\) expects array, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:\$converterMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:\$innerHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/FieldValue/ConverterRegistry.php + path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:listReverseRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:load\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\:\:extractLanguagesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentInfo\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to function is_int\(\) with 2\|int\<4, max\> will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentInfoByLocationId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:extractLanguageCodesFromMask\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentInfoByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:extractLanguageIdsFromMask\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentInfoList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:isLanguageAlwaysAvailable\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$array of function array_keys expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadRelation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:loadSubtreeIds\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadReverseRelations\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:setContentStates\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionInfo\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + message: '#^Variable \$copiedSubtreeRootLocation might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: src/lib/Persistence/Legacy/Content/Location/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionInfoList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\:\:\$trashed\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionedNameData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionedNameData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionsForUser\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:getLocationCreateStruct\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway.php + path: src/lib/Persistence/Legacy/Content/Location/Mapper.php - - message: '#^Argument of an invalid type DOMNodeList\\|false supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Trash\\Handler\:\:loadTrashItem\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Trashed but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Parameter \#2 \$prefix of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) expects string, null given\.$#' + identifier: argument.type count: 2 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 16 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + message: '#^Call to function is_int\(\) with 2\|int\<4, max\> will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Cannot call method removeChild\(\) on DOMNode\|null\.$#' - identifier: method.nonObject + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractContentInfoFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:deleteTranslationFromContentNames\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:deleteTranslationFromContentObject\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractFieldValueFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:deleteTranslationFromContentVersions\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractRelationFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:internalLoadContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractRelationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:listReverseRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractVersionInfoFromRow\(\) has parameter \$names with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:load\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractVersionInfoFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadContentInfo\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadContentInfoByLocationId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\VersionInfo\:\:\$contentInfo \(Ibexa\\Contracts\\Core\\Persistence\\Content\\ContentInfo\) does not accept null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadContentInfoByRemoteId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataFloat \(float\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadContentInfoList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadContentList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Persistence\\Content\\ObjectState\|false\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadRelation\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateGroupFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadReverseRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateGroupListFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadVersionInfo\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateListFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadVersionInfoList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadVersionedNameData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:createSectionFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Section/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadVersionedNameData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:createSectionsFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Section/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:loadVersionsForUser\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:copyLegacyField\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/StorageHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:removeRelationFromRelationField\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:__construct\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/StorageHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:removeRelationFromRelationListField\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:copyFieldData\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/StorageHandler.php - - message: '#^Parameter \#2 \$value2 of method Doctrine\\DBAL\\Platforms\\AbstractPlatform\:\:getBitAndComparisonExpression\(\) expects string, int given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:storeFieldData\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: src/lib/Persistence/Legacy/Content/StorageHandler.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$alwaysAvailable \(bool\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:\$context type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/StorageHandler.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$alwaysAvailable \(bool\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageRegistry\:\:__construct\(\) has parameter \$storageMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/StorageRegistry.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$mainLanguageId \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\:\:apply\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept int\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php - - message: '#^Result of \|\| is always true\.$#' - identifier: booleanOr.alwaysTrue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php - - message: '#^Ternary operator condition is always true\.$#' - identifier: ternary.alwaysTrue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group\:\:\$isSystem \(bool\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 14 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:link\(\) has Ibexa\\Contracts\\Core\\Repository\\Exceptions\\BadStateException in PHPDoc @throws tag but it''s not thrown\.$#' + identifier: throws.unusedType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 14 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadContentTypeList\(\) has parameter \$contentTypeIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:getContentIdsByContentTypeId\(\) has parameter \$contentTypeId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:listReverseRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadGroups\(\) has parameter \$groupIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:load\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @param for parameter \$contentTypeId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadContentInfo\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @param references unknown parameter\: \$fieldDefinitionId$#' + identifier: parameter.notFound + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Handler.php + + - + message: '#^PHPDoc tag @return with type bool is incompatible with native type void\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadContentInfoByLocationId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractFieldFromRow\(\) has parameter \$multilingualData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadContentInfoByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadContentInfoList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractGroupsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadContentList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualData\(\) has parameter \$fieldDefinitionRows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadRelation\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualDataFromRows\(\) has parameter \$mlFieldDefinitionsRows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadReverseRelations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualDataFromRows\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionInfo\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractStorageFieldFromRow\(\) has parameter \$multilingualDataRow with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionInfoList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractStorageFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionedNameData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypeFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionedNameData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionsForUser\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypesFromRows\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:deleteContent\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 2 - path: src/lib/Persistence/Legacy/Content/Handler.php + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\MultilingualStorageFieldDefinition\:\:\$description \(string\) does not accept string\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:deleteTranslationFromContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat1 \(float\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:deleteVersion\(\) should return bool but return statement is missing\.$#' - identifier: return.missing + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat2 \(float\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:loadContentInfoList\(\) has parameter \$contentIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat3 \(float\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:removeRawContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat4 \(float\) does not accept float\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:updatePathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt1 \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Parameter \#1 \$contentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:load\(\) expects int, int\|string given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$mainLanguageId \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt3 \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt4 \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:load\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language but returns object\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:getSearchableFieldMap\(\) should return array\ but returns array\|object\.$#' identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadAll\(\) should return array\ but returns array\\|object\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:load\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadByLanguageCode\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language but returns object\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadAllGroups\(\) should return array\ but returns array\\|object\.$#' identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadByIdentifier\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:storeCache\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadByRemoteId\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypeList\(\) has parameter \$contentTypeIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Parameter \#1 \$languages of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:storeCache\(\) expects array, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypeList\(\) should return array\ but returns array\\.$#' + identifier: return.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:\$innerHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypes\(\) should return array\ but returns array\\|object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/CachingHandler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\:\:loadAllLanguagesData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypesByFieldDefinitionIdentifier\(\) should return array\ but returns array\\|object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Gateway.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroup\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group but returns object\.$#' + identifier: return.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabase\:\:loadAllLanguagesData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroupByIdentifier\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\ExceptionConversion\:\:loadAllLanguagesData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroups\(\) has parameter \$groupIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroups\(\) should return array\ but returns array\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:storeGroupCache\(\) has parameter \$groups with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:storeTypeCache\(\) has parameter \$types with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Handler.php - - - - message: '#^Parameter \#1 \$rows of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\:\:extractLanguagesFromRows\(\) expects array, iterable\\> given\.$#' - identifier: argument.type - count: 4 - path: src/lib/Persistence/Legacy/Content/Language/Handler.php + path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\:\:extractLanguagesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\StorageRegistry\:\:__construct\(\) has parameter \$storages with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/Mapper.php + path: src/lib/Persistence/Legacy/Content/Type/StorageRegistry.php - - message: '#^Call to function is_int\(\) with 2\|int\<4, max\> will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:__construct\(\) has parameter \$id with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:extractLanguageCodesFromMask\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:__construct\(\) has parameter \$parentId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:extractLanguageIdsFromMask\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:\$entries type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:isLanguageAlwaysAvailable\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$id with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Parameter \#1 \$array of function array_keys expects array, iterable\ given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$isAlwaysAvailable with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$isPathIdentificationStringModified with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Language/MaskGenerator.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:create\(\) has parameter \$parentNode with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$name with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getBasicNodeData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$newId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getBasicNodeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$parentId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getChildren\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:archiveUrlAliasesForDeletedTranslations\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getFallbackMainNodeData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:copySubtree\(\) has parameter \$actionMap with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getNodeDataList\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:copySubtree\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:getSubtreeContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getCopiedLocationsMap\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:listTrashed\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getLocationEntryInLanguage\(\) has parameter \$locationEntries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:loadAllLocationsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getLocationEntryInLanguage\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:loadLocationDataByContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getNamesForAllLanguages\(\) has parameter \$contentInfo with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:loadParentLocationsDataForDraftContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getNamesForAllLanguages\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:loadTrashByLocation\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:historizeBeforeSwap\(\) has parameter \$location1Entries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:moveSubtreeNodes\(\) has parameter \$fromPathString with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:historizeBeforeSwap\(\) has parameter \$location2Entries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:moveSubtreeNodes\(\) has parameter \$toPathString with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:insertAliasEntryAsNop\(\) has parameter \$aliasEntry with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 6 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationDeleted\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 12 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationMoved\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:addSort\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) has parameter \$updatePathIdentificationString with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:addSort\(\) has parameter \$sort with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:removeSubtree\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:appendContentItemTranslationsConstraint\(\) has parameter \$translations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:shouldUrlAliasForSecondLocationBePublishedFirst\(\) has parameter \$location1Entries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:create\(\) has parameter \$parentNode with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:shouldUrlAliasForSecondLocationBePublishedFirst\(\) has parameter \$location2Entries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:createNodeQueryBuilder\(\) has parameter \$columns with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$languageCode of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadByLanguageCode\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:createNodeQueryBuilder\(\) has parameter \$translations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$parentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:removeCustomAlias\(\) expects int, string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getBasicNodeData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:\$name \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 3 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getBasicNodeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getChildren\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:extractLanguageCodesFromData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getFallbackMainNodeData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:extractUrlAliasListFromData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getNodeDataList\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:matchTypeAndDestination\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getSubtreeContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathData\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getSubtreeNodesData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:insertLocationIntoContentTree\(\) has parameter \$parentNode with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:listTrashed\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has parameter \$pathElementData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:loadAllLocationsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:loadHiddenSubtreesByPath\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:__construct\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:loadLocationDataByContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:cleanupText\(\) should return string but returns string\|null\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:loadParentLocationsDataForDraftContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:\$configuration type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:loadTrashByLocation\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:find\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:moveSingleSubtreeNode\(\) has parameter \$destinationNodeData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:match\(\) has parameter \$wildcard with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:moveSingleSubtreeNode\(\) has parameter \$sourceNodeData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:substitute\(\) has parameter \$values with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:moveSubtreeNodes\(\) has parameter \$destinationNodeData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Mapper\:\:extractUrlWildcardFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:moveSubtreeNodes\(\) has parameter \$sourceNodeData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Mapper\:\:extractUrlWildcardsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:updatePathIdentificationString\(\) has parameter \$locationId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\DestinationUrl\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/DestinationUrl.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:updatePathIdentificationString\(\) has parameter \$parentLocationId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\SourceUrl\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/SourceUrl.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:updatePathIdentificationString\(\) has parameter \$text with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\Type\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/Type.php - - message: '#^Parameter \#2 \$value2 of method Doctrine\\DBAL\\Platforms\\AbstractPlatform\:\:getBitAndComparisonExpression\(\) expects string, int given\.$#' - identifier: argument.type + message: '#^PHPDoc tag @param references unknown parameter\: \$status$#' + identifier: parameter.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php - - message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\ given\.$#' + message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 8 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\DateMetadataQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 8 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\IsContainerQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/IsContainerQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:create\(\) has parameter \$parentNode with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\ObjectStateIdentifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getBasicNodeData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getBasicNodeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Section\\IdentifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getChildren\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(bool\|float\|int\|string\)\: mixed\)\|null, Closure\(string\)\: array\, int\> given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getFallbackMainNodeData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getNodeDataList\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\DepthQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:getSubtreeContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$criterionValue of method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Doctrine\\FilteringQueryBuilder\:\:buildOperatorBasedCriterionConstraint\(\) expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:listTrashed\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:loadAllLocationsData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\IsMainLocationQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:loadLocationDataByContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\PriorityQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:loadParentLocationsDataForDraftContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$criterionValue of method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Doctrine\\FilteringQueryBuilder\:\:buildOperatorBasedCriterionConstraint\(\) expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:loadTrashByLocation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\SubtreeQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:moveSubtreeNodes\(\) has parameter \$fromPathString with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(bool\|float\|int\|string\)\: mixed\)\|null, Closure\(string\)\: string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:moveSubtreeNodes\(\) has parameter \$toPathString with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:changeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:hide\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:loadSubtreeIds\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:getVisibilityColumnsExpressions\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:move\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 2 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:removeSubtree\(\) should return bool but return statement is missing\.$#' - identifier: return.missing + message: '#^Parameter \#2 \$visibleFlag of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:getVisibilityColumnsExpressions\(\) expects int, bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:setContentStates\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\:\:\$criteria\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:setSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Variable \$criterion in PHPDoc tag @var does not match any variable in the foreach loop\: \$_criterion$#' + identifier: varTag.differentVariable count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:swap\(\) should return bool but return statement is missing\.$#' - identifier: return.missing + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\:\:\$criteria\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:unHide\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Variable \$criterion in PHPDoc tag @var does not match any variable in the foreach loop\: \$_criterion$#' + identifier: varTag.differentVariable count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\MatchAllQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:updateSubtreeSectionIfNecessary\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php - - - - message: '#^Variable \$copiedSubtreeRootLocation might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: src/lib/Persistence/Legacy/Content/Location/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\:\:\$trashed\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\IsUserEnabledQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Mapper.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Mapper.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\GroupQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Mapper.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:getLocationCreateStruct\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\ModifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Mapper.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Trash\\Handler\:\:loadTrashItem\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Trashed but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\OwnerQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php - - message: '#^Parameter \#2 \$prefix of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) expects string, null given\.$#' + message: '#^Parameter \#1 \$value of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\BaseUserCriterionQueryBuilder\:\:transformCriterionValueForLikeExpression\(\) expects string, array\\|bool\|float\|int\|string given\.$#' identifier: argument.type - count: 2 - path: src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php + count: 1 + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php - - message: '#^Call to function is_int\(\) with 2\|int\<4, max\> will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType + message: '#^Parameter \#1 \$value of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\BaseUserCriterionQueryBuilder\:\:transformCriterionValueForLikeExpression\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractContentInfoFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\GatewayDataMapper\:\:mapContentMetadataToPersistenceContentInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\GatewayDataMapper\:\:mapRawDataToPersistenceContentItem\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractFieldValueFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapContentDataToPersistenceContent\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractRelationFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapContentMetadataToPersistenceContentInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractRelationsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapFieldDataToPersistenceFieldList\(\) has parameter \$rawVersionFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractRelationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapFieldValueDataToStorageFieldValue\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractVersionInfoFromRow\(\) has parameter \$names with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapRawDataToPersistenceContentItem\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:extractVersionInfoFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapVersionDataToPersistenceVersionInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept null\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataFloat \(float\) does not accept float\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\VersionInfo\:\:\$contentInfo \(Ibexa\\Contracts\\Core\\Persistence\\Content\\ContentInfo\) does not accept null\.$#' + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept int\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataFloat \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:count\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php + + - + message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:find\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:count\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php + + - + message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:find\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Mapper.php + path: src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateDataForContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateGroupData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateGroupListData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:loadObjectStateListData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' + identifier: varTag.nativeType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway.php + path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\SortClauseVisitor\:\:__construct\(\) has parameter \$sortClauseQueryBuilders with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 5 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Notification\\Notification\:\:\$id \(int\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Mapper\:\:extractNotificationFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Notification/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Mapper\:\:extractNotificationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Notification/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateDataForContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\DatabasePlatform\\SqliteGateway\:\:getColumnNextIntegerValue\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateGroupData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:__construct\(\) has parameter \$gateways with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:\$gateways has unknown class iterable as its type\.$#' + identifier: class.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateGroupListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\AbstractGateway\:\:getAliasedColumns\(\) has parameter \$columns with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Token/AbstractGateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\:\:loadObjectStateListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\AbstractGateway\:\:getAliasedColumns\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Token/AbstractGateway.php - - message: '#^PHPDoc tag @param for parameter \$stateId with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 4 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getTypeById\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 4 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getTypeByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Gateway\:\:getTypeById\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Gateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Gateway\:\:getTypeByIdentifier\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Gateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateDataForContent\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Mapper\:\:mapToken\(\) has parameter \$tokenRow with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Token/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateGroupData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Mapper\:\:mapTokenType\(\) has parameter \$tokenTypeRow with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/Token/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Handler\:\:find\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/URL/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateGroupListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Handler\:\:findUsages\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/URL/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\ExceptionConversion\:\:loadObjectStateListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Mapper\:\:extractURLsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/URL/Mapper.php - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Persistence\\Content\\ObjectState\|false\.$#' - identifier: property.nonObject + message: '#^Parameter \#4 \$condition of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:innerJoin\(\) expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php + path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Handler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php + path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Handler\:\:deleteGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php + path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Handler\:\:setPriority\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Handler.php + path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php + path: src/lib/Persistence/Legacy/User/Gateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateGroupFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php + path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateGroupListFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php + path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:createObjectStateListFromData\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php + path: src/lib/Persistence/Legacy/User/Handler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType + message: '#^Cannot access offset mixed on non\-empty\-array\\>\|Ibexa\\Contracts\\Core\\Persistence\\User\\RoleAssignment\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/Content/ObjectState/Mapper.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\:\:loadAllSectionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapPolicies\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\:\:loadSectionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRole\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\:\:loadSectionDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRoleAssignments\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabase\:\:loadAllSectionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRoles\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabase\:\:loadSectionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapUser\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabase\:\:loadSectionDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapUsers\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\ExceptionConversion\:\:loadAllSectionData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\User\\Role\:\:\$policies \(array\\) does not accept array\\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/User/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\ExceptionConversion\:\:loadSectionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Mapper\:\:extractUserPreferenceFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/UserPreference/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\ExceptionConversion\:\:loadSectionDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Mapper\:\:extractUserPreferencesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php + path: src/lib/Persistence/Legacy/UserPreference/Mapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:assign\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Handler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:createSectionFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Handler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:createSectionsFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transform\(\) has parameter \$ruleNames with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Handler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transform\(\) should return string but returns string\|null\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Section/Handler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:copyLegacyField\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) should return string but returns string\|null\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:__construct\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + message: '#^Parameter \#3 \$subject of function preg_replace_callback expects array\\|string, string\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:copyFieldData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\:\:\$compiledRules type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:deleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\:\:\$ruleFiles type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:storeFieldData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\:\:\$context type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:filterValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageRegistry\:\:__construct\(\) has parameter \$storageMap with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:filterValues\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/StorageRegistry.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\:\:changeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parse\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/TreeHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\:\:removeRawContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parseString\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/TreeHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\:\:removeSubtree\(\) should return bool but return statement is missing\.$#' - identifier: return.missing + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:tokenize\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/TreeHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\:\:setSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$string of function strlen expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/TreeHandler.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Parameter \#1 \$contentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadContentInfo\(\) expects int, int\|string given\.$#' + message: '#^Parameter \#1 \$string of function substr expects string, string\|null given\.$#' identifier: argument.type - count: 1 - path: src/lib/Persistence/Legacy/Content/TreeHandler.php + count: 2 + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\:\:applyUpdates\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parseString\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\:\:apply\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$subject of function preg_match expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddField\:\:apply\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:\$tokenSpecifications type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php + path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compile\(\) has parameter \$ast with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compile\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveField\:\:apply\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileMap\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:getSearchableFieldMapData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileMap\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadAllGroupsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileReplace\(\) has parameter \$rule with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileReplace\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadGroupData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileRule\(\) has parameter \$rule with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileRule\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadTypeData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTranspose\(\) has parameter \$rule with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadTypeDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTranspose\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadTypeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTransposeModulo\(\) has parameter \$rule with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadTypesDataForGroup\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTransposeModulo\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:loadTypesListData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:hexdec\(\) should return int but returns float\|int\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 10 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + message: '#^Parameter \#1 \$charCode of method Ibexa\\Core\\Persistence\\Utf8Converter\:\:toUTF8Character\(\) expects int, float\|int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Doctrine\\DBAL\\Query\\QueryBuilder\:\:execute\(\) invoked with 1 parameter, 0 required\.$#' - identifier: arguments.count + message: '#^Parameter \#1 \$codepoint of function chr expects int, float\|int given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:getSearchableFieldMapData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$hex_string of function hexdec expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadAllGroupsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadGroupData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @param references unknown parameter\: \$installDir$#' + identifier: parameter.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Query\\QueryFactory\:\:create\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Query/QueryFactory.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadTypeData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Query\\QueryFactoryInterface\:\:create\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/Query/QueryFactoryInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadTypeDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractLocationQueryType\:\:resolveLocation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadTypeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:buildFilters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/AbstractQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadTypesDataForGroup\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:doGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/AbstractQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:loadTypesListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/AbstractQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:mapCommonContentTypeColumnsToQueryValuesAndTypes\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AncestorsQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/AncestorsQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:mapCommonFieldDefinitionColumnsToQueryValuesAndTypes\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\ChildrenQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php - - - - message: '#^Parameter \#4 \$condition of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:leftJoin\(\) expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given\.$#' - identifier: argument.type - count: 5 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/ChildrenQueryType.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group\:\:\$isSystem \(bool\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\GeoLocationQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php + path: src/lib/QueryType/BuiltIn/GeoLocationQueryType.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:\$columns type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabase.php - - - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 4 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 4 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SiblingsQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/QueryType/BuiltIn/SiblingsQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:getSearchableFieldMapData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\SyntaxErrorException\:\:fromUnexpectedToken\(\) has parameter \$expectedTypes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadAllGroupsData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\UnsupportedSortClauseException\:\:__construct\(\) has parameter \$code with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParser\\DefaultSortClauseParser\:\:__construct\(\) has parameter \$valueObjectClassMap with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadGroupData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParser\\DefaultSortClauseParser\:\:parse\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadGroupDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParserDispatcher\:\:__construct\(\) has parameter \$parsers with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadTypeData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$token of static method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\SyntaxErrorException\:\:fromUnexpectedToken\(\) expects Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token, Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadTypeDataByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserInterface\:\:parseSortClausesList\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadTypeDataByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SubtreeQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/BuiltIn/SubtreeQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadTypesDataForGroup\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:configureOptions\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/OptionsResolverBasedQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\ExceptionConversion\:\:loadTypesListData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:doGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Gateway/ExceptionConversion.php + path: src/lib/QueryType/OptionsResolverBasedQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:addFieldDefinition\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\FieldDefinition but return statement is missing\.$#' - identifier: return.missing + message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/OptionsResolverBasedQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:deleteGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/OptionsResolverBasedQueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:getSearchableFieldMap\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParameters\(\) has parameter \$queryParameterValue with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:link\(\) has Ibexa\\Contracts\\Core\\Repository\\Exceptions\\BadStateException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadContentTypeList\(\) has parameter \$contentTypeIds with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParametersFromContentView\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:loadGroups\(\) has parameter \$groupIds with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:publish\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryTypeRegistry\:\:addQueryType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryTypeRegistry.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:updateFieldDefinition\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Core\\QueryType\\QueryTypeRegistry\:\:addQueryTypes\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/QueryType/QueryTypeRegistry.php - - message: '#^PHPDoc tag @param for parameter \$contentTypeId with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/Repository/ContentService.php - - message: '#^PHPDoc tag @param references unknown parameter\: \$fieldDefinitionId$#' - identifier: parameter.notFound - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + message: '#^Cannot access property \$defaultValue on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 2 + path: src/lib/Repository/ContentService.php - - message: '#^PHPDoc tag @return with type bool is incompatible with native type void\.$#' - identifier: return.phpDocType + message: '#^Cannot access property \$fieldTypeIdentifier on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 3 + path: src/lib/Repository/ContentService.php + + - + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Handler.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractFieldFromRow\(\) has parameter \$multilingualData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$identifier on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 3 + path: src/lib/Repository/ContentService.php + + - + message: '#^Cannot access property \$isRequired on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractGroupsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$isTranslatable on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 2 + path: src/lib/Repository/ContentService.php + + - + message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) invoked with 6 parameters, 4\-5 required\.$#' + identifier: arguments.count count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualData\(\) has parameter \$fieldDefinitionRows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:copyTranslationsFromPublishedVersion\(\) has parameter \$translations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualDataFromRows\(\) has parameter \$mlFieldDefinitionsRows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractMultilingualDataFromRows\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractStorageFieldFromRow\(\) has parameter \$multilingualDataRow with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentBySPIContentInfo\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractStorageFieldFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalUpdateContent\(\) has parameter \$fieldIdentifiersToValidate with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypeFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:loadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:extractTypesFromRows\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:validate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:toFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\|null if not set the draft is created with the initialLanguage code of the source version or if not present with the main language\.\)\: Unexpected token "if", expected variable at offset 565 on line 9$#' + identifier: phpDoc.parseError count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:toStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + message: '#^PHPDoc tag @var has invalid value \(\$content \\Ibexa\\Core\\Repository\\Values\\Content\\Content\)\: Unexpected token "\$content", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError + count: 2 + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\MultilingualStorageFieldDefinition\:\:\$description \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType + message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat1 \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType + message: '#^PHPDoc tag @var has invalid value \(\$relations \\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation\[\]\)\: Unexpected token "\$relations", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat2 \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\)\: mixed\)\|null, Closure\(Ibexa\\Core\\Repository\\Values\\Content\\Location\)\: int given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat3 \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + message: '#^Parameter \#1 \$locationId of class Ibexa\\Contracts\\Core\\Limitation\\Target\\DestinationLocation constructor expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataFloat4 \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt1 \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + message: '#^Parameter \#5 \$fieldDefinitionId of method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt2 \(int\) does not accept int\|null\.$#' + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$publicationDate \(int\) does not accept int\|null\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt3 \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentCreateStruct\:\:\$modificationDate \(DateTime\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldDefinition\:\:\$dataInt4 \(int\) does not accept int\|null\.$#' + message: '#^Property Ibexa\\Core\\Repository\\ContentService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:getSearchableFieldMap\(\) should return array\ but returns array\|object\.$#' - identifier: return.type + message: '#^Property Ibexa\\Core\\Repository\\ContentService\:\:\$settings type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:load\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' - identifier: return.type + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadAllGroups\(\) should return array\ but returns array\\|object\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Repository\\ContentTypeService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadByIdentifier\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' - identifier: return.type - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Contracts\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError + count: 2 + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadByRemoteId\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type but returns object\.$#' - identifier: return.type - count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException constructor expects array\, array\\> given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypeList\(\) has parameter \$contentTypeIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$descriptions \(array\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypeList\(\) should return array\ but returns array\\.$#' - identifier: return.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$isContainer \(bool\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypes\(\) should return array\ but returns array\\|object\.$#' - identifier: return.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$nameSchema \(string\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadContentTypesByFieldDefinitionIdentifier\(\) should return array\ but returns array\\|object\.$#' - identifier: return.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$urlAliasSchema \(string\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroup\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group but returns object\.$#' - identifier: return.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct\:\:\$descriptions \(array\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroupByIdentifier\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group but returns object\.$#' - identifier: return.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct\:\:\$names \(array\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroups\(\) has parameter \$groupIds with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\ContentTypeService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/ContentTypeService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:loadGroups\(\) should return array\ but returns array\\.$#' - identifier: return.type + message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/Helper/RelationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:storeGroupCache\(\) has parameter \$groups with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) has parameter \$locationIdToContentIdMapping with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/Helper/RelationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\:\:storeTypeCache\(\) has parameter \$types with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) has parameter \$relations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/MemoryCachingHandler.php + path: src/lib/Repository/Helper/RelationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\StorageRegistry\:\:__construct\(\) has parameter \$storages with no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:processFieldRelations\(\) has parameter \$inputRelations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/Type/StorageRegistry.php + path: src/lib/Repository/Helper/RelationProcessor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:__construct\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Core\\Repository\\LanguageService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php + path: src/lib/Repository/LanguageService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:__construct\(\) has parameter \$parentId with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param for parameter \$languageId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php + path: src/lib/Repository/LanguageService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:\$entries type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\LanguageService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/SwappedLocationProperties.php + path: src/lib/Repository/LanguageService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Strict comparison using \!\=\= between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + path: src/lib/Repository/LanguageService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$isAlwaysAvailable with no type specified\.$#' - identifier: missingType.parameter + message: '#^Variable \$location might not be defined\.$#' + identifier: variable.undefined count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + path: src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$isPathIdentificationStringModified with no type specified\.$#' - identifier: missingType.parameter + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList\:\:getContentInfo\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$name with no type specified\.$#' - identifier: missingType.parameter + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList\:\:getLocation\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$newId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + message: '#^Call to function is_int\(\) with int will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\UrlAliasForSwappedLocation\:\:__construct\(\) has parameter \$parentId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:copySubtree\(\) invoked with 3 parameters, 2 required\.$#' + identifier: arguments.count count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/DTO/UrlAliasForSwappedLocation.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:getAllChildrenAliases\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) invoked with 6 parameters, 4\-5 required\.$#' + identifier: arguments.count count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:insertRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\LocationService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:listGlobalEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\LocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadAllLocationEntries\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Repository\\LocationService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadAutogeneratedEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\LocationService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadAutogeneratedEntry\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Strict comparison using \!\=\= between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/LocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadLocationEntries\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$contentId\.$#' + identifier: property.notFound + count: 2 + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadPathData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$contentTypeId\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadPathDataByHierarchy\(\) has parameter \$hierarchyData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadPathDataByHierarchy\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$mainLanguageCode\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadRow\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadUrlAliasData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:updateRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway.php - - - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 5 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 10 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Cannot cast Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string to int\.$#' - identifier: cast.int + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObjectsOnSearchResult\(\) should return array\ but returns list\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:deleteRow\(\) should return int but returns Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:deleteUrlAliasesWithoutLocation\(\) should return int but returns Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocation\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:deleteUrlAliasesWithoutParent\(\) should return int but returns Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:deleteUrlNopAliasesWithoutChildren\(\) should return int but returns Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationDomainObjectsOnSearchResult\(\) should return array\ but returns list\\.$#' identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:filterOriginalAliases\(\) has parameter \$urlAliasesData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$spiLocation of method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationWithContent\(\) expects Ibexa\\Contracts\\Core\\Persistence\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:filterOriginalAliases\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$searchHits \(list\\>\) does not accept array\, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchHit\\>\.$#' + identifier: assign.propertyType + count: 2 + path: src/lib/Repository/Mapper/ContentDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:getAllChildrenAliases\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentLocationMapper\\DecoratedLocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:getUrlAliasesForLocation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject + count: 2 + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:insertRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:cloneField\(\) has parameter \$overrides with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:listGlobalEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldsForCreate\(\) has parameter \$createdFields with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadAllLocationEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadAutogeneratedEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:mapFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadAutogeneratedEntry\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:mapFieldsForUpdate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadLocationEntries\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + message: '#^Parameter \#1 \$string of function md5 expects string, string\|false given\.$#' + identifier: argument.type + count: 4 + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadLocationEntriesMatchingMultipleLanguages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#3 \$fieldDefinition of method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldValueForUpdate\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadPathData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:\$contentLanguageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadPathDataByHierarchy\(\) has parameter \$hierarchyData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:\$descriptions\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadPathDataByHierarchy\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:\$names\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadRow\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentTypeDomainMapper\:\:buildContentTypeDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:loadUrlAliasData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentTypeDomainMapper\:\:buildContentTypeGroupDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase\:\:updateRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Contracts\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError + count: 2 + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Parameter \#2 \$callback of function array_filter expects \(callable\(int\)\: bool\)\|null, Closure\(mixed\)\: int given\.$#' + message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException constructor expects array\, array\ given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php - - message: '#^Variable \$connection in PHPDoc tag @var does not match assigned variable \$query\.$#' - identifier: varTag.differentVariable + message: '#^Argument of an invalid type array\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Mapper/RoleDomainMapper.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 2 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + message: '#^Method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:fillRoleStructWithPolicies\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Repository/Mapper/RoleDomainMapper.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Parameter \#1 \$limitationValues of method Ibexa\\Contracts\\Core\\Limitation\\Type\:\:buildValue\(\) expects array\, array\\|null given\.$#' + identifier: argument.type count: 2 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:getAllChildrenAliases\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/Mapper/RoleDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:insertRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:buildPersistencePolicyObject\(\) expects array\, iterable\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/Mapper/RoleDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:listGlobalEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:extractTokens\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadAllLocationEntries\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:getIdentifiers\(\) should return array\ but returns list\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadAutogeneratedEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:resolveToken\(\) has parameter \$groupLookupTable with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadAutogeneratedEntry\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:resolveToken\(\) has parameter \$titles with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadLocationEntries\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:tokenParts\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadPathData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:tokenParts\(\) should return array but returns list\\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadPathDataByHierarchy\(\) has parameter \$hierarchyData with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NameSchema/NameSchemaService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadPathDataByHierarchy\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$whatIsWrong of class Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException constructor expects string, int given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/NotificationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadRow\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$defaultLanguageCode\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:loadUrlAliasData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$prioritizedLanguages\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\ExceptionConversion\:\:updateRow\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:\$prioritizedLanguages\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:archiveUrlAliasesForDeletedTranslations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:archiveUrlAliasesForDeletedTranslations\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 4 + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:copySubtree\(\) has parameter \$actionMap with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ObjectStateService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:copySubtree\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ObjectStateService\:\:buildDomainObjectStateGroupObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getCopiedLocationsMap\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\ObjectStateService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ObjectStateService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getLocationEntryInLanguage\(\) has parameter \$locationEntries with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:sudo\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/CachedPermissionService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getLocationEntryInLanguage\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Permission\\CachedPermissionService\:\:getPermissionsCriterion\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/CachedPermissionService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getNamesForAllLanguages\(\) has parameter \$contentInfo with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Permission\\CachedPermissionService\:\:sudo\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/CachedPermissionService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getNamesForAllLanguages\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Permission\\LimitationService\:\:__construct\(\) has parameter \$limitationTypes with no value type specified in iterable type Traversable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/LimitationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:historizeBeforeSwap\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Permission\\LimitationService\:\:validateLimitations\(\) should return array\ but returns array\\>\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/LimitationService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:historizeBeforeSwap\(\) has parameter \$location1Entries with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionCriterionResolver\:\:getCriterionForLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionCriterionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:historizeBeforeSwap\(\) has parameter \$location2Entries with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionCriterionResolver\:\:getPermissionsCriterion\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionCriterionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:insertAliasEntryAsNop\(\) has parameter \$aliasEntry with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionCriterionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:internalPublishCustomUrlAliasForLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:__construct\(\) has parameter \$policyMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationCopied\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:isDeniedByRoleLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationDeleted\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:isGrantedByLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationMoved\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:prepareTargetsForType\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:locationSwapped\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:prepareTargetsForType\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) has parameter \$updatePathIdentificationString with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param for parameter \$callback contains unresolvable type\.$#' + identifier: parameter.unresolvableType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:removeSubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @var does not specify variable name\.$#' + identifier: varTag.noVariable count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:repairBrokenUrlAliasesForLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$limitationValues of method Ibexa\\Contracts\\Core\\Limitation\\Type\:\:buildValue\(\) expects array\, array\\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:shouldUrlAliasForSecondLocationBePublishedFirst\(\) has parameter \$location1Entries with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:\$policyMap type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/Permission/PermissionResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:shouldUrlAliasForSecondLocationBePublishedFirst\(\) has parameter \$location2Entries with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:translationRemoved\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Parameter \#1 \$languageCode of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\:\:loadByLanguageCode\(\) expects string, string\|null given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) has parameter \$contentTypeGroupIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Parameter \#1 \$parentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:removeCustomAlias\(\) expects int, string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\DTO\\SwappedLocationProperties\:\:\$name \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 3 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:extractLanguageCodesFromData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:extractUrlAliasListFromData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLanguageProxyList\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:matchTypeAndDestination\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLanguageProxyList\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathData\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLocationProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createUserProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has parameter \$pathElementData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Mapper\:\:normalizePathDataRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) has parameter \$contentTypeGroupIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:__construct\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:cleanupText\(\) should return string but returns string\|null\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:\$configuration type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlAlias/SlugConverter.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\:\:find\(\) has parameter \$sortClauses with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLanguageProxyList\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\:\:loadUrlWildcardBySourceUrl\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLanguageProxyList\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\:\:loadUrlWildcardData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLocationProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\:\:loadUrlWildcardsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createUserProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway.php - - - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php + path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGenerator\:\:createProxy\(\) should return ProxyManager\\Proxy\\VirtualProxyInterface&T but returns ProxyManager\\Proxy\\VirtualProxyInterface\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php + path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabase\:\:find\(\) has parameter \$sortClauses with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGenerator\:\:warmUp\(\) has parameter \$classes with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php + path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabase\:\:loadUrlWildcardBySourceUrl\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Offset ''message'' might not exist on array\{type\: int, message\: string, file\: string, line\: int\}\|null\.$#' + identifier: offsetAccess.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php + path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabase\:\:loadUrlWildcardData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabase\:\:loadUrlWildcardsData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php - - - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php - - - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Parameter \#1 \$callback of function spl_autoload_register expects \(callable\(string\)\: void\)\|null, ProxyManager\\Autoloader\\AutoloaderInterface given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php + path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\ExceptionConversion\:\:find\(\) has parameter \$sortClauses with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Unable to resolve the template type RealObjectType in call to method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\)$#' + identifier: argument.templateType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php + path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\ExceptionConversion\:\:loadUrlWildcardBySourceUrl\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGeneratorInterface\:\:warmUp\(\) has parameter \$classes with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php + path: src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\ExceptionConversion\:\:loadUrlWildcardData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:sudo\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php + path: src/lib/Repository/Repository.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\ExceptionConversion\:\:loadUrlWildcardsData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Repository\:\:__construct\(\) has parameter \$serviceSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php + path: src/lib/Repository/Repository.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:find\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Repository\\Repository\:\:\$proxyDomainMapperFactory \(Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperFactory\) does not accept Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperFactoryInterface\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php + path: src/lib/Repository/Repository.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:match\(\) has parameter \$wildcard with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Repository\:\:\$serviceSettings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php + path: src/lib/Repository/Repository.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:remove\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment\:\:\$id\.$#' + identifier: property.protected count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Handler\:\:substitute\(\) has parameter \$values with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:buildRoleAssignmentsFromPersistence\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Mapper\:\:extractUrlWildcardFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:checkAssignmentAndFilterLimitationValues\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Mapper\:\:extractUrlWildcardsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:checkAssignmentAndFilterLimitationValues\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Mapper.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriteriaConverter\:\:\$handlers \(array\\) does not accept iterable\\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriteriaConverter.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\DestinationUrl\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:getRoleAssignmentsForUser\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/DestinationUrl.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\SourceUrl\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:loadRole\(\) should return Ibexa\\Core\\Repository\\Values\\User\\Role but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/SourceUrl.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Query\\CriterionHandler\\Type\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Content/UrlWildcard/Query/CriterionHandler/Type.php + path: src/lib/Repository/RoleService.php - - message: '#^PHPDoc tag @param references unknown parameter\: \$status$#' - identifier: parameter.notFound + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:validatePolicy\(\) should return iterable\\> but returns array\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Exception/TypeGroupNotFound.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\ContentIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:validateRoleCreateStruct\(\) should return iterable\\>\> but returns array\\>\>\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php + path: src/lib/Repository/RoleService.php - - message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, array\ given\.$#' identifier: argument.type - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ContentIdQueryBuilder.php + count: 2 + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\DateMetadataQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/DateMetadataQueryBuilder.php + message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, iterable\\> given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\IsContainerQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/IsContainerQueryBuilder.php + message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, iterable\\>\> given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\LanguageCodeQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Parameter \#2 \.\.\.\$arrays of function array_diff expects array, array\\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilder.php + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\ObjectStateIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdQueryBuilder.php + message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:buildPersistencePolicyObject\(\) expects array\, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\ObjectStateIdentifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/ObjectStateIdentifierQueryBuilder.php + message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\RoleService\:\:validatePolicy\(\) expects array\, iterable\ given\.$#' + identifier: argument.type + count: 3 + path: src/lib/Repository/RoleService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\RemoteIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/RemoteIdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Section\\IdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findContentInfo\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Section\\IdentifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findLocations\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Section/IdentifierQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\GroupIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findSingle\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/GroupIdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\IdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:internalFindContentInfo\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\IdentifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:suggest\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/IdentifierQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\AncestorQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:validateContentCriteria\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(bool\|float\|int\|string\)\: mixed\)\|null, Closure\(string\)\: array\, int\> given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:validateContentSortClauses\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + message: '#^Parameter \#1 \$spiContentInfo of method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentInfoDomainObject\(\) expects Ibexa\\Contracts\\Core\\Persistence\\Content\\ContentInfo, Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilder.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\DepthQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Parameter \#2 \$criterionValue of method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Doctrine\\FilteringQueryBuilder\:\:buildOperatorBasedCriterionConstraint\(\) expects array, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Core\\Repository\\SearchService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/DepthQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\IdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Property Ibexa\\Core\\Repository\\SearchService\:\:\$settings type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IdQueryBuilder.php + path: src/lib/Repository/SearchService.php - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible + message: '#^Method Ibexa\\Core\\Repository\\SectionService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php + path: src/lib/Repository/SectionService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\IsMainLocationQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Property Ibexa\\Core\\Repository\\SectionService\:\:\$settings type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/IsMainLocationQueryBuilder.php + path: src/lib/Repository/SectionService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\ParentLocationIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SettingService\:\:newSettingCreateStruct\(\) has parameter \$properties with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationIdQueryBuilder.php + path: src/lib/Repository/SettingService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\PriorityQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SettingService\:\:newSettingUpdateStruct\(\) has parameter \$properties with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php + path: src/lib/Repository/SettingService.php - - message: '#^Parameter \#2 \$criterionValue of method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Doctrine\\FilteringQueryBuilder\:\:buildOperatorBasedCriterionConstraint\(\) expects array, array\\|bool\|float\|int\|string given\.$#' + message: '#^Parameter \#3 \$serializedValue of method Ibexa\\Contracts\\Core\\Persistence\\Setting\\Handler\:\:create\(\) expects string, string\|false given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/PriorityQueryBuilder.php + path: src/lib/Repository/SettingService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\RemoteIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Parameter \#3 \$serializedValue of method Ibexa\\Contracts\\Core\\Persistence\\Setting\\Handler\:\:update\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/RemoteIdQueryBuilder.php + path: src/lib/Repository/SettingService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\SubtreeQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\ContentService\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/ContentService.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(bool\|float\|int\|string\)\: mixed\)\|null, Closure\(string\)\: string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\ContentService\:\:validate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/ContentService.php - - message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\AbstractLanguageResolver\:\:getPrioritizedLanguages\(\) has parameter \$forcedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/SubtreeQueryBuilder.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\AbstractLanguageResolver\:\:getPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:getVisibilityColumnsExpressions\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolver\:\:__construct\(\) has parameter \$configLanguages with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php - - message: '#^Parameter \#2 \$visibleFlag of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\VisibilityQueryBuilder\:\:getVisibilityColumnsExpressions\(\) expects int, bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\LocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/VisibilityQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/LocationService.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\:\:\$criteria\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\SearchService\:\:suggest\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/SearchService.php - - message: '#^Variable \$criterion in PHPDoc tag @var does not match any variable in the foreach loop\: \$_criterion$#' - identifier: varTag.differentVariable + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\UserService\:\:createUser\(\) has parameter \$parentGroups with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalAndQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/UserService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\LogicalNotQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\UserService\:\:loadUsersByEmail\(\) should return array\ but returns iterable\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalNotQueryBuilder.php + path: src/lib/Repository/SiteAccessAware/UserService.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\:\:\$criteria\.$#' - identifier: property.notFound + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php - - message: '#^Variable \$criterion in PHPDoc tag @var does not match any variable in the foreach loop\: \$_criterion$#' - identifier: varTag.differentVariable + message: '#^Cannot access an offset on Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOrQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\MatchAllQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\ContentFieldStrategy\:\:setStrategies\(\) has parameter \$thumbnailStrategies with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchAllQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\MatchNoneQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^PHPDoc tag @param for parameter \$thumbnailStrategies with type iterable\&Traversable is incompatible with native type array\.$#' + identifier: parameter.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/MatchNoneQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\IsUserBasedQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\ThumbnailStrategy\:\:hasStrategy\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\FirstMatchingFieldStrategy\:\:getFieldByIdentifier\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserBasedQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\IsUserEnabledQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\FirstMatchingFieldStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\StaticStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/IsUserEnabledQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\GroupQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\ThumbnailChainStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/GroupQueryBuilder.php + path: src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\ModifierQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:__construct\(\) has parameter \$contentValidators with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/ModifierQueryBuilder.php + path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\Metadata\\OwnerQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) has parameter \$fieldErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/Metadata/OwnerQueryBuilder.php + path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\UserEmailQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) has parameter \$foundErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php + path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - message: '#^Parameter \#1 \$value of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\BaseUserCriterionQueryBuilder\:\:transformCriterionValueForLikeExpression\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserEmailQueryBuilder.php + path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\UserIdQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserIdQueryBuilder.php + path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\UserLoginQueryBuilder\:\:buildQueryConstraint\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' + identifier: method.notFound + count: 2 + path: src/lib/Repository/TrashService.php - - message: '#^Parameter \#1 \$value of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\User\\BaseUserCriterionQueryBuilder\:\:transformCriterionValueForLikeExpression\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/User/UserLoginQueryBuilder.php + path: src/lib/Repository/TrashService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionVisitor\:\:__construct\(\) has parameter \$criterionQueryBuilders with no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:buildDomainTrashItems\(\) has parameter \$spiTrashItems with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionVisitor.php + path: src/lib/Repository/TrashService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionVisitor\:\:setCriterionQueryBuilders\(\) has parameter \$criterionQueryBuilders with no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:buildDomainTrashItems\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionVisitor.php + path: src/lib/Repository/TrashService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionVisitor\:\:visitCriteria\(\) should return string but returns string\|null\.$#' - identifier: return.type + message: '#^PHPDoc tag @param for parameter \$trashItemId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionVisitor.php + path: src/lib/Repository/TrashService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Filter\\CriterionVisitor\:\:\$criterionQueryBuilders \(array\\) does not accept iterable\.$#' + message: '#^Property Ibexa\\Core\\Repository\\TrashService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Filter/CriterionVisitor.php + path: src/lib/Repository/TrashService.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + message: '#^Property Ibexa\\Core\\Repository\\TrashService\:\:\$settings type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Repository/TrashService.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + message: '#^Class Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias referenced with incorrect case\: Ibexa\\Contracts\\Core\\Persistence\\Content\\URLAlias\.$#' + identifier: class.nameCase + count: 7 + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:buildQuery\(\) has parameter \$columns with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:choosePrioritizedLanguageCode\(\) has parameter \$entries with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:bulkFetchFieldValues\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:isPathLoadable\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:bulkFetchVersionNames\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:isPathLoadable\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractFieldValues\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:matchLanguageCode\(\) has parameter \$pathElementData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractFieldValues\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:matchPath\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractVersionData\(\) has parameter \$rows with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:reverseLookup\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractVersionData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:sortTranslationsByPrioritizedLanguages\(\) has parameter \$translations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractVersionNames\(\) has parameter \$names with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:sortTranslationsByPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:extractVersionNames\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$custom of method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:listURLAliasesForLocation\(\) expects bool, bool\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLAliasService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:find\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$id\.$#' + identifier: property.protected + count: 6 + path: src/lib/Repository/URLService.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$isValid\.$#' + identifier: property.protected count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Doctrine\\DoctrineGateway\:\:getColumns\(\) return type has no value type specified in iterable type Traversable\.$#' - identifier: missingType.iterableValue + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$lastChecked\.$#' + identifier: property.protected count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLService.php - - message: '#^Parameter \#1 \$firstResult of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:setFirstResult\(\) expects int, null given\.$#' - identifier: argument.type + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#' + identifier: property.protected count: 2 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLService.php - - message: '#^Parameter \#4 \$condition of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:leftJoin\(\) expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Core\\Repository\\URLService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php + path: src/lib/Repository/URLService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\GatewayDataMapper\:\:mapContentMetadataToPersistenceContentInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php + message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 2 + path: src/lib/Repository/URLWildcardService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\GatewayDataMapper\:\:mapRawDataToPersistenceContentItem\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/GatewayDataMapper.php + message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard referenced with incorrect case\: Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\UrlWildcard\.$#' + identifier: class.nameCase + count: 4 + path: src/lib/Repository/URLWildcardService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapContentDataToPersistenceContent\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\URLWildcardService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/URLWildcardService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapContentMetadataToPersistenceContentInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\URLWildcardService\:\:\$settings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/URLWildcardService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapFieldDataToPersistenceFieldList\(\) has parameter \$rawVersionFields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + message: '#^Strict comparison using \!\=\= between int and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 2 + path: src/lib/Repository/URLWildcardService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapFieldValueDataToStorageFieldValue\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#3 \$hashType of method Ibexa\\Contracts\\Core\\Repository\\PasswordHashService\:\:isValidPassword\(\) expects int\|null, string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/User/PasswordValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapRawDataToPersistenceContentItem\(\) has parameter \$row with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Dead catch \- Exception is never thrown in the try block\.$#' + identifier: catch.neverThrown count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/UserPreferenceService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Content\\Mapper\\DoctrineGatewayDataMapper\:\:mapVersionDataToPersistenceVersionInfo\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' + identifier: method.notFound + count: 5 + path: src/lib/Repository/UserService.php + + - + message: '#^Method Ibexa\\Core\\Repository\\UserService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/UserService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataFloat \(float\) does not accept float\|null\.$#' - identifier: assign.propertyType + message: '#^PHPDoc tag @param for parameter \$id with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/UserService.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$dataInt \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Parameter \#1 \$contentType of class Ibexa\\Core\\Base\\Exceptions\\MissingUserFieldTypeException constructor expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Content/Mapper/DoctrineGatewayDataMapper.php + path: src/lib/Repository/UserService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:find\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$contentType of method Ibexa\\Core\\Repository\\UserService\:\:getUserFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Gateway.php + path: src/lib/Repository/UserService.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Parameter \#1 \$identifier of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:loadContentTypeByIdentifier\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 2 - path: src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php + path: src/lib/Repository/UserService.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Location\\Doctrine\\DoctrineGateway\:\:find\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Gateway/Location/Doctrine/DoctrineGateway.php + path: src/lib/Repository/UserService.php - - message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:count\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php - - - - message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:find\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Core\\Repository\\User\\PasswordValidatorInterface\:\:getPasswordInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Handler/ContentFilteringHandler.php - - - - message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:count\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php + path: src/lib/Repository/UserService.php - - message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Gateway\\Gateway\:\:find\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion, Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringCriterion\|null given\.$#' + message: '#^Parameter \#3 \$hashAlgorithm of method Ibexa\\Core\\Repository\\UserService\:\:comparePasswordHashes\(\) expects int, string given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Filter/Handler/LocationFilteringHandler.php + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentMetadataUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct\) in empty\(\) is not falsy\.$#' + identifier: empty.property count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DateModifiedSortClauseQueryBuilder.php + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentUpdateStruct\) in empty\(\) is not falsy\.$#' + identifier: empty.property count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/DatePublishedSortClauseQueryBuilder.php + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentUpdateStruct\) on left side of \?\? is not nullable\.$#' + identifier: nullCoalesce.property count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/IdSortClauseQueryBuilder.php + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType + message: '#^Property Ibexa\\Core\\Repository\\UserService\:\:\$settings type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/NameSortClauseQueryBuilder.php + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType - count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionIdentifierSortClauseQueryBuilder.php + message: '#^Result of \|\| is always true\.$#' + identifier: booleanOr.alwaysTrue + count: 4 + path: src/lib/Repository/UserService.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType + message: '#^Method Ibexa\\Core\\Repository\\Validator\\ContentCreateStructValidator\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Content/SectionNameSortClauseQueryBuilder.php + path: src/lib/Repository/Validator/ContentCreateStructValidator.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause\.$#' - identifier: varTag.nativeType - count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/Location/BaseLocationSortClauseQueryBuilder.php + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject + count: 2 + path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Filter\\SortClauseVisitor\:\:__construct\(\) has parameter \$sortClauseQueryBuilders with no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Validator\\ContentUpdateStructValidator\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php + path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Filter\\SortClauseVisitor\:\:\$sortClauseQueryBuilders \(array\\) does not accept iterable\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Validator\\ContentUpdateStructValidator\:\:\$contentLanguageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/Filter/SortClauseVisitor.php + path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\:\:getNotificationById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Validator\\TargetContentValidator\:\:validate\(\) has parameter \$allowedContentTypes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway.php + path: src/lib/Repository/Validator/TargetContentValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\:\:loadUserNotifications\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Validator\\TargetContentValidatorInterface\:\:validate\(\) has parameter \$allowedContentTypes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Validator/TargetContentValidatorInterface.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabase\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:__construct\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Validator/UserPasswordValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabase\:\:getNotificationById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:createValidationError\(\) has parameter \$values with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Validator/UserPasswordValidator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabase\:\:loadUserNotifications\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:\$constraints type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Validator/UserPasswordValidator.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Notification\\Notification\:\:\$id \(int\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Call to method getValue\(\) on an unknown class eZ\\Publish\\API\\Repository\\Values\\Content\\Field\.$#' + identifier: class.notFound count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/Content/Content.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/Content/Content.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:getField\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null but returns eZ\\Publish\\API\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/Content/Content.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\\ExceptionConversion\:\:getNotificationById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$fieldDefinitionTranslationMap has unknown class eZ\\Publish\\API\\Repository\\Values\\Content\\Field as its type\.$#' + identifier: class.notFound count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/Content/Content.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Gateway\\ExceptionConversion\:\:loadUserNotifications\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/Content/Location.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Mapper\:\:extractNotificationFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Mapper.php + path: src/lib/Repository/Values/Content/Location.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Notification\\Mapper\:\:extractNotificationsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Notification/Mapper.php + path: src/lib/Repository/Values/Content/TrashItem.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\:\:loadSetting\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway.php + path: src/lib/Repository/Values/Content/TrashItem.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\:\:loadSettingById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway.php + path: src/lib/Repository/Values/ContentType/ContentType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\\DoctrineDatabase\:\:loadSetting\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/ContentType/ContentType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\\DoctrineDatabase\:\:loadSettingById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:getName\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway/DoctrineDatabase.php - - - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 5 - path: src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/ContentType/ContentType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\\ExceptionConversion\:\:loadSetting\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\\ExceptionConversion\:\:loadSettingById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Setting/Gateway/ExceptionConversion.php + path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\DatabasePlatform\\SqliteGateway\:\:getColumnNextIntegerValue\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^PHPDoc tag @return with type array\ is incompatible with native type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Persistence/Legacy/SharedGateway/DatabasePlatform/SqliteGateway.php + path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - message: '#^Argument of an invalid type array\\|iterable supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + path: src/lib/Repository/Values/ContentType/ContentTypeGroup.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:__construct\(\) has parameter \$gateways with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup\:\:getName\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + path: src/lib/Repository/Values/ContentType/ContentTypeGroup.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:\$gateways \(array\\|iterable\) does not accept iterable\.$#' - identifier: assign.propertyType + message: '#^Class Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition has PHPDoc tag @property\-read for property \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:\$gateways has unknown class iterable as its type\.$#' - identifier: class.notFound + message: '#^Class Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition has PHPDoc tag @property\-read for property \$validatorConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\AbstractGateway\:\:getAliasedColumns\(\) has parameter \$columns with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Token/AbstractGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\AbstractGateway\:\:getAliasedColumns\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getFieldSettings\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/AbstractGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\Token\\Doctrine\\DoctrineGateway\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getName\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\Token\\Doctrine\\DoctrineGateway\:\:getToken\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\Token\\Doctrine\\DoctrineGateway\:\:getTokenById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:\$fieldSettings type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/Token/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\Token\\Gateway\:\:getToken\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:\$validatorConfiguration type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\Token\\Gateway\:\:getTokenById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\:\:__construct\(\) has parameter \$fieldDefinitions with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/Token/Gateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\:\:map\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getTypeById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\[\]\)\: Unexpected token "\\n ", expected variable at offset 87 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Doctrine\\DoctrineGateway\:\:getTypeByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:fieldSettingsFromHash\(\) has parameter \$fieldSettingsHash with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Doctrine/DoctrineGateway.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Gateway\:\:getTypeById\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:fieldSettingsToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Gateway.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Gateway\\TokenType\\Gateway\:\:getTypeByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:validatorConfigurationFromHash\(\) has parameter \$validatorConfigurationHash with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Gateway/TokenType/Gateway.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Mapper\:\:mapToken\(\) has parameter \$tokenRow with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:validatorConfigurationToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/Token/Mapper.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Token\\Mapper\:\:mapTokenType\(\) has parameter \$tokenTypeRow with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$value of method Ibexa\\Core\\FieldType\\FieldType\:\:validate\(\) expects Ibexa\\Core\\FieldType\\Value, Ibexa\\Contracts\\Core\\FieldType\\Value given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/Token/Mapper.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\:\:beginTransaction\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:\$internalFieldType \(Ibexa\\Core\\FieldType\\FieldType\) does not accept Ibexa\\Contracts\\Core\\FieldType\\FieldType\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/TransactionHandler.php + path: src/lib/Repository/Values/ContentType/FieldType.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\:\:commit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/TransactionHandler.php + path: src/lib/Repository/Values/ObjectState/ObjectState.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\:\:rollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:getName\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/TransactionHandler.php + path: src/lib/Repository/Values/ObjectState/ObjectState.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\:\:\$contentTypeHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/TransactionHandler.php + path: src/lib/Repository/Values/ObjectState/ObjectStateGroup.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:getName\(\) should return string\|null but returns string\|false\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/TransactionHandler.php + path: src/lib/Repository/Values/ObjectState/ObjectStateGroup.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\:\:findUsages\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Repository\\Values\\User\\PolicyDraft\:\:\$draftProperties type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway.php + path: src/lib/Repository/Values/User/PolicyDraft.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\:\:loadUrlData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\RoleDraft\:\:getPolicies\(\) should return iterable\ but returns iterable\\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway.php + path: src/lib/Repository/Values/User/RoleDraft.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\:\:loadUrlDataByUrl\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\User\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway.php + path: src/lib/Repository/Values/User/User.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\:\:updateUrl\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\User\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/User/User.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:findUsages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/User/User.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:getSelectColumns\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/User/UserGroup.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:loadUrlData\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/User/UserGroup.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:loadUrlDataByUrl\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Repository/Values/User/UserGroup.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:updateUrl\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\:\:registerContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabase.php + path: src/lib/Search/Common/BackgroundIndexer.php - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\:\:registerLocation\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php + path: src/lib/Search/Common/BackgroundIndexer.php - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown + message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\\NullIndexer\:\:registerContent\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php + path: src/lib/Search/Common/BackgroundIndexer/NullIndexer.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\ExceptionConversion\:\:findUsages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\\NullIndexer\:\:registerLocation\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php + path: src/lib/Search/Common/BackgroundIndexer/NullIndexer.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\ExceptionConversion\:\:loadUrlData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Event\\AfterEvent\:\:getUser\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php + path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\ExceptionConversion\:\:loadUrlDataByUrl\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameGenerator\:\:__construct\(\) has parameter \$fieldNameMapping with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\ExceptionConversion\:\:updateUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/URL/Gateway/ExceptionConversion.php + path: src/lib/Search/Common/FieldNameGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Handler\:\:find\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Search\\Common\\FieldNameGenerator\:\:\$fieldNameMapping type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Handler.php + path: src/lib/Search/Common/FieldNameGenerator.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Handler\:\:findUsages\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getSearchableFieldMap\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Handler.php + path: src/lib/Search/Common/FieldNameResolver.php - - message: '#^Parameter \#1 \$url of method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\:\:loadUrlDataByUrl\(\) expects int, string given\.$#' + message: '#^Parameter \#1 \$criterionOrSortClause of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects object, null given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/URL/Handler.php + path: src/lib/Search/Common/FieldNameResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Mapper\:\:extractURLsFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/URL/Mapper.php + message: '#^Parameter \#5 \$name of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Search/Common/FieldNameResolver.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\URL\\Query\\CriteriaConverter\:\:addHandler\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$raw\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriteriaConverter.php + path: src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php - - message: '#^Parameter \#4 \$condition of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:innerJoin\(\) expects string\|null, Doctrine\\DBAL\\Query\\Expression\\CompositeExpression given\.$#' - identifier: argument.type + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$raw\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/Base.php + path: src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Core\\Search\\Common\\IncrementalIndexer\:\:purge\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAnd.php + path: src/lib/Search/Common/IncrementalIndexer.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Core\\Search\\Common\\IncrementalIndexer\:\:updateSearchIndex\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNot.php + path: src/lib/Search/Common/IncrementalIndexer.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$criteria\.$#' - identifier: property.notFound + message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\:\:\$comparatorMap type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOr.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$sectionIds\.$#' - identifier: property.notFound + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionId.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion\:\:\$sectionIdentifiers\.$#' - identifier: property.notFound + message: '#^Parameter \#1 \$identifier of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler\:\:loadByIdentifier\(\) expects string, bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/URL/Query/CriterionHandler/SectionIdentifier.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Persistence/Legacy/User/Gateway.php + message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' + identifier: method.nonObject + count: 8 + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:load\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getFieldCondition\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:loadByEmail\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$fieldWhereExpressions with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:loadByLogin\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$fieldsInformation with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\:\:loadUserByToken\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 4 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldEmpty\:\:getFieldsInformation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:load\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldEmpty\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:loadByEmail\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) has parameter \$criterionValue with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:loadByLogin\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) has parameter \$fieldDefinitionIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\:\:loadUserByToken\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForInOperator\(\) has parameter \$criterionValue with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:load\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForInOperator\(\) has parameter \$fieldDefinitionIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:loadByEmail\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:getFieldDefinitionsIds\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:loadByLogin\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\ExceptionConversion\:\:loadUserByToken\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:assignRole\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:createNamedParameter\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:assignRole\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:createNamedParameter\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareParameter\(\) should return array\\|bool\|float\|int\|string but returns array\\|bool\|float\|int\|string\>\.$#' + identifier: return.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:deletePolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:lowerCase\(\) expects string, bool\|float\|int\|string given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:deleteRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareLikeString\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:expireUserToken\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$values of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:getParamArrayType\(\) expects array\, array\\|bool\|float\|int\|string\> given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:publishRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:removeRoleAssignment\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:\$comparatorMap type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:unassignRole\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareLikeString\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php + + - + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:lowerCase\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:updatePolicy\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:__construct\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:updateRole\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:getWordIdSubquery\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Handler\:\:updateUserToken\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:\$configuration type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - message: '#^Parameter \#2 \$limitations of method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:addPolicyLimitations\(\) expects array, array\|string given\.$#' + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Handler.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php - - message: '#^Cannot access offset mixed on non\-empty\-array\\>\|Ibexa\\Contracts\\Core\\Persistence\\User\\RoleAssignment\.$#' - identifier: offsetAccess.nonOffsetAccessible + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapPolicies\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRole\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$languageCodes of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:generateLanguageMaskFromLanguageCodes\(\) expects array\, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRoleAssignments\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapRoles\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapUser\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingConstraints\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Mapper\:\:mapUsers\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingCoordinates\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\User\\Role\:\:\$policies \(array\\) does not accept array\\.$#' - identifier: assign.propertyType + message: '#^Parameter \#3 \$distance of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingConstraints\(\) expects float, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Mapper.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:addPolicyLimitations\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadPoliciesByUserId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) expects string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRole\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot call method getConcatExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleAssignment\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseConverter\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleAssignmentsByGroupId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseConverter\:\:\$sortColumns type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleAssignmentsByRoleId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleAssignmentsByRoleIdWithOffsetAndLimit\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleByIdentifier\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$seed on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Target\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoleDraftByRoleId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\AbstractRandom\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRoles\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\ContentId\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:loadRolesForContentObjects\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\ContentName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 9 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:addPolicyLimitations\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\DateModified\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:fetchUserGroups\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\DatePublished\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadPoliciesByUserId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Factory\\RandomSortClauseHandlerFactory\:\:__construct\(\) has parameter \$randomSortClauseGateways with no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadPolicyLimitationValues\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRole\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleAssignment\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:getFieldCondition\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleAssignmentsByGroupId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:getFieldCondition\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleAssignmentsByRoleId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\MapLocationDistance\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleAssignmentsByRoleIdWithOffsetAndLimit\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\MapLocationDistance\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleByIdentifier\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionIdentifier\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoleDraftByRoleId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionName\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRoles\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:loadRolesForContentObjects\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\ContentTypeName\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php - - - - message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\ given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\:\:\$dbPlatform is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:addPolicyLimitations\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\ContentTypeName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadPoliciesByUserId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\DateTrashed\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRole\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\UserLogin\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleAssignment\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\UserLogin\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleAssignmentsByGroupId\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\FullTextValue\:\:\$transformationRules type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/FullTextValue.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleAssignmentsByRoleId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleAssignmentsByRoleIdWithOffsetAndLimit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$string of function trim expects string, bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleByIdentifier\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoleDraftByRoleId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRoles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\ExceptionConversion\:\:loadRolesForContentObjects\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/Legacy/User/Role/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverter\:\:addHandler\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$languageMask with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationConverter.php + path: src/lib/Search/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverter\:\:toLegacy\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$languageSettings with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationConverter.php + path: src/lib/Search/Legacy/Content/Handler.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverter\:\:toSPI\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$mainLanguageId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationConverter.php + path: src/lib/Search/Legacy/Content/Handler.php - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationHandler\:\:\$connection has no type specified\.$#' - identifier: missingType.property + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\:\:\$sortClauses \(array\\) does not accept null\.$#' + identifier: assign.propertyType count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationHandler.php + path: src/lib/Search/Legacy/Content/Handler.php - - message: '#^Argument of an invalid type array\|string supplied for foreach, only iterables are supported\.$#' + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationHandler\\ObjectStateHandler\:\:getGroupMap\(\) has parameter \$limitIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$string of function trim expects string, bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\LimitationHandler\\ObjectStateHandler\:\:getGroupMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/User/Role/LimitationHandler/ObjectStateHandler.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\:\:getUserPreferenceByUserIdAndName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\:\:loadUserPreferences\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 2 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php + message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabase\:\:getColumns\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabase\:\:getUserPreferenceByUserIdAndName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabase\:\:loadUserPreferences\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php + path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\ExceptionConversion\:\:getUserPreferenceByUserIdAndName\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Depth\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\ExceptionConversion\:\:loadUserPreferences\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Id\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Gateway/ExceptionConversion.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Mapper\:\:extractUserPreferenceFromRow\(\) has parameter \$row with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\IsMainLocation\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Mapper.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\UserPreference\\Mapper\:\:extractUserPreferencesFromRows\(\) has parameter \$rows with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Path\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/Legacy/UserPreference/Mapper.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Priority\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Visibility\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transform\(\) has parameter \$ruleNames with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$splitFlag\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transform\(\) should return string but returns string\|null\.$#' - identifier: return.type + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$transformationRules\.$#' + identifier: property.notFound count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) should return string but returns string\|null\.$#' - identifier: return.type + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:bulkIndex\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - message: '#^Parameter \#3 \$subject of function preg_replace_callback expects array\\|string, string\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Persistence/TransformationProcessor.php + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:index\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\:\:\$compiledRules type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:purgeIndex\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\:\:\$ruleFiles type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:remove\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/TransformationProcessor.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Argument of an invalid type list\\|false supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:buildWordIDArray\(\) has parameter \$indexArrayOnlyWords with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:filterValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:buildWordIDArray\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:filterValues\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:indexWords\(\) has parameter \$indexArray with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parse\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:indexWords\(\) has parameter \$wordIDArray with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parseString\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getContentObjectWords\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:tokenize\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getWordUpdateQuery\(\) has parameter \$wordIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - message: '#^Parameter \#1 \$string of function strlen expects string, string\|null given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getWords\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - message: '#^Parameter \#1 \$string of function substr expects string, string\|null given\.$#' + message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, int given\.$#' identifier: argument.type - count: 2 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + count: 1 + path: src/lib/Token/RandomBytesGenerator.php - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:parseString\(\) expects string, string\|false given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Doctrine\\\\DBAL\\\\Connection'' and Doctrine\\DBAL\\Connection will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php - - message: '#^Parameter \#2 \$subject of function preg_match expects string, string\|null given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:getResolver\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: tests/bundle/Core/ConfigResolverTest.php - - message: '#^Property Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser\:\:\$tokenSpecifications type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\FieldTypeParameterProviderRegistryPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/DefinitionBased/Parser.php + path: tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compile\(\) has parameter \$ast with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Offset 0 might not exist on array\|string\|null\.$#' + identifier: offsetAccess.notFound count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compile\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\QueryTypePassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileMap\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterSearchEngineIndexerPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileMap\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterSearchEnginePassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileReplace\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$commandsToAdd with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileReplace\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$existingOldParameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileRule\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$expectedCommands with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileRule\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Variable \$slugConverter in PHPDoc tag @var does not match assigned variable \$slugConverterRef\.$#' + identifier: varTag.differentVariable count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTranspose\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\TranslationCollectorPassTest\:\:testTranslationCollector\(\) has parameter \$availableTranslations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTranspose\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:hasParameterProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTransposeModulo\(\) has parameter \$rule with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:parameterProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:compileTransposeModulo\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' + identifier: argument.type count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PcreCompiler\:\:hexdec\(\) should return int but returns float\|int\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ConfigResolverTest\:\:parameterProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php - - message: '#^Parameter \#1 \$charCode of method Ibexa\\Core\\Persistence\\Utf8Converter\:\:toUTF8Character\(\) expects int, float\|int given\.$#' + message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' identifier: argument.type - count: 2 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php - - message: '#^Parameter \#1 \$codepoint of function chr expects int, float\|int given\.$#' + message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' identifier: argument.type count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php - - message: '#^Parameter \#1 \$hex_string of function hexdec expects string, string\|null given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\AbstractParserTestCase\:\:assertConfigResolverParameterValue\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased\:\:__construct\(\) has parameter \$ruleFiles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased\:\:getRules\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testSessionSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^PHPDoc tag @param references unknown parameter\: \$installDir$#' - identifier: parameter.notFound + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testSessionSettings\(\) has parameter \$inputParams with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Persistence/TransformationProcessor/PreprocessedBased.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\Utf8Converter\:\:toUnicodeCodepoint\(\) should return int but returns false\.$#' - identifier: return.type - count: 5 - path: src/lib/Persistence/Utf8Converter.php + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\Utf8Converter\:\:toUnicodeCodepoint\(\) should return int but returns int\<0, 2147483647\>\|false\.$#' - identifier: return.type + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:\$minimalConfig has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/Persistence/Utf8Converter.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^Method Ibexa\\Core\\Query\\QueryFactory\:\:create\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:\$minimalConfig is never read, only written\.$#' + identifier: property.onlyWritten count: 1 - path: src/lib/Query/QueryFactory.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - message: '#^Method Ibexa\\Core\\Query\\QueryFactoryInterface\:\:create\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Query/QueryFactoryInterface.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\ArrayQueryTypeRegistry\:\:addQueryType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testContentSettings\(\) has parameter \$config with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/ArrayQueryTypeRegistry.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\ArrayQueryTypeRegistry\:\:addQueryTypes\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testContentSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/ArrayQueryTypeRegistry.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractLocationQueryType\:\:resolveLocation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/AbstractLocationQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:buildFilters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:imageAssetSettingsProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/AbstractQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:doGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testImageAssetSettings\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/AbstractQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AbstractQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testImageAssetSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/AbstractQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\AncestorsQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/AncestorsQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\ChildrenQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/ChildrenQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\GeoLocationQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:\$minimalConfig has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/QueryType/BuiltIn/GeoLocationQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:\$minimalConfig is never read, only written\.$#' + identifier: property.onlyWritten count: 1 - path: src/lib/QueryType/BuiltIn/RelatedToContentQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SiblingsQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SiblingsQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\SyntaxErrorException\:\:fromUnexpectedToken\(\) has parameter \$expectedTypes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/Exception/SyntaxErrorException.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\UnsupportedSortClauseException\:\:__construct\(\) has parameter \$code with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:\$config has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/Exception/UnsupportedSortClauseException.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParser\\DefaultSortClauseParser\:\:__construct\(\) has parameter \$valueObjectClassMap with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParser\\DefaultSortClauseParser\:\:parse\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause but returns object\.$#' - identifier: return.type + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParser/DefaultSortClauseParser.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParserDispatcher\:\:__construct\(\) has parameter \$parsers with no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldDefinitionSettingsTemplates\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Property Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortClauseParserDispatcher\:\:\$parsers \(array\\) does not accept iterable\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldDefinitionSettingsTemplates\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortClauseParserDispatcher.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexer\:\:consume\(\) should return Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token but returns Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token\|null\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldTemplates\(\) has parameter \$config with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexer\:\:getAll\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldTemplates\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexer\:\:split\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexer\:\:split\(\) should return array but returns list\\|string\>\>\|false\.$#' - identifier: return.type + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Offset 0 on non\-empty\-list\ on left side of \?\? always exists and is not nullable\.$#' - identifier: nullCoalesce.offset + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:\$config has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecLexer.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - message: '#^Parameter \#2 \$token of static method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Exception\\SyntaxErrorException\:\:fromUnexpectedToken\(\) expects Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token, Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\Token\|null given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserInterface\:\:parseSortClausesList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParserInterface.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\BuiltIn\\SubtreeQueryType\:\:getQueryFilter\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:\$config has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/QueryType/BuiltIn/SubtreeQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:configureOptions\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$mapper of method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfig\(\) expects \(callable\(\)\: mixed\)\|Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationMapperInterface, stdClass given\.$#' + identifier: argument.type count: 1 - path: src/lib/QueryType/OptionsResolverBasedQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:doGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$config with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/OptionsResolverBasedQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$customSANodeKey with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/QueryType/OptionsResolverBasedQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\OptionsResolverBasedQueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$defaultValue with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/OptionsResolverBasedQueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParameters\(\) has parameter \$queryParameterValue with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$expected with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParameters\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$globalValue with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryParameterContentViewQueryTypeMapper\:\:extractParametersFromContentView\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$groups with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryParameterContentViewQueryTypeMapper.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$options with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$siteaccess with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$availableSAs type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$availableSiteAccessGroups type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryType.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryTypeRegistry\:\:addQueryType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$groupsBySA type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryTypeRegistry.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - message: '#^Method Ibexa\\Core\\QueryType\\QueryTypeRegistry\:\:addQueryTypes\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testParseDynamicSetting\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/QueryType/QueryTypeRegistry.php + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct supplied for foreach, only iterables are supported\.$#' + message: '#^Argument of an invalid type array\|bool\|float\|int\|string\|null supplied for foreach, only iterables are supported\.$#' identifier: foreach.nonIterable count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:getQueryPermissionsCriterion\(\)\.$#' - identifier: method.notFound - count: 2 - path: src/lib/Repository/ContentService.php + message: '#^Call to function is_bool\(\) with bool will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$defaultValue on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 2 - path: src/lib/Repository/ContentService.php + message: '#^Generator expects value type array\{bool, array\{string\}\}, array\{false, false\} given\.$#' + identifier: generator.valueType + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$fieldTypeIdentifier on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 3 - path: src/lib/Repository/ContentService.php + message: '#^Generator expects value type array\{bool, array\{string\}\}, array\{true, true\} given\.$#' + identifier: generator.valueType + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:getFilteringQueryBuilderData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$identifier on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 3 - path: src/lib/Repository/ContentService.php + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testCacheConfiguration\(\) has parameter \$customCacheConfig with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$isRequired on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject + message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Cannot access property \$isTranslatable on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 2 - path: src/lib/Repository/ContentService.php + message: '#^Parameter \#1 \$value of function count expects array\|Countable, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) invoked with 6 parameters, 4\-5 required\.$#' - identifier: arguments.count - count: 1 - path: src/lib/Repository/ContentService.php + message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) expects array\|ArrayAccess, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertContains\(\) expects iterable, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:copyTranslationsFromPublishedVersion\(\) has parameter \$translations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge_recursive expects array, array\|bool\|float\|int\|string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$minimalConfig has no type specified\.$#' + identifier: missingType.property count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$minimalConfig is never read, only written\.$#' + identifier: property.onlyWritten count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalLoadContentBySPIContentInfo\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:policiesConfigProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:internalUpdateContent\(\) has parameter \$fieldIdentifiersToValidate with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$configOne with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:loadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$configTwo with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$expectedConfig with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:validate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\|null if not set the draft is created with the initialLanguage code of the source version or if not present with the main language\.\)\: Unexpected token "if", expected variable at offset 565 on line 9$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getQuery\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query but return statement is missing\.$#' + identifier: return.missing count: 1 - path: src/lib/Repository/ContentService.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$content \\Ibexa\\Core\\Repository\\Values\\Content\\Content\)\: Unexpected token "\$content", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 2 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - message: '#^PHPDoc tag @var has invalid value \(\$relations \\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation\[\]\)\: Unexpected token "\$relations", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getSupportedParameters\(\) should return array but return statement is missing\.$#' + identifier: return.missing count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - message: '#^Parameter \#1 \$callback of function array_map expects \(callable\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\)\: mixed\)\|null, Closure\(Ibexa\\Core\\Repository\\Values\\Content\\Location\)\: int given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubPolicyProvider\:\:__construct\(\) has parameter \$policies with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php - - - - message: '#^Parameter \#1 \$locationId of class Ibexa\\Contracts\\Core\\Limitation\\Target\\DestinationLocation constructor expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php - - message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubPolicyProvider\:\:\$policies type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php - - message: '#^Parameter \#5 \$fieldDefinitionId of method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) expects string, int given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Repository/ContentService.php + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:__construct\(\) has parameter \$files with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$publicationDate \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:getFiles\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentCreateStruct\:\:\$modificationDate \(DateTime\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:\$files type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - message: '#^Property Ibexa\\Core\\Repository\\ContentService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackwardCompatibleCommandListenerTest\:\:createBackwardCompatibleCommand\(\) has parameter \$aliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - message: '#^Property Ibexa\\Core\\Repository\\ContentService\:\:\$settings type has no value type specified in iterable type array\.$#' + message: '#^Method Symfony\\Component\\Console\\Command\\Command@anonymous/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest\.php\:116\:\:__construct\(\) has parameter \$deprecatedAliases with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentService.php + path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType + message: '#^PHPDoc tag @return with type Ibexa\\Bundle\\Core\\Command\\BackwardCompatibleCommand\|Symfony\\Component\\Console\\Command\\Command is not subtype of native type Symfony\\Component\\Console\\Command\\Command\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ContentTypeService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$string of function trim expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Contracts\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Call to an undefined method Exception\:\:setMessageTemplate\(\)\.$#' + identifier: method.notFound count: 2 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException constructor expects array\, array\\> given\.$#' - identifier: argument.type + message: '#^Call to an undefined method Exception\:\:setParameters\(\)\.$#' + identifier: method.notFound count: 2 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$descriptions \(array\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^PHPDoc tag @param for parameter \$exception with type Exception\|Ibexa\\Core\\Base\\Translatable is not subtype of native type Exception\.$#' + identifier: parameter.phpDocType + count: 2 + path: tests/bundle/Core/EventListener/ExceptionListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:onKernelRequestProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$isContainer \(bool\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:testOnKernelRequest\(\) has parameter \$configuredLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$nameSchema \(string\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:testOnKernelRequest\(\) has parameter \$convertedLocalesValueMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct\:\:\$urlAliasSchema \(string\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RejectExplicitFrontControllerRequestsListenerTest\:\:prohibitedRequestDataProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct\:\:\$descriptions \(array\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RejectExplicitFrontControllerRequestsListenerTest\:\:validRequestDataProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct\:\:\$names \(array\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SessionSetDynamicNameListenerTest\:\:testOnSiteAccessMatch\(\) has parameter \$expectedSessionStorageOptions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php - - message: '#^Property Ibexa\\Core\\Repository\\ContentTypeService\:\:\$settings type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has parameter \$expectedVPArray with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ContentTypeService.php + path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' - identifier: method.nonObject + message: '#^Parameter \#2 \$offset of function substr expects int, int\<1, max\>\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\FooServiceInterface\:\:someMethod\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php - - message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) has parameter \$locationIdToContentIdMapping with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\FooServiceInterface\:\:someMethod\(\) has parameter \$arg with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php - - message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) has parameter \$relations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContent\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:processFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContent\(\) should return string but return statement is missing\.$#' + identifier: return.missing count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^Method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:processFieldRelations\(\) has parameter \$inputRelations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContentView\(\) has parameter \$defaultParams with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Helper/RelationProcessor.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^Method Ibexa\\Core\\Repository\\LanguageService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContentView\(\) should return string but return statement is missing\.$#' + identifier: return.missing + count: 1 + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderLocation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LanguageService.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^PHPDoc tag @param for parameter \$languageId with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderLocation\(\) should return string but return statement is missing\.$#' + identifier: return.missing count: 1 - path: src/lib/Repository/LanguageService.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^Property Ibexa\\Core\\Repository\\LanguageService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:setSiteAccess\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/LanguageService.php + path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - message: '#^Strict comparison using \!\=\= between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language and null will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewProvider\:\:getView\(\) should return Ibexa\\Core\\MVC\\Symfony\\View\\View but return statement is missing\.$#' + identifier: return.missing count: 1 - path: src/lib/Repository/LanguageService.php + path: tests/bundle/Core/EventListener/Stubs/ViewProvider.php - - message: '#^Variable \$location might not be defined\.$#' - identifier: variable.undefined + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewProvider\:\:setSiteAccess\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/LocationResolver/PermissionAwareLocationResolver.php + path: tests/bundle/Core/EventListener/Stubs/ViewProvider.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList\:\:getContentInfo\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:getTrustedHeaderEventSubscriberTestData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList\:\:getLocation\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:testTrustedHeaderEventSubscriberWithTrustedProxy\(\) has parameter \$headers with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - message: '#^Call to function is_int\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 2 - path: src/lib/Repository/LocationService.php + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:testTrustedHeaderEventSubscriberWithTrustedProxy\(\) has parameter \$server with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:copySubtree\(\) invoked with 3 parameters, 2 required\.$#' - identifier: arguments.count + message: '#^Binary operation "\." between ''rendered_'' and \(Closure\(array\\)\: string\)\|string results in an error\.$#' + identifier: binaryOp.invalid count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Fragment/DirectFragmentRendererTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) invoked with 6 parameters, 4\-5 required\.$#' - identifier: arguments.count + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpFoundation\\\\Response'' and Symfony\\Component\\HttpFoundation\\Response will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Fragment/DirectFragmentRendererTest.php - - message: '#^Method Ibexa\\Core\\Repository\\LocationService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:supportsValueProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\LocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - message: '#^Property Ibexa\\Core\\Repository\\LocationService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php - - message: '#^Property Ibexa\\Core\\Repository\\LocationService\:\:\$settings type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php - - message: '#^Strict comparison using \!\=\= between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location and null will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/LocationService.php + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$contentId\.$#' - identifier: property.notFound - count: 2 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$contentTypeId\.$#' - identifier: property.notFound + message: '#^Method PHPUnit\\Framework\\TestCase\:\:createMock\(\) invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$mainLanguageCode\.$#' - identifier: property.notFound + message: '#^Method PHPUnit\\Framework\\TestCase\:\:createMock\(\) invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php - - message: '#^Cannot call method error\(\) on Psr\\Log\\LoggerInterface\|null\.$#' - identifier: method.nonObject + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:getVariationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:supportsValueProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalFound\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentDomainObjectsOnSearchResult\(\) should return array\ but returns list\\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalNotFound\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocation\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationSkipsPlaceholderGeneration\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationDomainObject\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertColorEquals\(\) has parameter \$expected with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertSizeEquals\(\) has parameter \$expected with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationDomainObjectsOnSearchResult\(\) should return array\ but returns list\\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:testGetPlaceholder\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildVersionInfoDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:createPurger\(\) has parameter \$fileList with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:validateTranslatedList\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileListTest\:\:configureRowReaderMock\(\) has parameter \$fileList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php - - message: '#^Parameter \#1 \$spiLocation of method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildLocationWithContent\(\) expects Ibexa\\Contracts\\Core\\Persistence\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + message: '#^Cannot access offset ''path'' on array\{scheme\?\: string, host\?\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\|false\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: tests/bundle/Core/Routing/DefaultRouterTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$searchHits \(list\\>\) does not accept array\, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchHit\\>\.$#' - identifier: assign.propertyType + message: '#^Offset ''scheme'' might not exist on array\{scheme\?\: string, host\: string, port\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\.$#' + identifier: offsetAccess.notFound + count: 4 + path: tests/bundle/Core/Routing/DefaultRouterTest.php + + - + message: '#^Offset ''scheme'' might not exist on array\{scheme\?\: string, host\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\.$#' + identifier: offsetAccess.notFound count: 2 - path: src/lib/Repository/Mapper/ContentDomainMapper.php + path: tests/bundle/Core/Routing/DefaultRouterTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentLocationMapper\\DecoratedLocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' + message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/Routing/DefaultRouterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\JsRouting\\ExposedRoutesExtractorTest\:\:getDataForTestGetBaseUrl\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationService.php + path: tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 2 - path: src/lib/Repository/Mapper/ContentMapper.php + message: '#^Call to an undefined method Ibexa\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouter\:\:setConfigResolver\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:cloneField\(\) has parameter \$overrides with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:resetConfigResolver\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldsForCreate\(\) has parameter \$createdFields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$matchers of class Ibexa\\Bundle\\Core\\SiteAccess\\SiteAccessMatcherRegistry constructor expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:configureUrlHandlerRegistry\(\) has parameter \$schemes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:mapFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) has parameter \$schemes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:mapFieldsForUpdate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createSearchResults\(\) has parameter \$urls with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - message: '#^Parameter \#1 \$string of function md5 expects string, string\|false given\.$#' + message: '#^Argument of an invalid type PHPUnit\\Framework\\MockObject\\MockObject supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php + + - + message: '#^PHPDoc tag @var above foreach loop does not specify variable name\.$#' + identifier: varTag.noVariable + count: 1 + path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php + + - + message: '#^Parameter \#1 \$metadataHandlerFactories of class Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass constructor expects ArrayObject\, ArrayObject\ given\.$#' identifier: argument.type - count: 4 - path: src/lib/Repository/Mapper/ContentMapper.php + count: 1 + path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - message: '#^Parameter \#3 \$fieldDefinition of method Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:getFieldValueForUpdate\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + message: '#^Parameter \#2 \$binaryDataHandlerFactories of class Ibexa\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPass constructor expects ArrayObject\, ArrayObject\ given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Mapper\\ContentMapper\:\:\$contentLanguageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType + message: '#^Call to an undefined method object\:\:decorate\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Repository/Mapper/ContentMapper.php + path: tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:\$descriptions\.$#' - identifier: property.notFound + message: '#^PHPDoc tag @return with type object is not subtype of native type Doctrine\\DBAL\\Connection\.$#' + identifier: return.phpDocType count: 1 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + path: tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:\$names\.$#' - identifier: property.notFound + message: '#^Call to an undefined method object\:\:match\(\)\.$#' + identifier: method.notFound count: 1 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + path: tests/integration/Core/BasicKernelTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentTypeDomainMapper\:\:buildContentTypeDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\BinaryBase\\BinaryBaseStorage\\BinaryBaseStorageTest\:\:getContext\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + path: tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\ContentTypeDomainMapper\:\:buildContentTypeGroupDomainObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\BinaryBase\\BinaryBaseStorage\\BinaryBaseStorageTest\:\:providerOfFieldData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + path: tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$fieldType \\Ibexa\\Contracts\\Core\\FieldType\\FieldType\)\: Unexpected token "\$fieldType", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 2 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 4 + path: tests/integration/Core/FieldType/FieldConstraintsStorage/FieldConstraintsStorageTest.php - - message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\ContentTypeFieldDefinitionValidationException constructor expects array\, array\ given\.$#' + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + path: tests/integration/Core/FieldType/FieldConstraintsStorage/FieldConstraintsStorageTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Mapper\\ProxyAwareDomainMapper\:\:\$proxyFactory \(Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\) does not accept Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\FieldType\\FieldConstraintsStorage\\Stub\\ExampleFieldConstraintsStorage\:\:__construct\(\) has parameter \$fieldConstraints with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Mapper/ProxyAwareDomainMapper.php + path: tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldConstraintsStorage.php - - message: '#^Argument of an invalid type array\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Persistence\\Content\\FieldTypeConstraints\[\]\)\: Unexpected token "\\n ", expected variable at offset 82 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: src/lib/Repository/Mapper/RoleDomainMapper.php + path: tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldConstraintsStorage.php - - message: '#^Method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:fillRoleStructWithPolicies\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\IO\\BinarydataHandler\\FlysystemTest\:\:getBinaryDataHandler\(\) should return Ibexa\\Core\\IO\\IOBinarydataHandler but returns object\.$#' + identifier: return.type count: 1 - path: src/lib/Repository/Mapper/RoleDomainMapper.php + path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - message: '#^Parameter \#1 \$limitationValues of method Ibexa\\Contracts\\Core\\Limitation\\Type\:\:buildValue\(\) expects array\, array\\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Repository/Mapper/RoleDomainMapper.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\IO\\BinarydataHandler\\FlysystemTest\:\:getFlysystemFilesystem\(\) should return League\\Flysystem\\FilesystemOperator but returns object\.$#' + identifier: return.type + count: 1 + path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:buildPersistencePolicyObject\(\) expects array\, iterable\ given\.$#' + message: '#^Parameter \#1 \$inputStream of method Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:setInputStream\(\) expects resource, resource\|false given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/Mapper/RoleDomainMapper.php + path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:extractTokens\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$stream of function fclose expects resource, resource\|false given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:getIdentifiers\(\) should return array\ but returns list\\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\MemberOfLimitationTest\:\:testCanUserAssignRoleToUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/MemberOfLimitationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:resolveToken\(\) has parameter \$groupLookupTable with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\MemberOfLimitationTest\:\:userPermissionLimitationProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/MemberOfLimitationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:resolveToken\(\) has parameter \$titles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserCreateContent\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:tokenParts\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserDeleteContent\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:tokenParts\(\) should return array but returns list\\|false\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserDeleteContentTranslation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Property Ibexa\\Core\\Repository\\NameSchema\\NameSchemaService\:\:\$settings type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserEditOrPublishContent\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NameSchema/NameSchemaService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Parameter \#2 \$whatIsWrong of class Ibexa\\Core\\Base\\Exceptions\\InvalidArgumentException constructor expects string, int given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserCreateContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/NotificationService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$defaultLanguageCode\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserEditContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ObjectStateService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$prioritizedLanguages\.$#' - identifier: property.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserPublishContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ObjectStateService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:\$prioritizedLanguages\.$#' - identifier: property.notFound + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ObjectStateService.php - - - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 2 - path: src/lib/Repository/ObjectStateService.php - - - - message: '#^Call to function is_string\(\) with string will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 4 - path: src/lib/Repository/ObjectStateService.php + path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ObjectStateService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\RoleLimitationTest\:\:testCanUserAssignRole\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ObjectStateService.php + path: tests/integration/Core/Limitation/RoleLimitationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ObjectStateService\:\:buildDomainObjectStateGroupObject\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\RoleLimitationTest\:\:userPermissionLimitationProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ObjectStateService.php + path: tests/integration/Core/Limitation/RoleLimitationTest.php - - message: '#^Property Ibexa\\Core\\Repository\\ObjectStateService\:\:\$settings type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Search\\Content\\IndexerGatewayTest\:\:getDataForContentInSubtree\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ObjectStateService.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:sudo\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/lib/Repository/Permission/CachedPermissionService.php + path: tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\CachedPermissionService\:\:getPermissionsCriterion\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Search\\Content\\IndexerGatewayTest\:\:getDataForContentSince\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/CachedPermissionService.php + path: tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\CachedPermissionService\:\:sudo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Variation\\InMemoryVariationHandler\:\:getVariation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/CachedPermissionService.php + path: tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\LimitationService\:\:__construct\(\) has parameter \$limitationTypes with no value type specified in iterable type Traversable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraft\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/LimitationService.php + path: tests/integration/Core/Repository/BaseContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\LimitationService\:\:validateLimitations\(\) should return array\ but returns array\\>\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraftVersion1\(\) has parameter \$locationId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Permission/LimitationService.php + path: tests/integration/Core/Repository/BaseContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionCriterionResolver\:\:getCriterionForLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createMultilingualContentDraft\(\) has parameter \$multilingualFieldValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/PermissionCriterionResolver.php + path: tests/integration/Core/Repository/BaseContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionCriterionResolver\:\:getPermissionsCriterion\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createUpdatedDraftVersion2NotAdmin\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/PermissionCriterionResolver.php + path: tests/integration/Core/Repository/BaseContentServiceTest.php - - message: '#^PHPDoc tag @var does not specify variable name\.$#' - identifier: varTag.noVariable + message: '#^Parameter \#1 \$id of method Ibexa\\Contracts\\Core\\Repository\\UserService\:\:loadUserGroup\(\) expects int, string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/Permission/PermissionCriterionResolver.php + path: tests/integration/Core/Repository/BaseContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:__construct\(\) has parameter \$policyMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createMultilingualTestContent\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:isDeniedByRoleLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createTestContent\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:isGrantedByLimitation\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createTestContentForUpdate\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:prepareTargetsForType\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:prepareTargetsForType\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^PHPDoc tag @param for parameter \$callback contains unresolvable type\.$#' - identifier: parameter.unresolvableType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - message: '#^PHPDoc tag @var does not specify variable name\.$#' - identifier: varTag.noVariable + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseTest.php - - message: '#^Parameter \#1 \$limitationValues of method Ibexa\\Contracts\\Core\\Limitation\\Type\:\:buildValue\(\) expects array\, array\\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#' + identifier: property.protected + count: 5 + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:\$currentUserRef \(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserReference\) in empty\(\) is not falsy\.$#' - identifier: empty.property + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\SearchResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Permission\\PermissionResolver\:\:\$policyMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Permission/PermissionResolver.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has parameter \$ignoreOrder with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) has parameter \$contentTypeGroupIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertUsagesSearchResultItems\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertUsagesSearchResultItems\(\) has parameter \$expectedContentInfoIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeGroupProxyList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:doTestFindUrls\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createContentTypeProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:doTestFindUrls\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BaseURLServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLanguageProxyList\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Bookmark\\\\BookmarkList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Bookmark\\BookmarkList will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/BookmarkServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLanguageProxyList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Variable \$definition might not be defined\.$#' + identifier: variable.undefined count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createLocationProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot call method getValue\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentService/CopyNonTranslatableFieldsFromPublishedVersionTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:createUserProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentService/VersionValidatorTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' identifier: argument.type - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + count: 2 + path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Language'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Section'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\User'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type + message: '#^Cannot access property \$sortField on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \$initializer of method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\) expects Closure\(Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\|null\=, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User&ProxyManager\\Proxy\\ValueHolderInterface\&ProxyManager\\Proxy\\VirtualProxyInterface\=, string\=, array\\=, Closure\|null\=\)\: bool, Closure\(mixed, ProxyManager\\Proxy\\LazyLoadingInterface, mixed, array, mixed\)\: true given\.$#' - identifier: argument.type + message: '#^Cannot access property \$sortOrder on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:\$proxyGenerator \(ProxyManager\\Factory\\LazyLoadingValueHolderFactory\) does not accept Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGeneratorInterface\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + message: '#^Cannot access property \$sourceContentInfo on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation\|null\.$#' + identifier: property.nonObject + count: 9 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) has parameter \$actualAliases with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) has parameter \$expectedAliasProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) has parameter \$contentTypeGroupIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertExpectedRelations\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:contentRemoteIdVersionLanguageProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeGroupProxyList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:createUserWithVersionReadLimitations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createContentTypeProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:filterHiddenLocations\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLanguageProxyList\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:getExpectedMediaContentInfoProperties\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLanguageProxyList\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createLocationProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:providerForDeleteTranslationFromDraftRemovesUrlAliasOnPublishing\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\:\:createUserProxy\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterCreatesExpectedLocation\(\) has parameter \$testData with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyDomainMapperInterface.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGenerator\:\:createProxy\(\) should return ProxyManager\\Proxy\\VirtualProxyInterface&T but returns ProxyManager\\Proxy\\VirtualProxyInterface\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGenerator.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGenerator\:\:warmUp\(\) has parameter \$classes with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfo\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGenerator.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Offset ''message'' might not exist on array\{type\: int, message\: string, file\: string, line\: int\}\|null\.$#' - identifier: offsetAccess.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoByRemoteId\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGenerator.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#1 \$callback of function spl_autoload_register expects \(callable\(string\)\: void\)\|null, ProxyManager\\Autoloader\\AutoloaderInterface given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentWithPrioritizedLanguages\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGenerator.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Unable to resolve the template type RealObjectType in call to method ProxyManager\\Factory\\LazyLoadingValueHolderFactory\:\:createProxy\(\)$#' - identifier: argument.templateType - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGenerator.php - - - - message: '#^Method Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGeneratorInterface\:\:warmUp\(\) has parameter \$classes with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/ProxyFactory/ProxyGeneratorInterface.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:sudo\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/lib/Repository/Repository.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Repository\:\:__construct\(\) has parameter \$serviceSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Repository.php - - - - message: '#^Parameter \#5 \$backgroundIndexer of class Ibexa\\Core\\Repository\\SearchService constructor expects Ibexa\\Core\\Search\\Common\\BackgroundIndexer, Ibexa\\Core\\Search\\Common\\BackgroundIndexer\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/Repository.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Repository\:\:\$proxyDomainMapperFactory \(Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperFactory\) does not accept Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperFactoryInterface\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/Repository.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Repository\:\:\$serviceSettings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Repository.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment\:\:\$id\.$#' - identifier: property.protected - count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:buildRoleAssignmentsFromPersistence\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoById\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/RoleService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:checkAssignmentAndFilterLimitationValues\(\) has parameter \$limitation with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInfo\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/RoleService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:checkAssignmentAndFilterLimitationValues\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionCreatesLocationsDefinedOnCreate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/RoleService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:getRoleAssignmentsForUser\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^PHPDoc tag @var for variable \$field has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:loadRole\(\) should return Ibexa\\Core\\Repository\\Values\\User\\Role but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:loadRoleAssignment\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment\|Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserRoleAssignment\|null\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:validatePolicy\(\) should return iterable\\> but returns array\\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/RoleService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:validateRoleCreateStruct\(\) should return iterable\\>\> but returns array\\>\>\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/RoleService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, array\ given\.$#' + message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAllFieldsEquals\(\) expects array\, iterable\ given\.$#' identifier: argument.type - count: 2 - path: src/lib/Repository/RoleService.php + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, iterable\\> given\.$#' + message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertLocaleFieldsEquals\(\) expects array\, iterable\ given\.$#' identifier: argument.type count: 2 - path: src/lib/Repository/RoleService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#1 \$errors of class Ibexa\\Core\\Base\\Exceptions\\LimitationValidationException constructor expects array\, iterable\\>\> given\.$#' + message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:normalizeFields\(\) expects array\, iterable\ given\.$#' identifier: argument.type - count: 2 - path: src/lib/Repository/RoleService.php + count: 4 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#2 \.\.\.\$arrays of function array_diff expects array, array\\|null given\.$#' + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' identifier: argument.type - count: 1 - path: src/lib/Repository/RoleService.php + count: 12 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\Mapper\\RoleDomainMapper\:\:buildPersistencePolicyObject\(\) expects array\, iterable\ given\.$#' + message: '#^Parameter \#1 \$locations of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:filterHiddenLocations\(\) expects array\, iterable\ given\.$#' identifier: argument.type - count: 2 - path: src/lib/Repository/RoleService.php + count: 5 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Parameter \#3 \$limitations of method Ibexa\\Core\\Repository\\RoleService\:\:validatePolicy\(\) expects array\, iterable\ given\.$#' + message: '#^Parameter \#1 \$string of function md5 expects string, float given\.$#' identifier: argument.type count: 3 - path: src/lib/Repository/RoleService.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findContentInfo\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SearchService.php + message: '#^Parameter \#2 \$actualAliases of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) expects array, iterable\ given\.$#' + identifier: argument.type + count: 4 + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findLocations\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$code of class InvalidArgumentException constructor expects int, string given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:findSingle\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:internalFindContentInfo\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:suggest\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:validateContentCriteria\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCreateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SearchService\:\:validateContentSortClauses\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionUpdateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#1 \$spiContentInfo of method Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper\:\:buildContentInfoDomainObject\(\) expects Ibexa\\Contracts\\Core\\Persistence\\Content\\ContentInfo, Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/SearchService.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 5 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\SearchService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: assign.propertyType + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\SearchService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SectionService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SectionService.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeDraft'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 4 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\SectionService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SectionService.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroup'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 3 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SettingService\:\:newSettingCreateStruct\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroupCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SettingService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SettingService\:\:newSettingUpdateStruct\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SettingService.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroupUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#3 \$serializedValue of method Ibexa\\Contracts\\Core\\Persistence\\Setting\\Handler\:\:create\(\) expects string, string\|false given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SettingService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#3 \$serializedValue of method Ibexa\\Contracts\\Core\\Persistence\\Setting\\Handler\:\:update\(\) expects string, string\|false given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\FieldDefinitionCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SettingService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\ContentService\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\FieldDefinitionUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: src/lib/Repository/SiteAccessAware/ContentService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\ContentService\:\:validate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SiteAccessAware/ContentService.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 6 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\AbstractLanguageResolver\:\:getPrioritizedLanguages\(\) has parameter \$forcedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php + message: '#^Cannot access property \$fieldSettings on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject + count: 2 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\AbstractLanguageResolver\:\:getPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: property.nonObject count: 1 - path: src/lib/Repository/SiteAccessAware/Language/AbstractLanguageResolver.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolver\:\:__construct\(\) has parameter \$configLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject + count: 4 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\LocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot call method getDescriptions\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: method.nonObject count: 1 - path: src/lib/Repository/SiteAccessAware/LocationService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\SiteAccessAware\\Repository\:\:\$notificationService \(Ibexa\\Core\\Repository\\NotificationService\) does not accept Ibexa\\Core\\Repository\\SiteAccessAware\\NotificationService\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/SiteAccessAware/Repository.php + message: '#^Cannot call method getNames\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' + identifier: method.nonObject + count: 2 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\SearchService\:\:suggest\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:assertContentTypeGroupsCorrect\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: src/lib/Repository/SiteAccessAware/SearchService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\UserService\:\:createUser\(\) has parameter \$parentGroups with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:assertCopyContentTypeValues\(\) has parameter \$excludedProperties with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/SiteAccessAware/UserService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\UserService\:\:loadUsersByEmail\(\) should return array\ but returns iterable\\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/SiteAccessAware/UserService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Cannot access an offset on Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy\.$#' - identifier: offsetAccess.nonOffsetAccessible + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\ContentFieldStrategy\:\:setStrategies\(\) has parameter \$thumbnailStrategies with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentType\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^PHPDoc tag @param for parameter \$thumbnailStrategies with type iterable\&Traversable is incompatible with native type array\.$#' - identifier: parameter.phpDocType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/Field/ContentFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\ThumbnailStrategy\:\:hasStrategy\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\FirstMatchingFieldStrategy\:\:getFieldByIdentifier\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\FirstMatchingFieldStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/FirstMatchingFieldStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\StaticStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/StaticStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\ThumbnailChainStrategy\:\:getThumbnail\(\) has parameter \$fields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Strategy\\ContentThumbnail\\ThumbnailChainStrategy\:\:\$strategies \(array\\) does not accept iterable\\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentType\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Strategy/ContentThumbnail/ThumbnailChainStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:__construct\(\) has parameter \$contentValidators with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteId\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) has parameter \$fieldErrors with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteIdReturnsCorrectInstance\(\) has parameter \$contentType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) has parameter \$foundErrors with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroup\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:mergeErrors\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupByIdentifier\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroups\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\Strategy\\ContentValidator\\ContentValidatorStrategy\:\:\$contentValidators \(array\\) does not accept iterable\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupsIdentifiers\(\) has parameter \$groups with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: src/lib/Repository/Strategy/ContentValidator/ContentValidatorStrategy.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' - identifier: method.notFound - count: 2 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeStructValues\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:buildDomainTrashItems\(\) has parameter \$spiTrashItems with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypes\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\TrashService\:\:buildDomainTrashItems\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypesContent\(\) has parameter \$types with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^PHPDoc tag @param for parameter \$trashItemId with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeCreateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\TrashService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeGroupCreateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Core\\Repository\\TrashService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeUpdateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/TrashService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Class Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias referenced with incorrect case\: Ibexa\\Contracts\\Core\\Persistence\\Content\\URLAlias\.$#' - identifier: class.nameCase - count: 7 - path: src/lib/Repository/URLAliasService.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeUpdateStructValues\(\) has parameter \$typeUpdate with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:choosePrioritizedLanguageCode\(\) has parameter \$entries with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionCreateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:isPathLoadable\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionUpdateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:isPathLoadable\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:matchLanguageCode\(\) has parameter \$pathElementData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemoved\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:matchPath\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:reverseLookup\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\|false\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:sortTranslationsByPrioritizedLanguages\(\) has parameter \$translations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:sortTranslationsByPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#2 \$custom of method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:listURLAliasesForLocation\(\) expects bool, bool\|null given\.$#' + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#2 \$languageCode of method Ibexa\\Core\\Repository\\URLAliasService\:\:extractPath\(\) expects string, null given\.$#' + message: '#^Parameter \#2 \$actualObject of method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertStructPropertiesCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/URLAliasService.php - - - - message: '#^Parameter \#2 \$languageCode of method Ibexa\\Core\\Repository\\URLAliasService\:\:extractPath\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#2 \$path of method Ibexa\\Core\\Repository\\URLAliasService\:\:buildUrlAliasDomainObject\(\) expects string, string\|true given\.$#' + message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' identifier: argument.type count: 3 - path: src/lib/Repository/URLAliasService.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Parameter \#3 \$languageCode of method Ibexa\\Core\\Repository\\URLAliasService\:\:matchPath\(\) expects string, string\|null given\.$#' + message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) expects array\|ArrayAccess, iterable\ given\.$#' identifier: argument.type count: 1 - path: src/lib/Repository/URLAliasService.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$id\.$#' - identifier: property.protected - count: 6 - path: src/lib/Repository/URLService.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$isValid\.$#' - identifier: property.protected - count: 1 - path: src/lib/Repository/URLService.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$lastChecked\.$#' - identifier: property.protected - count: 1 - path: src/lib/Repository/URLService.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#' - identifier: property.protected - count: 2 - path: src/lib/Repository/URLService.php - - - - message: '#^Property Ibexa\\Core\\Repository\\URLService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/URLService.php - - - - message: '#^Call to function is_numeric\(\) with int will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 2 - path: src/lib/Repository/URLWildcardService.php - - - - message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard referenced with incorrect case\: Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\UrlWildcard\.$#' - identifier: class.nameCase - count: 4 - path: src/lib/Repository/URLWildcardService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\URLWildcardService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/URLWildcardService.php - - - - message: '#^Property Ibexa\\Core\\Repository\\URLWildcardService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/URLWildcardService.php - - - - message: '#^Strict comparison using \!\=\= between int and null will always evaluate to true\.$#' - identifier: notIdentical.alwaysTrue - count: 2 - path: src/lib/Repository/URLWildcardService.php - - - - message: '#^Parameter \#3 \$hashType of method Ibexa\\Contracts\\Core\\Repository\\PasswordHashService\:\:isValidPassword\(\) expects int\|null, string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/User/PasswordValidator.php - - - - message: '#^Dead catch \- Exception is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Repository/UserPreferenceService.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:internalLoadContentById\(\)\.$#' - identifier: method.notFound - count: 5 - path: src/lib/Repository/UserService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\UserService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\UserService\:\:setLogger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^PHPDoc tag @param for parameter \$id with type mixed is not subtype of native type int\.$#' - identifier: parameter.phpDocType - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#1 \$contentType of class Ibexa\\Core\\Base\\Exceptions\\MissingUserFieldTypeException constructor expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#1 \$contentType of method Ibexa\\Core\\Repository\\UserService\:\:getUserFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#1 \$identifier of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:loadContentTypeByIdentifier\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Core\\Repository\\User\\PasswordValidatorInterface\:\:getPasswordInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Parameter \#3 \$hashAlgorithm of method Ibexa\\Core\\Repository\\UserService\:\:comparePasswordHashes\(\) expects int, string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentMetadataUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct\) in empty\(\) is not falsy\.$#' - identifier: empty.property - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentUpdateStruct\) in empty\(\) is not falsy\.$#' - identifier: empty.property - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct\:\:\$contentUpdateStruct \(Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentUpdateStruct\) on left side of \?\? is not nullable\.$#' - identifier: nullCoalesce.property - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Property Ibexa\\Core\\Repository\\UserService\:\:\$settings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/UserService.php - - - - message: '#^Result of \|\| is always true\.$#' - identifier: booleanOr.alwaysTrue - count: 4 - path: src/lib/Repository/UserService.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\ContentCreateStructValidator\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/ContentCreateStructValidator.php - - - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 2 - path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\ContentUpdateStructValidator\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Validator\\ContentUpdateStructValidator\:\:\$contentLanguageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/Validator/ContentUpdateStructValidator.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\TargetContentValidator\:\:validate\(\) has parameter \$allowedContentTypes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/TargetContentValidator.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\TargetContentValidatorInterface\:\:validate\(\) has parameter \$allowedContentTypes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/TargetContentValidatorInterface.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:__construct\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/UserPasswordValidator.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:createValidationError\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/UserPasswordValidator.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Validator\\UserPasswordValidator\:\:\$constraints type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Validator/UserPasswordValidator.php - - - - message: '#^Call to method getValue\(\) on an unknown class eZ\\Publish\\API\\Repository\\Values\\Content\\Field\.$#' - identifier: class.notFound - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:getField\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null but returns eZ\\Publish\\API\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$fieldDefinitionTranslationMap has unknown class eZ\\Publish\\API\\Repository\\Values\\Content\\Field as its type\.$#' - identifier: class.notFound - count: 1 - path: src/lib/Repository/Values/Content/Content.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/Content/Location.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/Content/Location.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/Content/TrashItem.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/Content/TrashItem.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/ContentType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/ContentType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\:\:getName\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/ContentType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - - - message: '#^PHPDoc tag @return with type array\ is incompatible with native type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\.$#' - identifier: return.phpDocType - count: 1 - path: src/lib/Repository/Values/ContentType/ContentTypeDraft.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/ContentTypeGroup.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup\:\:getName\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/ContentTypeGroup.php - - - - message: '#^Class Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition has PHPDoc tag @property\-read for property \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Class Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition has PHPDoc tag @property\-read for property \$validatorConfiguration with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getName\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:getValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:\$fieldSettings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\:\:\$validatorConfiguration type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinition.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\:\:__construct\(\) has parameter \$fieldDefinitions with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollection\:\:map\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\[\]\)\: Unexpected token "\\n ", expected variable at offset 87 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: src/lib/Repository/Values/ContentType/FieldDefinitionCollection.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:fieldSettingsFromHash\(\) has parameter \$fieldSettingsHash with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:fieldSettingsToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:validatorConfigurationFromHash\(\) has parameter \$validatorConfigurationHash with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:validatorConfigurationToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Parameter \#2 \$value of method Ibexa\\Core\\FieldType\\FieldType\:\:validate\(\) expects Ibexa\\Core\\FieldType\\Value, Ibexa\\Contracts\\Core\\FieldType\\Value given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Values\\ContentType\\FieldType\:\:\$internalFieldType \(Ibexa\\Core\\FieldType\\FieldType\) does not accept Ibexa\\Contracts\\Core\\FieldType\\FieldType\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Repository/Values/ContentType/FieldType.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ObjectState/ObjectState.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:getName\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ObjectState/ObjectState.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:getDescription\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ObjectState/ObjectStateGroup.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:getName\(\) should return string\|null but returns string\|false\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/ObjectState/ObjectStateGroup.php - - - - message: '#^Property Ibexa\\Core\\Repository\\Values\\User\\PolicyDraft\:\:\$draftProperties type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/User/PolicyDraft.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\RoleDraft\:\:getPolicies\(\) should return iterable\ but returns iterable\\.$#' - identifier: return.type - count: 1 - path: src/lib/Repository/Values/User/RoleDraft.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\User\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/User/User.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\User\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/User/User.php - - - - message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: return.phpDocType - count: 1 - path: src/lib/Repository/Values/User/User.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:getProperties\(\) has parameter \$dynamicProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/User/UserGroup.php - - - - message: '#^Method Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:getProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Repository/Values/User/UserGroup.php - - - - message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: return.phpDocType - count: 1 - path: src/lib/Repository/Values/User/UserGroup.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\:\:registerContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/BackgroundIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\:\:registerLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/BackgroundIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\\NullIndexer\:\:registerContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/BackgroundIndexer/NullIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\BackgroundIndexer\\NullIndexer\:\:registerLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/BackgroundIndexer/NullIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onCopyContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onDeleteTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onHideContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onPublishVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onRevealContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ContentEventSubscriber\:\:onUpdateContentMetadata\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ContentEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onCopySubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onCreateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onDeleteLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onHideLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onMoveSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onSwapLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onUnhideLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\LocationEventSubscriber\:\:onUpdateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/LocationEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\ObjectStateEventSubscriber\:\:onSetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/ObjectStateEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\SectionEventSubscriber\:\:onAssignSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/SectionEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\TrashEventSubscriber\:\:onRecover\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\TrashEventSubscriber\:\:onTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/TrashEventSubscriber.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Event\\AfterEvent\:\:getUser\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onCreateUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onCreateUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onDeleteUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onDeleteUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onMoveUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onUpdateUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\EventSubscriber\\UserEventSubscriber\:\:onUpdateUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/EventSubscriber/UserEventSubscriber.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameGenerator\:\:__construct\(\) has parameter \$fieldNameMapping with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/FieldNameGenerator.php - - - - message: '#^Property Ibexa\\Core\\Search\\Common\\FieldNameGenerator\:\:\$fieldNameMapping type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/FieldNameGenerator.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getAggregationFieldName\(\) should return string\|null but returns false\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getFieldTypes\(\) should return array\ but returns list\\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) should return string but returns array\\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) should return string but returns array\\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getSearchableFieldMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getSortFieldName\(\) should return string\|null but returns false\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Offset false does not exist on string\.$#' - identifier: offsetAccess.notFound - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Parameter \#1 \$array of function array_keys expects array, string given\.$#' - identifier: argument.type - count: 3 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Parameter \#1 \$criterionOrSortClause of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects object, null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Parameter \#5 \$name of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Search/Common/FieldNameResolver.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$raw\.$#' - identifier: property.notFound - count: 1 - path: src/lib/Search/Common/FieldValueMapper/IdentifierMapper.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$raw\.$#' - identifier: property.notFound - count: 1 - path: src/lib/Search/Common/FieldValueMapper/MultipleIdentifierMapper.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldValueMapper\\MultipleStringMapper\:\:map\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/FieldValueMapper/MultipleStringMapper.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\FieldValueMapper\\StringMapper\:\:convert\(\) should return string but returns string\|null\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/FieldValueMapper/StringMapper.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\IncrementalIndexer\:\:purge\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/IncrementalIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\IncrementalIndexer\:\:updateSearchIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Common/IncrementalIndexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\Indexer\:\:getContentDbFieldsStmt\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/Indexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\Indexer\:\:getContentDbFieldsStmt\(\) return type has no value type specified in iterable type Doctrine\\DBAL\\Driver\\Statement\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Common/Indexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Common\\Indexer\:\:getContentDbFieldsStmt\(\) should return Doctrine\\DBAL\\Driver\\Statement but returns Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Common/Indexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriteriaConverter\:\:addHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriteriaConverter\:\:convertCriteria\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriteriaConverter.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\:\:\$comparatorMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\CompositeCriterion\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/CompositeCriterion.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ContentId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ContentTypeGroupId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeGroupId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ContentTypeId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeId.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ContentTypeIdentifier\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php - - - - message: '#^Parameter \#1 \$identifier of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler\:\:loadByIdentifier\(\) expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentTypeIdentifier.php - - - - message: '#^Cannot call method getBetweenExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\DateMetadata\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/DateMetadata.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\Field\:\:getFieldsInformation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\Field\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/Field.php - - - - message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 8 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getFieldCondition\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$fieldWhereExpressions with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$fieldsInformation with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldBase\:\:getInExpressionWithFieldConditions\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldBase.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldEmpty\:\:getFieldsInformation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldEmpty\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldEmpty.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) has parameter \$criterionValue with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) has parameter \$fieldDefinitionIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForContainsOperator\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForInOperator\(\) has parameter \$criterionValue with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:buildQueryForInOperator\(\) has parameter \$fieldDefinitionIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:getFieldDefinitionsIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldRelation\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldRelation.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Converter\:\:\$defaultHandler \(Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\) does not accept Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\|null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Converter.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Cannot call method getBetweenExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:createNamedParameter\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:createNamedParameter\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareParameter\(\) should return array\\|bool\|float\|int\|string but returns array\\|bool\|float\|int\|string\>\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:lowerCase\(\) expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareLikeString\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Parameter \#1 \$values of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:getParamArrayType\(\) expects array\, array\\|bool\|float\|int\|string\> given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Parameter \#2 \$array of function array_map expects array, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:\$comparatorMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:prepareLikeString\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 2 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Collection.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\Handler\:\:lowerCase\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/Handler/Simple.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FieldValue\\HandlerRegistry\:\:register\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FieldValue/HandlerRegistry.php - - - - message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Cannot call method getCountExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:__construct\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Parameter \#2 \$string of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:getWordIdSubquery\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\FullText\:\:\$configuration type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/FullText.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\IsContainer\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsContainer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\IsUserBased\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php - - - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserBased.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\IsUserEnabled\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php - - - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/IsUserEnabled.php - - - - message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\LanguageCode\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php - - - - message: '#^Parameter \#1 \$languageCodes of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\:\:generateLanguageMaskFromLanguageCodes\(\) expects array\, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LanguageCode.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\LogicalAnd\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalAnd.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\LogicalNot\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalNot.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\LogicalOr\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/LogicalOr.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Cannot call method getBetweenExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Cannot call method getRoundExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 3 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingConstraints\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingCoordinates\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getFieldDefinitionIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:kilometersToDegrees\(\) has parameter \$kilometers with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Parameter \#3 \$distance of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MapLocationDistance\:\:getBoundingConstraints\(\) expects float, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MatchAll\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchAll.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\MatchNone\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/MatchNone.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ObjectStateId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\ObjectStateIdentifier\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ObjectStateIdentifier.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\RemoteId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/RemoteId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\SectionId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\SectionIdentifier\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/SectionIdentifier.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\UserEmail\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserEmail.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\UserId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\UserLogin\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php - - - - message: '#^Parameter \#1 \$string of method Ibexa\\Core\\Persistence\\TransformationProcessor\:\:transformByGroup\(\) expects string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserLogin.php - - - - message: '#^Cannot call method getConcatExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\CriterionHandler\\UserMetadata\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/UserMetadata.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseConverter\:\:addHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseConverter\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseConverter\:\:\$sortColumns type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseConverter.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php - - - - message: '#^Cannot access property \$seed on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Target\|null\.$#' - identifier: property.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\AbstractRandom\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\ContentId\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\ContentName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\DateModified\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\DatePublished\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Factory\\RandomSortClauseHandlerFactory\:\:__construct\(\) has parameter \$randomSortClauseGateways with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Factory/RandomSortClauseHandlerFactory.php - - - - message: '#^Cannot call method getBitAndComparisonExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 8 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:getFieldCondition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:getFieldCondition\(\) has parameter \$fieldTableName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Field\:\:getFieldCondition\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Parameter \#1 \$number of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects int, string given\.$#' - identifier: argument.type - count: 3 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\MapLocationDistance\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\MapLocationDistance\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionIdentifier\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionName\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\SectionName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\ContentTypeName\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\ContentTypeName\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\DateTrashed\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\UserLogin\:\:applyJoin\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\\Trash\\UserLogin\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\FullTextValue\:\:\$transformationRules type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/FullTextValue.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\Ancestor\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Parameter \#1 \$string of function trim expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\LocationId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\LocationRemoteId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/LocationRemoteId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\ParentLocationId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/ParentLocationId.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\PermissionSubtree\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/PermissionSubtree.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\Subtree\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Subtree.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\CriterionHandler\\Visibility\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/CriterionHandler/Visibility.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:find\(\) should return array\\> but returns array\\|int\|null\>\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:find\(\) should return array\\> but returns array\\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:getContentInfoList\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:getContentInfoList\(\) has parameter \$sort with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:getLanguageMask\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:getQueryCondition\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\DoctrineDatabase\:\:getResultCount\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^PHPDoc tag @param for parameter \$limit with type mixed is not subtype of native type int\|null\.$#' - identifier: parameter.phpDocType - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^PHPDoc tag @param for parameter \$offset with type mixed is not subtype of native type int\|null\.$#' - identifier: parameter.phpDocType - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Parameter \#1 \$firstResult of method Doctrine\\DBAL\\Query\\QueryBuilder\:\:setFirstResult\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php - - - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php - - - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php - - - - message: '#^Parameter \#3 \$limit of method Ibexa\\Core\\Search\\Legacy\\Content\\Gateway\:\:find\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:bulkIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:commit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:deleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:deleteLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$languageMask with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$languageSettings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:extractMatchedLanguage\(\) has parameter \$mainLanguageId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:indexContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:indexLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:purgeIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Handler\:\:suggest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\:\:\$sortClauses \(array\\) does not accept null\.$#' - identifier: assign.propertyType - count: 1 - path: src/lib/Search/Legacy/Content/Handler.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Indexer\:\:purge\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Indexer.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Indexer\:\:updateSearchIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/Indexer.php - - - - message: '#^Call to an undefined method Doctrine\\DBAL\\Driver\\ResultStatement\:\:fetchOne\(\)\.$#' - identifier: method.notFound - count: 1 - path: src/lib/Search/Legacy/Content/IndexerGateway.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\IndexerGateway\:\:fetchIteration\(\) has parameter \$statement with no value type specified in iterable type Doctrine\\DBAL\\Driver\\ResultStatement\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/IndexerGateway.php - - - - message: '#^Parameter \#1 \$statement of method Ibexa\\Core\\Search\\Legacy\\Content\\IndexerGateway\:\:fetchIteration\(\) expects Doctrine\\DBAL\\Driver\\ResultStatement, Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string given\.$#' - identifier: argument.type - count: 3 - path: src/lib/Search/Legacy/Content/IndexerGateway.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Ancestor\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Parameter \#1 \$string of function trim expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Ancestor.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Cannot call method getBetweenExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Location\\Depth\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Depth.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Location\\IsBookmarked\:\:handle\(\) never returns Doctrine\\DBAL\\Query\\Expression\\CompositeExpression so it can be removed from the return type\.$#' - identifier: return.unusedType - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsBookmarked.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Location\\IsMainLocation\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/IsMainLocation.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - - - message: '#^Cannot access offset 1 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - - - message: '#^Cannot call method getBetweenExpression\(\) on Doctrine\\DBAL\\Platforms\\AbstractPlatform\|null\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Location\\Priority\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - - - message: '#^Parameter \#1 \$array of function reset expects array\|object, array\\|bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Location/Priority.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\LocationId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\LocationRemoteId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/LocationRemoteId.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\ParentLocationId\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/ParentLocationId.php - - - - message: '#^Argument of an invalid type array\\|bool\|float\|int\|string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Subtree\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Subtree.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\CriterionHandler\\Visibility\:\:handle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/CriterionHandler/Visibility.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:find\(\) should return array\\> but returns array\\|int\|null\>\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:find\(\) should return array\\> but returns array\\.$#' - identifier: return.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getLanguageMask\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabase\:\:getTotalCount\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/DoctrineDatabase.php - - - - message: '#^Dead catch \- Doctrine\\DBAL\\DBALException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php - - - - message: '#^Dead catch \- PDOException is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\ExceptionConversion\:\:find\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php - - - - message: '#^Parameter \#3 \$limit of method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\:\:find\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/ExceptionConversion.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Depth\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Id\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\IsMainLocation\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Path\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Priority\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\Location\\Gateway\\SortClauseHandler\\Location\\Visibility\:\:applySelect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$splitFlag\.$#' - identifier: property.notFound - count: 1 - path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Search\\FieldType\:\:\$transformationRules\.$#' - identifier: property.notFound - count: 1 - path: src/lib/Search/Legacy/Content/Mapper/FullTextMapper.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:bulkIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:index\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:purgeIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\:\:remove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway.php - - - - message: '#^Argument of an invalid type list\\|false supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:__construct\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:buildWordIDArray\(\) has parameter \$indexArrayOnlyWords with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:buildWordIDArray\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:bulkIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:index\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:indexWords\(\) has parameter \$indexArray with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:indexWords\(\) has parameter \$wordIDArray with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:purgeIndex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Gateway\\DoctrineDatabase\:\:\$fullTextSearchConfiguration type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getContentObjectWords\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getWordUpdateQuery\(\) has parameter \$wordIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - - - message: '#^Method Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:getWords\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - - - message: '#^Property Ibexa\\Core\\Search\\Legacy\\Content\\WordIndexer\\Repository\\SearchIndex\:\:\$connection has no type specified\.$#' - identifier: missingType.property - count: 1 - path: src/lib/Search/Legacy/Content/WordIndexer/Repository/SearchIndex.php - - - - message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, int given\.$#' - identifier: argument.type - count: 1 - path: src/lib/Token/RandomBytesGenerator.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ApiLoader\\CacheFactoryTest\:\:testGetService\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ApiLoader/CacheFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ApiLoader\\CacheFactoryTest\:\:testGetService\(\) has parameter \$name with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ApiLoader/CacheFactoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Doctrine\\\\DBAL\\\\Connection'' and Doctrine\\DBAL\\Connection will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/bundle/Core/ApiLoader/StorageConnectionFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:buildMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:buildMock\(\) has parameter \$class with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:buildMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:getParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testGetDefaultNamespace\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testGetParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testGetParameterInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testHasParameterFalse\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testHasParameterTrue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testPriority\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testReSortResolvers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testSetDefaultNamespace\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ChainConfigResolverTest\:\:testSortResolvers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Parameter \#1 \$resolver of method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ChainConfigResolver\:\:addResolver\(\) expects Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 4 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\)$#' - identifier: argument.templateType - count: 1 - path: tests/bundle/Core/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:getResolver\(\) has parameter \$groupsBySiteAccess with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:hasParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:parameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$paramName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterFailedNull\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterFailedWithException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$paramName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$paramName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$paramName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetSetDefaultScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetSetUndefinedStrategy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$defaultMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$globalMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$groupMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterNoNamespace\(\) has parameter \$scopeMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$defaultMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$globalMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$groupMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testHasParameterWithNamespaceAndScope\(\) has parameter \$scopeMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Parameter \#1 \$container of class Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver constructor expects Symfony\\Component\\DependencyInjection\\ContainerInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainConfigResolverPassTest\:\:addResolverProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainConfigResolverPassTest\:\:testAddResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainRoutingPassTest\:\:addRouterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainRoutingPassTest\:\:testAddRouter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainRoutingPassTest\:\:testAddRouterWithDefaultRouter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\FieldTypeParameterProviderRegistryPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\FieldTypeParameterProviderRegistryPassTest\:\:testRegisterFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\FieldTypeParameterProviderRegistryPassTest\:\:testRegisterFieldTypeNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/FieldTypeParameterProviderRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\FragmentPassTest\:\:testProcess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php - - - - message: '#^Offset 0 might not exist on array\|string\|null\.$#' - identifier: offsetAccess.notFound - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/FragmentPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\NotificationRendererPassTest\:\:testAddRenderer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\NotificationRendererPassTest\:\:testAddRendererWithoutAliasThrowsLogicException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/NotificationRendererPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\PlaceholderProviderPassTest\:\:testAddProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\PlaceholderProviderPassTest\:\:testAddProviderWithoutType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/PlaceholderProviderPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\QueryTypePassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/QueryTypePassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterSearchEngineIndexerPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEngineIndexerPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterSearchEnginePassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/RegisterSearchEnginePassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterStorageEnginePassTest\:\:testRegisterDefaultStorageEngine\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterStorageEnginePassTest\:\:testRegisterStorageEngine\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\RegisterStorageEnginePassTest\:\:testRegisterStorageEngineNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/RegisterStorageEnginePassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:configurationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$commandsToAdd with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$existingOldParameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:testMergeConfigurations\(\) has parameter \$expectedCommands with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Variable \$slugConverter in PHPDoc tag @var does not match assigned variable \$slugConverterRef\.$#' - identifier: varTag.differentVariable - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\TranslationCollectorPassTest\:\:testTranslationCollector\(\) has parameter \$availableTranslations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/TranslationCollectorPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\URLHandlerPassTest\:\:testRegisterURLHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\URLHandlerPassTest\:\:testRegisterURLHandlerNoScheme\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/URLHandlerPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ViewProvidersPassTest\:\:addViewProviderProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ViewProvidersPassTest\:\:testAddViewProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ViewProvidersPassTest\:\:testAddViewProvider\(\) has parameter \$declaredPriority with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ViewProvidersPassTest\:\:testAddViewProvider\(\) has parameter \$expectedPriority with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:provideSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testContainsDynamicSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testContainsDynamicSettings\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testContainsDynamicSettings\(\) has parameter \$setting with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testParseComplexSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testParseComplexSetting\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testParseComplexSetting\(\) has parameter \$setting with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingValueResolverTest\:\:testGetArgumentValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingValueResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:getConfigurationParserMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testAddSemanticConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testConstructWrongInnerParser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testGetSetInnerParsers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testMapConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParserTest\:\:testPrePostMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:hasParameterProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:parameterProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:\$siteAccess \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ConfigResolverTest\:\:parameterProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php - - - - message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/SiteAccessGroupConfigResolverTest.php - - - - message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/StaticSiteAccessConfigResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\AbstractParserTestCase\:\:assertConfigResolverParameterValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/AbstractParserTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:sessionSettingsProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testApiKeysSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testDefaultPage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testIndexPage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testMiscSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testNoUserSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testNonExistentSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testSessionSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testSessionSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testSessionSettings\(\) has parameter \$inputParams with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:testUserSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:\$minimalConfig has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:\$minimalConfig is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:contentSettingsProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testContentSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testContentSettings\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testContentSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:testDefaultContentSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:imageAssetSettingsProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testDefaultImageAssetSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testImageAssetSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testImageAssetSettings\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\FieldType\\ImageAssetTest\:\:testImageAssetSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:testHandlersConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:\$minimalConfig has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\IOTest\:\:\$minimalConfig is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/IOTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:testPrePostParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:testVariations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ImageTest\:\:\$config has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:testLanguagesSingleSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:testLanguagesSiteaccessGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:testTranslationSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\LanguagesTest\:\:testTranslationSiteAccessesWithGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/LanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldDefinitionSettingsTemplates\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldDefinitionSettingsTemplates\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldTemplates\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getExpectedConfigFieldTemplates\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:testFieldDefinitionSettingsTemplates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:testFieldTemplates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\TemplatesTest\:\:\$config has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/TemplatesTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:testContentView\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:testLocationView\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ViewTest\:\:\$config has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:getContainerMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:getContextualizerMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testGetSetContextualizer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapConfigArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapConfigClosure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapConfigHookableMapperObject\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapConfigMapperObject\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapConfigWrongMapper\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessorTest\:\:testMapSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Parameter \#2 \$mapper of method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:mapConfig\(\) expects \(callable\(\)\: mixed\)\|Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationMapperInterface, stdClass given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:fullMapConfigArrayProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:setContextualParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$customSANodeKey with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$defaultValue with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$globalValue with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$groups with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$options with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$siteaccess with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testFullMapConfigArray\(\) has parameter \$testId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testGetSetAvailableSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testGetSetContainer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testGetSetGroupsBySA\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testGetSetNamespace\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testGetSetSANodeName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testMapConfigArray\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testMapConfigArraySecondLevel\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testMapConfigArrayUnique\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testMapSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testSetContextualParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testSetContextualParameter\(\) has parameter \$parameterName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testSetContextualParameter\(\) has parameter \$scope with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testSetContextualParameter\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$availableSAs type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$availableSiteAccessGroups type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:\$groupsBySA type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:isDynamicSettingProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:parseDynamicSettingProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testIsDynamicSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testIsDynamicSetting\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testIsDynamicSetting\(\) has parameter \$setting with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testParseDynamicSetting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testParseDynamicSetting\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testParseDynamicSetting\(\) has parameter \$setting with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:testParseDynamicSettingFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\Collector\\SuggestionCollectorTest\:\:testAddHasGetSuggestions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Collector/SuggestionCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestionTest\:\:testConfigSuggestion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\ConfigSuggestionTest\:\:testEmptyConstructor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Suggestion/ConfigSuggestionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\Formatter\\YamlSuggestionFormatterTest\:\:testFormat\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Suggestion\\Formatter\\YamlSuggestionFormatterTest\:\:testFormatNoSuggestion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Configuration/Suggestion/Formatter/YamlSuggestionFormatterTest.php - - - - message: '#^Argument of an invalid type array\|bool\|float\|int\|string\|null supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Call to function is_bool\(\) with bool will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Generator expects value type array\{bool, array\{string\}\}, array\{false, false\} given\.$#' - identifier: generator.valueType - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Generator expects value type array\{bool, array\{string\}\}, array\{true, true\} given\.$#' - identifier: generator.valueType - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:cacheConfigurationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:getFilteringQueryBuilderData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:getMinimalConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:repositoriesConfigurationFieldGroupsProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testCacheConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testCacheConfiguration\(\) has parameter \$customCacheConfig with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testCacheConfigurationCustomPurgeService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testImageMagickConfigurationBasic\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testImageMagickConfigurationFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testImagePlaceholderConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testLocaleConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRegisteredPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationCompatibility\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationCompatibility2\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationFieldGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationFieldGroups\(\) has parameter \$expectedRepositories with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationFieldGroups\(\) has parameter \$repositories with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationSearchEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationStorageEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRoutingConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testSiteAccessConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testSiteAccessNoConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testUrlAliasConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Parameter \#1 \$input of static method Symfony\\Component\\Yaml\\Yaml\:\:parse\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, array\|bool\|float\|int\|string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) expects array\|ArrayAccess, array\|bool\|float\|int\|string\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Parameter \#2 \$haystack of static method PHPUnit\\Framework\\Assert\:\:assertContains\(\) expects iterable, array\|bool\|float\|int\|string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge_recursive expects array, array\|bool\|float\|int\|string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$minimalConfig has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$minimalConfig is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$siteaccessConfig has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:policiesConfigProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$configOne with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$configTwo with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddConfig\(\) has parameter \$expectedConfig with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\PoliciesConfigBuilderTest\:\:testAddResource\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/PoliciesConfigBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\YamlPolicyProviderTest\:\:testMultipleYaml\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Security\\PolicyProvider\\YamlPolicyProviderTest\:\:testSingleYaml\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Security/PolicyProvider/YamlPolicyProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getQuery\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\QueryTypeBundle\\QueryType\\TestQueryType\:\:getSupportedParameters\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/QueryTypeBundle/QueryType/TestQueryType.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubPolicyProvider\:\:__construct\(\) has parameter \$policies with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubPolicyProvider\:\:addPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubPolicyProvider\:\:\$policies type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubPolicyProvider.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:__construct\(\) has parameter \$files with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:getFiles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Stub\\StubYamlPolicyProvider\:\:\$files type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/DependencyInjection/Stub/StubYamlPolicyProvider.php - - - - message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\|Psr\\Log\\LoggerInterface\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:indexDeleteProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:indexingProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:testIndexDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:testIndexing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:testIndexing\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$value$#' - identifier: parameter.notFound - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Parameter \#1 \$logger of method Ibexa\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListener\:\:setLogger\(\) expects Psr\\Log\\LoggerInterface, PHPUnit\\Framework\\MockObject\\MockObject\|Psr\\Log\\LoggerInterface given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Parameter \#1 \$stub of method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:will\(\) expects PHPUnit\\Framework\\MockObject\\Stub\\Stub, PHPUnit\\Framework\\MockObject\\Stub given\.$#' - identifier: argument.type - count: 2 - path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackwardCompatibleCommandListenerTest\:\:createBackwardCompatibleCommand\(\) has parameter \$aliases with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - - - message: '#^Method Symfony\\Component\\Console\\Command\\Command@anonymous/tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest\.php\:116\:\:__construct\(\) has parameter \$deprecatedAliases with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - - - message: '#^PHPDoc tag @return with type Ibexa\\Bundle\\Core\\Command\\BackwardCompatibleCommand\|Symfony\\Component\\Console\\Command\\Command is not subtype of native type Symfony\\Component\\Console\\Command\\Command\.$#' - identifier: return.phpDocType - count: 1 - path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - - - message: '#^Parameter \#1 \$string of function trim expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/BackwardCompatibleCommandListenerTest.php - - - - message: '#^Argument of an invalid type PHPUnit\\Framework\\MockObject\\MockObject supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConfigScopeListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConfigScopeListenerTest\:\:testOnConfigScopeChange\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Parameter \#1 \$viewProviders of method Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener\:\:setViewProviders\(\) expects array, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Parameter \#2 \$viewManager of class Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener constructor expects Ibexa\\Core\\MVC\\Symfony\\View\\ViewManagerInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConfigScopeListenerTest\:\:\$viewProviders \(PHPUnit\\Framework\\MockObject\\MockObject\) does not accept array\\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/Core/EventListener/ConfigScopeListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:testDefaultSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:testInvalidSiteAccessDev\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:testInvalidSiteAccessProd\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:testValidSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:getListener\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:testDownloadNameOverrideWorks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:testGeneratesCorrectRouteReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:testIgnoresOtherRoutes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:testThrowsExceptionOnBadContentParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ContentDownloadRouteReferenceListenerTest\:\:testThrowsExceptionOnBadFieldIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ContentDownloadRouteReferenceListenerTest.php - - - - message: '#^Call to an undefined method Exception\:\:setMessageTemplate\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Call to an undefined method Exception\:\:setParameters\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:badRequestExceptionProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:otherExceptionProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testBadRequestException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testOtherRepositoryException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:testUntouchedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^PHPDoc tag @param for parameter \$exception with type Exception\|Ibexa\\Core\\Base\\Translatable is not subtype of native type Exception\.$#' - identifier: parameter.phpDocType - count: 2 - path: tests/bundle/Core/EventListener/ExceptionListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:indexPageProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testOnKernelRequestIndexNotOnIndexPage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testOnKernelRequestIndexOnIndexPage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testOnKernelRequestIndexOnIndexPage\(\) has parameter \$configuredIndexPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testOnKernelRequestIndexOnIndexPage\(\) has parameter \$expectedIndexPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testOnKernelRequestIndexOnIndexPage\(\) has parameter \$requestPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:testSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:onKernelRequestProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:testOnKernelRequest\(\) has parameter \$configuredLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:testOnKernelRequest\(\) has parameter \$convertedLocalesValueMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:testOnKernelRequest\(\) has parameter \$expectedLocale with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Parameter \#1 \$requestStack of class Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener constructor expects Symfony\\Component\\HttpFoundation\\RequestStack, Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface&PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\LocaleListenerTest\:\:\$requestStack \(Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Symfony\\Component\\HttpFoundation\\RequestStack\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/Core/EventListener/LocaleListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\OriginalRequestListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/OriginalRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\OriginalRequestListenerTest\:\:testOnKernelRequestNoOriginalRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/OriginalRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\OriginalRequestListenerTest\:\:testOnKernelRequestNotMaster\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/OriginalRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\OriginalRequestListenerTest\:\:testOnKernelRequestWithOriginalRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/OriginalRequestListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RejectExplicitFrontControllerRequestsListenerTest\:\:prohibitedRequestDataProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RejectExplicitFrontControllerRequestsListenerTest\:\:validRequestDataProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/RejectExplicitFrontControllerRequestsListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestForward\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestForwardSubRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestRedirectPrependSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestRedirectSubRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testOnKernelRequestRedirectWithLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:testSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\RequestEventListenerTest\:\:\$event is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: tests/bundle/Core/EventListener/RequestEventListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RoutingListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\RoutingListenerTest\:\:testOnSiteAccessMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - - - message: '#^Parameter \#1 \$configResolver of class Ibexa\\Bundle\\Core\\EventListener\\RoutingListener constructor expects Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 2 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - - - message: '#^Parameter \#2 \$urlAliasRouter of class Ibexa\\Bundle\\Core\\EventListener\\RoutingListener constructor expects Symfony\\Component\\Routing\\RouterInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 2 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - - - message: '#^Parameter \#3 \$urlAliasGenerator of class Ibexa\\Bundle\\Core\\EventListener\\RoutingListener constructor expects Ibexa\\Core\\MVC\\Symfony\\Routing\\Generator, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 2 - path: tests/bundle/Core/EventListener/RoutingListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SessionSetDynamicNameListenerTest\:\:testOnSiteAccessMatch\(\) has parameter \$configuredSessionStorageOptions with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SessionSetDynamicNameListenerTest\:\:testOnSiteAccessMatch\(\) has parameter \$expectedSessionStorageOptions with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:siteAccessMatchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has parameter \$expectedSemanticPathinfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has parameter \$expectedVPArray with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has parameter \$expectedVPString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchMasterRequest\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has parameter \$expectedViewParameters with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has parameter \$semanticPathinfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has parameter \$vpString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Parameter \#2 \$offset of function substr expects int, int\<1, max\>\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\FooServiceInterface\:\:someMethod\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\FooServiceInterface\:\:someMethod\(\) has parameter \$arg with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/Stubs/FooServiceInterface.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\TestOutput\:\:clear\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/Stubs/TestOutput.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\TestOutput\:\:doWrite\(\) has parameter \$message with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/Stubs/TestOutput.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\TestOutput\:\:doWrite\(\) has parameter \$newline with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventListener/Stubs/TestOutput.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\TestOutput\:\:\$output has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/Core/EventListener/Stubs/TestOutput.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContent\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContent\(\) should return string but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContentView\(\) has parameter \$defaultParams with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderContentView\(\) should return string but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderLocation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:renderLocation\(\) should return string but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewManager\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewManager.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewProvider\:\:getView\(\) should return Ibexa\\Core\\MVC\\Symfony\\View\\View but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewProvider.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\ViewProvider\:\:setSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/Stubs/ViewProvider.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:testGetControllerMatchedView\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:testGetControllerNoBuilder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:testGetControllerWithClosure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:\$controllerResolver \(PHPUnit\\Framework\\MockObject\\MockObject&Symfony\\Component\\HttpKernel\\Controller\\ControllerResolver\) does not accept PHPUnit\\Framework\\MockObject\\MockObject&Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\EventListener\\ViewControllerListenerTest\:\:\$viewConfigurator is unused\.$#' - identifier: property.unused - count: 1 - path: tests/bundle/Core/EventListener/ViewControllerListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\CrowdinRequestLocaleSubscriberTest\:\:testSetLocale\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\CrowdinRequestLocaleSubscriberTest\:\:testSetLocale\(\) has parameter \$shouldHaveCustomLocale with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\CrowdinRequestLocaleSubscriberTest\:\:testSetRequestsProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:getTrustedHeaderEventSubscriberTestData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:testTrustedHeaderEventSubscriberWithTrustedProxy\(\) has parameter \$headers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\TrustedHeaderClientIpEventSubscriberTest\:\:testTrustedHeaderEventSubscriberWithTrustedProxy\(\) has parameter \$server with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php - - - - message: '#^Binary operation "\." between ''rendered_'' and \(Closure\(array\\)\: string\)\|string results in an error\.$#' - identifier: binaryOp.invalid - count: 1 - path: tests/bundle/Core/Fragment/DirectFragmentRendererTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpFoundation\\\\Response'' and Symfony\\Component\\HttpFoundation\\Response will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 4 - path: tests/bundle/Core/Fragment/DirectFragmentRendererTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:buildFragmentListenerProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:testBuildFragmentListener\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:testBuildFragmentListener\(\) has parameter \$isFragmentCandidate with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:testBuildFragmentListener\(\) has parameter \$requestUri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:testBuildFragmentListenerNoRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasCleanerTest\:\:testRemoveAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasCleanerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:supportsValueProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationAlreadyStored\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationInvalidVariation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationNotStored\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationNotStoredHavingReferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationOriginal\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationOriginalNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testGetVariationWrongValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\AliasGeneratorTest\:\:testSupportsValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\BinaryLoaderTest\:\:testFindBadPathRoot\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/BinaryLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\BinaryLoaderTest\:\:testFindMissing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/BinaryLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\BinaryLoaderTest\:\:testFindNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/BinaryLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\Resolver\\ProxyResolverTest\:\:testResolveAndRemovePortUsingProxyHost\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\Resolver\\ProxyResolverTest\:\:testResolveAndRemovePortUsingProxyHostWithTrailingSlash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\Resolver\\ProxyResolverTest\:\:testResolveUsingProxyHostWithTrailingSlash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/Resolver/ProxyResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\Resolver\\RelativeResolverTest\:\:testResolve\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/Resolver/RelativeResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\ResolverFactoryTest\:\:testCreateProxyCacheResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Cache\\ResolverFactoryTest\:\:testCreateRelativeCacheResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Cache/ResolverFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:getFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:getSetOptionNoDefaulValueProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:getSetOptionWithDefaulValueProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionNoDefaultValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionNoDefaultValue\(\) has parameter \$optionName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionNoDefaultValue\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has parameter \$defaultValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has parameter \$optionName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetEzVariationImagineFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetEzVariationImagineOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetEzVariationNoReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetEzVariationWithReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetNoEzVariationInvalidImagineFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\FilterConfigurationTest\:\:testGetOnlyImagineFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/FilterConfigurationTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:loadProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoad\(\) has parameter \$color with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoad\(\) has parameter \$thickX with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoad\(\) has parameter \$thickY with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoadDefaultColor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\GrayscaleFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/GrayscaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ReduceNoiseFilterLoaderTest\:\:testLoadInvalidDriver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ReduceNoiseFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:testLoadHeighten\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:testLoadWiden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightDownOnlyFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightDownOnlyFilterLoaderTest\:\:testLoadInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleHeightFilterLoaderTest\:\:testLoadFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php - - - - message: '#^Method PHPUnit\\Framework\\TestCase\:\:createMock\(\) invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleHeightFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:loadInvalidProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:testLoadInvalidOptions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:testLoadInvalidOptions\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthDownOnlyFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthDownOnlyFilterLoaderTest\:\:testLoadInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthDownOnlyFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthFilterLoaderTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleWidthFilterLoaderTest\:\:testLoadFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php - - - - message: '#^Method PHPUnit\\Framework\\TestCase\:\:createMock\(\) invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/ScaleWidthFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoaderTest\:\:loadWithOptionProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoaderTest\:\:testLoadNoOption\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoaderTest\:\:testLoadWithOption\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoaderTest\:\:testLoadWithOption\(\) has parameter \$degrees with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\UnsupportedFilterTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/Filter/UnsupportedFilterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:getFilePathProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:resolveProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testGetFilePath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testGetFilePath\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testGetFilePath\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testGetFilePath\(\) has parameter \$path with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testIsStoredImageDoesntExist\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testIsStoredImageExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testRemoveEmptyFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testRemoveWithFilters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has parameter \$path with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has parameter \$requestUrl with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolve\(\) has parameter \$variationPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolveMissing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testResolveNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:testStore\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\ImageAsset\\AliasGeneratorTest\:\:testGetVariationOfImageAsset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\ImageAsset\\AliasGeneratorTest\:\:testGetVariationOfNonImageAsset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\ImageAsset\\AliasGeneratorTest\:\:testSupport\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/ImageAsset/AliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorConfiguratorTest\:\:testConfigure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorConfiguratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:getVariationProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:supportsValueProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalFound\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationOriginalNotFound\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationReturnsPlaceholderIfBinaryDataIsNotAvailable\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationSkipsPlaceholderGeneration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationSkipsPlaceholderGeneration\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testGetVariationWrongValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:testSupportsValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderAliasGeneratorTest\:\:\$placeholderOptions type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertColorEquals\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertColorEquals\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertSizeEquals\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:assertSizeEquals\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:getPlaceholderDataProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:testGetPlaceholder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:testGetPlaceholder\(\) has parameter \$expectedText with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:testGetPlaceholder\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistryTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistryTest\:\:testGetProviderKnown\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistryTest\:\:testGetProviderUnknown\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistryTest\:\:testSupports\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/PlaceholderProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPathGenerator\\AliasDirectoryVariationPathGeneratorTest\:\:testGetVariationPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPathGenerator/AliasDirectoryVariationPathGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPathGenerator\\OriginalDirectoryVariationPathGeneratorTest\:\:testGetVariationPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPathGenerator/OriginalDirectoryVariationPathGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:createPurger\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:createPurger\(\) has parameter \$fileList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:testDoesNotPurgeNotExistingItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:testIteratesOverItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\ImageFileVariationPurgerTest\:\:testPurgesExistingItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/ImageFileVariationPurgerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileListTest\:\:configureRowReaderMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileListTest\:\:configureRowReaderMock\(\) has parameter \$fileList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileListTest\:\:testImageIdTransformation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileListTest\:\:testIterator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileListTest.php - - - - message: '#^Cannot access offset ''path'' on array\{scheme\?\: string, host\?\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\|false\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:getExpectedRequestContext\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:getExpectedRequestContext\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:providerGenerateNoSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:providerGenerateWithSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testGenerateNoSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testGenerateNoSiteAccess\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testGenerateReverseSiteAccessMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testGenerateWithSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testGetContextBySimplifiedRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testMatchRequestRegularPathinfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:testMatchRequestWithSemanticPathinfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Offset ''scheme'' might not exist on array\{scheme\?\: string, host\: string, port\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\.$#' - identifier: offsetAccess.notFound - count: 4 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Offset ''scheme'' might not exist on array\{scheme\?\: string, host\: string, port\?\: int\<0, 65535\>, user\?\: string, pass\?\: string, path\?\: string, query\?\: string, fragment\?\: string\}\.$#' - identifier: offsetAccess.notFound - count: 2 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Parameter \#3 \$length of function substr expects int\|null, int\<0, max\>\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/Routing/DefaultRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\JsRouting\\ExposedRoutesExtractorTest\:\:getDataForTestGetBaseUrl\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/Routing/JsRouting/ExposedRoutesExtractorTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouter\:\:setConfigResolver\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:resetConfigResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestDeactivatedUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationCaseRedirectWithRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationCaseRedirectWithRootRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestResourceCaseRedirectWithRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestVirtualCaseRedirectWithRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestWithRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\UrlAliasRouterTest\:\:testMatchRequestWithRootLocationAndExclusion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Parameter \#1 \$configResolver of method Ibexa\\Bundle\\Core\\Routing\\UrlAliasRouter\:\:setConfigResolver\(\) expects Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\SiteAccess\\MatcherBuilderTest\:\:testBuildMatcherNoService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/SiteAccess/MatcherBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\SiteAccess\\MatcherBuilderTest\:\:testBuildMatcherService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/SiteAccess/MatcherBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\SiteAccess\\MatcherBuilderTest\:\:testBuildMatcherServiceWrongInterface\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/SiteAccess/MatcherBuilderTest.php - - - - message: '#^Parameter \#1 \$siteAccessMatcherRegistry of class Ibexa\\Bundle\\Core\\SiteAccess\\MatcherBuilder constructor expects Ibexa\\Bundle\\Core\\SiteAccess\\SiteAccessMatcherRegistryInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 3 - path: tests/bundle/Core/SiteAccess/MatcherBuilderTest.php - - - - message: '#^Parameter \#1 \$matchers of class Ibexa\\Bundle\\Core\\SiteAccess\\SiteAccessMatcherRegistry constructor expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/bundle/Core/SiteAccess/SiteAccessMatcherRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:configureUrlHandlerRegistry\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:configureUrlHandlerRegistry\(\) has parameter \$schemes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) has parameter \$n with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) has parameter \$schemes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createSearchResults\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createSearchResults\(\) has parameter \$urls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:testCheck\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:testCheckUnsupported\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Core/URLChecker/URLCheckerTest.php - - - - message: '#^Argument of an invalid type PHPUnit\\Framework\\MockObject\\MockObject supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:getDataCollectorMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testAddGetCollector\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testCollect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetAllCollectors\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetInvalidCollector\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetPanelTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetPanelTemplateNothing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetToolbarTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\Collector\\IbexaCoreCollectorTest\:\:testGetToolbarTemplateNothing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^PHPDoc tag @var above foreach loop does not specify variable name\.$#' - identifier: varTag.noVariable - count: 1 - path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\Debug\\DependencyInjection\\Compiler\\DataCollectorPassTest\:\:testAddCollector\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/Debug/DependencyInjection/Compiler/DataCollectorPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPassTest\:\:testBinarydataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPassTest\:\:testDefaultHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPassTest\:\:testMetadataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPassTest\:\:testUnknownBinarydataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\Compiler\\IOConfigurationPassTest\:\:testUnknownMetadataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\BaseFlysystemTest\:\:provideHandlerConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\BaseFlysystemTest\:\:validateConfiguredContainer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\BaseFlysystemTest\:\:validateConfiguredHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\BaseFlysystemTest\:\:\$filesystemServiceId has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\BaseFlysystemTest\:\:\$flysystemAdapterServiceId has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\MetadataHandler\\LegacyDFSClusterTest\:\:provideHandlerConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactory\\MetadataHandler\\LegacyDFSClusterTest\:\:validateConfiguredHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\ArrayNodeDefinition'' and Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:provideExpectedParentServiceId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:provideHandlerConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:registerHandler\(\) has parameter \$name with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:testAddConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:testConfigureHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:testGetParentServiceId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:validateConfiguredContainer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\ConfigurationFactoryTest\:\:validateConfiguredHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$container$#' - identifier: parameter.notFound - count: 1 - path: tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php - - - - message: '#^Call to an undefined method object\:\:decorate\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\IbexaIOExtensionTest\:\:testParametersWithBinarydataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\IbexaIOExtensionTest\:\:testParametersWithMetadataHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Bundle\\IO\\DependencyInjection\\IbexaIOExtensionTest\:\:testParametersWithoutConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/bundle/IO/DependencyInjection/IbexaIOExtensionTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\IO\\IOBinarydataHandler\\Flysystem\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/bundle/IO/Migration/FileMigratorTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/bundle/IO/Migration/FileMigratorTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/bundle/IO/Migration/FileMigratorTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\IO\\Migration\\FileMigratorTest\:\:\$binaryFlysystemFrom \(Ibexa\\Core\\IO\\IOBinarydataHandler\\Flysystem\) does not accept Ibexa\\Core\\IO\\IOBinarydataHandler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/IO/Migration/FileMigratorTest.php - - - - message: '#^Property Ibexa\\Tests\\Bundle\\IO\\Migration\\FileMigratorTest\:\:\$binaryFlysystemTo \(Ibexa\\Core\\IO\\IOBinarydataHandler\\Flysystem\) does not accept Ibexa\\Core\\IO\\IOBinarydataHandler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/bundle/IO/Migration/FileMigratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\BaseCoreFieldTypeIntegrationTest\:\:getDatabaseConnection\(\) should return Doctrine\\DBAL\\Connection but returns object\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php - - - - message: '#^PHPDoc tag @return with type object is not subtype of native type Doctrine\\DBAL\\Connection\.$#' - identifier: return.phpDocType - count: 1 - path: tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php - - - - message: '#^Call to an undefined method object\:\:match\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/integration/Core/BasicKernelTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\BinaryBase\\BinaryBaseStorage\\BinaryBaseStorageTest\:\:getContext\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\BinaryBase\\BinaryBaseStorage\\BinaryBaseStorageTest\:\:providerOfFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\BinaryBase\\BinaryBaseStorage\\BinaryBaseStorageTest\:\:\$gateway \(Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\\Gateway\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/BinaryBase/BinaryBaseStorage/BinaryBaseStorageTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 4 - path: tests/integration/Core/FieldType/FieldConstraintsStorage/FieldConstraintsStorageTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/FieldType/FieldConstraintsStorage/FieldConstraintsStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\FieldType\\FieldConstraintsStorage\\Stub\\ExampleFieldConstraintsStorage\:\:__construct\(\) has parameter \$fieldConstraints with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldConstraintsStorage.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Persistence\\Content\\FieldTypeConstraints\[\]\)\: Unexpected token "\\n ", expected variable at offset 82 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: tests/integration/Core/FieldType/FieldConstraintsStorage/Stub/ExampleFieldConstraintsStorage.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\IO\\BinarydataHandler\\FlysystemTest\:\:getBinaryDataHandler\(\) should return Ibexa\\Core\\IO\\IOBinarydataHandler but returns object\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\IO\\BinarydataHandler\\FlysystemTest\:\:getFlysystemFilesystem\(\) should return League\\Flysystem\\FilesystemOperator but returns object\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - - - message: '#^Parameter \#1 \$inputStream of method Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:setInputStream\(\) expects resource, resource\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - - - message: '#^Parameter \#1 \$stream of function fclose expects resource, resource\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/IO/BinarydataHandler/FlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\MemberOfLimitationTest\:\:testCanUserAssignRoleToUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/MemberOfLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\MemberOfLimitationTest\:\:userPermissionLimitationProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/MemberOfLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserCreateContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserDeleteContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserDeleteContentTranslation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:providerForCanUserEditOrPublishContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserCreateContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserEditContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\PermissionResolver\\LanguageLimitationIntegrationTest\:\:testCanUserPublishContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Limitation/PermissionResolver/LanguageLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\RoleLimitationTest\:\:testCanUserAssignRole\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/RoleLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Limitation\\RoleLimitationTest\:\:userPermissionLimitationProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Limitation/RoleLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Search\\Content\\IndexerGatewayTest\:\:getDataForContentInSubtree\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Search\\Content\\IndexerGatewayTest\:\:getDataForContentSince\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Persistence/Search/Content/IndexerGatewayTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Persistence\\Variation\\InMemoryVariationHandler\:\:getVariation\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Persistence/Variation/InMemoryVariationHandler.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraft\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraftVersion1\(\) has parameter \$contentFieldNameIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraftVersion1\(\) has parameter \$contentTypeIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createContentDraftVersion1\(\) has parameter \$locationId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createMultilingualContentDraft\(\) has parameter \$multilingualFieldValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseContentServiceTest\:\:createUpdatedDraftVersion2NotAdmin\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Parameter \#1 \$id of method Ibexa\\Contracts\\Core\\Repository\\UserService\:\:loadUserGroup\(\) expects int, string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/BaseContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createMultilingualTestContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createTestContent\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:createTestContentForUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseNonRedundantFieldSetTest\:\:updateTestContent\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseNonRedundantFieldSetTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Call to method commit\(\) on an unknown class Ibexa\\Solr\\Handler\.$#' - identifier: class.notFound - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesCorrectUnsorted\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesEqual\(\) has parameter \$actualValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesEqual\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesEqual\(\) has parameter \$propertyName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesEqual\(\) has parameter \$sortArray with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertStructPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertStructPropertiesCorrect\(\) has parameter \$additionalProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createFolder\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createRoleWithPolicies\(\) has parameter \$policiesData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createRoleWithPolicies\(\) has parameter \$roleName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createSimpleContentType\(\) has parameter \$fieldsToDefine with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createUserWithPolicies\(\) has parameter \$policiesData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:getSetupFactory\(\) should return Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory but returns object\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:refreshSearch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:sortItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:sortItems\(\) has parameter \$items with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:updateFolder\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$propertyNames$#' - identifier: parameter.notFound - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^PHPDoc tag @var for variable \$searchHandler contains unknown class Ibexa\\Solr\\Handler\.$#' - identifier: class.notFound - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Parameter \#1 \$string1 of function strcmp expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Parameter \#2 \$string2 of function strcmp expects string, bool\|float\|int\|string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentCreateStruct\:\:\$remoteId \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:\$repository \(Ibexa\\Contracts\\Core\\Repository\\Repository\) does not accept null\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:\$setupFactory \(Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\) does not accept object\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTrashServiceTest\:\:createTrashItem\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/BaseTrashServiceTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#' - identifier: property.protected - count: 5 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\SearchResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertSearchResultItems\(\) has parameter \$ignoreOrder with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertUsagesSearchResultItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:assertUsagesSearchResultItems\(\) has parameter \$expectedContentInfoIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:doTestFindUrls\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseURLServiceTest\:\:doTestFindUrls\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/BaseURLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Bookmark\\\\BookmarkList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Bookmark\\BookmarkList will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testCreateBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testCreateBookmarkThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testDeleteBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testDeleteBookmarkThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testIsBookmarked\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testIsNotBookmarked\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\BookmarkServiceTest\:\:testLoadBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Common\\SlugConverter\:\:setConfigurationValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Common/SlugConverter.php - - - - message: '#^Variable \$definition might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: tests/integration/Core/Repository/Container/Compiler/SetAllServicesPublicPass.php - - - - message: '#^Cannot call method getValue\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: method.nonObject - count: 1 - path: tests/integration/Core/Repository/ContentService/CopyNonTranslatableFieldsFromPublishedVersionTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentService/VersionValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testAddRelationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCopyContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCopyContentThrowsUnauthorizedExceptionWithGivenVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCopyContentToAuthorizedLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCopyContentToAuthorizedLocationWithSubtreeLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCountContentDraftsReturnZero\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCreateContentDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCreateContentDraftThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCreateContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testCreateContentThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testDeleteContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testDeleteRelationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testDeleteVersionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByContentInfoThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByContentInfoThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByContentInfoThrowsUnauthorizedExceptionWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByRemoteIdThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByRemoteIdThrowsUnauthorizedExceptionWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByVersionInfoThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentByVersionInfoThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentDraftsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentDraftsThrowsUnauthorizedExceptionWithUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentInfoByRemoteIdThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentInfoListSkipsUnauthorizedItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentInfoThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentThrowsUnauthorizedExceptionOnDrafts\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentThrowsUnauthorizedExceptionWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadContentThrowsUnauthorizedExceptionsOnArchives\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadRelationsForDraftVersionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadRelationsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadRelationsWithUnauthorizedRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadReverseRelationsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionInfoByIdThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionInfoByIdThrowsUnauthorizedExceptionForFirstDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionInfoByIdThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionInfoThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionInfoThrowsUnauthorizedExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testLoadVersionsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testPublishVersionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testSudo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testUpdateContentMetadataThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceAuthorizationTest\:\:testUpdateContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/ContentServiceAuthorizationTest.php - - - - message: '#^Access to an undefined property object\:\:\$content\.$#' - identifier: property.notFound - count: 6 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Access to an undefined property object\:\:\$reverseRelations\.$#' - identifier: property.notFound - count: 9 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Language'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Section'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\User'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Cannot access property \$sortField on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Cannot access property \$sortOrder on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Cannot access property \$sourceContentInfo on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation\|null\.$#' - identifier: property.nonObject - count: 9 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) has parameter \$actualAliases with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) has parameter \$expectedAliasProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAllFieldsEquals\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertDefaultContentStates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertExpectedRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertLocaleFieldsEquals\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertTranslationDoesNotExist\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:contentRemoteIdVersionLanguageProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:createUserWithVersionReadLimitations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:filterHiddenLocations\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:getExpectedMediaContentInfoProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:providerForDeleteTranslationFromDraftRemovesUrlAliasOnPublishing\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testAddRelationAddsRelationToContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testAddRelationSetsExpectedRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testAddRelationThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testChangeContentName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyContentInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyContentInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyContentWithGivenVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyContentWithNewOwner\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyTranslationsFromInvalidPublishedContentToDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCopyTranslationsFromPublishedToDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftAndLoadAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftInOtherLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftLoadContentByContentInfoStillLoadsPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftLoadContentByRemoteIdStillLoadsPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftLoadContentStillLoadsPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftLoadVersionInfoStillLoadsPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftSetsContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftSetsVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftWithRelationsCreatesExpectedRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentDraftWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentRequiredFieldMissing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentSetsExpectedContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentSetsExpectedContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentSetsExpectedVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentThrowsContentFieldValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentThrowsInvalidArgumentExceptionOnFieldTypeNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentThrowsInvalidArgumentExceptionWithLocationCreateParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterCreatesExpectedLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterCreatesExpectedLocation\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterDoesNotCreateLocationImmediately\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithLocationCreateParameterInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCreateContentWithRomanianSpecialCharsInTitle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testCustomURLAliasesNotHistorizedOnUpdatedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteContentInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteContentInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteContentWithEmptyBinaryField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteRelation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteRelationThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteRelationThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationDeletesSingleTranslationVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftArchivesUrlAliasOnPublishing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftRemovesUrlAliasOnPublishing\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftThrowsBadStateExceptionOnMainTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftThrowsBadStateExceptionOnPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftThrowsBadStateExceptionOnSingleTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationFromDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationMainLanguageThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationUpdatesInitialLanguageCodeVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteTranslationUpdatesUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteVersionInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteVersionInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteVersionThrowsBadStateExceptionOnPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testDeleteVersionWorksIfOnlyVersionIsDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testHideContentWithParentLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByContentInfoThrowsNotFoundExceptionWithVersionNumberParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByContentInfoWithLanguageParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByContentInfoWithVersionNumberParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteIdThrowsNotFoundExceptionWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteIdWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByRemoteIdWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentByVersionInfoWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentDraftsReturnsEmptyArrayByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentDraftsWithFirstParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoByRemoteIdSetsExpectedContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoByRemoteIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoListSkipsNotFoundItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoSetsExpectedContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentInfoThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentListByContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentThrowsNotFoundExceptionWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentWithPrioritizedLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentWithPrioritizedLanguagesThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadContentWithThirdParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadRelationsSkipsArchivedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadRelationsSkipsDraftContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadReverseRelationListSkipsDraftContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadReverseRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadReverseRelationsSkipsArchivedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadReverseRelationsSkipsDraftContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoById\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdSetsExpectedVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdWithSecondParameterSetsExpectedVersionInfo\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoThrowsNotFoundExceptionWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionsAfterDeletingTwoDrafts\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionsOfStatusArchived\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionsOfStatusDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionsSetsExpectedVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testNewContentCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testNewContentMetadataUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testNewContentUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishContentWithoutPublishPolicyThrowsException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionCreatesLocationsDefinedOnCreate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionDoesNotChangePublishedDate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionFromContentDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionFromContentDraftArchivesOldVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionFromContentDraftUpdatesContentInfoCurrentVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionFromOldContentDraftArchivesNewerVersionNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionSetsExpectedContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionSetsExpectedContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionSetsExpectedVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishVersionWithSelectedLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testPublishWorkflow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testRevealContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testRevealContentWithHiddenChildren\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testRevealContentWithHiddenParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testURLAliasesCreatedForNewContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testURLAliasesCreatedForUpdatedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataCheckWithinTransaction\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataNotUpdatesContentVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataThrowsInvalidArgumentExceptionOnDuplicateRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentMetadataThrowsInvalidArgumentExceptionOnNoMetadataPropertiesSet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentSetsExpectedFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentThrowsInvalidArgumentExceptionWhenFieldTypeDoesNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentValidatorIgnoresRequiredFieldsOfNotUpdatedLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentWhenMandatoryFieldIsEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdateContentWithNotUpdatingMandatoryField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testUpdatingDraftDoesNotUpdateOldVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^PHPDoc tag @var for variable \$field has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAllFieldsEquals\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertLocaleFieldsEquals\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:normalizeFields\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 12 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$locations of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:filterHiddenLocations\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 5 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$string of function md5 expects string, float given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#2 \$actualAliases of method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:assertAliasesCorrect\(\) expects array, iterable\ given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#2 \$code of class InvalidArgumentException constructor expects int, string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testAddFieldDefinitionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testAssignContentTypeGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testCopyContentTypeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testCreateContentTypeDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testCreateContentTypeGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testCreateContentTypeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testDeleteContentTypeGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testDeleteContentTypeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testPublishContentTypeDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testRemoveFieldDefinitionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testUnassignContentTypeGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testUpdateContentTypeDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testUpdateContentTypeGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceAuthorizationTest\:\:testUpdateFieldDefinitionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceAuthorizationTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCreateStruct supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionUpdateStruct supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 5 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentType'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeDraft'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 4 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroup'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroup will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 3 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroupCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeGroupUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\ContentTypeUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\FieldDefinitionCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\FieldDefinitionUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 6 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Cannot access property \$fieldSettings on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 2 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 4 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Cannot call method getDescriptions\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: method.nonObject - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Cannot call method getNames\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null\.$#' - identifier: method.nonObject - count: 2 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:assertContentTypeGroupsCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:assertCopyContentTypeValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:assertCopyContentTypeValues\(\) has parameter \$excludedProperties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionAddsFieldToContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionAddsFieldToContentAdded\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionThrowsBadStateExceptionContentInstances\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionThrowsBadStateExceptionNonRepeatableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionThrowsContentTypeFieldDefinitionValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionThrowsInvalidArgumentExceptionDuplicateFieldIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAssignContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAssignContentTypeGroupInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAssignContentTypeGroupInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAssignContentTypeGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCanLoadContentTypeDraftEvenIfDiffrentOwner\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentType\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCopyContentTypeWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentThrowsContentTypeValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructLanguageDependentValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructLanguageDependentValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsContentTypeFieldDefinitionValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateContentTypeIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateFieldIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsInvalidArgumentExceptionDuplicateRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeThrowsInvalidArgumentExceptionGroupsEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeGroupWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeGroupWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteContentTypeThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testDeleteUserDrafts\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testIsContentTypeUsed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByIdentifierReturnsCorrectInstance\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteIdReturnsCorrectInstance\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteIdReturnsCorrectInstance\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeByRemoteIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeDraftThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeDraftThrowsNotFoundExceptionIfDiffrentOwner\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeFieldDefinitions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupByIdentifierStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupsIdentifiers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeGroupsIdentifiers\(\) has parameter \$groups with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeStructValues\(\) has parameter \$userGroupType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypeWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypesContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testLoadContentTypesContent\(\) has parameter \$types with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeCreateStructValues\(\) has parameter \$createStruct with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeGroupCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeGroupCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeGroupCreateStructValues\(\) has parameter \$createStruct with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeGroupUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeUpdateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewContentTypeUpdateStructValues\(\) has parameter \$typeUpdate with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionCreateStructValues\(\) has parameter \$createStruct with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testNewFieldDefinitionUpdateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testPublishContentTypeDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testPublishContentTypeDraftRefreshesContentTypesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testPublishContentTypeDraftSetsNameSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testPublishContentTypeDraftThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testPublishContentTypeDraftThrowsInvalidArgumentExceptionWithoutFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveContentTypeTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveContentTypeTranslationWithMultilingualData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemoved\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemoved\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemovesFieldFromContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemovesFieldFromContentRemoved\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionThrowsInvalidArgumentExceptionOnWrongDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUnassignContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUnassignContentTypeGroupThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUnassignContentTypeGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftStructValues\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftThrowsInvalidArgumentExceptionDuplicateRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftThrowsInvalidArgumentExceptionNoDraftForAuthenticatedUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftWithNewTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftWithNewTranslationWithMultilingualData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructLanguageDependentValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructLanguageDependentValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionThrowsInvalidArgumentExceptionFieldIdentifierExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionThrowsInvalidArgumentExceptionForUndefinedField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionWithEmptyStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionWithNewTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$actualObject of method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertStructPropertiesCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) expects array\|ArrayAccess, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayNotHasKey\(\) expects array\|ArrayAccess, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 6 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 6 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Variable \$nameValue in PHPDoc tag @var does not exist\.$#' - identifier: varTag.variableNotFound - count: 1 - path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:addFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContentType\(\) has parameter \$fieldCreateOverride with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContentType\(\) has parameter \$typeCreateOverride with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createMultilingualContent\(\) has parameter \$fieldData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createMultilingualContent\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getOverride\(\) has parameter \$overrideValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidContentTypeConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidFieldConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidMultilingualFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:postCreationHook\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:removeFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testAddFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testContentTypeField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testContentTypeField\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopiedExternalData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopiedFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopiedFieldType\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopyField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopyField\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentTypeFailsWithInvalidFieldSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentTypeFailsWithInvalidValidatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentWithEmptyFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedEmptyFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedEmptyFieldValue\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedFieldType\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testDeleteContent\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testDeleteDraftOfPublishedContentDoesNotDeleteData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testDeleteTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testExceededVersionArchiveLimitHasNoEffectOnContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testFromHash\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testFromHash\(\) has parameter \$hash with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsEmptyValue\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsNotEmptyValue\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeFieldType\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueData\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueType\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadExternalData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishContentWithEmptyFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishedFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishedFieldType\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishedName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testRemoveFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testSettingsSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testToHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testToHash\(\) has parameter \$expectedHash with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testToHash\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateContentFails\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateContentWithNewTranslationOnEmptyField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateFieldNoNewContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateNoNewContentTypeFieldStillAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateNoNewContentTypeFieldStillAvailable\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateTypeFieldStillAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateTypeFieldStillAvailable\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdatedDataCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdatedNoNewContentDataCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testValidatorSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^PHPDoc tag @param for parameter \$repository with type Ibexa\\Contracts\\Core\\Repository is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' - identifier: parameter.phpDocType - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^PHPDoc tag @var with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\FieldType\.$#' - identifier: varTag.nativeType - count: 2 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Parameter \#1 \$field of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Parameter \$repository of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:postCreationHook\(\) has invalid type Ibexa\\Contracts\\Core\\Repository\.$#' - identifier: class.notFound - count: 1 - path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getDataForTestFindContentFieldCriterion\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Checkbox\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, stdClass given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Country\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\DateAndTime\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:testUpdateContentFails\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\EmailAddress\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Parameter \#1 \$email of class Ibexa\\Core\\FieldType\\EmailAddress\\Value constructor expects string, null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:cleanupStorageDir\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:setUpIgnoredPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:setUpIgnoredPath\(\) has parameter \$ignoredFiles with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:testUpdateWithRemove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:uriExistsOnIO\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:uriExistsOnIO\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$ignoredPathList type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$storageDirConfigKey has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Static property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$installDir \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\ISBN\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Parameter \#1 \$isbn of class Ibexa\\Core\\FieldType\\ISBN\\Value constructor expects string, null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - - - message: '#^Cannot access property \$alternativeText on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Cannot access property \$uri on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:getFixtureData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:getStoragePrefix\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:publishNewImage\(\) has parameter \$parentLocationIDs with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:\$loadedImagePath has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Integer\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Integer\\Value constructor expects int\|null, float given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 5 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:assertContentFieldHasCorrectData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:checkFullTextSupport\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidMultilingualFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Keyword\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestTruncateField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:testFindContentFieldCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:testKeywordsAreCaseSensitive\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:testTruncateField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:testUpdateContentKeywords\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\MapLocation\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:testCopyContentCopiesFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:testCreateContentRelationsProcessedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:testSubtreeCopyContentCopiesFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:testUpdateContentRelationsProcessedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:testCopyContentCopiesFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:testCreateContentRelationsProcessedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:testSubtreeCopyContentCopiesFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:testUpdateContentRelationsProcessedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertFindResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertFindResult\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertSortResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:checkCustomFieldsSupport\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:checkFullTextSupport\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:checkSearchEngineSupport\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:findProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:fullTextFindProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getResultContentIdList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:modifyFieldSortClause\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:sortProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testCreateTestContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$valueOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$valueTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$ascending with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Parameter \#2 \$fieldName of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:doModifyField\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Parameter \#2 \$fieldName of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:doModifyField\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:checkOperatorSupport\(\) has parameter \$operator with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:findMultivaluedProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testCreateMultivaluedTestContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$filter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$modifyField with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:\$legacyUnsupportedOperators type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Selection\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getValidFieldConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\TextBlock\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\TextLine\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:testUpdateContentFails\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidUpdateFieldData\(\) should return array but returns Ibexa\\Core\\FieldType\\Url\\Value\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Parameter \#1 \$link of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Parameter \#2 \$text of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\:\:\$content\.$#' - identifier: property.notFound - count: 2 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) should return array but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testAddFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopiedExternalData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopiedFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopiedFieldType\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopyField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopyField\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCreateContentWithEmptyFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testRemoveFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testUpdateFieldDefinitionWithIncompleteSettingsSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - - - message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\FieldType'' and Ibexa\\Contracts\\Core\\Repository\\FieldType will always evaluate to true\.$#' - identifier: method.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldTypeServiceTest\:\:testGetFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldTypeServiceTest\:\:testGetFieldTypeThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldTypeServiceTest\:\:testGetFieldTypes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldTypeServiceTest\:\:testHasFieldTypeReturnsFalse\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldTypeServiceTest\:\:testHasFieldTypeReturnsTrue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - - - message: '#^Cannot access property \$pathString on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:find\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:getFilterFactories\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:getUserLimitationData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' - identifier: argument.type - count: 5 - path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - - - message: '#^Call to an undefined method Traversable\\:\:offsetGet\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Cannot use array destructuring on iterable\\.$#' - identifier: offsetAccess.nonArray - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:createMultiplePagesOfContentItems\(\) should return int but returns int\|null\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getDataForTestFindContentWithLocationCriterion\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getFilterFactories\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getListOfSupportedSortClauses\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Parameter \#1 \$sortClause of method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:performAndAssertSimpleSortClauseQuery\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause, object given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceAuthorizationTest\:\:testCreateLanguageThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceAuthorizationTest\:\:testDeleteLanguageThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceAuthorizationTest\:\:testDisableLanguageThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceAuthorizationTest\:\:testEnableLanguageThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceAuthorizationTest\:\:testUpdateLanguageNameThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceAuthorizationTest.php - - - - message: '#^Comparison operation "\<" between int\<80300, 80499\> and 50400 is always false\.$#' - identifier: smaller.alwaysFalse - count: 1 - path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceMaximumSupportedLanguagesTest\:\:testCreateMaximumLanguageLimit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceMaximumSupportedLanguagesTest\:\:\$createdLanguages type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - - message: '#^Result of && is always false\.$#' - identifier: booleanAnd.alwaysFalse - count: 1 - path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Language'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 3 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LanguageCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LanguageCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:loadLanguagesReturnsAnEmptyArrayByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testCreateLanguageInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testCreateLanguageInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testCreateLanguageSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testCreateLanguageSetsIdPropertyOnReturnedLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testCreateLanguageThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testDeleteLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testDeleteLanguageThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testDisableLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testEnableLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testGetDefaultLanguageCode\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguageById\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguageByIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguageThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguageThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testLoadLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testNewLanguageCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testUpdateLanguageName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testUpdateLanguageNameInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testUpdateLanguageNameInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceTest\:\:testUpdateLanguageNameThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:assertCanUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:assertCanUser\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:loginAsEditorUserWithLimitations\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\ContentLimitationsMixIntegrationTest\:\:providerForCanUser\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\ContentLimitationsMixIntegrationTest\:\:testCanUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - - - message: '#^Cannot access property \$contentInfo on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:providerForCanUserEditOrPublishContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:testCanUserEditContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:testCanUserReadTrashedContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testCopySubtreeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testCreateLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testCreateLocationThrowsUnauthorizedExceptionDueToLackOfContentManageLocationsPolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testDeleteLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testDeleteLocationWithSubtreeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testHideLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testLoadLocationByRemoteIdThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testLoadLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testLoadLocationsNoAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testMoveSubtreeThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testSwapLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testUnhideLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceAuthorizationTest\:\:testUpdateLocationThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, string given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 12 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: property.nonObject - count: 11 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Cannot call method getContentInfo\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: method.nonObject - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertAliasesBeforeCopy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertAliasesBeforeCopy\(\) has parameter \$expectedSubItemAliases with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertDefaultContentStates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertGeneratedAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertGeneratedAliases\(\) has parameter \$expectedAliases with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has parameter \$expectedValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has parameter \$stopId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:dataProviderForOutOfRangeLocationPriority\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadLocationProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadSubtreeProperties\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadSubtreeProperties\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:providerForLoadLocationChildrenRespectsParentSortingClauses\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testBookmarksAreSwappedAfterSwapLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCopySubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCopySubtreeIncrementsChildCountOfNewParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCopySubtreeThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCopySubtreeUpdatesSubtreeProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCopySubtreeWithAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionContentAlreadyBelowParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionParentIsSubLocationOfContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has parameter \$priority with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionRemoteIdExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testDeleteContentObjectLastLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testDeleteLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testDeleteLocationDecrementsChildCountOnParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testDeleteLocationDeletesRelatedBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testGetLocationChildCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testGetSubtreeSize\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testHideLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationByRemoteIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationChildren\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationChildrenData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationChildrenRespectsParentSortingClauses\(\) has parameter \$expectedChildrenNames with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationListInCorrectOrder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationListWithRootLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationPrioritizedLanguagesFallback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationRootStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsContent\(\) has parameter \$locations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsLimitedSubtreeContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsThrowsBadStateExceptionLimitedSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadParentLocationsForDraftContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadParentLocationsForDraftContentThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testMoveInvisibleSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testMoveSubtreeDecrementsChildCountOfOldParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testMoveSubtreeIncrementsChildCountOfNewParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testMoveSubtreeUpdatesSubtreeProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testMoveSubtreeUpdatesSubtreePropertiesHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testNewLocationCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testNewLocationUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testSwapLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testSwapLocationDoesNotCorruptSearchResults\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testSwapLocationForMainAndSecondaryLocation\(\) should return array\ but returns array\\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testSwapLocationUpdatesMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUnhideLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUnhideLocationNotUnhidesHiddenSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has parameter \$priority with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationTwice\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationWithSameRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#1 \$expectedLocations of method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertContentHasExpectedLocations\(\) expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:moveSubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 23 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$actualObject of method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$location2 of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:swapLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$newParentLocation of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:moveSubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$parentLocationId of method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:publishContentWithParentLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 8 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Parameter \#2 \$targetParentLocation of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:copySubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:assertFieldIds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:mapFields\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentDefaultValuesFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentDefaultValuesNoStructFieldsFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentDraftFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentDraftFieldsRetainsIds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentEmptyValuesFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentEmptyValuesTranslationNotStoredFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentTwoLanguagesMainTranslationStoredFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentTwoLanguagesNoValuesForMainLanguageFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testCreateContentTwoLanguagesSecondTranslationNotStoredFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testUpdateContentUpdatingNonTranslatableFieldUpdatesFieldCopyFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testUpdateContentWithNewLanguageFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testUpdateContentWithNewLanguageNoValuesFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testUpdateContentWithNewLanguageVariantFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:testUpdateContentWithTwoLanguagesInitialLanguageTranslationNotCreatedFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:mapFields\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Notification\\\\Notification'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Notification\\Notification will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Notification\\\\NotificationList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Notification\\NotificationList will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testCreateNotification\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testCreateNotificationThrowsInvalidArgumentExceptionOnMissingOwner\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testCreateNotificationThrowsInvalidArgumentExceptionOnMissingType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testDeleteNotification\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testGetNotification\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testGetNotificationCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testGetPendingNotificationCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testLoadNotifications\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NotificationServiceTest\:\:testMarkNotificationAsRead\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testCreateObjectStateGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testCreateObjectStateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testDeleteObjectStateGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testDeleteObjectStateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testSetContentStateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testSetPriorityOfObjectStateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testUpdateObjectStateGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceAuthorizationTest\:\:testUpdateObjectStateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceAuthorizationTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$defaultLanguageCode\.$#' - identifier: property.notFound - count: 2 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$names\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectState'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 9 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroup'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 7 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Cannot access property \$id on bool\.$#' - identifier: property.nonObject - count: 2 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has parameter \$expectedIdentifiers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has parameter \$loadedObjects with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectState\(\) has parameter \$descriptions with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectState\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectStateGroups\(\) should return array\ but returns list\\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:deleteExistingObjectStateGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) has parameter \$groups with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getPrioritizedLanguagesList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateGroupStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateInEmptyGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testDeleteObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testDeleteObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testGetContentCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testGetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testGetInitialObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroupWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroupsWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroupsWithOffsetAndLimit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateGroupsWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStateWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectStatesWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupUpdateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateUpdateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testSetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testSetContentStateThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testSetPriorityOfObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateChosenFieldsOnly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupChosenFieldsOnly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Parameter \#1 \$groups of method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) expects array, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - - - message: '#^Parameter \#1 \$execution of class Jenner\\SimpleFork\\Process constructor expects string\|null, Closure given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$hasAccess\.$#' - identifier: property.protected - count: 3 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$lookupPolicyLimitations\.$#' - identifier: property.protected - count: 8 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$roleLimitations\.$#' - identifier: property.protected - count: 3 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupPolicyLimitations\:\:\$policy\.$#' - identifier: property.protected - count: 3 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 2 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:getDataForTestCanUserWithLimitations\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserForAdministratorUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserForAnonymousUserNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithLimitationNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithLimitationYes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithLimitations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithLimitations\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithMultipleTargetsNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithMultipleTargetsYes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithTargetNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithTargetThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithTargetYes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testGetCurrentUserReferenceReturnsAnonymousUserReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testHasAccessForCurrentUserNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testHasAccessForCurrentUserYes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testHasAccessLimited\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testHasAccessWithAdministratorUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testHasAccessWithAnonymousUserNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testSetCurrentUserReference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Parameter \#1 \$array of function array_filter expects array, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Parameter \#1 \$policy of class Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupPolicyLimitations constructor expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/PermissionResolverTest.php - - - - message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' - identifier: class.notFound - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018LanguageTest\:\:testSearchOnNotExistingLanguageGivesException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018LanguageTest\:\:testSearchOnNotUsedInstalledLanguageGivesNoResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018LanguageTest\:\:testSearchOnStandardLanguageGivesManyResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018LanguageTest\:\:testSearchOnUsedLanguageGivesOneResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018ObjectStateTest\:\:testSearchForNonUsedObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018ObjectStateTest\:\:testSearchForUsedObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018ObjectStateTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018VisibilityTest\:\:testSearchForHiddenContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP20018VisibilityTest\:\:testSearchForVisibleContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP20018VisibilityTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21069Test\:\:testSearchOnCurrentAttributeContentGivesOnesResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21069Test.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21069Test\:\:testSearchOnDraftAttributeContentGivesNoResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21069Test.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21069Test\:\:testSearchOnPreviousAttributeContentGivesNoResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21069Test.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21089Test\:\:testCreateContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21089Test.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21089Test\:\:\$contentType \(Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21089Test.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:deleteTestContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:testEzIntegerWithDefaultValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:testEzIntegerWithDefaultValues\(\) has parameter \$integerValue with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:validIntegerValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\:\:\$names\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21771EzStringTest\:\:test11NumbersOnEzString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21798Test\:\:testRoleChanges\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21798Test.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21798Test.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21906SearchOneContentMultipleLocationsTest\:\:searchContentQueryProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21906SearchOneContentMultipleLocationsTest\:\:testSearchContentMultipleLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21906SearchOneContentMultipleLocationsTest\:\:testSearchContentMultipleLocations\(\) has parameter \$expectedResultCount with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22408DeleteRelatedObjectTest\:\:createReferenceObject\(\) has parameter \$relationListTarget with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22408DeleteRelatedObjectTest\:\:createTestContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22408DeleteRelatedObjectTest\:\:testRelationListIsUpdatedWhenRelatedObjectIsDeleted\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22408DeleteRelatedObjectTest\:\:testSingleRelationIsUpdatedWhenRelatedObjectIsDeleted\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22409RelationListTypeStateTest\:\:createContentWithRelationList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22409RelationListTypeStateTest\:\:testCreateObjectWithRelationToContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22409RelationListTypeStateTest\:\:testCreateObjectWithRelationToContentTypeWithExistingDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22409RelationListTypeStateTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22612URLAliasTranslations\:\:getFolderCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22612URLAliasTranslations\:\:getFolderCreateStruct\(\) has parameter \$name with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22612URLAliasTranslations\:\:testURLAliasLoadedInRightLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22840RoleLimitations\:\:testSectionRoleAssignLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22840RoleLimitations\:\:testSubtreeRoleAssignLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22840RoleLimitations.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:searchContentQueryProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:searchContentQueryWithInvalidDataProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtree\(\) has parameter \$pathString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtreeShouldThrowException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtreeShouldThrowException\(\) has parameter \$pathString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP26327UrlAliasHistorizationTest\:\:testHistorization\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP26327UrlAliasHistorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP26367UrlAliasHistoryRedirectLoopTest\:\:testLookupHistoryUrlReturnsActiveAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP26367UrlAliasHistoryRedirectLoopTest\:\:testReverseLookupReturnsHistoryAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP26551DeleteContentTypeDraftTest\:\:testDeleteContentTypeGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP26551DeleteContentTypeDraftTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP28799SubtreeSearchTest\:\:testConflictingConditions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP28799SubtreeSearchTest\:\:testNegativeSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EnvTest\:\:testVerifyCacheDriver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/EnvTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:providerForTestMatchAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:testMatchAllContentInfoFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:testMatchAllContentInfoQuery\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:testMatchAllLocationFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:testMatchAllLocationQuery\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService'' and Ibexa\\Contracts\\Core\\Repository\\ContentService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentTypeService'' and Ibexa\\Contracts\\Core\\Repository\\ContentTypeService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\FieldTypeService'' and Ibexa\\Contracts\\Core\\Repository\\FieldTypeService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\LanguageService'' and Ibexa\\Contracts\\Core\\Repository\\LanguageService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\LocationService'' and Ibexa\\Contracts\\Core\\Repository\\LocationService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\NotificationService'' and Ibexa\\Contracts\\Core\\Repository\\NotificationService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ObjectStateService'' and Ibexa\\Contracts\\Core\\Repository\\ObjectStateService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\PermissionResolver'' and Ibexa\\Contracts\\Core\\Repository\\PermissionResolver will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\RoleService'' and Ibexa\\Contracts\\Core\\Repository\\RoleService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\SearchService'' and Ibexa\\Contracts\\Core\\Repository\\SearchService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\SectionService'' and Ibexa\\Contracts\\Core\\Repository\\SectionService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\TrashService'' and Ibexa\\Contracts\\Core\\Repository\\TrashService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\URLAliasService'' and Ibexa\\Contracts\\Core\\Repository\\URLAliasService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\URLWildcardService'' and Ibexa\\Contracts\\Core\\Repository\\URLWildcardService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\UserService'' and Ibexa\\Contracts\\Core\\Repository\\UserService will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testCommitThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetContentLanguageService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetContentService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetContentTypeService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetFieldTypeService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetLocationService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetNotificationService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetObjectStateService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetPermissionResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetRepository\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetRoleService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetSearchService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetSectionService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetTrashService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetURLAliasService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetURLWildcardService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testGetUserService\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RepositoryTest\:\:testRollbackThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RepositoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testAssignRoleToUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testAssignRoleToUserGroupThrowsUnauthorizedExceptionWithRoleLimitationParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testAssignRoleToUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testAssignRoleToUserThrowsUnauthorizedExceptionWithRoleLimitationParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testCreateRoleThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testDeletePolicyThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testDeleteRoleThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testGetRoleAssignmentsForUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testGetRoleAssignmentsForUserLoadsEmptyListForAnonymousUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testGetRoleAssignmentsForUserWithSubtreeLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testGetRoleAssignmentsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testLoadRoleByIdentifierThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testLoadRoleThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testLoadRolesForUserWithSubtreeLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testLoadRolesLoadsEmptyListForAnonymousUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testRemovePolicyThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testRemoveRoleAssignmentFromUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testRemoveRoleAssignmentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceAuthorizationTest\:\:testUpdatePolicyByRoleDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Parameter \#2 \$policyDraft of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:removePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment\:\:\$id\.$#' - identifier: property.protected - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Policy'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\PolicyCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\PolicyUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Role'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Role'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleDraft'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 4 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Cannot access property \$limitation on Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment\|false\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Cannot call method getIdentifier\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' - identifier: method.nonObject - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:newRoleUpdateStruct\(\) invoked with 1 parameter, 0 required\.$#' - identifier: arguments.count - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:providerForCopyRoleTests\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftSetsPolicyProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftSetsPolicyProperties\(\) has parameter \$roleAndPolicy with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftUpdatesRole\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyWithRoleAssignment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroupAffectsRoleAssignmentsForUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroupWithRoleLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroupWithRoleLimitationThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserGroupWithRoleLimitationThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserWithRoleLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserWithRoleLimitationThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAssignRoleToUserWithRoleLimitationThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleDraftInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleDraftThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleDraftWithAddPolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleWithAddPolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleWithMultiplePolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleWithPolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testDeleteRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testDeleteRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testGetRoleAssignmentsContainExpectedLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testGetRoleAssignmentsForUserDirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testGetRoleAssignmentsForUserEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testGetRoleAssignmentsForUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testGetRoleAssignmentsForUserInherited\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadPoliciesByUserId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleDraftByRoleId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleDraftByRoleIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleDraftThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoleThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRoles\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testLoadRolesReturnsExpectedSetOfDefaultRoles\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewPolicyCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewPolicyCreateStructSetsStructProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewPolicyUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewRoleCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewRoleCreateStructSetsNamePropertyOnStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testNewRoleUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testPublishRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testPublishRoleDraftAddPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRemovePolicyByRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRemoveRoleAssignment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRemoveRoleAssignmentFromUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValuesWithPolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValuesWithPolicy\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUnassignRoleByAssignment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUnassignRoleByAssignmentThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUnassignRoleByAssignmentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyByRoleDraft\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyByRoleDraftNoLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyByRoleDraftThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyUpdatesLimitations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyUpdatesLimitations\(\) has parameter \$roleAndPolicy with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyUpdatesRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdateRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdateRoleDraftThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft\|null given\.$#' - identifier: argument.type - count: 3 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Parameter \#2 \$policyDraft of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:removePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Variable \$role might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: tests/integration/Core/Repository/RoleServiceTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$mainLocationId\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$publishedDate\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$remoteId\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:assertContentIdSearch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:assertSubtreeInvisibleProperty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContent\(\) has parameter \$parentLocationIdList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithNameAndDescription\(\) has parameter \$contentDescription with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithNameAndDescription\(\) has parameter \$parentLocationIdList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:getEmailAddressesCases\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:getSpecialFullTextCases\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testAssignSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testCopyContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testCopySubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testCreateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testCreateUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testCreateUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testDeleteVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testFindContentInfoFullTextIsNotSearchable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testFindContentInfoFullTextIsSearchable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testFindLocationsFullTextIsNotSearchable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testFindLocationsFullTextIsSearchable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testHideSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testIndexContentWithNullField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testIndexingSpecialFullTextCases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testMoveSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testPublishVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testRecoverLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testRemovedContentFieldValueIsNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testRevealSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testSetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testSwapLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testUpdateContentDraftMetadataIsNotIndexed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testUpdateContentMetadata\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testUpdateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testUpdateUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testUserFullTextSearch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$ignoreForSetupFactories$#' - identifier: parameter.notFound - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LocationId constructor expects array\\|int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Parameter \#2 \$parentLocationIdList of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithName\(\) expects array\, array\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - - - message: '#^Cannot call method first\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResultCollection\|null\.$#' - identifier: method.nonObject - count: 2 - path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\AbstractAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\AbstractAggregationTest\:\:dataProviderForTestFindLocationWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ContentTypeGroupTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ContentTypeTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:build\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:setExpectedEntries\(\) has parameter \$entries with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:\$entries type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DateMetadataRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\AuthorTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\CheckboxTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\CountryTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\DateRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\DateTimeRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\FloatRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\FloatStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\IntegerRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\IntegerStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\KeywordTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\SelectionTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\TimeRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:setValues\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Parameter \#1 \$contentTypeIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Parameter \#2 \$fieldDefinitionIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Parameter \#2 \$fieldDefinitionIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Parameter \#3 \$fieldTypeIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Parameter \#3 \$values of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) expects iterable, iterable\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:\$values type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\LanguageTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\LocationChildrenTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ObjectStateTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\SectionTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\SubtreeTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createGroupTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createModifierTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createOwnerTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:dataProviderForTestFindLocationWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\VisibilityTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\DeleteTranslationTest\:\:createTestContentWithLanguages\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php - - - - message: '#^Parameter \#1 \$array of function array_column expects array, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchService/MultilingualContentSearchIndexingTest.php - - - - message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\RemoteIdIndexingTest\:\:getRemoteIDs\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\RemoteIdIndexingTest\:\:providerForTestIndexingRemoteId\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - - - message: '#^Part \$criterion\-\>value \(array\\|bool\|float\|int\|string\) of encapsed string cannot be cast to string\.$#' - identifier: encapsedStringPart.nonString - count: 1 - path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$remoteId\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\AbstractSortClauseTest\:\:assertSearchResultOrderByRemoteId\(\) has parameter \$expectedOrderedIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:createContentForContentTranslatedNameTesting\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:dataProviderForTestSortingByContentTranslatedName\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$expectedOrderedRemoteIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$expectedOrderedRemoteIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$values$#' - identifier: parameter.notFound - count: 2 - path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:dataProviderForTestSortingByScore\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:testSortingByScore\(\) has parameter \$expectedOrderedIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:testSortingByScore\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$values$#' - identifier: parameter.notFound - count: 1 - path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindContentEmptyResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindContentWithUserPermissionFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindSingleThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindSingleThrowsNotFoundExceptionWithUserPermissionFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceAuthorizationTest\:\:testFindSingleWithUserPermissionFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:assertFulltextSearch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:assertFulltextSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:assertFulltextSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextContentSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextContentSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$searchString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapSearchResultToIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:providerForTestFulltextSearchSolr7\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextContentSearchSolr7\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextContentSearchSolr7\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextLocationSearchSolr7\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextLocationSearchSolr7\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextLocationSearchSolr7\(\) has parameter \$searchString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testPrepareContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^PHPDoc tag @var for variable \$keyGroup has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\:\:setCustomField\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Cannot access offset ''id'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Cannot access offset ''title'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' - identifier: class.notFound - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:assertQueryFixture\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:assertQueryFixture\(\) has parameter \$ignoreScore with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:mapResultLocationIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:simplifySearchResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testFieldCollectionContains\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testFieldCollectionContainsNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testFieldIsEmptyInLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testFieldIsNotEmptyInLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testFindLocationsWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testInvalidFieldIdentifierIn\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testInvalidFieldIdentifierRange\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceBetween\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceGreaterThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceLessThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceSortAscending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceSortDescending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceWithCustomField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testMapLocationDistanceWithCustomFieldSort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testQueryCustomField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testQueryModifiedField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:testVisibilityCriterionWithHiddenContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 3 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\:\:setCustomField\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Search\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Cannot access offset ''id'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 3 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Cannot access offset ''title'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ContentTypeIdentifier constructor invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 2 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' - identifier: class.notFound - count: 5 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Instanceof between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query will always evaluate to true\.$#' - identifier: instanceof.alwaysTrue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:createContentForTestUserMetadataGroupHorizontal\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:createContentWithFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:find\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getCaseInsensitiveSearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getContentQuerySearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getFilterContentSearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getLocationQuerySearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getRelationFieldFilterSearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSeedsForRandomSortClause\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSortedContentSearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSortedLocationSearches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:mapResultContentIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestMultilingualFieldFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestMultilingualFieldSort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestSortingByNumericFieldsWithValuesOfDifferentLength\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:simplifySearchResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:skipIfSeedNotImplemented\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:sortSearchHitsById\(\) has parameter \$searchHits with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testContentWithMultipleLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFieldCollectionContains\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFieldCollectionContainsNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFieldCriterionForContentsWithIdenticalFieldIdentifiers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFieldIsNotEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContent\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContent\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContent\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentInfo\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentInfo\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentInfo\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentLocations\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentLocations\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentLocations\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortLocations\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortLocations\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortLocations\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFieldFiltersCaseSensitivity\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFieldFiltersCaseSensitivity\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFiltered\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFiltered\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFiltered\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFiltered\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentInfoFiltered\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentInfoFiltered\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentInfoFiltered\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentInfoFiltered\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentWithLanguageFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsContentFiltered\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsContentFiltered\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsContentFiltered\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsContentFiltered\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsFieldFiltersCaseSensitivity\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsFieldFiltersCaseSensitivity\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsNoPerformCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsNoPerformCountException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindNoPerformCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindNoPerformCountException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindNonMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldContentInfoFiltered\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldContentInfoFiltered\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldContentInfoFiltered\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldLocationsFiltered\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldLocationsFiltered\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldLocationsFiltered\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindSingleFailMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindSingleWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFullTextOnNewContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextComplex\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentSearchComplex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentSearchComplex\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentTranslationSearch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentTranslationSearch\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextLocationSearchComplex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextLocationSearchComplex\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextLocationTranslationSearch\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testInvalidFieldIdentifierIn\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testInvalidFieldIdentifierRange\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testLanguageAnalysisSameContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testLanguageAnalysisSameContentNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testLanguageAnalysisSeparateContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceBetween\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceBetweenPolar\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceGreaterThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceLessThanOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceSortAscending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceSortDescending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceWithCustomField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMapLocationDistanceWithCustomFieldSort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContent\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContent\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContent\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentLocations\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentLocations\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentLocations\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryCustomField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryLocations\(\) has parameter \$closure with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryLocations\(\) has parameter \$fixture with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryLocations\(\) has parameter \$queryData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryModifiedField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testRandomSortContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testRandomSortLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testRelationContentCreation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testSortFieldWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testSortMainLocationAscending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testSortMainLocationDescending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testSortMapLocationDistanceWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testSortModifiedField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalFilterContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalFilterLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalFilterLocation\(\) has parameter \$queryType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalQueryContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalQueryLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$data \\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\)\: Unexpected token "\$data", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#' - identifier: argument.type - count: 4 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Parameter \#1 \$query of method Ibexa\\Contracts\\Core\\Repository\\SearchService\:\:findLocations\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationQuery, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 3 - path: tests/integration/Core/Repository/SearchServiceTest.php - - - - message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' - identifier: class.notFound - count: 3 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createContent\(\) has parameter \$parentLocationIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createContent\(\) has parameter \$searchValuesMap with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createTestContent\(\) has parameter \$parentLocationIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createTestContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:getIndexesToMatchData\(\) has parameter \$inputContentData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:getIndexesToMatchData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:getSetupType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:providerForTestFind\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testCreateTestContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testAssignSectionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testCreateSectionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testDeleteSectionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testLoadSectionByIdentifierThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testLoadSectionFiltersSections\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testLoadSectionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testLoadSectionsLoadsEmptyListForAnonymousUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceAuthorizationTest\:\:testUpdateSectionThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceAuthorizationTest.php - - - - message: '#^Call to function is_object\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Section'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 4 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\SectionCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\SectionCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\SectionUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\SectionUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testAssignSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testAssignSectionToSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCountAssignedContents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCountAssignedContentsReturnsZeroByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCreateSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCreateSectionForUserWithSectionLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCreateSectionInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCreateSectionInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testCreateSectionThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testDeleteSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testDeleteSectionThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testDeleteSectionThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testIsSectionUsed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testIsSectionUsedReturnsZeroByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSectionByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSectionByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSectionThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSections\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testLoadSectionsReturnsDefaultSectionsByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testNewSectionCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testNewSectionUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionForUserWithSectionLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionInTransactionWithCommit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionInTransactionWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionKeepsSectionIdentifierOnNameUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionKeepsSectionNameOnIdentifierUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SectionServiceTest\:\:testUpdateSectionWithSectionIdentifierOnNameUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SettingServiceTest\:\:dataProviderForCreateSetting\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/SettingServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SettingServiceTest\:\:testCreateSetting\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/SettingServiceTest.php - - - - message: '#^Generator expects value type array\{string, int, string\|null, int\|null\}, array\{''foo'', 100, null\} given\.$#' - identifier: generator.valueType - count: 1 - path: tests/integration/Core/Repository/TokenServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testDeleteTrashItemThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testEmptyTrashThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testLoadTrashItemThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testRecoverThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testRecoverThrowsUnauthorizedExceptionWithNewParentLocationParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testTrashRequiresContentRemovePolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testTrashRequiresPremissionsToRemoveAllSubitems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceAuthorizationTest\:\:testTrashThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceAuthorizationTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\:\:\$trashed\.$#' - identifier: property.protected - count: 4 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\TrashItem'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\SearchResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 3 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Cannot access property \$remoteId on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' - identifier: property.nonObject - count: 4 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Cannot call method getRemovedLocationContentIdMap\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' - identifier: method.nonObject - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:assertAliasNotExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testAliasesForRemovedItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testDeleteThrowsNotFoundExceptionForNonExistingTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testDeleteTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testEmptyTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testEmptyTrashForUserWithSubtreeLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItems\(\) has parameter \$filters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItemsLimitedAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItemsLimits\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItemsSort\(\) has parameter \$sortClausesClasses with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItemsSubtreeLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testLoadTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testLoadTrashItemThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testNotFoundAliasAfterRemoveIt\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecover\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverDoesNotRestoreChildLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverIncrementsChildCountOnOriginalParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverThrowsNotFoundExceptionForNonExistingTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverToNonExistingLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverWithLocationCreateStructParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testRecoverWithLocationCreateStructParameterIncrementsChildCountOnNewParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashDecrementsChildCountOnParentLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashRemovesChildLocationsFromMainStorage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashRemovesLocationFromMainStorage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashReturnsNull\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashSetsExpectedTrashItemProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testTrashUpdatesMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:trashFiltersProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:trashSortClausesProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 6 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Parameter \#1 \$trashItem of method Ibexa\\Contracts\\Core\\Repository\\TrashService\:\:recover\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\:\:\$sortClauses \(array\\) does not accept array\\.$#' - identifier: assign.propertyType - count: 2 - path: tests/integration/Core/Repository/TrashServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php - - - - message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:listLocationAliases\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceAuthorizationTest\:\:testCreateGlobalUrlAliasThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceAuthorizationTest\:\:testCreateUrlAliasThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceAuthorizationTest\:\:testRemoveAliasesThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - - message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - - - message: '#^Call to function is_object\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' - identifier: function.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 10 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 3 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertLookupHistory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesCorrect\(\) has parameter \$expectedIsHistory with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesCorrect\(\) has parameter \$expectedLanguageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesCorrect\(\) has parameter \$expectedPath with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesSame\(\) has parameter \$expectedValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlIsCurrent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlIsHistory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:changeContentTypeUrlAliasSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:changeSlugConverterConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:createGlobalAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationPropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationPropertyValues\(\) has parameter \$testData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationVariation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationVariationPropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasForLocationVariationPropertyValues\(\) has parameter \$testData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasPropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithForward\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithForwardPropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateNonLatinNonEmptyUniqueAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateSameAliasForDifferentLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValuesWithAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValuesWithAlwaysAvailable\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValuesWithForwarding\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValuesWithForwarding\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasWithAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasWithForwarding\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testDeleteCorruptedUrlAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListGlobalAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListGlobalAliasesWithLanguageFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListGlobalAliasesWithLimit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListGlobalAliasesWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliasesLoadsCorrectly\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliasesLoadsCorrectly\(\) has parameter \$testData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliasesWithCustomFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliasesWithLanguageCodeFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUp\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUpThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUpThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUpThrowsNotFoundExceptionWithLanguageFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUpWithLanguageFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookupOnMultilingualNestedLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookupOnRenamedParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForContentsWithUpdatedContentTypes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForLocationWithChangedSlugConverterConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForMissingUrlWithHistory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForMovedLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRemoveAliases\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testRemoveAliasesThrowsInvalidArgumentExceptionIfAutogeneratedAliasesAreToBeRemoved\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:updateContentField\(\) has parameter \$fieldDefinitionIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:updateContentField\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\)\: Unexpected token "\\n \*", expected variable at offset 74 on line 2$#' - identifier: phpDoc.parseError - count: 5 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, iterable\ given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 11 - path: tests/integration/Core/Repository/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceAuthorizationTest\:\:testFindUrlsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceAuthorizationTest\:\:testLoadByIdThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceAuthorizationTest\:\:testLoadByUrlThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceAuthorizationTest\:\:testUpdateUrlThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceAuthorizationTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$modified\.$#' - identifier: property.protected - count: 4 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\URL'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 4 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\URLUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\UsageSearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\UsageSearchResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:dataProviderForFindUrlsWithSorting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:dataProviderForFindUsages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testCreateUpdateStructValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrls\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsUsingMatchNone\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsUsingPatternCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsUsingValidityCriterionInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsUsingValidityCriterionValid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsUsingVisibleOnlyCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithInvalidLimitThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithInvalidOffsetThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithLimitZero\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithOffsetAndLimit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithSorting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithSorting\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithoutCounting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$expectedContentInfos with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$expectedTotalCount with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$limit with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$offset with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$urlId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsagesReturnsEmptySearchResults\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testLoadById\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testLoadByIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testLoadByUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testLoadByUrlThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testUpdateUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testUpdateUrlStatus\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testUpdateUrlWithNonUniqueUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$limit \(int\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$offset \(int\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: tests/integration/Core/Repository/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardService\\CriterionTest\:\:getUrlWildcards\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - - - message: '#^Parameter \#1 \$criteria of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard\\Query\\Criterion\\LogicalAnd constructor expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - - - message: '#^Parameter \#1 \$expectedCount of static method PHPUnit\\Framework\\Assert\:\:assertCount\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceAuthorizationTest\:\:testRemoveThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceAuthorizationTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLWildcard'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLWildcardTranslationResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateSetsIdPropertyOnURLWildcard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateSetsPropertiesOnURLWildcard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateThrowsContentValidationExceptionWhenPatternsAndPlaceholdersNotMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateThrowsContentValidationExceptionWhenPlaceholdersNotValidNumberSequence\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateThrowsInvalidArgumentExceptionOnDuplicateSourceUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testCreateWithOptionalForwardParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadAllReturnsEmptyArrayByDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadAllWithOffsetAndLimitParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadAllWithOffsetParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadSetsPropertiesOnURLWildcard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testLoadThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testRemove\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testTranslateReturnsLongestMatchingWildcard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testTranslateSetsPropertiesOnTranslationResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testTranslateThrowsNotFoundExceptionWhenNotAliasOrWildcardMatches\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardServiceTest\:\:testTranslateWithForwardSetToTrue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\UserPreference\\\\UserPreference'' and Ibexa\\Contracts\\Core\\Repository\\Values\\UserPreference\\UserPreference will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 2 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\UserPreference\\\\UserPreferenceList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\UserPreference\\UserPreferenceList will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testGetUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testGetUserPreferenceCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testLoadUserPreferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testSetUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testSetUserPreferenceThrowsInvalidArgumentExceptionOnEmptyName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserPreferenceServiceTest\:\:testSetUserPreferenceThrowsInvalidArgumentExceptionOnInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testAssignUserToUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testCreateUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testCreateUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testDeleteUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testDeleteUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testLoadSubUserGroupsThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testLoadUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testLoadUserGroupsOfUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testLoadUsersOfUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testMoveUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testUnAssignUserFromUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testUpdateUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceAuthorizationTest\:\:testUpdateUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceAuthorizationTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\User'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 7 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupCreateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Cannot call method add\(\) on DateTimeImmutable\|false\|null\.$#' - identifier: method.nonObject - count: 3 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:createUserContentTypeWithAccountSettings\(\) has parameter \$fieldSetting with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:createUserContentTypeWithAccountSettings\(\) has parameter \$validatorConfiguration with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:dataProviderForValidatePassword\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:getDataForTestPasswordUpdateRespectsAllValidationSettings\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testAssignUserToUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testAssignUserToUserGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserGroupSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserGroupThrowsInvalidArgumentExceptionFieldTypeNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserGroupWhenMissingField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserWhenMissingField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserWithStrongPassword\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testCreateUserWithWeakPasswordThrowsUserPasswordValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testDeleteUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testDeleteUserDeletesRelatedBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testDeleteUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testDeleteUserGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testExpireUserToken\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadSubUserGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadSubUserGroupsThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadSubUserGroupsWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByEmailReturnsEmptyInUnknownEmail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByLogin\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByLoginThrowsNotFoundExceptionForUnknownLogin\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByLoginThrowsNotFoundExceptionForUnknownLoginByEmail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByLoginWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserByLoginWorksForLoginWithWrongCase\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupWithNoAccessToParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupWithPrioritizedLanguagesListAfterMainLanguageUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupsOfUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserGroupsOfUserWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUserWithPrioritizedLanguagesListAfterMainLanguageUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUsersByEmailWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUsersOfUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testLoadUsersOfUserGroupWithPrioritizedLanguagesList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testMoveUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testMoveUserGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserCreateStructSetsExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserCreateStructWithFifthParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserGroupCreateStructSetsContentType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserGroupCreateStructSetsMainLanguageCode\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserGroupCreateStructWithSecondParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserGroupUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUnAssignUserFromUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUnAssignUserFromUserGroupThrowsBadStateArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUnAssignUserFromUserGroupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserGroupThrowsContentFieldValidationExceptionOnRequiredFieldEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserGroupThrowsInvalidArgumentExceptionOnFieldTypeNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserGroupWithSubContentMetadataUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserGroupWithSubContentUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserReturnsPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserThrowsInvalidArgumentExceptionOnFieldTypeNotAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserToken\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserUpdatesExpectedProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserWhenMissingField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserWithContentMetadataUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserWithContentUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserWithStrongPassword\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testUpdateUserWithWeakPasswordThrowsUserPasswordValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testValidatePassword\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testValidatePassword\(\) has parameter \$expectedErrors with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testValidatePasswordWithDefaultContext\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/UserServiceTest.php - - - - message: '#^Parameter \#1 \$string of function md5 expects string, int\<1, max\> given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getContentCreatePolicyDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getDataForDeniedAccess\(\) should return array\\}\> but returns array\{array\{123, array\{\-1\}\}, array\{123, array\{456, 789\}\}\}\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getDataForGrantedAccess\(\) should return array\\}\> but returns array\{array\{null, array\{\}\}, array\{null, array\{\-1\}\}, array\{null, array\{123, 456, \-1\}\}, array\{123, array\{123, 456, \-1\}\}, array\{123, array\{\}\}\}\.$#' - identifier: return.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ContentTypeLimitationTest\:\:testContentTypeLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ContentTypeLimitationTest\:\:testContentTypeLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ContentTypeLimitationTest\:\:testContentTypeLimitationForbidVariant\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft is not subtype of native type null\.$#' - identifier: varTag.nativeType - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - - - message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' - identifier: property.nonObject - count: 2 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:createEditorUserWithLanguageLimitation\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForCanUserWithLimitationTargets\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForCreateAndPublishContent\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForPrepareDataForTestsWithLanguageLimitationAndDifferentContentTranslations\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForPublishVersionWithLanguageLimitation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCanUserWithLimitationTargets\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCanUserWithLimitationTargets\(\) has parameter \$folderNames with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCopyContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCopySubtreeWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCreateAndPublishContent\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCreateAndPublishContent\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testHideContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testHideLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testMoveSubtreeWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPrepareDataForTestsWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$namesToUpdate with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersionIsNotAllowedIfModifiedOtherTranslations\(\) has parameter \$names with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testRevealContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testSwapLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testUnhideLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testUpdateLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^PHPDoc tag @return with type iterable\\|bool\>\> is not subtype of native type array\.$#' - identifier: return.phpDocType - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' - identifier: argument.type - count: 7 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Parameter \#4 \$targets of method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:canUser\(\) expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LocationLimitationTest\:\:testLocationLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LocationLimitationTest\:\:testLocationLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\NewObjectStateLimitationTest\:\:testNewObjectStateLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\NewObjectStateLimitationTest\:\:testNewObjectStateLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/NewObjectStateLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\NewSectionLimitationTest\:\:testNewSectionLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\NewSectionLimitationTest\:\:testNewSectionLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/NewSectionLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ObjectStateLimitationTest\:\:createUserWithObjectStateLimitation\(\) has parameter \$objectStateIDs with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ObjectStateLimitationTest\:\:createUserWithObjectStateLimitationOnContentRead\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\OwnerLimitationTest\:\:testOwnerLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\OwnerLimitationTest\:\:testOwnerLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - - - message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$removePolicy\.$#' - identifier: varTag.differentVariable - count: 2 - path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentContentTypeLimitationTest\:\:testParentContentTypeLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentContentTypeLimitationTest\:\:testParentContentTypeLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentDepthLimitationTest\:\:testParentDepthLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentDepthLimitationTest\:\:testParentDepthLimitationAllowPublish\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentDepthLimitationTest\:\:testParentDepthLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentOwnerLimitationTest\:\:testParentOwnerLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentOwnerLimitationTest\:\:testParentOwnerLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentUserGroupLimitationTest\:\:testParentUserGroupLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ParentUserGroupLimitationTest\:\:testParentUserGroupLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:addPolicyToNewRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:getSubtreeLocationsCount\(\) has parameter \$subtreePathString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:providerForTestRolePoliciesWithOverlappingLimitations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:testRolePoliciesWithOverlappingLimitations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SectionLimitationTest\:\:testSectionLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SectionLimitationTest\:\:testSectionLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 2 - path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - - - message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$readPolicy\.$#' - identifier: varTag.differentVariable - count: 2 - path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\StatusLimitationTest\:\:testStatusLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\StatusLimitationTest\:\:testStatusLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitationTest\:\:prepareLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitationTest\:\:testSubtreeLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitationTest\:\:testSubtreeLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$editPolicy\.$#' - identifier: varTag.differentVariable - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - - - message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' - identifier: property.nonObject - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\UserGroupLimitationTest\:\:testUserGroupLimitationAllow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\UserGroupLimitationTest\:\:testUserGroupLimitationForbid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - - - message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' - identifier: argument.type - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - - - message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$editPolicy\.$#' - identifier: varTag.differentVariable - count: 1 - path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:getDataForTestCountUsersWithUnsupportedHashType\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:providerForGetFieldData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - - - message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:testGetFieldData\(\) has parameter \$expectedUserData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - - - message: '#^Property Ibexa\\Tests\\Integration\\RepositoryInstaller\\TestCase\:\:\$class has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/integration/RepositoryInstaller/TestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\FieldTypeRegistryPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\FieldTypeRegistryPassTest\:\:testRegisterFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\FieldTypeRegistryPassTest\:\:testRegisterFieldTypeNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\GenericFieldTypeConverterPassTest\:\:assertContainerBuilderHasNoServiceDefinitionWithMethodCall\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\GenericFieldTypeConverterPassTest\:\:assertContainerBuilderHasNoServiceDefinitionWithMethodCall\(\) has parameter \$index with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\FieldTypeRegistryPassTest\:\:testRegisterFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\FieldTypeRegistryPassTest\:\:testRegisterFieldTypeNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/FieldTypeRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\CriteriaConverterPassTest\:\:testAddContentHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\CriteriaConverterPassTest\:\:testAddLocationHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/CriteriaConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\CriterionFieldValueHandlerRegistryPassTest\:\:testRegisterValueHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\CriterionFieldValueHandlerRegistryPassTest\:\:testRegisterValueHandlerNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/CriterionFieldValueHandlerRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\SortClauseConverterPassTest\:\:testAddContentHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\SortClauseConverterPassTest\:\:testAddLocationAndContentHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Search\\Legacy\\SortClauseConverterPassTest\:\:testAddLocationHandlers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Search/Legacy/SortClauseConverterPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:externalStorageHandlerGatewayTagsProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:externalStorageHandlerTagsProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandlerNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandlerWithGateway\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandlerWithGatewayNoAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandlerWithGatewayNoIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:testRegisterExternalStorageHandlerWithoutRegisteredGateway\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\Legacy\\FieldValueConverterRegistryPassTest\:\:testRegisterConverterNoLazy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/Legacy/FieldValueConverterRegistryPassTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\Legacy\\RoleLimitationConverterPassTest\:\:testRegisterRoleLimitationConverter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Storage/Legacy/RoleLimitationConverterPassTest.php - - - - message: '#^Class Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:getFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:hasFieldData\(\) should return bool but return statement is missing\.$#' - identifier: return.missing - count: 1 - path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\TaggedServiceIdsIterator\\DeprecationErrorCollector\:\:getErrors\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\TaggedServiceIdsIterator\\DeprecationErrorCollector\:\:\$errors type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\CollectionInterface\:\:filter\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''IteratorAggregate'' and Ibexa\\Contracts\\Core\\Collection\\CollectionInterface will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' - identifier: class.notFound - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollectionWithExampleData\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' - identifier: class.notFound - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollectionWithExampleData\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createEmptyCollection\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' - identifier: class.notFound - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createEmptyCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:getExampleData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^PHPDoc tag @return with type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces is not subtype of native type Ibexa\\Contracts\\Core\\Collection\\CollectionInterface\.$#' - identifier: return.phpDocType - count: 3 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^PHPDoc tag @template TCollection for class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest has invalid bound type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' - identifier: class.notFound - count: 1 - path: tests/lib/Collection/AbstractCollectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayListTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/ArrayListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayListTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\ArrayList does not specify its types\: TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/ArrayListTest.php - - - - message: '#^PHPDoc tag @var for variable \$list contains generic class Ibexa\\Contracts\\Core\\Collection\\ArrayList but does not specify its types\: TValue$#' - identifier: missingType.generics - count: 2 - path: tests/lib/Collection/ArrayListTest.php - - - - message: '#^Type Ibexa\\Contracts\\Core\\Collection\\ArrayList in generic type Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\ in PHPDoc tag @extends is not subtype of template type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces of class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\.$#' - identifier: generics.notSubtype - count: 1 - path: tests/lib/Collection/ArrayListTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:exists\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:filter\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:forAll\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:map\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:createCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\MapInterface does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:getExampleData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Collection\\MapInterface\|Ibexa\\Contracts\\Core\\Collection\\StreamableInterface is not subtype of native type Ibexa\\Contracts\\Core\\Collection\\MapInterface\.$#' - identifier: return.phpDocType - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^PHPDoc tag @var for variable \$map contains generic class Ibexa\\Contracts\\Core\\Collection\\ArrayMap but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Type Ibexa\\Contracts\\Core\\Collection\\ArrayMap in generic type Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\ in PHPDoc tag @extends is not subtype of template type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces of class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\.$#' - identifier: generics.notSubtype - count: 1 - path: tests/lib/Collection/ArrayMapTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayListTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/MutableArrayListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayListTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayList does not specify its types\: TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/MutableArrayListTest.php - - - - message: '#^PHPDoc tag @var for variable \$list contains generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayList but does not specify its types\: TValue$#' - identifier: missingType.generics - count: 4 - path: tests/lib/Collection/MutableArrayListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayMapTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Collection/MutableArrayMapTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayMapTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayMap does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/Collection/MutableArrayMapTest.php - - - - message: '#^Parameter \#2 \$string of static method PHPUnit\\Framework\\Assert\:\:assertRegExp\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Container/Encore/ConfigurationDumperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\AbstractServiceTest\:\:getListenersStack\(\) has parameter \$listeners with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Event/AbstractServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\AbstractServiceTest\:\:getListenersStack\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Event/AbstractServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\BookmarkServiceTest\:\:testCreateBookmarkEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\BookmarkServiceTest\:\:testCreateBookmarkStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\BookmarkServiceTest\:\:testDeleteBookmarkEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\BookmarkServiceTest\:\:testDeleteBookmarkStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/BookmarkServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testAddRelationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testAddRelationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCopyContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCopyContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCreateContentDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCreateContentDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCreateContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testCreateContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteRelationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteRelationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteTranslationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteTranslationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteVersionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testDeleteVersionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testHideContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testHideContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testPublishVersionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testPublishVersionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnAddRelationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnCopyContentResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnCreateContentDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnCreateContentResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnDeleteContentResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnPublishVersionResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnUpdateContentMetadataResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testReturnUpdateContentResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testRevealContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testRevealContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testUpdateContentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testUpdateContentMetadataEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testUpdateContentMetadataStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentServiceTest\:\:testUpdateContentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testAddFieldDefinitionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testAddFieldDefinitionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testAssignContentTypeGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testAssignContentTypeGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCopyContentTypeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCopyContentTypeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testCreateContentTypeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testDeleteContentTypeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testDeleteContentTypeGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testDeleteContentTypeGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testDeleteContentTypeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testPublishContentTypeDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testPublishContentTypeDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testRemoveContentTypeTranslationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testRemoveContentTypeTranslationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testReturnCopyContentTypeResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testReturnCreateContentTypeDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testReturnCreateContentTypeGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testReturnCreateContentTypeResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testReturnRemoveContentTypeTranslationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUnassignContentTypeGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUnassignContentTypeGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ContentTypeServiceTest\:\:testUpdateFieldDefinitionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ContentTypeServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testCreateLanguageEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testCreateLanguageStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testDeleteLanguageEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testDeleteLanguageStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testDisableLanguageEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testDisableLanguageStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testEnableLanguageEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testEnableLanguageStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testReturnCreateLanguageResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testReturnDisableLanguageResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testReturnEnableLanguageResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testReturnUpdateLanguageNameResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testUpdateLanguageNameEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LanguageServiceTest\:\:testUpdateLanguageNameStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LanguageServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testCopySubtreeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testCopySubtreeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testCreateLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testCreateLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testDeleteLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testDeleteLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testHideLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testHideLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testMoveSubtreeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testMoveSubtreeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testReturnCopySubtreeResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testReturnCreateLocationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testReturnHideLocationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testReturnUnhideLocationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testReturnUpdateLocationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testSwapLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testSwapLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testUnhideLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testUnhideLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testUpdateLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\LocationServiceTest\:\:testUpdateLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/LocationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testCreateNotificationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testCreateNotificationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testDeleteNotificationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testDeleteNotificationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testMarkNotificationAsReadEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testMarkNotificationAsReadStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\NotificationServiceTest\:\:testReturnCreateNotificationResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/NotificationServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testCreateObjectStateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testCreateObjectStateGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testCreateObjectStateGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testCreateObjectStateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testDeleteObjectStateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testDeleteObjectStateGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testDeleteObjectStateGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testDeleteObjectStateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testReturnCreateObjectStateGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testReturnCreateObjectStateResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testReturnUpdateObjectStateGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testReturnUpdateObjectStateResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testSetContentStateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testSetContentStateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testSetPriorityOfObjectStateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testSetPriorityOfObjectStateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testUpdateObjectStateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\ObjectStateServiceTest\:\:testUpdateObjectStateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/ObjectStateServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAddPolicyByRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAddPolicyByRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAssignRoleToUserEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAssignRoleToUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAssignRoleToUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testAssignRoleToUserStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testCreateRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testCreateRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testCreateRoleEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testCreateRoleStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testDeleteRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testDeleteRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testDeleteRoleEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testDeleteRoleStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testPublishRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testPublishRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testRemovePolicyByRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testRemovePolicyByRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testRemoveRoleAssignmentEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testRemoveRoleAssignmentStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnAddPolicyByRoleDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnCreateRoleDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnCreateRoleResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnRemovePolicyByRoleDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnUpdatePolicyByRoleDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testReturnUpdateRoleDraftResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testUpdatePolicyByRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testUpdatePolicyByRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testUpdateRoleDraftEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\RoleServiceTest\:\:testUpdateRoleDraftStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/RoleServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testAssignSectionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testAssignSectionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testAssignSectionToSubtreeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testAssignSectionToSubtreeStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testCreateSectionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testCreateSectionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testDeleteSectionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testDeleteSectionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testReturnCreateSectionResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testReturnUpdateSectionResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testUpdateSectionEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\SectionServiceTest\:\:testUpdateSectionStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/SectionServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\TrashItemDeleteResult and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\TrashItemDeleteResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testDeleteTrashItemEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testDeleteTrashItemStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testEmptyTrashEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testEmptyTrashStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testRecoverEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testRecoverStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testReturnDeleteTrashItemResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testReturnEmptyTrashResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testReturnRecoverResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testReturnTrashResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testTrashEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\TrashServiceTest\:\:testTrashStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/TrashServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testCreateUrlAliasEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testCreateUrlAliasStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForLocationEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testRefreshSystemUrlAliasesForLocationStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testRemoveAliasesEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testRemoveAliasesStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testReturnCreateGlobalUrlAliasResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLAliasServiceTest\:\:testReturnCreateUrlAliasResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Parameter \#4 \$forwarding of method Ibexa\\Core\\Event\\URLAliasService\:\:createGlobalUrlAlias\(\) expects bool, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Parameter \#4 \$forwarding of method Ibexa\\Core\\Event\\URLAliasService\:\:createUrlAlias\(\) expects bool, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Parameter \#5 \$alwaysAvailable of method Ibexa\\Core\\Event\\URLAliasService\:\:createGlobalUrlAlias\(\) expects bool, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Parameter \#5 \$alwaysAvailable of method Ibexa\\Core\\Event\\URLAliasService\:\:createUrlAlias\(\) expects bool, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Event/URLAliasServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLServiceTest\:\:testReturnUpdateUrlResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLServiceTest\:\:testUpdateUrlEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLServiceTest\:\:testUpdateUrlStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLServiceTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testCreateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testCreateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testRemoveEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testRemoveStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testReturnCreateResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testReturnTranslateResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testTranslateEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\URLWildcardServiceTest\:\:testTranslateStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Parameter \#3 \$forward of method Ibexa\\Core\\Event\\URLWildcardService\:\:create\(\) expects bool, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Event/URLWildcardServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserPreferenceServiceTest\:\:testSetUserPreferenceEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserPreferenceServiceTest\:\:testSetUserPreferenceStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserPreferenceServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testAssignUserToUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testAssignUserToUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testCreateUserEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testCreateUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testCreateUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testCreateUserStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testDeleteUserEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testDeleteUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testDeleteUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testDeleteUserStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testMoveUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testMoveUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnCreateUserGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnCreateUserResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnDeleteUserGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnDeleteUserResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnUpdateUserGroupResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnUpdateUserResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testReturnUpdateUserTokenResultInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUnAssignUserFromUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUnAssignUserFromUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserGroupEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserGroupStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserTokenEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Event\\UserServiceTest\:\:testUpdateUserTokenStopPropagationInBeforeEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Event/UserServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateFieldSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateFieldSettingsNoError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateValidatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateValidatorConfigurationNoError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\APIFieldTypeTest\:\:testValidateValueNoError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/APIFieldTypeTest.php - - - - message: '#^Cannot assign new offset to Ibexa\\Core\\FieldType\\Author\\AuthorCollection\.$#' - identifier: offsetAssign.dimType - count: 3 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testAcceptValueInvalidFormat\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testAcceptValueInvalidType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testAcceptValueValidFormat\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testAddAuthor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testBuildFieldValueWithParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testBuildFieldValueWithoutParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testFieldValueToString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testRemoveAuthors\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:testValidatorConfigurationSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Property Ibexa\\Core\\FieldType\\Author\\Value\:\:\$authors \(Ibexa\\Core\\FieldType\\Author\\AuthorCollection\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/FieldType/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:assertIsValidHashValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:assertIsValidHashValue\(\) has parameter \$keyChain with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:doValidate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:doValidate\(\) has parameter \$fieldDefinitionData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:doValidate\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:getFieldDefinitionMock\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testAcceptGetEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testEmptyValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testEmptyValueIsEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFieldSettingsFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFieldSettingsFromHash\(\) has parameter \$inputSettings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFieldSettingsToHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFieldSettingsToHash\(\) has parameter \$inputSettings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFromHash\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testFromHash\(\) has parameter \$inputHash with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testGetFieldTypeIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testSettingsSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testToHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testToHash\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateFieldSettingsInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateFieldSettingsValid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateInvalid\(\) has parameter \$errors with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateInvalid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateInvalid\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateValid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateValid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateValid\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateValidatorConfigurationInvalid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidateValidatorConfigurationValid\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidatorConfigurationFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidatorConfigurationSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:testValidatorConfigurationToHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$inputConfiguration$#' - identifier: parameter.notFound - count: 2 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$inputValue$#' - identifier: parameter.notFound - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^PHPDoc tag @var has invalid value \(\|\\PHPUnit\\Framework\\MockObject\\MockObject \$fieldDefinitionMock\)\: Unexpected token "\|", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Parameter \#1 \$expected of static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) contains unresolvable type\.$#' - identifier: argument.unresolvableType - count: 2 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTest\:\:\$fieldTypeUnderTest \(Ibexa\\Contracts\\Core\\FieldType\\FieldType\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/FieldType/BaseFieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:getBlackListValidatorMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:getConfigResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTest\:\:\$blackListedExtensions has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/FieldType/BinaryBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/BinaryFileTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:testBuildFieldValueWithParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:testBuildFieldValueWithoutParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:testFieldValueToString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:testToPersistenceValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, int given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/CountryTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$value\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Cannot access property \$value on array\.$#' - identifier: property.nonObject - count: 2 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Cannot call method add\(\) on DateTime\|null\.$#' - identifier: method.nonObject - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForTimeStringFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testFromHash\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testFromHash\(\) has parameter \$inputHash with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testTimeStringFromHash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testTimeStringFromHash\(\) has parameter \$inputHash with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^PHPDoc tag @param references unknown parameter\: \$inputValue$#' - identifier: parameter.notFound - count: 2 - path: tests/lib/FieldType/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Parameter \#1 \$email of class Ibexa\\Core\\FieldType\\EmailAddress\\Value constructor expects string, int given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/EmailAddressTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Validator\\EmailAddressValidator\:\:\$Extent\.$#' - identifier: property.notFound - count: 4 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\EmailAddressValidator will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testConstraintsInitializeGet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testConstraintsSetGet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testGetConstraintsSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testValidateCorrectEmailAddresses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressValidatorTest\:\:testValidateWrongEmailAddresses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/EmailAddressValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:providerForTestApplyDefaultSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:providerForTestApplyDefaultValidatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettings\(\) has parameter \$expectedSettings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettings\(\) has parameter \$initialSettings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettingsThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfiguration\(\) has parameter \$expectedConfiguration with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfiguration\(\) has parameter \$initialConfiguration with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfigurationEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfigurationEmptyThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FieldTypeMockTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\FieldType\\FieldType\:\:valuesEqual\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/FieldType/FieldTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeTest\:\:provideInputForValuesEqual\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FieldTypeTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Validator\\FileSizeValidator\:\:\$unexisting\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Translation\\Message\:\:\$message\.$#' - identifier: property.protected - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Translation\\Message\:\:\$values\.$#' - identifier: property.protected - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\FileSizeValidator will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateConstraintsKO\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateConstraintsOK\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateKO\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateOK\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testConstraintsInitializeGet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testConstraintsSetGet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testGetBadConstraint\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testGetConstraintsSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testInitializeBadConstraint\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testSetBadConstraint\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsCorrectValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsCorrectValues\(\) has parameter \$constraints with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$constraints with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$expectedMessages with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$values with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateCorrectValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has parameter \$message with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has parameter \$size with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has parameter \$values with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Unreachable statement \- code above always terminates\.$#' - identifier: deadCode.unreachable - count: 3 - path: tests/lib/FieldType/FileSizeValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Float\\Value constructor expects float\|null, string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/FloatTest.php - - - - message: '#^Class Symfony\\Component\\Validator\\ConstraintViolation constructor invoked with 1 parameter, 6\-10 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:createFieldTypeUnderTest\(\) should return Ibexa\\Core\\FieldType\\FieldType but returns Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Type\.$#' - identifier: return.type - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$errors with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateValid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateValid\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:\$serializer \(Ibexa\\Contracts\\Core\\FieldType\\ValueSerializerInterface&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Contracts\\Core\\FieldType\\ValueSerializerInterface\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/FieldType/Generic/GenericTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:__construct\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/FieldType/Generic/Stubs/Value.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:getValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Generic/Stubs/Value.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:\$value has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/FieldType/Generic/Stubs/Value.php - - - - message: '#^Class Ibexa\\Core\\FieldType\\ISBN\\Type does not have a constructor and must be instantiated without any parameters\.$#' - identifier: new.noConstructor - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testCreateBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testDeleteBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testExists\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetFileContents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetFileContentsOfDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetFileInputStream\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetMimeType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetMimeTypeOfDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testGetUri\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFileByUriWithDraftFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFileByUriWithPublishedFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFileDraftExternalPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFileDraftInternalPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testLoadBinaryFilePublishedInternalPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testNewBinaryCreateStructFromLocalFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\IO\\LegacyTest\:\:testNewBinaryCreateStructFromUploadedFile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Parameter \#1 \$binaryFileId of method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:getUri\(\) expects string, Ibexa\\Core\\IO\\Values\\BinaryFile given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/Image/IO/LegacyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\PathGenerator\\LegacyPathGeneratorTest\:\:provideStoragePathForFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\PathGenerator\\LegacyPathGeneratorTest\:\:testGetStoragePathForField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\FieldType\\ImageAsset\\AssetMapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 4 - path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAsset\\AssetMapperTest\:\:createPartialMapper\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAsset\\AssetMapperTest\:\:dataProviderForIsAsset\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\ImageAsset\\AssetMapperTest\:\:\$mappings type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:testGetRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:testIsSearchable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:testValidateNonAsset\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageAssetTest.php - - - - message: '#^Access to an undefined property Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:\$mimeTypeDetectorMock\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getBlackListValidatorMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getConfigResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getImageValidatorMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForValuesEqual\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:\$blackListedExtensions has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/FieldType/ImageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Integer\\Value constructor expects int\|null, string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/IntegerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MapLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:testGetRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Parameter \#1 \$contentId of method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:generateValidationError\(\) expects string, int given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Parameter \#1 \$value of method Ibexa\\Core\\FieldType\\RelationList\\Type\:\:getRelations\(\) expects Ibexa\\Core\\FieldType\\RelationList\\Value, Ibexa\\Core\\FieldType\\Value given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:testGetRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Parameter \#1 \$fieldValue of method Ibexa\\Core\\FieldType\\Relation\\Type\:\:getRelations\(\) expects Ibexa\\Core\\FieldType\\Relation\\Value, Ibexa\\Core\\FieldType\\Value given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:\$contentHandler has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/FieldType/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Parameter \#1 \$selection of class Ibexa\\Core\\FieldType\\Selection\\Value constructor expects array\, array\ given\.$#' - identifier: argument.type - count: 4 - path: tests/lib/FieldType/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\Gateway\\DoctrineStorageTest\:\:testGetIdUrlMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\Gateway\\DoctrineStorageTest\:\:testGetUrlIdMap\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\Gateway\\DoctrineStorageTest\:\:testInsertUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\Gateway\\DoctrineStorageTest\:\:testLinkUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\Gateway\\DoctrineStorageTest\:\:testUnlinkUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php - - - - message: '#^Cannot access offset ''urlId'' on array\|bool\|float\|int\|string\|null\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 2 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testDeleteFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testGetFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testGetFieldDataNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testGetFieldDataWithEmptyUrlId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testHasFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testStoreFieldDataWithEmptyUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testStoreFieldDataWithExistingUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:testStoreFieldDataWithNewUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:\$gatewayMock \(Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\FieldType\\Url\\UrlStorageTest\:\:\$loggerMock \(PHPUnit\\Framework\\MockObject\\MockObject&Psr\\Log\\LoggerInterface\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/FieldType/Url/UrlStorageTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Parameter \#1 \$link of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/FieldType/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:providerForTestCreatePersistenceValue\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:providerForTestValidate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testCreatePersistenceValue\(\) has parameter \$expectedFieldValueExternalData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testCreatePersistenceValue\(\) has parameter \$userValueDate with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testValidate\(\) has parameter \$expectedValidationErrors with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/FieldType/UserTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\StringLengthValidator will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/FieldType/Validator/StringLengthValidatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentInfoLocationLoader\\SudoMainLocationLoaderTest\:\:testLoadLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentInfoLocationLoader\\SudoMainLocationLoaderTest\:\:testLoadLocationError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentInfoLocationLoader\\SudoMainLocationLoaderTest\:\:testLoadLocationNoMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentInfoLocationLoader/SudoMainLocationLoaderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentPreviewHelperTest\:\:testChangeConfigScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentPreviewHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentPreviewHelperTest\:\:testPreviewActive\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentPreviewHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentPreviewHelperTest\:\:testPreviewedContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentPreviewHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentPreviewHelperTest\:\:testPreviewedLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentPreviewHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\ContentPreviewHelperTest\:\:testRestoreConfigScope\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/ContentPreviewHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldHelperTest\:\:testIsFieldEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/FieldHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldHelperTest\:\:testIsFieldNotEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/FieldHelperTest.php - - - - message: '#^Constant Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:DEFAULT_GROUP_NAME is unused\.$#' - identifier: classConstant.unused - count: 1 - path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:getArrayTranslatorFieldsGroupsList\(\) has parameter \$groups with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:getFieldDefinitionMock\(\) has parameter \$constructorArgs with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:\$translatorMock has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\PreviewLocationProviderTest\:\:testGetPreviewLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/PreviewLocationProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\PreviewLocationProviderTest\:\:testGetPreviewLocationDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/PreviewLocationProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\PreviewLocationProviderTest\:\:testGetPreviewLocationNoLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/PreviewLocationProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:getTranslatedField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:getTranslatedField\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:getTranslatedFieldProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:getTranslatedNameProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:getTranslationSiteAccessProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetAvailableLanguagesWithTranslationSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetAvailableLanguagesWithoutTranslationSiteAccesses\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedName\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedNameByContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedNameByContentInfo\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedNameByContentInfoForcedLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedNameByContentInfoForcedLanguageMainLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslatedNameForcedLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccess\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccess\(\) has parameter \$language with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccess\(\) has parameter \$relatedSiteAccesses with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccess\(\) has parameter \$translationSiteAccesses with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:testGetTranslationSiteAccessUnkownLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Helper\\TranslationHelperTest\:\:\$siteAccessByLanguages has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Helper/TranslationHelperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\IO\\ConfigScopeChangeAwareIOServiceTest\:\:\$innerIOService \(Ibexa\\Core\\IO\\ConfigScopeChangeAwareIOService&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\IOServiceInterface&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/ConfigScopeChangeAwareIOServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\FilePathNormalizer\\FlysystemTest\:\:providerForTestNormalizePath\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/FilePathNormalizer/FlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\IOBinarydataHandler\\FlysystemTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - - - message: '#^Parameter \#1 \$inputStream of method Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:setInputStream\(\) expects resource, resource\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:\$mtime \(DateTime\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\IO\\IOBinarydataHandler\\FlysystemTest\:\:\$handler \(Ibexa\\Core\\IO\\IOBinarydataHandler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\IOBinarydataHandler\\Flysystem\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\IOMetadataHandler\\FlysystemTest\:\:getDataForFileExists\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/IOMetadataHandler/FlysystemTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\IOMetadataHandler\\FlysystemTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/IOMetadataHandler/FlysystemTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\IO\\IOMetadataHandler\\FlysystemTest\:\:\$handler \(Ibexa\\Core\\IO\\IOMetadataHandler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\IOMetadataHandler\\Flysystem\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/IOMetadataHandler/FlysystemTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:\$mtime \(DateTime\) does not accept int\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\IO\\IOMetadataHandler\\LegacyDFSClusterTest\:\:\$handler \(Ibexa\\Core\\IO\\IOMetadataHandler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\IOMetadataHandler\\LegacyDFSCluster\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\MimeTypeDetector\\FileInfoTest\:\:testGetFromBuffer\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/MimeTypeDetector/FileInfoTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\MimeTypeDetector\\FileInfoTest\:\:testGetFromPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/MimeTypeDetector/FileInfoTest.php - - - - message: '#^Parameter \#1 \$path of method Ibexa\\Core\\IO\\MimeTypeDetector\\FileInfo\:\:getFromBuffer\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/IO/MimeTypeDetector/FileInfoTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\AbsolutePrefixTest\:\:provideData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:provideData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testDecorate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testDecorate\(\) has parameter \$decoratedUrl with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testDecorate\(\) has parameter \$prefix with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testDecorate\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testUndecorate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testUndecorate\(\) has parameter \$decoratedUrl with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testUndecorate\(\) has parameter \$prefix with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:testUndecorate\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/IO/UrlDecorator/PrefixTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlRedecoratorTest\:\:testRedecorateFromSource\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/UrlRedecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlRedecoratorTest\:\:testRedecorateFromTarget\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/IO/UrlRedecoratorTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\IO\\UrlRedecoratorTest\:\:\$redecorator \(Ibexa\\Core\\IO\\UrlRedecorator&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\UrlRedecorator\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/IO/UrlRedecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\Base\:\:getPersistenceMock\(\) has parameter \$mockMethods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/Base.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\Base\:\:getUserMock\(\) has parameter \$mockMethods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/Base.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testGetCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testGetCriterionMultipleValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testGetCriterionSingleValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ContentTypeLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:dataProviderForAccept\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:dataProviderForEvaluate\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:getLanguageLimitation\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:getTergetVersion\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testGetCriterionMultipleValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testGetCriterionSingleValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/LocationLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestEvaluateSelfGroup\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:testEvaluateSelfGroup\(\) has parameter \$currentUserGroupLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:willReturnOnConsecutiveCalls\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 1 - path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testGetCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testGetCriterionMultipleValuesFromMultipleGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testGetCriterionMultipleValuesFromSingleGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:testGetCriterionSingleValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:\$loadObjectStatesMap type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$callNo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$contentId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$contentInfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$persistenceCalled with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:getTestEvaluateContentMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:getTestEvaluateVersionInfoMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistence with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - - - message: '#^Instanceof between Ibexa\\Core\\Repository\\Values\\User\\UserRoleAssignment and Ibexa\\Core\\Repository\\Values\\User\\User will always evaluate to false\.$#' - identifier: instanceof.alwaysFalse - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/RoleLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testGetCriterionMultipleValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testGetCriterionSingleValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SectionLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testGetCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:getContentMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:getVersionInfoMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:getVersionInfoMock\(\) has parameter \$shouldBeCalled with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testGetCriterion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/StatusLimitationTypeTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testAcceptValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testAcceptValueException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testBuildValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testGetCriterionInvalidValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testGetCriterionMultipleValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testGetCriterionSingleValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testValidateError\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testValidateErrorWrongPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testValidatePass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testValueSchema\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Component\\Serializer\\Stubs\\CompoundStub\:\:__construct\(\) has parameter \$subMatchers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Component/Serializer/Stubs/CompoundStub.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Component\\Serializer\\Stubs\\MatcherStub\:\:__construct\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Component\\Serializer\\Stubs\\MatcherStub\:\:getData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Component\\Serializer\\Stubs\\MatcherStub\:\:setRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Component/Serializer/Stubs/MatcherStub.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Controller\\ControllerTest\:\:testRender\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Controller/ControllerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Controller\\ControllerTest\:\:testRenderWithResponse\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Controller/ControllerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Event\\RouteReferenceGenerationEventTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Event\\RouteReferenceGenerationEventTest\:\:testGetSet\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Event/RouteReferenceGenerationEventTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Event\\ScopeChangeEventTest\:\:testGetSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Event/ScopeChangeEventTest.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest\.php\:47\:\:getTwigVariables\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\ContentViewTwigVariablesSubscriberTest\:\:getRegistry\(\) has parameter \$providers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest\.php\:47\:\:\$identifier has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListenerTest\:\:testGetSubscribedEvents\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListenerTest\:\:testOnRouteReferenceGeneration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListenerTest\:\:testOnRouteReferenceGenerationNoLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListenerTest\:\:testOnRouteReferenceGenerationNoTranslationSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php - - - - message: '#^Parameter \#1 \$translationHelper of class Ibexa\\Core\\MVC\\Symfony\\EventListener\\LanguageSwitchListener constructor expects Ibexa\\Core\\Helper\\TranslationHelper, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/MVC/Symfony/EventListener/LanguageSwitchListenerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\ImageAsset\\ParameterProviderTest\:\:dataProviderForTestGetViewParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\ImageAsset\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\ImageAsset\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$status with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:providerForTestGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$status with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testNotFoundGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testUnauthorizedGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:providerForTestGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$desinationContentIds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testNotFoundGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testUnauthorizedGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:getLocaleConverterMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:getRequestStackMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:getRequestStackMock\(\) has parameter \$hasLocale with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:providerForTestGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:testGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expectedLocale with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$hasRequestLocale with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderRegistryTest\:\:testGetParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderRegistryTest\:\:testGetParameterProviderFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProviderRegistryTest\:\:testSetHasParameterProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/FieldType/View/ParameterProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\LocaleConverterTest\:\:convertToPOSIXProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\LocaleConverterTest\:\:\$conversionMap \(array\{array\{string, string\|null\}\}\) does not accept array\{eng\-GB\: ''en_GB'', eng\-US\: ''en_US'', fre\-FR\: ''fr_FR'', ger\-DE\: ''de_DE'', nor\-NO\: ''no_NO'', cro\-HR\: ''hr_HR''\}\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:getLanguageCodesMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:providerForTestGetPreferredLanguages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:providerForTestGetPreferredLanguagesWithUserPreferredLanguage\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithUserPreferredLanguage\(\) has parameter \$expectedEzLanguageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithUserPreferredLanguage\(\) has parameter \$userLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithoutUserLanguage\(\) has parameter \$expectedEzLanguageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithoutUserLanguage\(\) has parameter \$userLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Parameter \#1 \$filename of static method Symfony\\Component\\Yaml\\Yaml\:\:parseFile\(\) expects string, string\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:\$userLanguagePreferenceProvider is never read, only written\.$#' - identifier: property.onlyWritten - count: 1 - path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\BaseTest\:\:getContentInfoMock\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\BaseTest\:\:getLocationMock\(\) has parameter \$properties with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\BaseTest\:\:getPartiallyMockedViewProvider\(\) has parameter \$matchingConfig with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\BaseTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/BaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Depth\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroupTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroupTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroupTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroupTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroup\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeGroup\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeGroupTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentTypeTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentTypeTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentTypeTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentType\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentType\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocation\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentTypeTest\:\:matchContentInfoProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentTypeTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentTypeTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentTypeTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentType\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Parameter \#1 \$contentTypeIdentifier of method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentTypeTest\:\:generateRepositoryMockForContentTypeIdentifier\(\) expects int, string given\.$#' - identifier: argument.type - count: 8 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ContentType\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentTypeTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentTypeTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentTypeTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentType\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentType\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\SectionTest\:\:matchSectionProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\SectionTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\SectionTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\Section\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\Section\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:getMultipleValuedMatcherMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:matchingConfigProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:testInjectRepository\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:testSetMatchingConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:testSetMatchingConfig\(\) has parameter \$matchingConfig with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:matchLocationProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:setMatchingConfigProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:testMatchContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:testMatchLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:testSetMatchingConfig\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Parameter \#1 \$contentInfo of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAlias\:\:matchContentInfo\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Parameter \#1 \$location of method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAlias\:\:matchLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\MVC\\Symfony\\Matcher\\ConfigurableMatcherFactoryInterface\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:matchConfigProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$matchedConfig with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$namespace with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$parameterName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$scope with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$viewsConfiguration with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:generateProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testGenerateWithSiteAccessNoReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testGenerateWithSiteAccessNoReverseMatch\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testGenerateWithSiteAccessNoReverseMatch\(\) has parameter \$referenceType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testGenerateWithSiteAccessNoReverseMatch\(\) has parameter \$urlResource with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testSimpleGenerate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testSimpleGenerate\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testSimpleGenerate\(\) has parameter \$referenceType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testSimpleGenerate\(\) has parameter \$urlResource with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:generateGenerator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerate\(\) has parameter \$params with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerate\(\) has parameter \$resource with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerateNullResource\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerateNullResourceAndPassedParams\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerateNullResourceWithoutRoute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Parameter \#1 \$dispatcher of class Ibexa\\Core\\MVC\\Symfony\\Routing\\Generator\\RouteReferenceGenerator constructor expects Symfony\\Component\\EventDispatcher\\EventDispatcherInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 4 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceTest\:\:testGetSetParams\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceTest\:\:testGetSetRoute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceTest\:\:testRemoveParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/RouteReferenceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequestTest\:\:fromUrlProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequestTest\:\:testFromUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerateRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerateWithSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestIsPrefixExcluded\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerate\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerate\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateNoUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateRootLocation\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateRootLocation\(\) has parameter \$isOutsideAndNotExcluded with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateRootLocation\(\) has parameter \$pathPrefix with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateWithSiteAccessParam\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateWithSiteAccessParam\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testGetPathPrefixByRootLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testIsPrefixExcluded\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testIsPrefixExcluded\(\) has parameter \$expectedIsExcluded with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testIsPrefixExcluded\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testLoadLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:getRequestByPathInfo\(\) has parameter \$pathInfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:providerTestSupports\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateInvalidLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateNoLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateWithContentId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateWithContentIdWithMissingMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateWithLocationAsParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGenerateWithLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testGetRouteCollection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationCorrectCaseUriPrefixExcluded\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationCustom\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationCustomForward\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationHistory\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationWithCaseRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestLocationWrongCaseUriPrefixExcluded\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestResource\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestResourceCaseIncorrectWithForwardRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestResourceWithCaseRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestResourceWithRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestVirtual\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testMatchRequestVirtualWithCaseRedirect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testRequestContext\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testSupports\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testSupports\(\) has parameter \$isSupported with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:testSupports\(\) has parameter \$routeReference with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:\$requestContext has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:checkRequestPathProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:generateUriProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:generateUriStandardProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPath\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPath\(\) has parameter \$path with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPath\(\) has parameter \$requestUri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPath\(\) has parameter \$siteAccessUri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testCheckRequestPathStandard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUri\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUri\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUri\(\) has parameter \$isUriRouteName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUri\(\) has parameter \$siteAccessUri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUri\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUriStandard\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUriStandard\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUriStandard\(\) has parameter \$isUriRouteName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:testGenerateUriStandard\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\:\:\$matcher \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\URILexer&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 2 - path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - - - message: '#^Parameter \#1 \$expirationDate of class Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PasswordInfo constructor expects DateTimeImmutable\|null, DateTimeImmutable\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Security/UserCheckerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserTest\:\:testIsEqualTo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserTest\:\:testIsEqualToNotSameUserType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserTest\:\:testIsNotEqualTo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserTest\:\:testSetAPIUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\UserWrappedTest\:\:testIsEqualTo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/UserWrappedTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:supportsAttributeProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:supportsClassProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsAttribute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsAttribute\(\) has parameter \$attribute with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsAttribute\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsClass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsClass\(\) has parameter \$class with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVote\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVote\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVote\(\) has parameter \$repositoryCanUser with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVoteInvalidAttribute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVoteInvalidAttribute\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:voteInvalidAttributeProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:voteProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:supportsAttributeProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:supportsClassProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testSupportsAttribute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testSupportsAttribute\(\) has parameter \$attribute with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testSupportsAttribute\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testSupportsClass\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testSupportsClass\(\) has parameter \$class with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVote\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVote\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVote\(\) has parameter \$repositoryCanUser with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVoteInvalidAttribute\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVoteInvalidAttribute\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:voteInvalidAttributeProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:voteProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:matchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testMatch\(\) has parameter \$expectedMatch with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testReverseMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testReverseMatchNotVersatile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testReverseMatchSiteAccessNotConfigured\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testSerialize\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testSetMatcherBuilder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testSetRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Parameter \#1 \$matcherBuilder of method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:setMatcherBuilder\(\) expects Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\MatcherBuilderInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 6 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:matchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testReverseMatch1\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testReverseMatch2\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testReverseMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testReverseMatchNotVersatile\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testReverseMatchSiteAccessNotConfigured\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testSerialize\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:testSetMatcherBuilder\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Parameter \#1 \$matcherBuilder of method Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Compound\:\:setMatcherBuilder\(\) expects Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\MatcherBuilderInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 6 - path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:getExistingSiteProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:siteAccessNamesProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - - - message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - - - message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\:\:\$groups \(array\\) does not accept array\\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:\$groupsBySiteAccess type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterBaseTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterBaseTest\:\:testMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterBaseTest.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Host constructor invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:reverseMatchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testReverseMatch\(\) has parameter \$elementNumber with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testReverseMatch\(\) has parameter \$expectedHost with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testReverseMatch\(\) has parameter \$siteAccessName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testReverseMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:testSerialize\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testReverseHostMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testReverseMatchHost\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testReverseMatchPort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testReversePortMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testSetGetRequestMapHost\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostPortURITest\:\:testSetGetRequestMapPort\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostPortURITest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Routing\\\\SimplifiedRequest'' and Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostText constructor invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostTextTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostTextTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostTextTest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:fixupURIProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:setRequestProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testAnalyseLink\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testAnalyseURI\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testReverseMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testSetGetRequest\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testSetGetRequest\(\) has parameter \$config with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterPortHostURITest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterPortHostURITest.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Port constructor invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterSpecialPortsTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterSpecialPortsTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:createRouter\(\) has parameter \$debug with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testConstructDebug\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatch\(\) has parameter \$siteAccess with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchByName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchByNameInvalidSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchByNameNoVersatileMatcher\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchWithDevEnvFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchWithEnv\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:testMatchWithProdEnvFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:analyseProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:reverseMatchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testAnalyseLink\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testAnalyseURI\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testAnalyseURILevelAsInt\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testReverseMatch\(\) has parameter \$originalPathinfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testReverseMatch\(\) has parameter \$siteAccessName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testReverseMatchFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:testSerialize\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:analyseProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:reverseMatchProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testAnalyseLink\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testAnalyseURI\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testReverseMatch\(\) has parameter \$originalPathinfo with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testReverseMatch\(\) has parameter \$siteAccessName with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:testSerialize\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Routing\\\\SimplifiedRequest'' and Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIText constructor invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURITextTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURITextTest\:\:testAnalyseLink\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURITextTest\:\:testAnalyseURI\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURITextTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURITextTest\:\:testReverseMatch\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessServiceTest\:\:getAvailableSitAccesses\(\) return type with generic class ArrayIterator does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessServiceTest\:\:getConfigResolverParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - - - message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessServiceTest\:\:\$availableSiteAccesses with generic class ArrayIterator does not specify its types\: TKey, TValue$#' - identifier: missingType.generics - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessServiceTest\:\:\$configResolverParameters type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetAvailableLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetConfigResolver\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetRequestedUriString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetSiteaccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetSystemUriString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetSystemUriStringNoUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetTranslationSiteAccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetViewParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\GlobalHelperTest\:\:testGetViewParametersString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/GlobalHelperTest.php - - - - message: '#^Anonymous function has an unused use \$content\.$#' - identifier: closure.unusedUse - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - - - message: '#^Anonymous function has an unused use \$siteAccess\.$#' - identifier: closure.unusedUse - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - - - message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpKernel\\\\Controller\\\\ControllerReference'' and Symfony\\Component\\HttpKernel\\Controller\\ControllerReference will always evaluate to true\.$#' - identifier: method.alreadyNarrowedType - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - - - message: '#^Anonymous function has an unused use \$content\.$#' - identifier: closure.unusedUse - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - - - message: '#^Anonymous function has an unused use \$siteAccess\.$#' - identifier: closure.unusedUse - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - - - message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpKernel\\\\Controller\\\\ControllerReference'' and Symfony\\Component\\HttpKernel\\Controller\\ControllerReference will always evaluate to true\.$#' - identifier: method.alreadyNarrowedType - count: 1 - path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getConfigResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getContent\(\) has parameter \$fieldsData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getContent\(\) has parameter \$namesData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getField\(\) has parameter \$isEmpty with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Parameter \#1 \$repository of class Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtension constructor expects Ibexa\\Contracts\\Core\\Repository\\Repository, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:\$fieldHelperMock \(Ibexa\\Contracts\\Core\\Repository\\ContentTypeService&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\Helper\\FieldHelper&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getConfigResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getContent\(\) has parameter \$fieldsData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getContent\(\) has parameter \$namesData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$settings with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$typeIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getTemplatePath\(\) has parameter \$tpl with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:\$fieldDefinitions has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - - - message: '#^Argument of an invalid type string supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:getExtensions\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:getLocale\(\) should return string but returns array\\.$#' - identifier: return.type - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:setConfigurationLocale\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 115 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Core\\MVC\\Symfony\\Locale\\LocaleConverterInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 114 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^PHPDoc tag @param has invalid value \(\\Symfony\\Contracts\\Translation\\TranslatorInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 109 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$configResolverInterfaceMock has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$locale has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$localeConverterInterfaceMock has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$suffixes has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$translatorMock has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - - - message: '#^Call to an undefined method Twig\\Error\\SyntaxError\:\:setTemplateFile\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$condition with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$deprecation with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$exception with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$file with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$message with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$outputs with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSystemTwigIntegrationTestCase\:\:doIntegrationTest\(\) has parameter \$templates with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Parameter \#1 \$name of method Twig\\Loader\\ChainLoader\:\:getSourceContext\(\) expects string, int\|string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Undefined variable\: \$ret$#' - identifier: variable.undefined - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSystemTwigIntegrationTestCase.php - - - - message: '#^Anonymous function should return non\-empty\-string but returns non\-empty\-string\|false\.$#' - identifier: return.type - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\RoutingExtensionTest\:\:getExampleRouteReference\(\) has parameter \$name with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\RoutingExtensionTest\:\:getExampleRouteReference\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:\$messageTemplate has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:\$parameters has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:\$messageTemplate has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:\$parameters has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:addParameter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:addParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setMessageTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setParameters\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Parameter \#1 \$messageTemplate of method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setMessageTemplate\(\) expects string, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:\$messageTemplate has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:\$parameters has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:badTemplateIdentifierProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:createViewUnderTest\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:createViewUnderTest\(\) has parameter \$template with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:createViewUnderTest\(\) has parameter \$viewType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:getAlwaysAvailableParams\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\AbstractViewTest\:\:goodTemplateIdentifierProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Parameter \#1 \$templateIdentifier of method Ibexa\\Core\\MVC\\Symfony\\View\\View\:\:setTemplateIdentifier\(\) expects \(Closure\(array\\)\: string\)\|string, \(callable\(\)\: mixed\)\|string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/MVC/Symfony/View/AbstractViewTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilderTest\:\:\$contentViewBuilder \(Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\MVC\\Symfony\\View\\Builder\\ContentViewBuilder\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/MVC/Symfony/View/Builder/ContentViewBuilderTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:constructFailProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:constructProvider\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:createViewUnderTest\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:createViewUnderTest\(\) has parameter \$template with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:createViewUnderTest\(\) has parameter \$viewType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:getAlwaysAvailableParams\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstruct\(\) has parameter \$params with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstruct\(\) has parameter \$templateIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstructFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstructFail\(\) has parameter \$templateIdentifier with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:\$valueParams type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\LoginFormViewTest\:\:createViewUnderTest\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/LoginFormViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\LoginFormViewTest\:\:createViewUnderTest\(\) has parameter \$template with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/LoginFormViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\LoginFormViewTest\:\:createViewUnderTest\(\) has parameter \$viewType with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/MVC/Symfony/View/LoginFormViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\LoginFormViewTest\:\:getAlwaysAvailableParams\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/LoginFormViewTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\Renderer\\TemplateRendererTest\:\:testRender\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\Renderer\\TemplateRendererTest\:\:testRenderNoViewTemplate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/Renderer/TemplateRendererTest.php - - - - message: '#^Method Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest\.php\:29\:\:getTwigVariables\(\) has parameter \$options with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\VariableProviderRegistryTest\:\:getRegistry\(\) has parameter \$providers with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest\.php\:29\:\:\$identifier has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:testRenderContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:testRenderContentWithClosure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:testRenderLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:testRenderLocationWithClosure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:testRenderLocationWithContentPassed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ViewManagerTest\:\:\$viewBaseLayout has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/MVC/Symfony/View/ViewManagerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Pagination\\AdapterFactory\\SearchHitAdapterFactoryTest\:\:dataProviderForCreateFixedAdapter\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php - - - - message: '#^Parameter \#3 \$languageFilter of class Ibexa\\Core\\Pagination\\Pagerfanta\\ContentFilteringAdapter constructor expects array\\|null, array\\|true\> given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Pagination/ContentFilteringAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractBaseHandlerTest\:\:getCacheItem\(\) has parameter \$key with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractBaseHandlerTest\:\:provideAbstractCacheHandlerArguments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractBaseHandlerTest\:\:provideInMemoryCacheHandlerArguments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractBaseHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$additionalCalls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$keyGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$tagGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$additionalCalls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$keyGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$tagGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$key with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$tags with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:willReturnOnConsecutiveCalls\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 6 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:with\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 2 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:withConsecutive\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 6 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Only iterables can be unpacked, array\|null given in argument \#1\.$#' - identifier: argument.unpackNonIterable - count: 5 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Parameter \#1 \$callback of function call_user_func_array expects callable\(\)\: mixed, array\{mixed, string\} given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' - identifier: argument.templateType - count: 3 - path: tests/lib/Persistence/Cache/AbstractCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$additionalCalls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$keyGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheHit\(\) has parameter \$tagGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$additionalCalls with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$keyGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testLoadMethodsCacheMiss\(\) has parameter \$tagGeneratingResults with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$key with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$keyGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$tagGeneratingArguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractInMemoryCacheHandlerTest\:\:testUnCachedMethods\(\) has parameter \$tags with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:willReturnOnConsecutiveCalls\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 6 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:with\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 2 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:withConsecutive\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 6 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Only iterables can be unpacked, array\|null given in argument \#1\.$#' - identifier: argument.unpackNonIterable - count: 5 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Parameter \#1 \$callback of function call_user_func_array expects callable\(\)\: mixed, array\{mixed, string\} given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' - identifier: argument.templateType - count: 3 - path: tests/lib/Persistence/Cache/AbstractInMemoryCacheHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:arrayAsGenerator\(\) has parameter \$array with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:createCacheItem\(\) has parameter \$tags with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:providerForClearAndInvalidation\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:providerForDelete\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testClearAndInvalidation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testClearAndInvalidation\(\) has parameter \$argument with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testDelete\(\) has parameter \$argument with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testGetItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testGetItems\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testGetItemsWithGenerator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testHasItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\BookmarkHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/BookmarkHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\BookmarkHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/BookmarkHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\BookmarkHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/BookmarkHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentHandlerTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentLanguageHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentLanguageHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentLanguageHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentTypeHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentTypeHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentTypeHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ContentTypeHandlerTest\:\:testPublish\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Parameter \#1 \$callback of function call_user_func_array expects callable\(\)\: mixed, array\{mixed, ''publish''\} given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Parameter \#2 \$value of method Ibexa\\Tests\\Core\\Persistence\\Cache\\AbstractBaseHandlerTest\:\:getCacheItem\(\) expects null, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' - identifier: argument.templateType - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Variable \$tags in empty\(\) always exists and is not falsy\.$#' - identifier: empty.variable - count: 1 - path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateKey\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateKeyThrowsInvalidArgumentException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateTag\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateTagThrowsInvalidArgumentException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateKey\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateKeyThrowsInvalidArgumentException\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateTag\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateTagThrowsInvalidArgumentException\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierSanitizerTest\:\:providerForTestEscapeCacheKey\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierSanitizerTest\:\:testEscapeCacheKey\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php - - - - message: '#^Function Ibexa\\Core\\Persistence\\Cache\\InMemory\\microtime\(\) has parameter \$asFloat with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:providerForTestConvertToPathIds\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:testConvertToPathIds\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:testConvertToPathIds\(\) has parameter \$resultArray with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\NotificationHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/NotificationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\NotificationHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/NotificationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\NotificationHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/NotificationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ObjectStateHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ObjectStateHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\ObjectStateHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testContentHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testContentLocationHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testContentTypeHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testLanguageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testObjectStateHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testSectionHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testTransactionHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testTrashHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testUrlAliasHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testUrlWildcardHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceHandlerTest\:\:testUserHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceLoggerTest\:\:testGetCallValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceLoggerTest\:\:testGetCalls\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceLoggerTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\PersistenceLoggerTest\:\:testLogCall\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php - - - - message: '#^Result of method Ibexa\\Core\\Persistence\\Cache\\PersistenceLogger\:\:logCall\(\) \(void\) is used\.$#' - identifier: method.void - count: 1 - path: tests/lib/Persistence/Cache/PersistenceLoggerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SectionHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SectionHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SectionHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SettingHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SettingHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SettingHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SettingHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\SettingHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/SettingHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:testBeginTransactionStartsCacheTransaction\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:testCommitStopsCacheTransaction\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TransactionHandlerTest\:\:testRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TransactionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:testDeleteTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:testEmptyTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:testRecover\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\TrashHandlerTest\:\:testTrashSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 4 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' - identifier: argument.templateType - count: 4 - path: tests/lib/Persistence/Cache/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\URLHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/URLHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\URLHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/URLHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\URLHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/URLHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\URLHandlerTest\:\:testUpdateUrlStatusIsUpdated\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/URLHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlAliasHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlAliasHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlAliasHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlWildcardHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlWildcardHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UrlWildcardHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UrlWildcardHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:testAssignRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:testPublishNewRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:testPublishRoleDraftFromExistingRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Cache/UserHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserPreferenceHandlerTest\:\:providerForCachedLoadMethodsHit\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserPreferenceHandlerTest\:\:providerForCachedLoadMethodsMiss\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserPreferenceHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Cache/UserPreferenceHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\DatabaseConnectionFactory\:\:\$databasePlatforms type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/DatabaseConnectionFactory.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\FieldType'' and Ibexa\\Contracts\\Core\\Persistence\\FieldType will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType - count: 3 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:getFieldTypeMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\FieldType but returns Ibexa\\Contracts\\Core\\FieldType\\FieldType&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:testGetFieldTypeInstance\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:testGetNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:testGetNotFoundBCException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:testGetNotInstance\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldTypeRegistryTest\:\:testRegister\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Parameter \#1 \$coreFieldTypes of class Ibexa\\Core\\Persistence\\FieldTypeRegistry constructor expects array\, array\ given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Parameter \#1 \$coreFieldTypes of class Ibexa\\Core\\Persistence\\FieldTypeRegistry constructor expects array\, array\ given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Parameter \#2 \$fieldType of method Ibexa\\Core\\Persistence\\FieldTypeRegistry\:\:register\(\) expects Ibexa\\Contracts\\Core\\FieldType\\FieldType, Ibexa\\Contracts\\Core\\Persistence\\FieldType given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/FieldTypeRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldValue\\Converter\\ImageConverterTest\:\:dataProviderForTestToFieldDefinition\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldValue\\Converter\\ImageConverterTest\:\:dataProviderForTestToStorageFieldDefinition\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\:\:loadBookmarkDataById\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:dataProviderForLoadUserBookmarks\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:loadBookmark\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testCountUserBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testCountUserBookmarks\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testDeleteBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testInsertBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLoadBookmarkDataById\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLoadBookmarkDataByUserIdAndLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLoadUserBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLoadUserBookmarks\(\) has parameter \$expected with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLocationSwapped\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testLoadByUserIdAndLocationIdExistingBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testLoadByUserIdAndLocationIdNonExistingBookmark\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testLoadUserBookmarks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\HandlerTest\:\:testLocationSwapped\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/HandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\MapperTest\:\:testCreateBookmarkFromCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\MapperTest\:\:testExtractBookmarksFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Bookmark/MapperTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 9 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 17 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 8 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 17 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getContentTypeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getRelationFixture\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getTreeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testAddRelation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCopyAllVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCopySingleVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCopyThrowsNotFoundExceptionContentNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCopyThrowsNotFoundExceptionVersionNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testCreateDraftFromVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testDeleteContentWithLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testDeleteContentWithoutLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testDeleteVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testListVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoadContentInfoByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoadContentList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoadDraftsForUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoadErrorNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testLoadReverseRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testPublish\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testPublishFirstVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testRemoveRawContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testRemoveRelation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testSetStatus\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testUpdateContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testUpdateMetadata\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:testUpdateMetadataUpdatesPathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$contentHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$contentTypeHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$fieldHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$locationGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$mapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$slugConverterMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$treeHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$typeGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$urlAliasGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateExistingFieldsInNewVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateNewFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateNewFieldsForMainLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertUpdateFieldsExistingLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertUpdateFieldsForInitialLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertUpdateFieldsWithNewLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getFieldTypeMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\FieldType&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\FieldType\\FieldType\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getFieldTypeRegistryMock\(\) should return Ibexa\\Core\\Persistence\\FieldTypeRegistry&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\FieldTypeRegistry\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateExistingFieldsInNewVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateExistingFieldsInNewVersionUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateNewFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateNewFieldsForMainLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateNewFieldsForMainLanguageUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testCreateNewFieldsUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testDeleteFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testLoadExternalFieldData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsExistingLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsExistingLanguagesUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsForInitialLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsForInitialLanguageUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsWithNewLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:testUpdateFieldsWithNewLanguageUpdatingStorageHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$value \(Ibexa\\Contracts\\Core\\Persistence\\Content\\FieldValue\) does not accept null\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$contentGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$fieldTypeMock \(Ibexa\\Contracts\\Core\\FieldType\\FieldType\) does not accept Ibexa\\Contracts\\Core\\Persistence\\FieldType&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$fieldTypeMock \(Ibexa\\Contracts\\Core\\FieldType\\FieldType\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$fieldTypeRegistryMock \(Ibexa\\Core\\Persistence\\FieldTypeRegistry\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$mapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$storageHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Variable \$copyField might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Variable \$originalField might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - - - message: '#^Cannot access offset ''email'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Cannot access offset ''id'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Cannot access offset ''name'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:testToStorageFieldDefinitionDefaultCurrentUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:testToStorageFieldDefinitionDefaultEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:\$authors \(array\\) does not accept array\\>\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CheckboxTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CheckboxTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:providerForTestToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:providerForTestToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldDefinitionMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldDefinitionSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldValue\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldValue\(\) has parameter \$dataText with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldValue\(\) has parameter \$sortKeyString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageFieldDefinitionMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageFieldDefinitionSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has parameter \$dataText with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has parameter \$sortKey with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has parameter \$sortKeyString with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php - - - - message: '#^Cannot access offset ''timestring'' on array\|bool\|float\|int\|string\|null\.$#' - identifier: offsetAccess.nonOffsetAccessible - count: 3 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:getXMLToDateIntervalMap\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testGenerateDateIntervalXML\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testGetDateIntervalFromXML\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToFieldDefinitionCurrentDate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToFieldDefinitionNoDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToFieldDefinitionWithAdjustmentAndSeconds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToFieldDefinitionWithAdjustmentNoSeconds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToStorageFieldDefinitionCurrentDate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToStorageFieldDefinitionNoDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToStorageFieldDefinitionWithAdjustment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToFieldDefinitionDefaultCurrentDate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToFieldDefinitionDefaultEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToStorageFieldDefinitionDefaultCurrentDate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToStorageFieldDefinitionDefaultEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNTest\:\:providerForTestToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNTest\:\:testToFieldDefinition\(\) has parameter \$dataInt with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNTest\:\:testToFieldDefinition\(\) has parameter \$excpectedIsbn13Value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\KeywordTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/KeywordTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaTest\:\:\$converter has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToFieldDefinitionMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToFieldValueEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationListTest\:\:testToStorageValueEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationListTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationTest\:\:\$converter \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToFieldDefinitionMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToFieldDefinitionSingleEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToFieldValueEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToStorageFieldDefinitionMultiple\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToStorageFieldDefinitionSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\SelectionTest\:\:testToStorageValueEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/SelectionTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:\$longText has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineTest\:\:testToStorageFieldDefinitionNoValidator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineTest\:\:testToStorageFieldDefinitionWithValidator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextLineTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextLineTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToFieldDefinitionDefaultCurrentTime\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToFieldDefinitionDefaultEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToStorageFieldDefinitionDefaultCurrentTime\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToStorageFieldDefinitionDefaultEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TimeTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TimeTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlTest\:\:testToFieldValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\UrlTest\:\:testToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyInt \(int\) does not accept false\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept false\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValueConverterRegistryTest\:\:testGetNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValueConverterRegistryTest\:\:testGetStorage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValueConverterRegistryTest\:\:testRegister\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:assertContentVersionAttributesLanguages\(\) has parameter \$expectation with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:assertValuesInRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:insertRelationFixture\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:storeFixture\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testCreateFixtureForMapperExtractContentFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testCreateFixtureForMapperExtractContentFromRowsMultipleVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteFields\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteFieldsWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteNames\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteNamesWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteRelation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteRelationsFrom\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteRelationsTo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteRelationsWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testDeleteVersionsWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testGetAllLocationIds\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testGetFieldIdsByType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testGetFieldIdsByTypeWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testGetLastVersionNumber\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testInsertContentObject\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testInsertNewAlwaysAvailableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testInsertNewField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testInsertRelation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testInsertVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testListVersionNumbers\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testListVersionsForUser\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadNonExistentTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadRelationsByType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadRelationsByVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadRelationsNoResult\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadReverseRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadReverseRelationsWithType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadWithAllTranslations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testLoadWithSingleTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testSetName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testSetStatus\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testSetStatusPublished\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testSetStatusUnknownVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testUpdateContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testUpdateField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testUpdateNonTranslatableField\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:testUpdateVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Parameter \#2 \$expectedValues of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:assertValuesInRows\(\) expects array\, array\ given\.$#' - identifier: argument.type - count: 9 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\RandomSortClauseHandlerFactoryTest\:\:getGateways\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\RandomSortClauseHandlerFactoryTest\:\:testGetGateway\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\RandomSortClauseHandlerFactoryTest\:\:testGetGatewayNotImplemented\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getCacheIdentifierGeneratorMock\(\) should return Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getInnerLanguageHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getLanguageCacheMock\(\) should return Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testLoadByLanguageCode\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testLoadByLanguageCodeFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testLoadFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:testUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$cacheIdentifierGeneratorMock \(Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$innerHandlerMock \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageCacheMock \(Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:testDeleteLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:testInsertLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:testLoadAllLanguagesData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:testLoadLanguageListData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:testUpdateLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\\DoctrineDatabase\:\:deleteLanguage\(\) \(void\) is used\.$#' - identifier: method.void - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 11 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 6 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testDeleteFail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testDeleteSuccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testLoadByLanguageCode\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testLoadByLanguageCodeFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testLoadFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:testUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$mapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MapperTest\:\:testCreateLanguageFromCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MapperTest\:\:testExtractLanguagesFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:getLanguageIndicatorData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:isAlwaysAvailableProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:languageIdsFromMaskProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:removeAlwaysAvailableFlagProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testExtractLanguageIdsFromMask\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testExtractLanguageIdsFromMask\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testGenerateLanguageIndicator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testIsAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testIsLanguageAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testIsLanguageAlwaysAvailableNoDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testIsLanguageAlwaysAvailableOtherLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testRemoveAlwaysAvailableFlag\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testRemoveAlwaysAvailableFlag\(\) has parameter \$expectedResult with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testRemoveAlwaysAvailableFlag\(\) has parameter \$langMask with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Offset string might not exist on array\{\}\|array\{eng\-US\?\: Ibexa\\Contracts\\Core\\Persistence\\Content\\Language, eng\-GB\?\: Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\}\.$#' - identifier: offsetAccess.notFound - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextSearchConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - - - message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$fieldNameGeneratorMock \(Ibexa\\Core\\Search\\Common\\FieldNameGenerator&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageMaskGenerator \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:delete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:update\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:\$languages has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - - - message: '#^Cannot call method fetch\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:assertLoadLocationProperties\(\) has parameter \$locationData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:buildContentTreeSelectContentWithParentQuery\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:buildGenericNodeSelectContentWithParentQuery\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:buildNodeAssignmentSelectContentWithParentQuery\(\) has parameter \$fields with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getConvertNodeAssignmentsLocationValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getCreateLocationReturnValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getCreateLocationValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getLoadLocationValues\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getLocationGateway\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getNodeAssignmentValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:getUpdateLocationData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:providerForTestUpdatePathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testChangeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignments\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignments\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignments\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignmentsMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignmentsParentHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignmentsParentInvisible\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testConvertNodeAssignmentsUpdateAssignment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationNodeAssignmentCreation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationNodeAssignmentCreation\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationNodeAssignmentCreationMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationReturnValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationReturnValues\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationReturnValues\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationValues\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testCreateLocationValues\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testDeleteNodeAssignment\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testDeleteNodeAssignmentWithSecondArgument\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testGetChildren\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testGetMainNodeId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testHideUnhideParentTree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testHideUnhidePartialSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testHideUnhideUpdateHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testHideUpdateHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadInvalidLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadLocationByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadLocationDataByContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadLocationDataByContentLimitSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadLocationList\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testLoadParentLocationDataForDraftContentAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testMoveHiddenDestinationUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testMoveHiddenSourceChildUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testMoveHiddenSourceUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testMoveSubtreeAssignmentUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testMoveSubtreePathUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testRemoveLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testSetSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testSwapLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdateLocation\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdateLocation\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdateLocationsContentVersionNo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdatePathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdatePathIdentificationString\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdatePathIdentificationString\(\) has parameter \$locationId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdatePathIdentificationString\(\) has parameter \$parentLocationId with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTest\:\:testUpdatePathIdentificationString\(\) has parameter \$text with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\ given\.$#' - identifier: argument.type - count: 11 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:getLoadTrashValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:getLocationGateway\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:getTrashValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:getUntrashedLocationValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testCleanupTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testCountLocationsByContentId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testCountTrashed\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListEmptyTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListFullTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashItem\(\) has parameter \$key with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashItem\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashLimited\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashSortedDepth\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testListTrashSortedPathStringDesc\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testLoadTrashByLocationId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testLoadTrashByLocationId\(\) has parameter \$field with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testLoadTrashByLocationId\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testRemoveElementFromTrash\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testTrashLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testTrashLocationUpdateTrashTable\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashInvalidLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationDefault\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationDefault\(\) has parameter \$property with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationDefault\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationInvalidOldParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationInvalidParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:testUntrashLocationNewParent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\\DoctrineDatabaseTrashTest\:\:trashSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Parameter \#2 \$y of method Doctrine\\DBAL\\Query\\Expression\\ExpressionBuilder\:\:in\(\) expects array\\|string, array\ given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:testCreateLocationFromRow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:testCreateLocationFromRowWithPrefix\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:testCreateLocationsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:testCreateTrashedFromRow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:testGetLocationCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Parameter \#2 \$prefix of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) expects string, null given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationCreateStructValues type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationRow type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationValues type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 34 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 8 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:getTrashHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testDeleteTrashItemStillHaveLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testFindTrashItemsWhenEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testFindTrashItemsWithLimits\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testLoadTrashItem\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testRecover\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testTrashSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testTrashSubtreeReturnsNull\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:testTrashSubtreeUpdatesMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 6 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 20 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 4 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 4 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:getLocationHandler\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:loadParentLocationsForDraftContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testChangeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testCopySubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testCreateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testHideUnhideUpdateHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testHideUpdateHidden\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testLoadLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testLoadLocationByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testLoadLocationSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testLoadLocationsByContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testMoveSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testRemoveSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testSetSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testSwapLocations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LocationHandlerTest\:\:testUpdateLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\Relation\\CreateStruct supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:createCreateStructFromContent\(\) invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:extractContentInfoFromRowProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:extractVersionInfoFromRowProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getContentExtractFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getMapper\(\) has parameter \$valueConverter with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getMultipleVersionsNamesExtractFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getNamesExtractFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getRelationExtractFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testConvertToStorageValue\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentBasicProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentBasicProperties\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldCount\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldsNoId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldsNoId\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentParentLocationsEmpty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentParentLocationsEmpty\(\) has parameter \$data with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentWithPreserveOriginalLanguage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateRelationFromCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateVersionInfoForContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractContentFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractContentFromRowsMultipleVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractContentInfoFromRow\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractContentInfoFromRow\(\) has parameter \$fixtures with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractRelationsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Possibly invalid array key type \(list\\|string\)\.$#' - identifier: offsetAccess.invalidOffset - count: 2 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\CreateStruct\:\:\$name \(array\\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:\$valueConverterRegistryMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testDeleteObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testDeleteObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testDeleteObjectStateLinks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testGetContentCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testInsertObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testInsertObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testInsertObjectStateInEmptyGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateDataByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateDataForContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateGroupData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateGroupDataByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateGroupListData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testLoadObjectStateListData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testSetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testUpdateObjectState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testUpdateObjectStateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testUpdateObjectStateLinks\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:testUpdateObjectStatePriority\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateGroupRowsFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateGroupRowsFixture\(\) should return array\\> but returns array\\>\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateRowsFixture\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateRowsFixture\(\) should return array\\> but returns array\\>\.$#' - identifier: return.type - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateFromData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateFromInputStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateGroupFromData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateGroupFromInputStruct\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateGroupListFromData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:testCreateObjectStateListFromData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 39 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 18 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testCreateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testDeleteGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testDeleteThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testGetContentCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testGetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadAllGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadGroupByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadGroupByIdentifierThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadGroupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadObjectStates\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testLoadThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testSetContentState\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testSetPriority\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:testUpdateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$mapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$objectStateHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testAssignSectionToContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testCountContentObjectsInSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testCountRoleAssignmentsUsingSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testDeleteSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testInsertSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testLoadAllSectionData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testLoadSectionData\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testLoadSectionDataByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:testUpdateSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\\DoctrineDatabase\:\:assignSectionToContent\(\) \(void\) is used\.$#' - identifier: method.void - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/Gateway/DoctrineDatabaseTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 12 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testAssign\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testCountRoleAssignmentsUsingSection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testDeleteFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testLoadByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testPoliciesCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:testUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:\$sectionHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\StorageRegistryTest\:\:testGetNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\StorageRegistryTest\:\:testGetStorage\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:getPartlyMockedTreeHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testChangeMainLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testChangeMainLocationToLocationWithoutContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testListVersions\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testLoadContentInfoByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testLoadLocation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testRemoveRawContent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testRemoveSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:testSetSectionForSubtree\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:\$contentGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:\$contentMapper \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:\$fieldHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:\$locationGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:\$locationMapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 35 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 3 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 21 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 6 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getMapperMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getPartlyMockedHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testAddFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testCopy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testCreateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testCreateVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testDeleteGroupFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testDeleteGroupSuccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testDeleteSuccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testDeleteThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testGetContentCount\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testGetFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLink\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadAllGroups\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadContentTypes\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadDefaultVersion\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadGroupByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testLoadNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testPublish\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testPublishNoOldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testRemoveContentTypeTranslation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testRemoveFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testUnlinkFailure\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testUnlinkSuccess\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testUpdate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testUpdateFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:testUpdateGroup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayNotHasKey\(\) expects array\|ArrayAccess, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$mapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type + count: 6 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$storageDispatcherMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\StorageDispatcherInterface&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type + count: 6 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Variable \$nameValue in PHPDoc tag @var does not exist\.$#' + identifier: varTag.variableNotFound count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + path: tests/integration/Core/Repository/ContentTypeServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$updateHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\ContentUpdater\\\\Action\\\\AddField'' and Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddField will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentFixture\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldValueConverterMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getMockedAction\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testApplyMultipleVersionsMultipleTranslations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testApplyMultipleVersionsSingleTranslation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:addFieldDefinition\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testApplySingleVersionMultipleTranslations\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertCopiedFieldDataLoadedCorrectly\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testApplySingleVersionSingleTranslation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertFieldDataLoadedCorrect\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testConstructor\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testInsertExistingField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testInsertExistingFieldUpdating\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContentType\(\) has parameter \$fieldCreateOverride with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testInsertNewField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createContentType\(\) has parameter \$typeCreateOverride with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:testInsertNewFieldUpdating\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createMultilingualContent\(\) has parameter \$fieldData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Parameter \#1 \$id of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldReference\(\) expects int, null given\.$#' - identifier: argument.type - count: 6 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:createMultilingualContent\(\) has parameter \$names with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Parameter \#1 \$id of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldReference\(\) expects int, string given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getOverride\(\) has parameter \$overrideValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept null\.$#' - identifier: assign.propertyType - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidContentTypeConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentMapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidFieldConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentStorageHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidMultilingualFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$fieldValueConverterMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentFixture\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:testApplyMultipleVersionsMultipleTranslations\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:providerForTestIsEmptyValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:testApplyMultipleVersionsSingleTranslation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:testApplySingleVersionSingleTranslation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:removeFieldDefinition\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testContentTypeField\(\) has parameter \$contentType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentMapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopiedFieldType\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentStorageHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopiedFieldType\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$removeFieldAction \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveField\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopyField\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:expects\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCopyField\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContent\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:testApplyUpdates\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:testDetermineActions\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreateContentWithEmptyFieldValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentGatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedEmptyFieldValue\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentMapperMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedEmptyFieldValue\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentStorageHandlerMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedFieldType\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentUpdater \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testCreatedFieldType\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$converterRegistryMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testFromHash\(\) has parameter \$expectedValue with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:countInstancesOfType\(\) invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testFromHash\(\) has parameter \$hash with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:getGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsEmptyValue\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:getTypeCreationContentClassNameExpectations\(\) should return array\\> but returns array\\|string\>\>\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testIsNotEmptyValue\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:getTypeCreationExpectations\(\) should return array\\> but returns array\\>\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeField\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testCountGroupsForType\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeFieldType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testCountInstancesOfTypeExist\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadContentTypeFieldType\(\) has parameter \$contentType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testCountInstancesOfTypeNotExist\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testCountTypesInGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueData\(\) has parameter \$field with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteFieldDefinition\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteFieldDefinitionsForTypeExisting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadEmptyFieldValueType\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteFieldDefinitionsForTypeNotExisting\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadField\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteGroup\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testLoadFieldType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteGroupAssignment\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteGroupAssignmentsForTypeExisting\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishedFieldType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteGroupAssignmentsForTypeNotExisting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testPublishedFieldType\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteTypeExisting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testToHash\(\) has parameter \$expectedHash with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testDeleteTypeNotExisting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testToHash\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertFieldDefinition\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateField\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertGroup\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateFieldNoNewContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertGroupAssignment\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateNoNewContentTypeFieldStillAvailable\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateNoNewContentTypeFieldStillAvailable\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertType\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateTypeFieldStillAvailable\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertType\(\) has parameter \$column with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:testUpdateTypeFieldStillAvailable\(\) has parameter \$content with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertType\(\) has parameter \$expectation with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param for parameter \$repository with type Ibexa\\Contracts\\Core\\Repository is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Repository\.$#' + identifier: parameter.phpDocType count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertTypeContentClassName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @var with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\FieldType\.$#' + identifier: varTag.nativeType + count: 2 + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php + + - + message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertTypeContentClassName\(\) has parameter \$column with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$field of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:assertUpdatedFieldDataLoadedCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testInsertTypeContentClassName\(\) has parameter \$expectation with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:removeFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadAllGroupsData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \$repository of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\BaseIntegrationTest\:\:postCreationHook\(\) has invalid type Ibexa\\Contracts\\Core\\Repository\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/BaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadGroupData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadGroupDataByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getDataForTestFindContentFieldCriterion\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadTypeData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadTypeDataByIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadTypeDataByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testLoadTypesDataForGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testPublishTypeAndFields\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, stdClass given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateType\(\) has parameter \$expectedValue with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateType\(\) has parameter \$fieldName with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:testUpdateTypeName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\:\:\$description \(array\\) does not accept array\\.$#' - identifier: assign.propertyType - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\FieldDefinition\:\:\$defaultValue \(Ibexa\\Contracts\\Core\\Persistence\\Content\\FieldValue\) does not accept array\\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabaseTest\:\:\$gateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\\DoctrineDatabase\:\:updateGroup\(\) \(void\) is used\.$#' - identifier: method.void + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\CreateStruct supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:getLoadGroupFixture\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:getLoadTypeFixture\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:getMaskGeneratorMock\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testCreateGroupFromCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testCreateStructFromType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testExtractGroupsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testExtractTypesFromRowsSingle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testToFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testToStorageFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testTypeFromCreateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:testTypeFromUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php - - message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabase\:\:deleteOldType\(\) invoked with 2 parameters, 1 required\.$#' - identifier: arguments.count + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabaseTest\:\:testDeleteOldType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabaseTest\:\:testPublishNewType\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabaseTest\:\:testUpdateContentObjects\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabaseTest\:\:\$contentUpdaterMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\\DoctrineDatabaseTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/Type/Update/Handler/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:getGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Parameter \#1 \$email of class Ibexa\\Core\\FieldType\\EmailAddress\\Value constructor expects string, null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:getGateway\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabase but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:cleanupStorageDir\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestArchiveUrlAliasesForDeletedTranslations\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:setUpIgnoredPath\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestCleanupAfterPublishHistorize\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:setUpIgnoredPath\(\) has parameter \$ignoredFiles with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestCleanupAfterPublishRemovesLanguage\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:uriExistsOnIO\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestLoadPathData\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:uriExistsOnIO\(\) has parameter \$uri with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestLoadPathDataMultipleLanguages\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$ignoredPathList type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testArchiveUrlAliasesForDeletedTranslations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$storageDirConfigKey has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishHistorize\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Static property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FileSearchBaseIntegrationTest\:\:\$installDir \(string\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FileSearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishHistorize\(\) has parameter \$action with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishHistorize\(\) has parameter \$languageId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishHistorize\(\) has parameter \$parentId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishHistorize\(\) has parameter \$textMD5 with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishRemovesLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishRemovesLanguage\(\) has parameter \$action with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishRemovesLanguage\(\) has parameter \$languageId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishRemovesLanguage\(\) has parameter \$parentId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testCleanupAfterPublishRemovesLanguage\(\) has parameter \$textMD5 with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testGetNextId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathData\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathData\(\) has parameter \$pathData with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathDataMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$isbn of class Ibexa\\Core\\FieldType\\ISBN\\Value constructor expects string, null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathDataMultipleLanguages\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Cannot access property \$alternativeText on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadPathDataMultipleLanguages\(\) has parameter \$pathData with no type specified\.$#' - identifier: missingType.parameter + message: '#^Cannot access property \$uri on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlaliasData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlaliasDataMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:getFixtureData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlaliasDataNonExistent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testRemove\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testRemoveCustomAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testRemoveCustomAliasFails\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testRemoveWithId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ImageIntegrationTest\:\:publishNewImage\(\) has parameter \$parentLocationIDs with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/ImageIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:testReparent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:\$gateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:cleanupTextData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:convertData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:getSlugConverterMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:getSlugConverterMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:providerForTestGetUniqueCounterValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testCleanupText\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Integer\\Value constructor expects int\|null, float given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testCleanupText\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject + count: 5 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testCleanupText\(\) has parameter \$method with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testCleanupText\(\) has parameter \$text with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvert\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertNoMocking\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertNoMocking\(\) has parameter \$defaultText with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertNoMocking\(\) has parameter \$expected with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertNoMocking\(\) has parameter \$text with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertNoMocking\(\) has parameter \$transformation with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertWithDefaultTextFallback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testConvertWithGivenTransformation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testGetUniqueCounterValue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testGetUniqueCounterValue\(\) has parameter \$isRootLevel with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testGetUniqueCounterValue\(\) has parameter \$returnValue with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:testGetUniqueCounterValue\(\) has parameter \$text with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php - - message: '#^Parameter \#1 \$transformationProcessor of class Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter constructor expects Ibexa\\Core\\Persistence\\TransformationProcessor, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$configuration type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$slugConverter \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$slugConverterMock \(PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$transformationProcessorMock \(PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - - - message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias supplied for foreach, only iterables are supported\.$#' - identifier: foreach.nonIterable - count: 4 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\UrlAlias'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:assertVirtualUrlAliasValid\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:assertVirtualUrlAliasValid\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:getHistoryAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:getLanguageHandler\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:getPartlyMockedHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForArchiveUrlAliasesForDeletedTranslations\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestLookupCustomLocationUrlAlias\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertFindResult\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestLookupLocationMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertFindResult\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestLookupLocationUrlAlias\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:assertSortResult\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestLookupResourceUrlAlias\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:checkCustomFieldsSupport\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestLookupVirtualUrlAlias\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:checkSearchEngineSupport\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestPublishUrlAliasForLocationComplex\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:findProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestPublishUrlAliasForLocationSkipsReservedWord\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:fullTextFindProvider\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testArchiveUrlAliasesForDeletedTranslations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasBehaviour\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:getResultContentIdList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasReusesHistory\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:modifyFieldSortClause\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasReusesHistoryOfDifferentLanguage\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:sortProvider\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasReusesLocationElement\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testCreateTestContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasReusesNopElement\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateCustomUrlAliasWithNonameParts\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreateGlobalUrlAliasBehaviour\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testCreatedCustomUrlAliasIsLoadable\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testListGlobalURLAliases\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testListGlobalURLAliasesWithLanguageCode\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindBetweenTwoOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testListGlobalURLAliasesWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testListGlobalURLAliasesWithOffsetAndLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testListURLAliasesForLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindContainsTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$locationId with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadAutogeneratedUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadHistoryUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindEqualsTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$destination with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$forward with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$pathData with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadResourceUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadUrlAliasThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindGreaterThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadVirtualUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadVirtualUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLoadVirtualUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationCopiedCopiedLocationAliasIsValid\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationCopiedCopiedSubtreeIsValid\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationCopiedHistoryNotCopied\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationCopiedSubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationCopiedSubtreeHistoryNotCopied\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationDeleted\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindInTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedHistorize\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedHistorySubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedReparent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedReparentHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedReparentSubtree\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLikeTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationMovedReparentSubtreeHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedMultipleLanguagesDifferentLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedMultipleLanguagesDifferentLanguagesSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedMultipleLanguagesSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedMultipleLanguagesUpdatesLocationPathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedMultipleLanguagesWithCompositeHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSameName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSameNameMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSameNameReverse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSimpleReverse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSimpleWithHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindLowerThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSiblingsSimpleWithHistoryReverse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSimpleWithConflict\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedSimpleWithHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedUpdatesLocationPathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedWithReusingExternalHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotBetweenTwoOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedWithReusingNopEntry\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLocationSwappedWithReusingNopEntryCustomAliasIsDestroyed\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$destination with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotContainsTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$forward with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotEqualsTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$destination with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$forward with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupCustomLocationUrlAliasCaseCorrection\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqual\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$locationId with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotGreaterThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationCaseCorrection\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationHistoryUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOne\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInOneTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$locationId with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationMultipleLanguages\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotInTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$locationId with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$pathData with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLikeTwo\(\) has parameter \$valueTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupLocationUrlAlias\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$valueOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$destination with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$forward with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$pathData with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanOrEqualTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$alwaysAvailable with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$destination with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFindNotLowerThanTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$forward with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindOne\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$pathData with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$valueOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupResourceUrlAliasCaseInsensitive\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testFullTextFindTwo\(\) has parameter \$valueTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$ascending with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupUppercaseIri\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupVirtualUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:testSort\(\) has parameter \$modifyField with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupVirtualUrlAlias\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#2 \$fieldName of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:doModifyField\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testLookupVirtualUrlAlias\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:checkOperatorSupport\(\) has parameter \$operator with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasCreatesUniqueAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:findMultivaluedProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testCreateMultivaluedTestContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$alwaysAvailable with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$id with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$locationId with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$pathData with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationComplex\(\) has parameter \$url with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$valuesOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationDowngradesOldEntryRemovesLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedBetweenTwoOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationDowngradesOldEntryToHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationRepublish\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusesCustomAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedContainsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusesHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusingNopElement\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedEqualsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusingNopElementChangesCustomPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationReusingNopElementChangesCustomPathAndCreatesHistory\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationSameAliasForMultipleLanguages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationSkipsReservedWord\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationSkipsReservedWord\(\) has parameter \$alias with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$valuesOne with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationSkipsReservedWord\(\) has parameter \$text with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOneFindsTwo\(\) has parameter \$valuesTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasForLocationUpdatesLocationPathIdentificationString\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasReuseAutogeneratedCleanup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasReuseHistoryCleanup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:testPublishUrlAliasReuseNopCleanupCustomAliasIsDestroyed\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedGreaterThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$languageMaskGenerator \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$locationGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:getExpectation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:providerForTestExtractUrlAliasFromData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedInOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:testExtractLanguageCodesFromData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:testExtractUrlAliasFromData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:testExtractUrlAliasFromData\(\) has parameter \$index with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneEmpty\(\) has parameter \$valuesTwo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:testExtractUrlAliasListFromData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:\$fixture has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:getGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOneFindsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testDeleteUrlWildcard\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testInsertUrlWildcard\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlWildcardData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedLowerThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlWildcardsData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlWildcardsDataWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:testLoadUrlWildcardsDataWithOffsetAndLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:\$fixtureData has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:\$gateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:getHandler\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotBetweenTwoOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testCreate\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotContainsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testLoadAllWithOffset\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testLoadAllWithOffsetAndLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testLoadThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotEqualsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:testRemove\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:\$fixtureData has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:\$urlWildcardHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlWildcard\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardMapperTest\:\:testCreateUrlWildcard\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardMapperTest\:\:testExtractUrlWildcardFromRow\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardMapperTest\:\:testExtractUrlWildcardsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOneFindsTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardMapperTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\FieldValue\\Converter\\ImageConverterTest\:\:fieldValueToXmlProvider\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\FieldValue\\Converter\\ImageConverterTest\:\:xmlToFieldValueProvider\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:getBaseCriterionQueryBuilders\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotGreaterThanOrEqual\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:testVisitCriteriaProducesQuery\(\) has parameter \$expectedParameterValues with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\LanguageCodeQueryBuilderQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\ContentTypeGroupIdQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotInOneTwo\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeGroupIdQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\ContentTypeQueryBuildersTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\AncestorQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\LocationIdQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneEmpty\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\ParentLocationQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\LogicalOperatorQueryBuilderQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Container\:\:get\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOneFindsOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:loadNotification\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$context with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testCountUserNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$valuesOne with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testCountUserPendingNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:testFindMultivaluedNotLowerThanOrEqualOne\(\) has parameter \$valuesTwo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchMultivaluedBaseIntegrationTest\:\:\$legacyUnsupportedOperators type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SearchMultivaluedBaseIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testGetNotificationById\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testInsert\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testLoadUserNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\Gateway\\DoctrineDatabaseTest\:\:testUpdateNotification\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testCountNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testCountPendingNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testCreateNotification\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testDelete\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testGetNotificationById\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testLoadUserNotifications\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\HandlerTest\:\:testUpdateNotification\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\MapperTest\:\:testCreateNotificationFromUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getValidFieldConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/MapperTest.php + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\MapperTest\:\:testExtractNotificationsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/MapperTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Notification\\MapperTest\:\:testExtractNotificationsFromRowsThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Notification/MapperTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Setting\\SettingHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Setting\\SettingHandlerTest\:\:\$gatewayMock \(Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Setting\\SettingHandlerTest\:\:\$settingHandler \(Ibexa\\Core\\Persistence\\Legacy\\Setting\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Generator expects value type Doctrine\\DBAL\\Connection\|PHPUnit\\Framework\\MockObject\\MockObject, array\ given\.$#' - identifier: generator.valueType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^PHPDoc tag @var with type Doctrine\\DBAL\\Platforms\\AbstractPlatform is not subtype of native type Doctrine\\DBAL\\Platforms\\MySQL80Platform\|Doctrine\\DBAL\\Platforms\\MySqlPlatform\|Doctrine\\DBAL\\Platforms\\PostgreSqlPlatform\|Doctrine\\DBAL\\Platforms\\SqlitePlatform\.$#' - identifier: varTag.nativeType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php - - message: '#^Parameter \#1 \$expected of static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) expects class\-string\, string given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/SharedGateway/GatewayFactoryTest.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertPropertiesCorrect\(\) has parameter \$properties with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) has parameter \$expectation with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertStructsEqual\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertStructsEqual\(\) has parameter \$propertyNames with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:getPublicPropertyNames\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:getResultTextRepresentation\(\) has parameter \$result with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:\$db \(string\) does not accept string\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:\$dsn \(string\) does not accept string\|false\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TestCase.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:getContentTypeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:getLanguageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:testBeginTransaction\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getAdditionallyIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:testCommit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getFullTextIndexedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:testCommitException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:testRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:testRollbackException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:\$connectionMock \(Doctrine\\DBAL\\Connection&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:\$contentTypeHandlerMock \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:\$languageHandlerMock \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:\$transactionHandler \(Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Parameter \#1 \$link of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Parameter \#1 \$url of method Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\:\:loadUrlDataByUrl\(\) expects int, string given\.$#' + message: '#^Parameter \#2 \$text of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabaseTest\:\:\$fixtureData type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User\:\:\$content\.$#' + identifier: property.notFound + count: 2 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabaseTest\:\:\$gateway \(Ibexa\\Core\\Persistence\\Legacy\\URL\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:createContent\(\) has parameter \$contentType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/URL/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:getUrl\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getSettingsSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:getUrl\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getValidatorSchema\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:getUrl\(\) has parameter \$urlAddr with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideFromHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testFind\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideInvalidCreationFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testFindUsages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideInvalidUpdateFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testLoadByIdWithUrlData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:provideToHashData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testLoadByIdWithoutUrlData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopiedFieldType\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testLoadByUrlWithUrlData\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopyField\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testLoadByUrlWithoutUrlData\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:testCopyField\(\) has parameter \$content with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\HandlerTest\:\:testUpdateUrl\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\FieldType'' and Ibexa\\Contracts\\Core\\Repository\\FieldType will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/FieldTypeServiceTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\URL\\URL\:\:\$url \(string\) does not accept Ibexa\\Contracts\\Core\\Persistence\\URL\\URL\.$#' - identifier: assign.propertyType + message: '#^Cannot access property \$pathString on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/URL/HandlerTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\MapperTest\:\:testCreateURLFromUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/MapperTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\MapperTest\:\:testExtractURLsFromRows\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/MapperTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:assertHandlerAcceptsCriterion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:assertHandlerRejectsCriterion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:find\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:getFilterFactories\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:testHandle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\BaseRepositoryFilteringTestCase\:\:getUserLimitationData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\:\:accept\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' identifier: argument.type - count: 2 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + count: 5 + path: tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php - - message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + message: '#^Call to an undefined method Traversable\\:\:offsetGet\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' - identifier: argument.templateType - count: 2 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php + message: '#^Cannot use array destructuring on iterable\\.$#' + identifier: offsetAccess.nonArray + count: 1 + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\LogicalAndTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\LogicalNotTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalNotTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\LogicalOrTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:createMultiplePagesOfContentItems\(\) should return int but returns int\|null\.$#' + identifier: return.type count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\MatchAllTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\MatchAllTest\:\:testHandle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getDataForTestFindContentWithLocationCriterion\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchAllTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\MatchNoneTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getFilterFactories\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\MatchNoneTest\:\:testHandle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:getListOfSupportedSortClauses\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/MatchNoneTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\PatternTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php + message: '#^Parameter \#1 \$sortClause of method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\ContentFilteringTest\:\:performAndAssertSimpleSortClauseQuery\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Filter\\FilteringSortClause, object given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\PatternTest\:\:testHandle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/PatternTest.php + path: tests/integration/Core/Repository/Filtering/ContentFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\ValidityTest\:\:testAccept\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$expectedContentRemoteIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php + path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\ValidityTest\:\:testHandle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:assertFoundContentItemsByRemoteIds\(\) has parameter \$list with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/ValidityTest.php + path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Filtering\\LocationFilteringTest\:\:find\(\) has parameter \$contextLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/Filtering/LocationFilteringTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\User\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Comparison operation "\<" between int\<80300, 80499\> and 50400 is always false\.$#' + identifier: smaller.alwaysFalse count: 1 - path: tests/lib/Persistence/Legacy/User/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabaseTest\:\:getDatabaseGateway\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabaseTest\:\:\$databaseGateway \(Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\\DoctrineDatabase\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\LanguageServiceMaximumSupportedLanguagesTest\:\:\$createdLanguages type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/Role/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverterTest\:\:getLimitationConverter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Result of && is always false\.$#' + identifier: booleanAnd.alwaysFalse count: 1 - path: tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php + path: tests/integration/Core/Repository/LanguageServiceMaximumSupportedLanguagesTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverterTest\:\:testObjectStateToLegacy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Language'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 3 + path: tests/integration/Core/Repository/LanguageServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\Role\\LimitationConverterTest\:\:testObjectStateToSPI\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LanguageCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LanguageCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php + path: tests/integration/Core/Repository/LanguageServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:createRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LanguageServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getDummyUser\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:assertCanUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getGatewayReturnValue\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:assertCanUser\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getValidUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\BaseLimitationIntegrationTest\:\:loginAsEditorUserWithLimitations\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/BaseLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getValidUserToken\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\ContentLimitationsMixIntegrationTest\:\:providerForCanUser\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getValidUserToken\(\) has parameter \$time with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\ContentLimitationsMixIntegrationTest\:\:testCanUser\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddPolicyLimitationValues\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/ContentLimitationsMixIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddPolicyLimitations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$contentInfo on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddPolicyPolicyId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:providerForCanUserEditOrPublishContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddPolicyToRoleLimitations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:testCanUserEditContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddRoleToUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Limitation\\PermissionResolver\\LocationLimitationIntegrationTest\:\:testCanUserReadTrashedContent\(\) has parameter \$limitations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/Limitation/PermissionResolver/LocationLimitationIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddRoleToUserWithComplexLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testAddRoleToUserWithLimitation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, string given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testCreateNewRoleRoleId\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testCreateNewRoleWithoutPolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 10 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testCreateRoleDraftWithoutPolicies\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testCreateUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationList will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeleteNonExistingUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertTrue\(\) with true will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeletePolicy\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: property.nonObject + count: 11 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeletePolicyLimitationValues\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Cannot call method getContentInfo\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: method.nonObject + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeletePolicyLimitations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertAliasesBeforeCopy\(\) has parameter \$expectedSubItemAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeleteRole\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertGeneratedAliases\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testDeleteRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertGeneratedAliases\(\) has parameter \$expectedAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testExpireUserToken\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testImplicitlyCreatePolicies\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has parameter \$expectedValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadComplexRoleAssignments\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertSubtreeProperties\(\) has parameter \$stopId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadMultipleUsersByEmail\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadLocationProperties\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadMultipleUsersByLogin\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadSubtreeProperties\(\) has parameter \$properties with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRole\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:loadSubtreeProperties\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleAssignmentsByGroupId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:providerForLoadLocationChildrenRespectsParentSortingClauses\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleAssignmentsByGroupIdInherited\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleDraftByRoleId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testCreateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has parameter \$priority with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleWithPolicies\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testGetSubtreeSize\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: return.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleWithPoliciesAndGroups\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationChildren\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoleWithPolicyLimitations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationChildrenRespectsParentSortingClauses\(\) has parameter \$expectedChildrenNames with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadRoles\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocations\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUnknownUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadLocationsContent\(\) has parameter \$locations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUser\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testLoadParentLocationsForDraftContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUserByEmail\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testSwapLocationForMainAndSecondaryLocation\(\) should return array\ but returns array\\.$#' + identifier: return.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUserByEmailNotFound\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUserByLogin\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testUpdateLocationThrowsInvalidArgumentExceptionPriorityIsOutOfRange\(\) has parameter \$priority with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUserByToken\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$expectedLocations of method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertContentHasExpectedLocations\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUserByTokenNotFound\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testLoadUsersByEmail\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:moveSubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' + identifier: argument.type + count: 3 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testRemoveUserRoleAssociation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 23 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testRoleDraftOnlyHavePolicyDraft\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testUpdatePolicies\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#2 \$actualObject of method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:assertPropertiesCorrect\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testUpdateRole\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' + identifier: argument.type + count: 3 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testUpdateUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$location2 of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:swapLocation\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testUpdateUserSettings\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#2 \$newParentLocation of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:moveSubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:testUpdateUserToken\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + message: '#^Parameter \#2 \$parentLocationId of method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:publishContentWithParentLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 8 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Parameter \#1 \$handler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:createTestRole\(\) expects Ibexa\\Core\\Persistence\\Legacy\\User\\Handler, Ibexa\\Contracts\\Core\\Persistence\\User\\Handler given\.$#' + message: '#^Parameter \#2 \$targetParentLocation of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:copySubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|false given\.$#' identifier: argument.type - count: 5 - path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + count: 1 + path: tests/integration/Core/Repository/LocationServiceTest.php - - message: '#^Cannot call method fetchAll\(\) on Doctrine\\DBAL\\ForwardCompatibility\\Result\|int\|string\.$#' - identifier: method.nonObject + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:assertFieldIds\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabaseTest\:\:loadUserPreference\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:mapFields\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabaseTest\:\:testCountUserPreferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + message: '#^Parameter \#1 \$fields of method Ibexa\\Tests\\Integration\\Core\\Repository\\NonRedundantFieldSetTest\:\:mapFields\(\) expects array\, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/NonRedundantFieldSetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabaseTest\:\:testInsert\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Notification\\\\Notification'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Notification\\Notification will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/NotificationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabaseTest\:\:testLoadUserPreferences\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Notification\\\\NotificationList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Notification\\NotificationList will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + path: tests/integration/Core/Repository/NotificationServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\Gateway\\DoctrineDatabaseTest\:\:testUpdateUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabaseTest.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$defaultLanguageCode\.$#' + identifier: property.notFound + count: 2 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\HandlerTest\:\:testCountUserPreferences\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$names\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\HandlerTest\:\:testLoadUserPreferences\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectState'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectState will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 9 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\HandlerTest\:\:testSetUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/HandlerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\UserPreference\\MapperTest\:\:testExtractUserPreferencesFromRows\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/Legacy/UserPreference/MapperTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroup'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 7 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Target\\\\Builder\\\\VersionBuilder'' and Ibexa\\Contracts\\Core\\Limitation\\Target\\Builder\\VersionBuilder will always evaluate to true\.$#' + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupCreateStruct will always evaluate to true\.$#' identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Limitation\\Target\\Builder\\VersionBuilderTest\:\:providerForTestBuild\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedParserTest\:\:testParse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\ObjectState\\ObjectStateUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedParserTest\:\:testParse\(\) has parameter \$file with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedParserTest.php + message: '#^Cannot access property \$id on bool\.$#' + identifier: property.nonObject + count: 2 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedTest\:\:getProcessor\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedTest\:\:testAllNormalizations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has parameter \$expectedIdentifiers with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedTest\:\:testApplyAllLowercaseNormalizations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:assertObjectsLoadedByIdentifiers\(\) has parameter \$loadedObjects with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedTest\:\:testSimpleNormalizationLowercase\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectState\(\) has parameter \$descriptions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorDefinitionBasedTest\:\:testSimpleNormalizationUppercase\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectState\(\) has parameter \$names with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:createObjectStateGroups\(\) should return array\ but returns list\\.$#' + identifier: return.type count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser constructor invoked with 1 parameter, 0 required\.$#' - identifier: arguments.count - count: 10 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) has parameter \$groups with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:applyTransformations\(\) has parameter \$transformations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:applyTransformations\(\) should return string but returns string\|null\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getPrioritizedLanguagesList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileMap\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateGroup\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileMapAscii\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectStateStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileMapKeep\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testLoadObjectState\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileMapRemove\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateCreateStruct\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileMapUnicode\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupCreateStruct\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileModuloTranspose\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateGroupUpdateStruct\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileReplace\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testNewObjectStateUpdateStruct\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileTranspose\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroupStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileTransposeAsciiLowercase\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateStructValues\(\) has parameter \$testData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:testCompileTransposePlus\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + message: '#^Parameter \#1 \$groups of method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:getGroupIdentifierMap\(\) expects array, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php - - message: '#^Parameter \#3 \$subject of function preg_replace_callback expects array\\|string, string\|null given\.$#' + message: '#^Parameter \#1 \$execution of class Jenner\\SimpleFork\\Process constructor expects string\|null, Closure given\.$#' identifier: argument.type count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php + path: tests/integration/Core/Repository/Parallel/BaseParallelTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPreprocessedBasedTest\:\:getProcessor\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$hasAccess\.$#' + identifier: property.protected + count: 3 + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPreprocessedBasedTest\:\:testAllNormalizations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$lookupPolicyLimitations\.$#' + identifier: property.protected + count: 8 + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPreprocessedBasedTest\:\:testSimpleNormalizationLowercase\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupLimitationResult\:\:\$roleLimitations\.$#' + identifier: property.protected + count: 3 + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPreprocessedBasedTest\:\:testSimpleNormalizationUppercase\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupPolicyLimitations\:\:\$policy\.$#' + identifier: property.protected + count: 3 + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Parameter \#2 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased constructor expects array, list\\|false given\.$#' - identifier: argument.type - count: 1 - path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject + count: 2 + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:getDataForTestCanUserWithLimitations\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\PermissionResolverTest\:\:testCanUserWithLimitations\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:testGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$array of function array_filter expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AncestorsQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$policy of class Ibexa\\Contracts\\Core\\Repository\\Values\\User\\LookupPolicyLimitations constructor expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php + path: tests/integration/Core/Repository/PermissionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AncestorsQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' + identifier: class.notFound count: 1 - path: tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP20018LanguageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\ChildrenQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21089Test\:\:\$contentType \(Ibexa\\Core\\Repository\\Values\\ContentType\\ContentType\) does not accept Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP21089Test.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\ChildrenQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:deleteTestContentType\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\GeoLocationQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo\:\:\$names\.$#' + identifier: property.notFound count: 1 - path: tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP21771EzStringTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\GeoLocationQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP21798Test.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22408DeleteRelatedObjectTest\:\:createReferenceObject\(\) has parameter \$relationListTarget with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SiblingsQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22612URLAliasTranslations\:\:getFolderCreateStruct\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SiblingsQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php + path: tests/integration/Core/Repository/Regression/EZP22612URLAliasTranslations.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerStub\:\:__construct\(\) has parameter \$tokens with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 4 + path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerTest\:\:dataProviderForTokenize\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Regression/EZP26367UrlAliasHistoryRedirectLoopTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerTest\:\:testTokenize\(\) has parameter \$expectedTokens with no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php + + - + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Regression/EZP28799SubtreeSearchTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService'' and Ibexa\\Contracts\\Core\\Repository\\ContentService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserTest\:\:dataProviderForParseSortDirection\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentTypeService'' and Ibexa\\Contracts\\Core\\Repository\\ContentTypeService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserTest\:\:testParseSortDirection\(\) has parameter \$input with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\FieldTypeService'' and Ibexa\\Contracts\\Core\\Repository\\FieldTypeService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SubtreeQueryTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\LanguageService'' and Ibexa\\Contracts\\Core\\Repository\\LanguageService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SubtreeQueryTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\LocationService'' and Ibexa\\Contracts\\Core\\Repository\\LocationService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy@anonymous/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest\.php\:24\:\:getThumbnail\(\) never returns null so it can be removed from the return type\.$#' - identifier: return.unusedType + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\NotificationService'' and Ibexa\\Contracts\\Core\\Repository\\NotificationService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\ContentThumbnail\\StaticStrategyTest\:\:testStaticStrategy\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ObjectStateService'' and Ibexa\\Contracts\\Core\\Repository\\ObjectStateService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentThumbnail/StaticStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:__construct\(\) has parameter \$validationReturn with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\PermissionResolver'' and Ibexa\\Contracts\\Core\\Repository\\PermissionResolver will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\RoleService'' and Ibexa\\Contracts\\Core\\Repository\\RoleService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\ContentValidator\\ContentValidatorStrategyTest\:\:buildContentValidator\(\) has parameter \$validationReturn with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\SearchService'' and Ibexa\\Contracts\\Core\\Repository\\SearchService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:\$validationReturn type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\SectionService'' and Ibexa\\Contracts\\Core\\Repository\\SectionService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\BookmarkServiceDecoratorTest\:\:testCreateBookmarkDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\TrashService'' and Ibexa\\Contracts\\Core\\Repository\\TrashService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\BookmarkServiceDecoratorTest\:\:testDeleteBookmarkDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\URLAliasService'' and Ibexa\\Contracts\\Core\\Repository\\URLAliasService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\BookmarkServiceDecoratorTest\:\:testIsBookmarkedDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\URLWildcardService'' and Ibexa\\Contracts\\Core\\Repository\\URLWildcardService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\BookmarkServiceDecoratorTest\:\:testLoadBookmarksDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\UserService'' and Ibexa\\Contracts\\Core\\Repository\\UserService will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php + path: tests/integration/Core/Repository/RepositoryTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\BookmarkServiceDecorator@anonymous/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\BookmarkService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testAddRelationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$policyDraft of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:removePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testCopyContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment\:\:\$id\.$#' + identifier: property.protected count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testCreateContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testCreateContentDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Policy'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testDeleteContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\PolicyCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testDeleteRelationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\PolicyUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testDeleteTranslationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Role'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testDeleteTranslationFromDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Role'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testDeleteVersionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testHideContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleDraft'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 4 + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentByContentInfoDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\RoleUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentByRemoteIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$limitation on Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment\|false\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentByVersionInfoDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot call method getIdentifier\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\RoleLimitation\|null\.$#' + identifier: method.nonObject count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:newRoleUpdateStruct\(\) invoked with 1 parameter, 0 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentInfoByRemoteIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:providerForCopyRoleTests\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentInfoDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftSetsPolicyProperties\(\) has parameter \$roleAndPolicy with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentInfoListDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testAddPolicyByRoleDraftUpdatesRole\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadContentListByContentInfoDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadReverseRelationsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValuesWithPolicy\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadVersionInfoByIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyByRoleDraft\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadVersionInfoDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyUpdatesLimitations\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testLoadVersionsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testUpdatePolicyUpdatesLimitations\(\) has parameter \$roleAndPolicy with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testNewContentCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testNewContentMetadataUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type + count: 3 + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testNewContentUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testPublishVersionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft\|null given\.$#' + identifier: argument.type + count: 3 + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testRevealContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$policyDraft of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:removePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testUpdateContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Variable \$role might not be defined\.$#' + identifier: variable.undefined count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/RoleServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentServiceDecoratorTest\:\:testUpdateContentMetadataDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$mainLocationId\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Parameter \#2 \$locationCreateStructs of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:createContent\(\) expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$publishedDate\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testAddFieldDefinitionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Content\:\:\$remoteId\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testAssignContentTypeGroupDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:assertContentIdSearch\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testCopyContentTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContent\(\) has parameter \$parentLocationIdList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testCreateContentTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithNameAndDescription\(\) has parameter \$contentDescription with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testCreateContentTypeDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithNameAndDescription\(\) has parameter \$parentLocationIdList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testCreateContentTypeGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:getEmailAddressesCases\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testDeleteContentTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:getSpecialFullTextCases\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testDeleteContentTypeGroupDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:testFindContentInfoFullTextIsSearchable\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testIsContentTypeUsedDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @param references unknown parameter\: \$ignoreForSetupFactories$#' + identifier: parameter.notFound count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeByIdentifierDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 4 + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeByRemoteIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LocationId constructor expects array\\|int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ParentLocationId constructor expects array\\|int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$fieldDefinition of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:updateFieldDefinition\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeGroupByIdentifierDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + message: '#^Parameter \#2 \$parentLocationIdList of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchEngineIndexingTest\:\:createContentWithName\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/SearchEngineIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + message: '#^Cannot call method first\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\AggregationResultCollection\|null\.$#' + identifier: method.nonObject + count: 2 + path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeGroupsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\AbstractAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypeListDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\AbstractAggregationTest\:\:dataProviderForTestFindLocationWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/AbstractAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testLoadContentTypesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ContentTypeGroupTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeGroupTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewContentTypeCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ContentTypeTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/ContentTypeTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewContentTypeGroupCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:build\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewContentTypeGroupUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:setExpectedEntries\(\) has parameter \$entries with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewContentTypeUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DataSetBuilder\\TermAggregationDataSetBuilder\:\:\$entries type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/DataSetBuilder/TermAggregationDataSetBuilder.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewFieldDefinitionCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\DateMetadataRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/DateMetadataRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testNewFieldDefinitionUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\AuthorTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/AuthorTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testPublishContentTypeDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\CheckboxTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/CheckboxTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testRemoveContentTypeTranslationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\CountryTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/CountryTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testRemoveFieldDefinitionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\DateRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/DateRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testUnassignContentTypeGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\DateTimeRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/DateTimeRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testUpdateContentTypeDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\FloatRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testUpdateContentTypeGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\FloatStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/FloatStatsAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ContentTypeServiceDecoratorTest\:\:testUpdateFieldDefinitionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\IntegerRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerRangeAggregationTest.php - - message: '#^Parameter \#1 \$contentTypeIds of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:loadContentTypeList\(\) expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\IntegerStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/IntegerStatsAggregationTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\ContentTypeServiceDecorator@anonymous/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest\.php\:31 constructor expects Ibexa\\Contracts\\Core\\Repository\\ContentTypeService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\KeywordTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/KeywordTermAggregationTest.php - - message: '#^Parameter \#2 \$contentTypeGroups of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:createContentType\(\) expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\SelectionTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/SelectionTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\FieldTypeServiceDecoratorTest\:\:testGetFieldTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\Field\\TimeRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/Field/TimeRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\FieldTypeServiceDecoratorTest\:\:testGetFieldTypesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\FieldTypeServiceDecoratorTest\:\:testHasFieldTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:setValues\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\FieldTypeServiceDecorator@anonymous/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest\.php\:20 constructor expects Ibexa\\Contracts\\Core\\Repository\\FieldTypeService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$contentTypeIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testCreateLanguageDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$fieldDefinitionIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testDeleteLanguageDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$fieldDefinitionIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testDisableLanguageDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#3 \$fieldTypeIdentifier of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createContentTypeForFieldAggregation\(\) expects string, string\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testEnableLanguageDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#3 \$values of method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:createFieldAggregationFixtures\(\) expects iterable, iterable\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testGetDefaultLanguageCodeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\FixtureGenerator\\FieldAggregationFixtureGenerator\:\:\$values type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/FixtureGenerator/FieldAggregationFixtureGenerator.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testLoadLanguageByIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\LanguageTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/LanguageTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testLoadLanguageDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\LocationChildrenTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/LocationChildrenTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testLoadLanguageListByCodeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\ObjectStateTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/ObjectStateTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testLoadLanguageListByIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawRangeAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/RawRangeAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testLoadLanguagesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawStatsAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/RawStatsAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testNewLanguageCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\RawTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/RawTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LanguageServiceDecoratorTest\:\:testUpdateLanguageNameDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\SectionTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/SectionTermAggregationTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\LanguageServiceDecorator@anonymous/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest\.php\:22 constructor expects Ibexa\\Contracts\\Core\\Repository\\LanguageService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\SubtreeTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/SubtreeTermAggregationTest.php - - message: '#^Parameter \#1 \$languageIds of method Ibexa\\Contracts\\Core\\Repository\\LanguageService\:\:loadLanguageListById\(\) expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createGroupTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testCopySubtreeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createModifierTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testCreateLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:createOwnerTermAggregationDataSet\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testDeleteLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testGetAllLocationsCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\UserMetadataTermAggregationTest\:\:dataProviderForTestFindLocationWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/UserMetadataTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testGetLocationChildCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\Aggregation\\VisibilityTermAggregationTest\:\:dataProviderForTestFindContentWithAggregation\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/Aggregation/VisibilityTermAggregationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testHideLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\DeleteTranslationTest\:\:createTestContentWithLanguages\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/DeleteTranslationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadAllLocationsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$array of function array_column expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/MultilingualContentSearchIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadLocationByRemoteIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access offset 0 on array\\|bool\|float\|int\|string\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadLocationChildrenDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\RemoteIdIndexingTest\:\:getRemoteIDs\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\RemoteIdIndexingTest\:\:providerForTestIndexingRemoteId\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadLocationListDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Part \$criterion\-\>value \(array\\|bool\|float\|int\|string\) of encapsed string cannot be cast to string\.$#' + identifier: encapsedStringPart.nonString count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/RemoteIdIndexingTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadLocationsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$remoteId\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testLoadParentLocationsForDraftContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\AbstractSortClauseTest\:\:assertSearchResultOrderByRemoteId\(\) has parameter \$expectedOrderedIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/AbstractSortClauseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testMoveSubtreeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:createContentForContentTranslatedNameTesting\(\) has parameter \$values with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testNewLocationCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:dataProviderForTestSortingByContentTranslatedName\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testNewLocationUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$expectedOrderedRemoteIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testSwapLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testUnhideLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testContentSortingByContentTranslatedName\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testUpdateLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$expectedOrderedRemoteIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\LocationServiceDecorator@anonymous/tests/lib/Repository/Decorator/LocationServiceDecoratorTest\.php\:29 constructor expects Ibexa\\Contracts\\Core\\Repository\\LocationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testCreateNotificationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ContentTranslatedNameTest\:\:testLocationSortingByContentTranslatedName\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testDeleteNotificationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + message: '#^PHPDoc tag @param references unknown parameter\: \$values$#' + identifier: parameter.notFound + count: 2 + path: tests/integration/Core/Repository/SearchService/SortClause/ContentTranslatedNameTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testGetNotificationCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:dataProviderForTestSortingByScore\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testGetNotificationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:testSortingByScore\(\) has parameter \$expectedOrderedIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testGetPendingNotificationCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchService\\SortClause\\ScoreTest\:\:testSortingByScore\(\) has parameter \$inputValues with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testLoadNotificationsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @param references unknown parameter\: \$values$#' + identifier: parameter.notFound count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchService/SortClause/ScoreTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\NotificationServiceDecoratorTest\:\:testMarkNotificationAsReadDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:assertFulltextSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\NotificationServiceDecorator@anonymous/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest\.php\:22 constructor expects Ibexa\\Contracts\\Core\\Repository\\NotificationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:assertFulltextSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testCreateObjectStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextContentSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testCreateObjectStateGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextContentSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testDeleteObjectStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testDeleteObjectStateGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testGetContentCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:doTestFulltextLocationSearch\(\) has parameter \$searchString with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testGetContentStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testLoadObjectStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testLoadObjectStateGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapKeysToIds\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testLoadObjectStateGroupsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:mapSearchResultToIds\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testLoadObjectStatesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:providerForTestFulltextSearchSolr7\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testNewObjectStateCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextContentSearchSolr7\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testNewObjectStateGroupCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextContentSearchSolr7\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testNewObjectStateGroupUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextLocationSearchSolr7\(\) has parameter \$expectedKeys with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testNewObjectStateUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceFulltextTest\:\:testFulltextLocationSearchSolr7\(\) has parameter \$idMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testSetContentStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @var for variable \$keyGroup has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceFulltextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testSetPriorityOfObjectStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testUpdateObjectStateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\:\:setCustomField\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\ObjectStateServiceDecoratorTest\:\:testUpdateObjectStateGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access offset ''id'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\ObjectStateServiceDecorator@anonymous/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest\.php\:27 constructor expects Ibexa\\Contracts\\Core\\Repository\\ObjectStateService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Cannot access offset ''title'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testAddPolicyByRoleDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testAssignRoleToUserDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:assertQueryFixture\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testAssignRoleToUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:assertQueryFixture\(\) has parameter \$ignoreScore with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testCreateRoleDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:mapResultLocationIds\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testCreateRoleDraftDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceLocationTest\:\:simplifySearchResult\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testDeleteRoleDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#' + identifier: argument.type + count: 4 + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testDeleteRoleDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testGetLimitationTypeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/SearchServiceLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testGetLimitationTypesByModuleFunctionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound + count: 3 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testGetRoleAssignmentsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\:\:setCustomField\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testGetRoleAssignmentsForUserDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Search\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testGetRoleAssignmentsForUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Cannot access offset ''id'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 3 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRoleAssignmentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access offset ''title'' on Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRoleByIdentifierDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ContentTypeIdentifier constructor invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count + count: 2 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRoleDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' + identifier: class.notFound + count: 5 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRoleDraftByRoleIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Instanceof between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRoleDraftDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testLoadRolesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testNewPolicyCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testNewPolicyUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldFilter\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testNewRoleCreateStructDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testNewRoleUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testPublishRoleDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testRemovePolicyByRoleDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:assertMultilingualFieldSort\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testRemoveRoleAssignmentDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:createContentForTestUserMetadataGroupHorizontal\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testUpdatePolicyByRoleDraftDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:createContentWithFieldType\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\RoleServiceDecoratorTest\:\:testUpdateRoleDraftDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:find\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\RoleServiceDecorator@anonymous/tests/lib/Repository/Decorator/RoleServiceDecoratorTest\.php\:34 constructor expects Ibexa\\Contracts\\Core\\Repository\\RoleService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSortedContentSearches\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:getSearchEngineCapabilities\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:mapResultContentIds\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:testFindContentDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestSortingByNumericFieldsWithValuesOfDifferentLength\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:testFindContentInfoDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:simplifySearchResult\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:testFindLocationsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:sortSearchHitsById\(\) has parameter \$searchHits with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:testFindSingleDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextComplex\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:testSuggestDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentSearchComplex\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SearchServiceDecorator@anonymous/tests/lib/Repository/Decorator/SearchServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\SearchService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextContentTranslationSearch\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testAssignSectionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextLocationSearchComplex\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testAssignSectionToSubtreeDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFulltextLocationTranslationSearch\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testCountAssignedContentsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testCreateSectionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testDeleteSectionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testIsSectionUsedDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testLoadSectionByIdentifierDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testLoadSectionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldFilterLocation\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testLoadSectionsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testNewSectionCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testNewSectionUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SectionServiceDecoratorTest\:\:testUpdateSectionDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SectionServiceDecorator@anonymous/tests/lib/Repository/Decorator/SectionServiceDecoratorTest\.php\:27 constructor expects Ibexa\\Contracts\\Core\\Repository\\SectionService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testCreateSettingDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testMultilingualFieldSortLocation\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testDeleteSettingDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has parameter \$closure with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testLoadSettingDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testUserMetadataGroupHorizontalFilterLocation\(\) has parameter \$queryType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testNewSettingCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @var has invalid value \(\$data \\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\)\: Unexpected token "\$data", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testNewSettingUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + message: '#^Parameter \#1 \$class of class ReflectionProperty constructor expects object\|string, class\-string\|false given\.$#' + identifier: argument.type + count: 4 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SettingServiceDecoratorTest\:\:testUpdateSettingDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$parentLocationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:newLocationCreateStruct\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SettingServiceDecorator@anonymous/tests/lib/Repository/Decorator/SettingServiceDecoratorTest\.php\:26 constructor expects Ibexa\\Contracts\\Core\\Repository\\SettingService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$query of method Ibexa\\Contracts\\Core\\Repository\\SearchService\:\:findLocations\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\LocationQuery, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TranslationServiceDecoratorTest\:\:testTranslateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 3 + path: tests/integration/Core/Repository/SearchServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TranslationServiceDecoratorTest\:\:testTranslateStringDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php + message: '#^Class Ibexa\\Tests\\Solr\\SetupFactory\\LegacySetupFactory not found\.$#' + identifier: class.notFound + count: 3 + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\TranslationServiceDecorator@anonymous/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\TranslationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createContent\(\) has parameter \$parentLocationIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testDeleteTrashItemDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createContent\(\) has parameter \$searchValuesMap with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testEmptyTrashDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createTestContent\(\) has parameter \$parentLocationIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testFindTrashItemsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createTestContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testLoadTrashItemDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:getIndexesToMatchData\(\) has parameter \$inputContentData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testRecoverDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:getIndexesToMatchData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\TrashServiceDecoratorTest\:\:testTrashDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testCreateTestContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\TrashServiceDecorator@anonymous/tests/lib/Repository/Decorator/TrashServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\TrashService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testCreateGlobalUrlAliasDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testCreateUrlAliasDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindContent\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testDeleteCorruptedUrlAliasesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testListGlobalAliasesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testListLocationAliasesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsMultiple\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testLoadDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$contentDataList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testLookupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testRefreshSystemUrlAliasesForLocationDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:testFindLocationsSingle\(\) has parameter \$languageSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testRemoveAliasesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to function is_object\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SectionServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLAliasServiceDecoratorTest\:\:testReverseLookupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Section'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 4 + path: tests/integration/Core/Repository/SectionServiceTest.php - - message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\SectionCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\SectionCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SectionServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLAliasServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest\.php\:24 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLAliasService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\SectionUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\SectionUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php + path: tests/integration/Core/Repository/SectionServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testCreateUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SettingServiceTest\:\:dataProviderForCreateSetting\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + path: tests/integration/Core/Repository/SettingServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testFindUrlsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Generator expects value type array\{string, int, string\|null, int\|null\}, array\{''foo'', 100, null\} given\.$#' + identifier: generator.valueType count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + path: tests/integration/Core/Repository/TokenServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testFindUsagesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\:\:\$trashed\.$#' + identifier: property.protected + count: 4 + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testLoadByIdDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testLoadByUrlDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\TrashItem'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLServiceDecoratorTest\:\:testUpdateUrlDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\SearchResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 3 + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLWildcardServiceDecoratorTest\:\:testCreateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$remoteId on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' + identifier: property.nonObject + count: 4 + path: tests/integration/Core/Repository/TrashServiceTest.php + + - + message: '#^Cannot call method getRemovedLocationContentIdMap\(\) on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null\.$#' + identifier: method.nonObject count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLWildcardServiceDecoratorTest\:\:testLoadAllDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItems\(\) has parameter \$filters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLWildcardServiceDecoratorTest\:\:testLoadDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:testFindTrashItemsSort\(\) has parameter \$sortClausesClasses with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLWildcardServiceDecoratorTest\:\:testRemoveDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:trashFiltersProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\URLWildcardServiceDecoratorTest\:\:testTranslateDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\TrashServiceTest\:\:trashSortClausesProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLWildcardServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLWildcardService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' identifier: argument.type - count: 1 - path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php + count: 6 + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserPreferenceServiceDecoratorTest\:\:testGetUserPreferenceCountDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + message: '#^Parameter \#1 \$trashItem of method Ibexa\\Contracts\\Core\\Repository\\TrashService\:\:recover\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\TrashItem\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserPreferenceServiceDecoratorTest\:\:testGetUserPreferenceDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\:\:\$sortClauses \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 2 + path: tests/integration/Core/Repository/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserPreferenceServiceDecoratorTest\:\:testLoadUserPreferencesDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasService/CustomUrlAliasForMultilingualContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserPreferenceServiceDecoratorTest\:\:testSetUserPreferenceDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\UserPreferenceServiceDecorator@anonymous/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest\.php\:20 constructor expects Ibexa\\Contracts\\Core\\Repository\\UserPreferenceService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:listLocationAliases\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasService/UrlAliasLookupTest.php - - message: '#^Parameter \#1 \$userPreferenceSetStructs of method Ibexa\\Contracts\\Core\\Repository\\UserPreferenceService\:\:setUserPreference\(\) expects array\, array\ given\.$#' + message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, iterable\ given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testAssignUserToUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceAuthorizationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testCheckUserCredentialsDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to function is_object\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testCreateUserDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLAlias'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 5 + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testCreateUserGroupDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertLookupHistory\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testDeleteUserDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesCorrect\(\) has parameter \$expectedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testDeleteUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlAliasPropertiesSame\(\) has parameter \$expectedValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testExpireUserTokenDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlIsCurrent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testIsUserDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:assertUrlIsHistory\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testIsUserGroupDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:changeContentTypeUrlAliasSchema\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadSubUserGroupsDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:changeSlugConverterConfiguration\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUserByLoginDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAlias\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUserByTokenDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithAlwaysAvailable\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUserDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateGlobalUrlAliasWithForward\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testCreateUrlAliasPropertyValuesWithAlwaysAvailable\(\) has parameter \$testData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUserGroupsOfUserDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testListLocationAliasesLoadsCorrectly\(\) has parameter \$testData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUsersByEmailDecorator\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:testLookUp\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testLoadUsersOfUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLAliasServiceTest\:\:updateContentField\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testMoveUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLAlias\)\: Unexpected token "\\n \*", expected variable at offset 74 on line 2$#' + identifier: phpDoc.parseError + count: 3 + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testNewUserCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, iterable\ given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testNewUserGroupCreateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 11 + path: tests/integration/Core/Repository/URLAliasServiceTest.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$modified\.$#' + identifier: property.protected + count: 4 + path: tests/integration/Core/Repository/URLServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\URL'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 4 + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testNewUserGroupUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\URLUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testNewUserUpdateStructDecorator\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\URL\\\\UsageSearchResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\UsageSearchResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testUnAssignUserFromUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUrlsWithSorting\(\) has parameter \$expectedUrls with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testUpdateUserDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$expectedContentInfos with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testUpdateUserGroupDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$expectedTotalCount with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testUpdateUserTokenDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:testFindUsages\(\) has parameter \$urlId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\UserServiceDecoratorTest\:\:testValidatePasswordDecorator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$limit \(int\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\UserServiceDecorator@anonymous/tests/lib/Repository/Decorator/UserServiceDecoratorTest\.php\:37 constructor expects Ibexa\\Contracts\\Core\\Repository\\UserService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$offset \(int\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php + path: tests/integration/Core/Repository/URLServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Filtering\\TestContentProvider\:\:createContentDraft\(\) has parameter \$multilingualFields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLWildcardService\\CriterionTest\:\:getUrlWildcards\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Filtering/TestContentProvider.php + path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - message: '#^Parameter \#2 \$mainLanguageCode of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:newContentCreateStruct\(\) expects string, int\|string given\.$#' + message: '#^Parameter \#1 \$criteria of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard\\Query\\Criterion\\LogicalAnd constructor expects array\, array\ given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Filtering/TestContentProvider.php + path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - message: '#^Parameter \#2 \$parentLocationId of method Ibexa\\Tests\\Core\\Repository\\Filtering\\TestContentProvider\:\:createArticle\(\) expects int, int\|null given\.$#' + message: '#^Parameter \#1 \$expectedCount of static method PHPUnit\\Framework\\Assert\:\:assertCount\(\) expects int, int\|null given\.$#' identifier: argument.type - count: 3 - path: tests/lib/Repository/Filtering/TestContentProvider.php - - - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\FieldType\\\\FieldType'' and Ibexa\\Contracts\\Core\\FieldType\\FieldType will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + path: tests/integration/Core/Repository/URLWildcardService/CriterionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:getFieldTypeMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLWildcard'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcard will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\URLWildcardTranslationResult'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + path: tests/integration/Core/Repository/URLWildcardServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:testGetFieldType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\UserPreference\\\\UserPreference'' and Ibexa\\Contracts\\Core\\Repository\\Values\\UserPreference\\UserPreference will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:testGetFieldTypeThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\UserPreference\\\\UserPreferenceList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\UserPreference\\UserPreferenceList will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + path: tests/integration/Core/Repository/UserPreferenceServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:testGetFieldTypeThrowsRuntimeExceptionIncorrectType\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\User'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 7 + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Helper\\FieldTypeRegistryTest\:\:testGetFieldTypes\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Parameter \#1 \$fieldTypes of class Ibexa\\Core\\FieldType\\FieldTypeRegistry constructor expects array\, array\ given\.$#' - identifier: argument.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserGroupCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Iterator\\BatchIteratorTestAdapter\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserGroupUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Iterator\\BatchIteratorTestAdapter\:\:\$data type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\UserUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:method\(\)\.$#' - identifier: method.notFound - count: 7 - path: tests/lib/Repository/LocationResolver/PermissionAwareLocationResolverTest.php - - - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:method\(\)\.$#' - identifier: method.notFound - count: 5 - path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php - - - - message: '#^Call to an undefined method Ibexa\\Core\\Repository\\Mapper\\ContentLocationMapper\\ContentLocationMapper\:\:expects\(\)\.$#' - identifier: method.notFound - count: 5 - path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Cannot access property \$locations on iterable\\.$#' - identifier: property.nonObject - count: 2 - path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php + message: '#^Cannot call method add\(\) on DateTimeImmutable\|false\|null\.$#' + identifier: method.nonObject + count: 3 + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\AllValidationErrorsOccur\:\:extractTranslatable\(\) has parameter \$fieldErrors with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:createUserContentTypeWithAccountSettings\(\) has parameter \$fieldSetting with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php - - - - message: '#^PHPDoc tag @param has invalid value \(array\\>\> \$fieldErrors\)\: Unexpected token "\<", expected type at offset 29 on line 2$#' - identifier: phpDoc.parseError - count: 1 - path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:compareArrays\(\) has parameter \$actual with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:createUserContentTypeWithAccountSettings\(\) has parameter \$validatorConfiguration with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:compareArrays\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:dataProviderForValidatePassword\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:evaluate\(\) has parameter \$content with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:getDataForTestPasswordUpdateRespectsAllValidationSettings\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Class Ibexa\\Tests\\Core\\Repository\\Parallel\\ParallelProcessList implements generic interface IteratorAggregate but does not specify its types\: TKey, TValue$#' - identifier: missingType.generics + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:getPrioritizedLanguageList\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Parallel/ParallelProcessList.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionCriterionResolverMock\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testNewUserCreateStruct\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionCriterionResolverMock\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\UserServiceTest\:\:testValidatePassword\(\) has parameter \$expectedErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionResolverMock\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#2 \$array of function array_map expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/UserServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:providerForTestPermissionResolverPassTrough\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$string of function md5 expects string, int\<1, max\> given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/BaseLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testGetPermissionsCriterionCaching\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getContentCreatePolicyDraft\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft but returns Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testGetPermissionsCriterionPassTrough\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getDataForDeniedAccess\(\) should return array\\}\> but returns array\{array\{123, array\{\-1\}\}, array\{123, array\{456, 789\}\}\}\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testPermissionResolverPassTrough\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ChangeOwnerLimitationTest\:\:getDataForGrantedAccess\(\) should return array\\}\> but returns array\{array\{null, array\{\}\}, array\{null, array\{\-1\}\}, array\{null, array\{123, 456, \-1\}\}, array\{123, array\{123, 456, \-1\}\}, array\{123, array\{\}\}\}\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ChangeOwnerLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testPermissionResolverPassTrough\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testPermissionResolverPassTrough\(\) has parameter \$expectedReturn with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft is not subtype of native type null\.$#' + identifier: varTag.nativeType count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testPermissionResolverPassTrough\(\) has parameter \$method with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ContentTypeLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:\$permissionCriterionResolverMock has no type specified\.$#' - identifier: missingType.property - count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + message: '#^Cannot access property \$value on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Field\|null\.$#' + identifier: property.nonObject + count: 2 + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:\$permissionResolverMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:createEditorUserWithLanguageLimitation\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getLimitationServiceMock\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForCanUserWithLimitationTargets\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getLimitationServiceMock\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForCreateAndPublishContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForPrepareDataForTestsWithLanguageLimitationAndDifferentContentTranslations\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getPermissionResolverMock\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:providerForPublishVersionWithLanguageLimitation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCanUserWithLimitationTargets\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has parameter \$criterionMock with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCanUserWithLimitationTargets\(\) has parameter \$folderNames with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has parameter \$limitationCount with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCopyContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has parameter \$permissionSets with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCopySubtreeWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:providerForTestGetPermissionsCriterion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCreateAndPublishContent\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:providerForTestGetPermissionsCriterionBooleanPermissionSets\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testCreateAndPublishContent\(\) has parameter \$names with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testHideContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has parameter \$criterionMock with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testHideLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has parameter \$expectedCriterion with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testMoveSubtreeWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has parameter \$limitationCount with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPrepareDataForTestsWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has parameter \$permissionSets with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$allowedTranslationsList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterionBooleanPermissionSets\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$names with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterionBooleanPermissionSets\(\) has parameter \$permissionSets with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersion\(\) has parameter \$namesToUpdate with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:\$limitationServiceMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testPublishVersionIsNotAllowedIfModifiedOtherTranslations\(\) has parameter \$names with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:\$permissionResolverMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testRevealContentWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:getEventDispatcher\(\) should return PHPUnit\\Framework\\MockObject\\MockObject&Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface but returns Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testSwapLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:getRelationProcessorMock\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testUnhideLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:getRepository\(\) has parameter \$serviceSettings with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\LanguageLimitationTest\:\:testUpdateLocationWithLanguageLimitationAndDifferentContentTranslations\(\) has parameter \$limitationValues with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Parameter \#1 \$className of method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\) expects class\-string\, string given\.$#' - identifier: argument.type + message: '#^PHPDoc tag @return with type iterable\\|bool\>\> is not subtype of native type array\.$#' + identifier: return.phpDocType count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Parameter \#2 \$searchHandler of class Ibexa\\Core\\Repository\\Repository constructor expects Ibexa\\Contracts\\Core\\Search\\Handler, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + message: '#^Parameter \#1 \$locationId of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:loadLocation\(\) expects int, int\|null given\.$#' identifier: argument.type - count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + count: 7 + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$contentDomainMapperMock \(Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Parameter \#4 \$targets of method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver\:\:canUser\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LanguageLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$contentTypeDomainMapperMock \(Ibexa\\Core\\Repository\\Mapper\\ContentTypeDomainMapper&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/LocationLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$fieldTypeRegistryMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ObjectStateLimitationTest\:\:createUserWithObjectStateLimitation\(\) has parameter \$objectStateIDs with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$fieldTypeServiceMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\ObjectStateLimitationTest\:\:createUserWithObjectStateLimitationOnContentRead\(\) has parameter \$values with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/ObjectStateLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$permissionServiceMock \(Ibexa\\Contracts\\Core\\Repository\\PermissionService&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$persistenceMock \(Ibexa\\Contracts\\Core\\Persistence\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$removePolicy\.$#' + identifier: varTag.differentVariable + count: 2 + path: tests/integration/Core/Repository/Values/User/Limitation/OwnerLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$repositoryMock \(Ibexa\\Contracts\\Core\\Repository\\Repository&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/ParentContentTypeLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\Base\:\:\$thumbnailStrategyMock \(Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\ThumbnailStrategy&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/ParentDepthLimitationTest.php - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\)$#' - identifier: argument.templateType + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/Base.php + path: tests/integration/Core/Repository/Values/User/Limitation/ParentOwnerLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:createBookmarkService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/ParentUserGroupLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testCreateBookmark\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:addPolicyToNewRole\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testCreateBookmarkThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:getSubtreeLocationsCount\(\) has parameter \$subtreePathString with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testCreateBookmarkWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testDeleteBookmarkExisting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testDeleteBookmarkNonExisting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$readPolicy\.$#' + identifier: varTag.differentVariable + count: 2 + path: tests/integration/Core/Repository/Values/User/Limitation/SectionLimitationTest.php + + - + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/StatusLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testDeleteBookmarkWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testLoadBookmarks\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitationTest\:\:prepareLimitation\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testLoadBookmarksEmptyList\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testLocationShouldBeBookmarked\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$editPolicy\.$#' + identifier: varTag.differentVariable count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/SubtreeLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:testLocationShouldNotBeBookmarked\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access property \$text on Ibexa\\Contracts\\Core\\FieldType\\Value\|null\.$#' + identifier: property.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:\$bookmarkHandler \(Ibexa\\Contracts\\Core\\Persistence\\Bookmark\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Parameter \#2 \$policy of method Ibexa\\Contracts\\Core\\Repository\\RoleService\:\:updatePolicyByRoleDraft\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PolicyDraft, Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/BookmarkTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' - identifier: staticMethod.alreadyNarrowedType + message: '#^Variable \$policy in PHPDoc tag @var does not match assigned variable \$editPolicy\.$#' + identifier: varTag.differentVariable count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/integration/Core/Repository/Values/User/Limitation/UserGroupLimitationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getContentHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:getDataForTestCountUsersWithUnsupportedHashType\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getLanguageHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:providerForGetFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getTypeHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: return.type + message: '#^Method Ibexa\\Tests\\Integration\\Core\\User\\UserStorage\\UserStorageGatewayTest\:\:testGetFieldData\(\) has parameter \$expectedUserData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:providerForBuildLocationDomainObjectsOnSearchResult\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\FieldTypeRegistryPassTest\:\:tagsProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/FieldTypeRegistryPassTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:providerForBuildVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\GenericFieldTypeConverterPassTest\:\:assertContainerBuilderHasNoServiceDefinitionWithMethodCall\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\GenericFieldTypeConverterPassTest\:\:assertContainerBuilderHasNoServiceDefinitionWithMethodCall\(\) has parameter \$index with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/GenericFieldTypeConverterPassTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$contentIds with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:externalStorageHandlerGatewayTagsProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$contentInfoList with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Storage\\ExternalStorageRegistryPassTest\:\:externalStorageHandlerTagsProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Storage/ExternalStorageRegistryPassTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Class Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler extends generic class Ibexa\\Contracts\\Core\\FieldType\\GatewayBasedStorage but does not specify its types\: T$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$locationHits with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:deleteFieldData\(\) has parameter \$fieldIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationWithContentForRootLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:deleteFieldData\(\) should return bool but return statement is missing\.$#' + identifier: return.missing count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationWithContentIsAlignedWithBuildLocation\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:getFieldData\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationWithContentThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\Stubs\\GatewayBasedStorageHandler\:\:hasFieldData\(\) should return bool but return statement is missing\.$#' + identifier: return.missing count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/Stubs/GatewayBasedStorageHandler.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\TaggedServiceIdsIterator\\DeprecationErrorCollector\:\:getErrors\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php - - message: '#^Parameter \#2 \$locationHandler of class Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper constructor expects Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' - identifier: argument.type + message: '#^Property Ibexa\\Tests\\Core\\Base\\Container\\Compiler\\TaggedServiceIdsIterator\\DeprecationErrorCollector\:\:\$errors type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + path: tests/lib/Base/Container/Compiler/TaggedServiceIdsIterator/DeprecationErrorCollector.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$value\.$#' - identifier: property.notFound - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\CollectionInterface\:\:filter\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''IteratorAggregate'' and Ibexa\\Contracts\\Core\\Collection\\CollectionInterface will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$fieldDefinitions with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollectionWithExampleData\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestCreateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createCollectionWithExampleData\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createEmptyCollection\(\) has invalid return type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$existingFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:createEmptyCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\CollectionInterface does not specify its types\: TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$fieldDefinitions with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\:\:getExampleData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^PHPDoc tag @return with type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces is not subtype of native type Ibexa\\Contracts\\Core\\Collection\\CollectionInterface\.$#' + identifier: return.phpDocType + count: 3 + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @template TCollection for class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest has invalid bound type Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces\.$#' + identifier: class.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/AbstractCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$allFieldErrors with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayListTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$existingFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayListTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\ArrayList does not specify its types\: TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$fieldDefinitions with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @var for variable \$list contains generic class Ibexa\\Contracts\\Core\\Collection\\ArrayList but does not specify its types\: TValue$#' + identifier: missingType.generics + count: 2 + path: tests/lib/Collection/ArrayListTest.php + + - + message: '#^Type Ibexa\\Contracts\\Core\\Collection\\ArrayList in generic type Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\ in PHPDoc tag @extends is not subtype of template type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces of class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\.$#' + identifier: generics.notSubtype count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:exists\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Collection/ArrayMapTest.php + + - + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:filter\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:forAll\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Collection/ArrayMapTest.php + + - + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Collection\\MapInterface\:\:map\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:createCollection\(\) return type with generic interface Ibexa\\Contracts\\Core\\Collection\\MapInterface does not specify its types\: TKey, TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$fieldDefinitions with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Collection\\ArrayMapTest\:\:getExampleData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Collection\\MapInterface\|Ibexa\\Contracts\\Core\\Collection\\StreamableInterface is not subtype of native type Ibexa\\Contracts\\Core\\Collection\\MapInterface\.$#' + identifier: return.phpDocType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @var for variable \$map contains generic class Ibexa\\Contracts\\Core\\Collection\\ArrayMap but does not specify its types\: TKey, TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForCreate\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Type Ibexa\\Contracts\\Core\\Collection\\ArrayMap in generic type Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\ in PHPDoc tag @extends is not subtype of template type TCollection of Ibexa\\Contracts\\Core\\Repository\\Collection\\CollectionInterfaces of class Ibexa\\Tests\\Core\\Collection\\AbstractCollectionTest\.$#' + identifier: generics.notSubtype count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/ArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForCreate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayListTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/MutableArrayListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForUpdate\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayListTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayList does not specify its types\: TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/MutableArrayListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForUpdate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^PHPDoc tag @var for variable \$list contains generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayList but does not specify its types\: TValue$#' + identifier: missingType.generics + count: 4 + path: tests/lib/Collection/MutableArrayListTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayMapTest\:\:createCollection\(\) has parameter \$data with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/MutableArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:fixturesForTestCreateContentNonRedundantFieldSetComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Collection\\MutableArrayMapTest\:\:createCollection\(\) return type with generic class Ibexa\\Contracts\\Core\\Collection\\MutableArrayMap does not specify its types\: TKey, TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Collection/MutableArrayMapTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:fixturesForTestUpdateContentNonRedundantFieldSetComplex\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Parameter \#2 \$string of static method PHPUnit\\Framework\\Assert\:\:assertRegExp\(\) expects string, string\|false given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Container/Encore/ConfigurationDumperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:getPartlyMockedContentService\(\) should return Ibexa\\Core\\Repository\\ContentService&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Repository\\ContentService\.$#' - identifier: return.type + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\TrashItemDeleteResult and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\TrashItemDeleteResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Event/TrashServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:internalLoadContentProviderById\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Parameter \#4 \$forwarding of method Ibexa\\Core\\Event\\URLAliasService\:\:createGlobalUrlAlias\(\) expects bool, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Event/URLAliasServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:internalLoadContentProviderByRemoteId\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#4 \$forwarding of method Ibexa\\Core\\Event\\URLAliasService\:\:createUrlAlias\(\) expects bool, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Event/URLAliasServiceTest.php + + - + message: '#^Parameter \#5 \$alwaysAvailable of method Ibexa\\Core\\Event\\URLAliasService\:\:createGlobalUrlAlias\(\) expects bool, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Event/URLAliasServiceTest.php + + - + message: '#^Parameter \#5 \$alwaysAvailable of method Ibexa\\Core\\Event\\URLAliasService\:\:createUrlAlias\(\) expects bool, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Event/URLAliasServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\URLWildcardTranslationResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/Event/URLWildcardServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mapStructFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Parameter \#3 \$forward of method Ibexa\\Core\\Event\\URLWildcardService\:\:create\(\) expects bool, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Event/URLWildcardServiceTest.php + + - + message: '#^Cannot assign new offset to Ibexa\\Core\\FieldType\\Author\\AuthorCollection\.$#' + identifier: offsetAssign.dimType + count: 3 + path: tests/lib/FieldType/AuthorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mapStructFieldsForUpdate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockBuildContentDomainObject\(\) has parameter \$translations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockGetDefaultObjectStates\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockPublishUrlAliasesForContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockSetDefaultObjectStates\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$existingFields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$existingLanguageCodes with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\AuthorTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Core\\FieldType\\Author\\Value\:\:\$authors \(Ibexa\\Core\\FieldType\\Author\\AuthorCollection\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSet1\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSet2\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSetComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentFieldValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryFileTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/BinaryFileTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionRequiredField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentWithInvalidLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet1\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet2\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet3\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CheckboxTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet4\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$boolValue of class Ibexa\\Core\\FieldType\\Checkbox\\Value constructor expects bool, int given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CheckboxTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSetComplex\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentRequiredField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentValidationExceptionTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentWithInvalidLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:stubValues\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:stubValues\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\CountryTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/CountryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCopyContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$value\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/FieldType/DateAndTimeTest.php + + - + message: '#^Cannot call method add\(\) on DateTime\|null\.$#' + identifier: method.nonObject count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCopyContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCopyContentWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCopyContentWithVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForTimeStringFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param references unknown parameter\: \$inputValue$#' + identifier: parameter.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentObjectStates\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has parameter \$identifier with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/DateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentFieldValidationException\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsInvalidArgumentExceptionContentTypeNotSet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsInvalidArgumentExceptionDuplicateRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\EmailAddressTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsInvalidArgumentExceptionMainLanguageCodeNotSet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$email of class Ibexa\\Core\\FieldType\\EmailAddress\\Value constructor expects string, int given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Validator\\EmailAddressValidator\:\:\$Extent\.$#' + identifier: property.notFound + count: 4 + path: tests/lib/FieldType/EmailAddressValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithInvalidLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\EmailAddressValidator will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/EmailAddressValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithInvalidLanguage\(\) has parameter \$mainLanguageCode with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Validator\\FileSizeValidator\:\:\$unexisting\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/FieldType/FileSizeValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithInvalidLanguage\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Translation\\Message\:\:\$message\.$#' + identifier: property.protected count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FileSizeValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithLocations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\Translation\\Message\:\:\$values\.$#' + identifier: property.protected count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FileSizeValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithLocationsDuplicateUnderParent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\FileSizeValidator will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FileSizeValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 3 + path: tests/lib/FieldType/FileSizeValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testDeleteContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testDeleteContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testDeleteContentWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testDeleteVersionThrowsBadStateExceptionLastVersion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testInternalLoadContentById\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testInternalLoadContentByRemoteId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testInternalLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContentByContentInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContentByVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContentNonPublished\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FloatTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContentNotPublishedStatusUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Float\\Value constructor expects float\|null, string given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/FloatTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadContentUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Class Symfony\\Component\\Validator\\ConstraintViolation constructor invoked with 1 parameter, 6\-10 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfo\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$errors with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoById\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoByIdAndVersionNumber\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateInvalid\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoByIdNonPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateValid\(\) has parameter \$fieldDefinitionData with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoByIdPublishedVersion\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:testValidateValid\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/GenericTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoByIdThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:__construct\(\) has parameter \$value with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/Stubs/Value.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testLoadVersionInfoByIdThrowsUnauthorizedExceptionNonPublishedVersion\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:getValue\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/Stubs/Value.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Value\:\:\$value has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Generic/Stubs/Value.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Class Ibexa\\Core\\FieldType\\ISBN\\Type does not have a constructor and must be instantiated without any parameters\.$#' + identifier: new.noConstructor count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ISBNTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ISBNTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$binaryFileId of method Ibexa\\Core\\FieldType\\Image\\IO\\Legacy\:\:getUri\(\) expects string, Ibexa\\Core\\IO\\Values\\BinaryFile given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/Image/IO/LegacyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAsset\\AssetMapperTest\:\:dataProviderForIsAsset\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAsset/AssetMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has parameter \$spiFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$identifier with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageAssetTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageAssetTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Access to an undefined property Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:\$mimeTypeDetectorMock\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsBadStateException\(\) has parameter \$status with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$allFieldErrors with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$spiField with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInputForValuesEqual\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\FieldType\\ImageTest\:\:\$blackListedExtensions has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/ImageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentTransactionRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentWithInvalidLanguage\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentWithInvalidLanguage\(\) has parameter \$initialLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentWithInvalidLanguage\(\) has parameter \$structFields with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Parameter \#1 \$languageHandlerMock of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:loadByLanguageCodeMock\(\) expects PHPUnit\\Framework\\MockObject\\MockObject, Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Parameter \#1 \$singular of class Ibexa\\Core\\FieldType\\ValidationError constructor expects string, int given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Repository/Service/Mock/ContentTest.php + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$publicationDate \(int\) does not accept int\|null\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:\$contentTypeServiceMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\IntegerTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:\$locationServiceMock has no type specified\.$#' - identifier: missingType.property + message: '#^Parameter \#1 \$value of class Ibexa\\Core\\FieldType\\Integer\\Value constructor expects int\|null, string given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/IntegerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:\$partlyMockedContentService \(Ibexa\\Core\\Repository\\ContentService\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:\$relationProcessorMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/ContentTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\User\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 11 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\PermissionResolver&PHPUnit\\Framework\\MockObject\\MockObject\:\:sudo\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:createRole\(\) has parameter \$policiesData with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:getPermissionResolverMock\(\) has parameter \$methods with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:getPermissionSetsMock\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\KeywordTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/KeywordTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:getUserReferenceMock\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestCanUserComplex\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestCanUserSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsFalse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsInvalidArgumentValueException\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsLimitationNotFoundException\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsPermissionSets\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MapLocationTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MapLocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsPermissionSetsWithRoleLimitation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:providerForTestHasAccessReturnsTrue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserComplex\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserComplex\(\) has parameter \$policyLimitationEvaluations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserComplex\(\) has parameter \$roleLimitationEvaluations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserComplex\(\) has parameter \$userCan with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserSimple\(\) has parameter \$permissionSets with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserSimple\(\) has parameter \$result with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testCanUserWithoutLimitations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\MediaTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testGetCurrentUserReferenceReturnsAnonymousUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsFalse\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsFalse\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsFalse\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsFalseButSudoSoTrue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsInvalidArgumentValueException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsInvalidArgumentValueException\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsInvalidArgumentValueException\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsLimitationNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsLimitationNotFoundException\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsLimitationNotFoundException\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSets\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSets\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSets\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSetsWithRoleLimitation\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + message: '#^Parameter \#1 \$contentId of method Ibexa\\Tests\\Core\\FieldType\\RelationListTest\:\:generateValidationError\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSetsWithRoleLimitation\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$value of method Ibexa\\Core\\FieldType\\RelationList\\Type\:\:getRelations\(\) expects Ibexa\\Core\\FieldType\\RelationList\\Value, Ibexa\\Core\\FieldType\\Value given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationListTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsPermissionSetsWithRoleLimitation\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsTrue\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsTrue\(\) has parameter \$roleAssignments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testHasAccessReturnsTrue\(\) has parameter \$roles with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:testSetAndGetCurrentUserReference\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$limitationsPass\)\: Unexpected token "\$limitationsPass", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$policy \\Ibexa\\Contracts\\Core\\Persistence\\User\\Policy\)\: Unexpected token "\$policy", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$policy \\Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Policy\)\: Unexpected token "\$policy", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$role \\Ibexa\\Contracts\\Core\\Persistence\\User\\Role\)\: Unexpected token "\$role", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^PHPDoc tag @var has invalid value \(\$roleAssignments \\Ibexa\\Contracts\\Core\\Persistence\\User\\RoleAssignment\[\]\)\: Unexpected token "\$roleAssignments", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$userHandlerMock \\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\$userHandlerMock", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 6 - path: tests/lib/Repository/Service/Mock/PermissionTest.php - - - - message: '#^PHPDoc tag @var has invalid value \(\$valueObject \\Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\)\: Unexpected token "\$valueObject", expected type at offset 9 on line 1$#' - identifier: phpDoc.parseError - count: 3 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:\$permissionResolverMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:\$repositoryMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\RelationTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\PermissionTest\:\:\$userReferenceMock has no type specified\.$#' - identifier: missingType.property + message: '#^Parameter \#1 \$fieldValue of method Ibexa\\Core\\FieldType\\Relation\\Type\:\:getRelations\(\) expects Ibexa\\Core\\FieldType\\Relation\\Value, Ibexa\\Core\\FieldType\\Value given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/RelationTest.php - - message: '#^Variable \$limitationsPass might not be defined\.$#' - identifier: variable.undefined + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/PermissionTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 2 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$callCounter with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$fieldRelations with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$locationHandlerMock with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$type with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$contentId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$fieldDefinitionId with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$type with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\SelectionTest\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:providerForTestAppendRelations\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + message: '#^Parameter \#1 \$selection of class Ibexa\\Core\\FieldType\\Selection\\Value constructor expects array\, array\ given\.$#' + identifier: argument.type + count: 4 + path: tests/lib/FieldType/SelectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelations\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelations\(\) has parameter \$fieldRelations with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelationsLocationMappingWorks\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelationsLogsMissingLocations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testProcessFieldRelationsAddsRelations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testProcessFieldRelationsNoChanges\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testProcessFieldRelationsRemovesRelations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testProcessFieldRelationsWhenRelationFieldNoLongerExists\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\TimeTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + path: tests/lib/FieldType/TimeTest.php - - message: '#^Parameter \#5 \$fieldDefinitionId of method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) expects string, int given\.$#' - identifier: argument.type - count: 3 - path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + message: '#^Cannot access offset ''urlId'' on array\|bool\|float\|int\|string\|null\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: tests/lib/FieldType/Url/UrlStorageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RepositoryTest\:\:testBeginTransaction\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RepositoryTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RepositoryTest\:\:testCommit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RepositoryTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RepositoryTest\:\:testCommitThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RepositoryTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RepositoryTest\:\:testRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RepositoryTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RepositoryTest\:\:testRollbackThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RepositoryTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct\:\:expects\(\)\.$#' - identifier: method.notFound + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:getPartlyMockedRoleService\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UrlTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:getPartlyMockedRoleService\(\) should return Ibexa\\Core\\Repository\\RoleService&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Core\\Repository\\RoleService\.$#' - identifier: return.type + message: '#^Parameter \#1 \$link of class Ibexa\\Core\\FieldType\\Url\\Value constructor expects string\|null, int given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAddPolicyThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleGroupToUserThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUser\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserGroup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserGroupThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserGroupThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserGroupWithNullLimitation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserGroupWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserThrowsBadStateException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserWithNullLimitation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:providerForTestCreatePersistenceValue\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testAssignRoleToUserWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:providerForTestValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testCreateRoleThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testCreatePersistenceValue\(\) has parameter \$expectedFieldValueExternalData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testRemovePolicyByRoleDraft\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testCreatePersistenceValue\(\) has parameter \$userValueDate with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testRemovePolicyByRoleDraftThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\UserTest\:\:testValidate\(\) has parameter \$expectedValidationErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testRemovePolicyByRoleDraftWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\FieldType\\\\Validator'' and Ibexa\\Core\\FieldType\\Validator\\StringLengthValidator will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/FieldType/Validator/StringLengthValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:testUpdatePolicyThrowsLimitationValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Constant Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:DEFAULT_GROUP_NAME is unused\.$#' + identifier: classConstant.unused count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php - - - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: varTag.nativeType - count: 6 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: varTag.nativeType + message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:getArrayTranslatorFieldsGroupsList\(\) has parameter \$groups with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php - - - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: varTag.nativeType - count: 3 - path: tests/lib/Repository/Service/Mock/RoleTest.php - - - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroup is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: varTag.nativeType - count: 3 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:\$partlyMockedRoleService \(Ibexa\\Core\\Repository\\RoleService\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:getFieldDefinitionMock\(\) has parameter \$constructorArgs with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/RoleTest.php + path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Search\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound - count: 7 - path: tests/lib/Repository/Service/Mock/SearchTest.php + message: '#^Method Ibexa\\Tests\\Core\\IO\\FilePathNormalizer\\FlysystemTest\:\:providerForTestNormalizePath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/IO/FilePathNormalizer/FlysystemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:providerForFindContentValidatesLocationCriteriaAndSortClauses\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:providerForFindSingleValidatesLocationCriteria\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentNoPermissionsFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\BaseVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/BaseVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentThrowsHandlerException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentValidatesLocationCriteriaAndSortClauses\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentValidatesLocationCriteriaAndSortClauses\(\) has parameter \$exceptionMessage with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentValidatesLocationCriteriaAndSortClauses\(\) has parameter \$query with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\DFSVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/DFSVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentWhenDomainMapperThrowsException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentWithDefaultQueryValues\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentWithNoPermission\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestInverseForDirectory\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindContentWithPermission\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\Flysystem\\VisibilityConverter\\SiteAccessAwareVisibilityConverterTest\:\:getDataForTestInverseForFile\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/Flysystem/VisibilityConverter/SiteAccessAwareVisibilityConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindLocationsBackgroundIndexerWhenDomainMapperThrowsException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$inputStream of method Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:setInputStream\(\) expects resource, resource\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindLocationsThrowsHandlerException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:\$mtime \(DateTime\) does not accept int\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindLocationsWithDefaultQueryValues\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\IO\\IOBinarydataHandler\\FlysystemTest\:\:\$handler \(Ibexa\\Core\\IO\\IOBinarydataHandler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\IOBinarydataHandler\\Flysystem\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/IOBinarydataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindLocationsWithNoPermissionsFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\IOMetadataHandler\\FlysystemTest\:\:getDataForFileExists\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/IOMetadataHandler/FlysystemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindLocationsWithPermission\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\IO\\BinaryFileCreateStruct\:\:\$mtime \(DateTime\) does not accept int\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindSingleThrowsHandlerException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$path of method Ibexa\\Core\\IO\\MimeTypeDetector\\FileInfo\:\:getFromBuffer\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/MimeTypeDetector/FileInfoTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindSingleThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\AbsolutePrefixTest\:\:provideData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/UrlDecorator/AbsolutePrefixTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindSingleValidatesLocationCriteria\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\IO\\UrlRedecoratorTest\:\:\$redecorator \(Ibexa\\Core\\IO\\UrlRedecorator&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\IO\\UrlRedecorator\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/IO/UrlRedecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindSingleValidatesLocationCriteria\(\) has parameter \$criterion with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:testFindSingleValidatesLocationCriteria\(\) has parameter \$exceptionMessage with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: varTag.nativeType - count: 5 - path: tests/lib/Repository/Service/Mock/SearchTest.php + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$searchHits \(list\\>\) does not accept array\, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchHit\\>\.$#' - identifier: assign.propertyType - count: 2 - path: tests/lib/Repository/Service/Mock/SearchTest.php + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:\$contentDomainMapperMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:\$permissionsCriterionResolverMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\BlockingLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/Limitation/BlockingLimitationTypeTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:\$repositoryMock has no type specified\.$#' - identifier: missingType.property + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:dataProviderForAccept\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/SearchTest.php + path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - message: '#^Call to new Ibexa\\Core\\Repository\\URLAliasService\(\) on a separate line has no effect\.$#' - identifier: new.resultUnused + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:dataProviderForEvaluate\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:getPartlyMockedURLAliasServiceService\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:getLanguageLimitation\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:getSpiUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LanguageLimitation\\ContentDeleteEvaluatorTest\:\:getTergetVersion\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LanguageLimitation/ContentDeleteEvaluatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/LocationLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookupThrowsNotFoundExceptionPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestEvaluateSelfGroup\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookupWithSharedTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestReverseLookup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\MemberOfLimitationTypeTest\:\:testEvaluateSelfGroup\(\) has parameter \$currentUserGroupLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestReverseLookupAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:willReturnOnConsecutiveCalls\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' + identifier: argument.named count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/MemberOfLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:setConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:setConfiguration\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testConstructor\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\NewObjectStateLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/NewObjectStateLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Limitation\\ObjectStateLimitationTypeTest\:\:\$loadObjectStatesMap type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ObjectStateLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAliasForLocation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionPath\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAliasThrowsInvalidArgumentExceptionResource\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$contentId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAliasThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$contentInfo with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateGlobalUrlAliasWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:assertContentHandlerExpectations\(\) has parameter \$persistenceCalled with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateUrlAlias\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateUrlAliasThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateUrlAliasThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testCreateUrlAliasWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistence with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmpty\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmpty\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmptyCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Instanceof between Ibexa\\Core\\Repository\\Values\\User\\UserRoleAssignment and Ibexa\\Core\\Repository\\Values\\User\\User will always evaluate to false\.$#' + identifier: instanceof.alwaysFalse count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/RoleLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/RoleLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/RoleLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/RoleLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SectionLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SectionLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SectionLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SectionLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SiteAccessLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:getVersionInfoMock\(\) has parameter \$shouldBeCalled with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\StatusLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/StatusLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$id\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestAcceptValueException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestEvaluateInvalidArgument\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:providerForTestValidatePass\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$expected with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$persistenceLocations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest\.php\:47\:\:getTwigVariables\(\) has parameter \$options with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\EventListener\\ContentViewTwigVariablesSubscriberTest\:\:getRegistry\(\) has parameter \$providers with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/EventListener/ContentViewTwigVariablesSubscriberTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\ImageAsset\\ParameterProviderTest\:\:dataProviderForTestGetViewParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\ImageAsset\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/ImageAsset/ParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$desinationContentIds with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:testGetViewParameters\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:getRequestStackMock\(\) has parameter \$hasLocale with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\LocaleConverterTest\:\:convertToPOSIXProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\LocaleConverterTest\:\:\$conversionMap \(array\{array\{string, string\|null\}\}\) does not accept array\{eng\-GB\: ''en_GB'', eng\-US\: ''en_US'', fre\-FR\: ''fr_FR'', ger\-DE\: ''de_DE'', nor\-NO\: ''no_NO'', cro\-HR\: ''hr_HR''\}\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/LocaleConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:getLanguageCodesMap\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:providerForTestGetPreferredLanguages\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:providerForTestGetPreferredLanguagesWithUserPreferredLanguage\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithUserPreferredLanguage\(\) has parameter \$expectedEzLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Locale\\UserLanguagePreferenceProviderTest\:\:testGetPreferredLanguagesWithUserPreferredLanguage\(\) has parameter \$userLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$filename of static method Symfony\\Component\\Yaml\\Yaml\:\:parseFile\(\) expects string, string\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Locale/UserLanguagePreferenceProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\MultipleValuedTest\:\:matchingConfigProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:matchConfigProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$namespace with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has parameter \$languageCode with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$scope with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testGenerateWithSiteAccessNoReverseMatch\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:testSimpleGenerate\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:testGenerate\(\) has parameter \$params with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerate\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:testDoGenerateWithSiteAccessParam\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:getRequestByPathInfo\(\) has parameter \$pathInfo with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\:\:\$matcher \(Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\) does not accept Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\URILexer&PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType + count: 2 + path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$expirationDate of class Ibexa\\Contracts\\Core\\Repository\\Values\\User\\PasswordInfo constructor expects DateTimeImmutable\|null, DateTimeImmutable\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Security/UserCheckerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testVoteInvalidAttribute\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:testVoteInvalidAttribute\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:testMatch\(\) has parameter \$expectedMatch with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:getExistingSiteProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:siteAccessNamesProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Core\\MVC\\Symfony\\SiteAccess\:\:\$groups \(array\\) does not accept array\\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\ChainSiteAccessProviderTest\:\:\$groupsBySiteAccess type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/Provider/ChainSiteAccessProviderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Host constructor invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\HostText constructor invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterHostTextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:testSetGetRequest\(\) has parameter \$config with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\Map\\Port constructor invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterSpecialPortsTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$spiUrlAliases with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterTest\:\:createRouter\(\) has parameter \$debug with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\MVC\\\\Symfony\\\\Routing\\\\SimplifiedRequest'' and Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Matcher\\URIText constructor invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/RouterURITextTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessServiceTest\:\:getAvailableSitAccesses\(\) return type with generic class ArrayIterator does not specify its types\: TKey, TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + message: '#^Parameter \#2 \$groupsBySiteAccess of class Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\Provider\\StaticSiteAccessProvider constructor expects array\, array\\> given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/MVC/Symfony/SiteAccess/SiteAccessServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Anonymous function has an unused use \$content\.$#' + identifier: closure.unusedUse count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListGlobalAliases\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Anonymous function has an unused use \$siteAccess\.$#' + identifier: closure.unusedUse count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListGlobalAliasesEmpty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpKernel\\\\Controller\\\\ControllerReference'' and Symfony\\Component\\HttpKernel\\Controller\\ControllerReference will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderContentStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListGlobalAliasesWithParameters\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Anonymous function has an unused use \$content\.$#' + identifier: closure.unusedUse count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListLocationAliasesWithShowAllTranslations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Anonymous function has an unused use \$siteAccess\.$#' + identifier: closure.unusedUse count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListLocationAliasesWithShowAllTranslationsCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Symfony\\\\Component\\\\HttpKernel\\\\Controller\\\\ControllerReference'' and Symfony\\Component\\HttpKernel\\Controller\\ControllerReference will always evaluate to true\.$#' + identifier: method.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/RenderLocationStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getContent\(\) has parameter \$fieldsData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLoadThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getContent\(\) has parameter \$namesData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLoadThrowsNotFoundExceptionPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\ContentExtensionTest\:\:getField\(\) has parameter \$isEmpty with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getContent\(\) has parameter \$fieldsData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has parameter \$alwaysAvailable with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getContent\(\) has parameter \$namesData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has parameter \$languageCode with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$id with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has parameter \$prioritizedLanguageList with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$settings with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has parameter \$showAllTranslations with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:getFieldDefinition\(\) has parameter \$typeIdentifier with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundException\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:setConfigurationLocale\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 115 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param has invalid value \(\\Ibexa\\Core\\MVC\\Symfony\\Locale\\LocaleConverterInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 114 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable\(\) has parameter \$prioritizedLanguageList with no type specified\.$#' - identifier: missingType.parameter + message: '#^PHPDoc tag @param has invalid value \(\\Symfony\\Contracts\\Translation\\TranslatorInterface\|\\PHPUnit\\Framework\\MockObject\\MockObject\)\: Unexpected token "\\n ", expected variable at offset 109 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$configResolverInterfaceMock has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$locale has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has parameter \$alwaysAvailable with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:\$suffixes has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has parameter \$languageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Anonymous function should return non\-empty\-string but returns non\-empty\-string\|false\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has parameter \$prioritizedLanguageList with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\RoutingExtensionTest\:\:getExampleRouteReference\(\) has parameter \$name with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has parameter \$showAllTranslations with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\RoutingExtensionTest\:\:getExampleRouteReference\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/RoutingExtensionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testRemoveAliases\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testRemoveAliasesThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testRemoveAliasesThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testRemoveAliasesWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:\$messageTemplate has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\NoTranslationToExtract\:\:\$parameters has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/NoTranslationToExtract.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupCustomConfiguration\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:\$messageTemplate has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\SetMessageTemplate\:\:\$parameters has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/SetMessageTemplate.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$paths with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:addParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$prioritizedLanguageCodes with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:getParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$reverseLookupLanguageCode with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setParameters\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$spiUrlAliases with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$messageTemplate of method Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:setMessageTemplate\(\) expects string, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:\$messageTemplate has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupWithShowAllTranslations\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Translation\\fixtures\\WrongTranslationId\:\:\$parameters has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/Translation/fixtures/WrongTranslationId.php - - message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' - identifier: argument.type - count: 12 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:createViewUnderTest\(\) has parameter \$viewType with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:\$urlAliasHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:testConstruct\(\) has parameter \$params with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - message: '#^Cannot call method getTimestamp\(\) on DateTimeInterface\|null\.$#' - identifier: method.nonObject - count: 2 - path: tests/lib/Repository/Service/Mock/UrlTest.php + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:\$valueParams type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/View/ContentViewTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configurePermissions\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\LoginFormViewTest\:\:createViewUnderTest\(\) has parameter \$viewType with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/MVC/Symfony/View/LoginFormViewTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configurePermissions\(\) has parameter \$permissions with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Contracts\\Core\\MVC\\View\\VariableProvider@anonymous/tests/lib/MVC/Symfony/View/VariableProviderRegistryTest\.php\:29\:\:getTwigVariables\(\) has parameter \$options with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\VariableProviderRegistryTest\:\:getRegistry\(\) has parameter \$providers with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/MVC/Symfony/View/VariableProviderRegistryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has parameter \$hasAccess with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Pagination\\AdapterFactory\\SearchHitAdapterFactoryTest\:\:dataProviderForCreateFixedAdapter\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Pagination/AdapterFactory/SearchHitAdapterFactoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has parameter \$object with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + message: '#^Parameter \#3 \$languageFilter of class Ibexa\\Core\\Pagination\\Pagerfanta\\ContentFilteringAdapter constructor expects array\\|null, array\\|true\> given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Pagination/ContentFilteringAdapterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:arrayAsGenerator\(\) has parameter \$array with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has parameter \$hasAccess with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:createCacheItem\(\) has parameter \$tags with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has parameter \$object with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:providerForClearAndInvalidation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermissionForHasAccess\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:providerForDelete\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermissionForHasAccess\(\) has parameter \$hasAccess with no type specified\.$#' - identifier: missingType.parameter + message: '#^Parameter \#1 \$callback of function call_user_func_array expects callable\(\)\: mixed, array\{mixed, ''publish''\} given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:createUrlService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Variable \$tags in empty\(\) always exists and is not falsy\.$#' + identifier: empty.variable count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:dateProviderForFindUsages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateKey\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:getApiUrl\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateKeyThrowsInvalidArgumentException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:getApiUrl\(\) has parameter \$id with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateTag\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:getApiUrl\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:providerForTestGenerateTagThrowsInvalidArgumentException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testCreateUpdateStruct\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateKey\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUrls\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateKeyThrowsInvalidArgumentException\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUrlsNonNumericLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateTag\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUrlsNonNumericOffset\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:testGenerateTagThrowsInvalidArgumentException\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUrlsUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierSanitizerTest\:\:providerForTestEscapeCacheKey\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUsages\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierSanitizerTest\:\:testEscapeCacheKey\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierSanitizerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUsages\(\) has parameter \$limit with no type specified\.$#' + message: '#^Function Ibexa\\Core\\Persistence\\Cache\\InMemory\\microtime\(\) has parameter \$asFloat with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/InMemory/InMemoryCacheTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUsages\(\) has parameter \$offset with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:providerForTestConvertToPathIds\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUsages\(\) has parameter \$usages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:testConvertToPathIds\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testLoadById\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\LocationPathConverterTest\:\:testConvertToPathIds\(\) has parameter \$resultArray with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/LocationPathConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testLoadByIdUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\UserHandlerTest\:\:providerForUnCachedMethods\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Cache/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testLoadByUrl\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\FieldType'' and Ibexa\\Contracts\\Core\\Persistence\\FieldType will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 3 + path: tests/lib/Persistence/FieldTypeRegistryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testLoadByUrlUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$coreFieldTypes of class Ibexa\\Core\\Persistence\\FieldTypeRegistry constructor expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/FieldTypeRegistryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testUpdateUrl\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\FieldValue\\Converter\\ImageConverterTest\:\:dataProviderForTestToFieldDefinition\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/FieldValue/Converter/ImageConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testUpdateUrlNonUnique\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\:\:loadBookmarkDataById\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testUpdateUrlStatus\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:dataProviderForLoadUserBookmarks\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testUpdateUrlUnauthorized\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:loadBookmark\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:withConsecutive\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testCountUserBookmarks\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$limit \(int\) does not accept string\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Bookmark\\Gateway\\DoctrineDatabaseTest\:\:testLoadUserBookmarks\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + path: tests/lib/Persistence/Legacy/Bookmark/Gateway/DoctrineDatabaseTest.php - - message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$offset \(int\) does not accept string\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler\:\:expects\(\)\.$#' + identifier: method.notFound + count: 9 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:\$urlHandler \(Ibexa\\Contracts\\Core\\Repository\\URLService&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType - count: 1 - path: tests/lib/Repository/Service/Mock/UrlTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound + count: 8 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestCreate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:expects\(\)\.$#' + identifier: method.notFound + count: 17 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestCreateThrowsContentValidationException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestTranslate\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestTranslateThrowsNotFoundException\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$contentHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreate\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateExistingFieldsInNewVersion\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreate\(\) has parameter \$destinationUrl with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateNewFields\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreate\(\) has parameter \$forward with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:assertCreateNewFieldsForMainLanguage\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreate\(\) has parameter \$sourceUrl with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$value \(Ibexa\\Contracts\\Core\\Persistence\\Content\\FieldValue\) does not accept null\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsContentValidationException\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Variable \$copyField might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsContentValidationException\(\) has parameter \$destinationUrl with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Variable \$originalField might not be defined\.$#' + identifier: variable.undefined + count: 2 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsContentValidationException\(\) has parameter \$forward with no type specified\.$#' - identifier: missingType.parameter + message: '#^Cannot access offset ''email'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsContentValidationException\(\) has parameter \$sourceUrl with no type specified\.$#' - identifier: missingType.parameter + message: '#^Cannot access offset ''id'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Cannot access offset ''name'' on Ibexa\\Core\\FieldType\\Author\\Author\.$#' + identifier: offsetAccess.nonOffsetAccessible count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\AuthorTest\:\:\$authors \(array\\) does not accept array\\>\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/AuthorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testCreateWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Cannot access offset ''timestring'' on array\|bool\|float\|int\|string\|null\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 3 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testLoad\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\DateAndTimeTest\:\:getXMLToDateIntervalMap\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testLoadAll\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\MediaTest\:\:\$converter has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/MediaTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testLoadAllWithLimitAndOffset\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationTest\:\:\$converter \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\RelationConverter\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/RelationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testLoadThrowsException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\TextBlockTest\:\:\$longText has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/TextBlockTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testRemove\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyInt \(int\) does not accept false\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testRemoveThrowsUnauthorizedException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue\:\:\$sortKeyString \(string\) does not accept false\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testRemoveWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:assertContentVersionAttributesLanguages\(\) has parameter \$expectation with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslate\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Parameter \#2 \$expectedValues of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\DoctrineDatabaseTest\:\:assertValuesInRows\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 9 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslate\(\) has parameter \$createArray with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Gateway\\RandomSortClauseHandlerFactoryTest\:\:getGateways\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Gateway/RandomSortClauseHandlerFactoryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslate\(\) has parameter \$uri with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler but returns Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslate\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) does not accept Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslateThrowsNotFoundException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslateThrowsNotFoundException\(\) has parameter \$createArray with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound + count: 11 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslateThrowsNotFoundException\(\) has parameter \$url with no type specified\.$#' - identifier: missingType.parameter - count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper\:\:expects\(\)\.$#' + identifier: method.notFound + count: 6 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslateUsesLongestMatchingWildcard\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:\$urlWildcardHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlWildcard\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:dateProviderForValidate\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:getLanguageIndicatorData\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:testValidate\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:isAlwaysAvailableProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:testValidate\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:languageIdsFromMaskProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:testValidate\(\) has parameter \$expectedErrors with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:removeAlwaysAvailableFlagProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:createAPIUserPreferenceService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGeneratorTest\:\:testExtractLanguageIdsFromMask\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testGetUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Offset string might not exist on array\{\}\|array\{eng\-US\?\: Ibexa\\Contracts\\Core\\Persistence\\Content\\Language, eng\-GB\?\: Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\}\.$#' + identifier: offsetAccess.notFound count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testGetUserPreferenceCount\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/Language/MaskGeneratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testLoadUserPreferences\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextSearchConfiguration\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testSetUserPreference\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testSetUserPreferenceThrowsInvalidArgumentException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:testSetUserPreferenceWithRollback\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageMaskGenerator \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageAwareTestCase.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:\$userSPIPreferenceHandler \(Ibexa\\Contracts\\Core\\Persistence\\UserPreference\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:loadList\(\) has parameter \$ids with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\User\\Handler\:\:expects\(\)\.$#' - identifier: method.notFound + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageHandlerMock\:\:\$languages has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Service/Mock/UserTest.php + path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php - - message: '#^Parameter \#1 \$methods of method PHPUnit\\Framework\\MockObject\\MockBuilder\\:\:onlyMethods\(\) expects array\, array\\|null given\.$#' + message: '#^Parameter \#2 \$prefix of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper\:\:createLocationFromRow\(\) expects string, null given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Service/Mock/UserTest.php + path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - message: '#^Parameter \#6 \$userHandler of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserTest\:\:mockDeleteUserFlow\(\) expects Ibexa\\Contracts\\Core\\Persistence\\User\\Handler&PHPUnit\\Framework\\MockObject\\MockObject, Ibexa\\Contracts\\Core\\Persistence\\User\\Handler given\.$#' - identifier: argument.type - count: 2 - path: tests/lib/Repository/Service/Mock/UserTest.php + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationCreateStructValues type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - message: '#^Call to method expects\(\) on an unknown class object\.$#' - identifier: class.notFound - count: 4 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationRow type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:getAPIServiceClassName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\MapperTest\:\:\$locationValues type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Location/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:getSiteAccessAwareServiceClassName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\Relation\\CreateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper\:\:createCreateStructFromContent\(\) invoked with 2 parameters, 1 required\.$#' + identifier: arguments.count count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:extractContentInfoFromRowProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesLookupArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:extractVersionInfoFromRowProvider\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesLookupArguments\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getContentExtractFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getLanguageHandler\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getMapper\(\) has parameter \$valueConverter with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesLookupExpectedArguments\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getMultipleVersionsNamesExtractFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getNamesExtractFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getRelationExtractFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:setLanguagesPassTroughArguments\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testExtractContentInfoFromRow\(\) has parameter \$fixtures with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForLanguagesLookup\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + message: '#^Possibly invalid array key type \(list\\|string\)\.$#' + identifier: offsetAccess.invalidOffset + count: 2 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForLanguagesLookup\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\CreateStruct\:\:\$name \(array\\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForLanguagesPassTrough\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:\$languageHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForLanguagesPassTrough\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateGroupRowsFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForPassTrough\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateGroupRowsFixture\(\) should return array\\> but returns array\\>\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:testForPassTrough\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateRowsFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php - - - - message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:with\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' - identifier: argument.named - count: 4 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:\$innerApiServiceMock \(object&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\MapperTest\:\:getObjectStateRowsFixture\(\) should return array\\> but returns array\\>\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + path: tests/lib/Persistence/Legacy/Content/ObjectState/MapperTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\AbstractServiceTest\:\:\$innerApiServiceMock has unknown class object as its type\.$#' - identifier: class.notFound - count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound + count: 39 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\)$#' - identifier: argument.templateType - count: 1 - path: tests/lib/Repository/SiteAccessAware/AbstractServiceTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper\:\:expects\(\)\.$#' + identifier: method.notFound + count: 18 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ContentServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$objectStateHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/ContentServiceTest.php + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ContentServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/ContentServiceTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound + count: 12 + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ContentTypeServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:\$sectionHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ContentTypeServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\TreeHandlerTest\:\:getPartlyMockedTreeHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/ContentTypeServiceTest.php + path: tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:getDataForTestGetPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound + count: 35 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper\:\:expects\(\)\.$#' + identifier: method.notFound + count: 21 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$configLanguages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler\:\:expects\(\)\.$#' + identifier: method.notFound + count: 6 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$expectedPrioritizedLanguagesList with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getMapperMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$forcedLanguages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getPartlyMockedHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\LanguageServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\Type\\\\ContentUpdater\\\\Action\\\\AddField'' and Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddField will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\LanguageServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentFixture\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/LanguageServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\LocationServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getMockedAction\(\) has parameter \$methods with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/SiteAccessAware/LocationServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\LocationServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/LocationServiceTest.php + message: '#^Parameter \#1 \$id of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldReference\(\) expects int, null given\.$#' + identifier: argument.type + count: 6 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ObjectStateServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php + message: '#^Parameter \#1 \$id of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldReference\(\) expects int, string given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\ObjectStateServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/ObjectStateServiceTest.php + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Field\:\:\$id \(int\) does not accept null\.$#' + identifier: assign.propertyType + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentFixture\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$removeFieldAction \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveField\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesLookupArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesLookupArguments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to an undefined method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentUpdater \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\CreateStruct supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesLookupExpectedArguments\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:getLoadGroupFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\MapperTest\:\:getLoadTypeFixture\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestArchiveUrlAliasesForDeletedTranslations\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\SearchServiceTest\:\:setLanguagesPassTroughArguments\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestCleanupAfterPublishHistorize\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/SearchServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\TrashServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\\DoctrineDatabaseTest\:\:providerForTestCleanupAfterPublishRemovesLanguage\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/TrashServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\TrashServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:getSlugConverterMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/TrashServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:getSlugConverterMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$transformationProcessor of class Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter constructor expects Ibexa\\Core\\Persistence\\TransformationProcessor, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$configuration type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesLookupExpectedArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:\$slugConverter \(Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesLookupExpectedArguments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + message: '#^Argument of an invalid type Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 4 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\UrlAlias'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesPassTroughArguments\(\) has parameter \$languages with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:assertVirtualUrlAliasValid\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UrlAliasServiceTest\:\:setLanguagesPassTroughArguments\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:assertVirtualUrlAliasValid\(\) has parameter \$id with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/SiteAccessAware/UrlAliasServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UserServiceTest\:\:providerForLanguagesLookupMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:getPartlyMockedHandler\(\) has parameter \$methods with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/UserServiceTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\UserServiceTest\:\:providerForPassTroughMethods\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:providerForTestPublishUrlAliasForLocationComplex\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/SiteAccessAware/UserServiceTest.php - - - - message: '#^Call to method expects\(\) on an unknown class PHPUnit_Framework_MockObject_MockObject\.$#' - identifier: class.notFound - count: 2 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Call to method method\(\) on an unknown class PHPUnit_Framework_MockObject_MockObject\.$#' - identifier: class.notFound + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$languageHandler \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Validator\\TargetContentValidatorTest\:\:\$contentHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler&PHPUnit_Framework_MockObject_MockObject\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$languageMaskGenerator \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Validator\\TargetContentValidatorTest\:\:\$contentHandler has unknown class PHPUnit_Framework_MockObject_MockObject as its type\.$#' - identifier: class.notFound + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasHandlerTest\:\:\$locationGateway \(Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasHandlerTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Validator\\TargetContentValidatorTest\:\:\$contentTypeHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit_Framework_MockObject_MockObject\) does not accept Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' - identifier: assign.propertyType + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:\$fixture has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Repository\\Validator\\TargetContentValidatorTest\:\:\$contentTypeHandler has unknown class PHPUnit_Framework_MockObject_MockObject as its type\.$#' - identifier: class.notFound + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\\DoctrineDatabaseTest\:\:\$fixtureData has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Validator/TargetContentValidatorTest.php - - - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabaseTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\UrlWildcardHandlerTest\:\:\$fixtureData has no type specified\.$#' + identifier: missingType.property count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/Content/UrlWildcard/UrlWildcardHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\FieldValue\\Converter\\ImageConverterTest\:\:fieldValueToXmlProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\FieldValue\\Converter\\ImageConverterTest\:\:xmlToFieldValueProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/FieldValue/Converter/ImageConverterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:getBaseCriterionQueryBuilders\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LanguageTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\BaseCriterionVisitorQueryBuilderTestCase\:\:testVisitCriteriaProducesQuery\(\) has parameter \$expectedParameterValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/LanguageTest.php + path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/Content/LocationTest.php + message: '#^Parameter \#1 \.\.\.\$arrays of function array_merge expects array, iterable given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\LocationTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \.\.\.\$arrays of function array_merge expects array, iterable\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/Content/LocationTest.php + path: tests/lib/Persistence/Legacy/Filter/BaseCriterionVisitorQueryBuilderTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\Query\\Aggregation\\RangeTest\:\:dataProviderForTestToString\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\LanguageCodeQueryBuilderQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/LanguageCodeQueryBuilderQueryBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\Query\\Criterion\\DateMetadataTest\:\:testConstruction\(\) has parameter \$value with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\ContentTypeGroupIdQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/Query/Criterion/DateMetadataTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeGroupIdQueryBuilderTest.php - - message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/Content/SectionTest.php + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Content\\Type\\ContentTypeQueryBuildersTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Content/Type/ContentTypeQueryBuildersTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\AncestorQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/AncestorQueryBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\LocationIdQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/LocationIdQueryBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\Location\\ParentLocationQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/Location/ParentLocationQueryBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Filter\\CriterionQueryBuilder\\LogicalOperatorQueryBuilderQueryBuilderTest\:\:getFilteringCriteriaQueryData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Container\:\:get\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/HandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\SectionTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:getContentTypeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\MemoryCachingHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Values/Content/SectionTest.php + path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:getLanguageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\CachingHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Persistence\\Legacy\\TransactionHandlerTest\:\:\$transactionHandler \(Ibexa\\Core\\Persistence\\Legacy\\TransactionHandler\) in isset\(\) is not nullable\.$#' + identifier: isset.property count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + path: tests/lib/Persistence/Legacy/TransactionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:testIsPropertySet\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:assertHandlerAcceptsCriterion\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:testMissingProperty\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:assertHandlerRejectsCriterion\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:testNewClass\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:testAccept\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\\CriterionHandlerTest\:\:testHandle\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\TrashItemTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Values/Content/TrashItemTest.php + message: '#^Parameter \#1 \$criterion of method Ibexa\\Core\\Persistence\\Legacy\\URL\\Query\\CriterionHandler\:\:accept\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\Query\\Criterion, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\ContentTypeDraftTest\:\:testObjectProperties\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php + message: '#^Parameter \#1 \$originalClassName of method PHPUnit\\Framework\\TestCase\:\:createMock\(\) expects class\-string\, string given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitions\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php + message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:createMock\(\)$#' + identifier: argument.templateType + count: 2 + path: tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/CriterionHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitionsWith\(\) has parameter \$values with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:createRole\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitionsWith\(\) return type has no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getDummyUser\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getComplexFilterTestData\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getGatewayReturnValue\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getFilters\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:getValidUserToken\(\) has parameter \$time with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getFiltersWithInvalidSliceData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue - count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php + message: '#^Parameter \#1 \$handler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\User\\UserHandlerTest\:\:createTestRole\(\) expects Ibexa\\Core\\Persistence\\Legacy\\User\\Handler, Ibexa\\Contracts\\Core\\Persistence\\User\\Handler given\.$#' + identifier: argument.type + count: 5 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getInvalidSortClausesData\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Target\\\\Builder\\\\VersionBuilder'' and Ibexa\\Contracts\\Core\\Limitation\\Target\\Builder\\VersionBuilder will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php + path: tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:testConstructorThrowsBadStateException\(\) has parameter \$sortClauses with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Limitation\\Target\\Builder\\VersionBuilderTest\:\:providerForTestBuild\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php + path: tests/lib/Persistence/Limitation/Target/Builder/VersionBuilderTest.php - - message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\RemoteId constructor expects array\\|string, int given\.$#' + message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' identifier: argument.type count: 1 - path: tests/lib/Repository/Values/Filter/FilterTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorDefinitionBasedTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + message: '#^Class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased\\Parser constructor invoked with 1 parameter, 0 required\.$#' + identifier: arguments.count + count: 10 + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testGetMultiLanguageDefaultDescription\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:applyTransformations\(\) has parameter \$transformations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testGetMultiLanguageDefaultName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\TransformationProcessor\\TransformationProcessorPcreCompilerTest\:\:applyTransformations\(\) should return string but returns string\|null\.$#' + identifier: return.type count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testGetMultiLanguagePrioritizedDescription\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#3 \$subject of function preg_replace_callback expects array\\|string, string\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPcreCompilerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testGetMultiLanguagePrioritizedName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\PreprocessedBased constructor expects array, list\\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/Persistence/TransformationProcessor/TransformationProcessorPreprocessedBasedTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AbstractQueryTypeTest\:\:testGetQuery\(\) has parameter \$parameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/QueryType/BuiltIn/AbstractQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AncestorsQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php + path: tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroupTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\AncestorsQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/AncestorsQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\ChildrenQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testGetMultiLanguageDefaultDescription\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\ChildrenQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/ChildrenQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testGetMultiLanguageDefaultName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\GeoLocationQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testGetMultiLanguagePrioritizedDescription\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\GeoLocationQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/GeoLocationQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testGetMultiLanguagePrioritizedName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\RelatedToContentQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/RelatedToContentQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SiblingsQueryTypeTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SiblingsQueryTypeTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/SiblingsQueryTypeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerStub\:\:__construct\(\) has parameter \$tokens with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php + path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerStub.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ObjectState\\ObjectStateTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerTest\:\:testTokenize\(\) has parameter \$expectedTokens with no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\Policy\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecLexerTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserTest\:\:dataProviderForParseSortDirection\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParserTest\:\:testParseSortDirection\(\) has parameter \$input with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/QueryType/BuiltIn/SortSpec/SortSpecParserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SubtreeQueryTest\:\:dataProviderForGetQuery\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\QueryType\\BuiltIn\\SubtreeQueryTest\:\:getExpectedSupportedParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/QueryType/BuiltIn/SubtreeQueryTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Strategy\\ContentThumbnail\\Field\\FieldTypeBasedThumbnailStrategy@anonymous/tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest\.php\:24\:\:getThumbnail\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php + path: tests/lib/Repository/ContentThumbnail/ContentFieldStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\PolicyTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:__construct\(\) has parameter \$validationReturn with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/PolicyTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\Role\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\ContentValidator\\ContentValidatorStrategyTest\:\:buildContentValidator\(\) has parameter \$validationReturn with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Validator\\ContentValidator@anonymous/tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest\.php\:88\:\:\$validationReturn type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/ContentValidator/ContentValidatorStrategyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\BookmarkServiceDecorator@anonymous/tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\BookmarkService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/Decorator/BookmarkServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$locationCreateStructs of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:createContent\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php + path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\RoleTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$contentTypeIds of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:loadContentTypeList\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/RoleTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\ContentTypeServiceDecorator@anonymous/tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest\.php\:31 constructor expects Ibexa\\Contracts\\Core\\Repository\\ContentTypeService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testGetName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$contentTypeGroups of method Ibexa\\Contracts\\Core\\Repository\\ContentTypeService\:\:createContentType\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/ContentTypeServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testIsPropertySet\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\FieldTypeServiceDecorator@anonymous/tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest\.php\:20 constructor expects Ibexa\\Contracts\\Core\\Repository\\FieldTypeService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/FieldTypeServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testMissingProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\LanguageServiceDecorator@anonymous/tests/lib/Repository/Decorator/LanguageServiceDecoratorTest\.php\:22 constructor expects Ibexa\\Contracts\\Core\\Repository\\LanguageService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testNewClass\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$languageIds of method Ibexa\\Contracts\\Core\\Repository\\LanguageService\:\:loadLanguageListById\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testObjectProperties\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\LocationServiceDecorator@anonymous/tests/lib/Repository/Decorator/LocationServiceDecoratorTest\.php\:29 constructor expects Ibexa\\Contracts\\Core\\Repository\\LocationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testReadOnlyProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\NotificationServiceDecorator@anonymous/tests/lib/Repository/Decorator/NotificationServiceDecoratorTest\.php\:22 constructor expects Ibexa\\Contracts\\Core\\Repository\\NotificationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php + path: tests/lib/Repository/Decorator/NotificationServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserGroupTest\:\:testUnsetProperty\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\ObjectStateServiceDecorator@anonymous/tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest\.php\:27 constructor expects Ibexa\\Contracts\\Core\\Repository\\ObjectStateService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserGroupTest.php - - - - message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\User\:\:\$notDefined\.$#' - identifier: property.notFound - count: 2 - path: tests/lib/Repository/Values/User/UserTest.php + path: tests/lib/Repository/Decorator/ObjectStateServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\User\\UserTest\:\:assertPropertiesCorrect\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\RoleServiceDecorator@anonymous/tests/lib/Repository/Decorator/RoleServiceDecoratorTest\.php\:34 constructor expects Ibexa\\Contracts\\Core\\Repository\\RoleService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Repository/Values/User/UserTest.php + path: tests/lib/Repository/Decorator/RoleServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Common\\FieldValueMapper\\RemoteIdentifierMapperTest\:\:getDataForTestCanMap\(\) return type has no value type specified in iterable type iterable\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\SearchServiceDecoratorTest\:\:getSearchEngineCapabilities\(\) return type has no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php + path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Common\\FieldValueMapper\\RemoteIdentifierMapperTest\:\:getDataForTestMap\(\) return type has no value type specified in iterable type iterable\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SearchServiceDecorator@anonymous/tests/lib/Repository/Decorator/SearchServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\SearchService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php + path: tests/lib/Repository/Decorator/SearchServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:getMockedFieldNameResolver\(\) has parameter \$methods with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SectionServiceDecorator@anonymous/tests/lib/Repository/Decorator/SectionServiceDecoratorTest\.php\:27 constructor expects Ibexa\\Contracts\\Core\\Repository\\SectionService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/SectionServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetFieldNames\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\SettingServiceDecorator@anonymous/tests/lib/Repository/Decorator/SettingServiceDecoratorTest\.php\:26 constructor expects Ibexa\\Contracts\\Core\\Repository\\SettingService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/SettingServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetFieldNamesReturnsEmptyArray\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\TranslationServiceDecorator@anonymous/tests/lib/Repository/Decorator/TranslationServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\TranslationService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/TranslationServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetFieldNamesWithNamedField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\TrashServiceDecorator@anonymous/tests/lib/Repository/Decorator/TrashServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\TrashService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/TrashServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetFieldNamesWithTypedAndNamedField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$aliasList of method Ibexa\\Contracts\\Core\\Repository\\URLAliasService\:\:removeAliases\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetFieldNamesWithTypedField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLAliasServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest\.php\:24 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLAliasService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/URLAliasServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameCustomField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLServiceDecoratorTest\.php\:23 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/URLServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameDefaultMatchField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\URLWildcardServiceDecorator@anonymous/tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest\.php\:21 constructor expects Ibexa\\Contracts\\Core\\Repository\\URLWildcardService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/URLWildcardServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameDefaultMatchFieldThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\UserPreferenceServiceDecorator@anonymous/tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest\.php\:20 constructor expects Ibexa\\Contracts\\Core\\Repository\\UserPreferenceService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameDefaultSortField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$userPreferenceSetStructs of method Ibexa\\Contracts\\Core\\Repository\\UserPreferenceService\:\:setUserPreference\(\) expects array\, array\ given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/UserPreferenceServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameDefaultSortFieldThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$innerService of class Ibexa\\Contracts\\Core\\Repository\\Decorator\\UserServiceDecorator@anonymous/tests/lib/Repository/Decorator/UserServiceDecoratorTest\.php\:37 constructor expects Ibexa\\Contracts\\Core\\Repository\\UserService, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Decorator/UserServiceDecoratorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameNamedField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Filtering\\TestContentProvider\:\:createContentDraft\(\) has parameter \$multilingualFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Filtering/TestContentProvider.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetIndexFieldNameNamedFieldThrowsRuntimeException\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$mainLanguageCode of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:newContentCreateStruct\(\) expects string, int\|string given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Filtering/TestContentProvider.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetSortFieldName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + message: '#^Parameter \#2 \$parentLocationId of method Ibexa\\Tests\\Core\\Repository\\Filtering\\TestContentProvider\:\:createArticle\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Repository/Filtering/TestContentProvider.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:testGetSortFieldNameReturnsNull\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\FieldType\\\\FieldType'' and Ibexa\\Contracts\\Core\\FieldType\\FieldType will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php - - message: '#^Parameter \#1 \$array of function key expects array\|object, string given\.$#' + message: '#^Parameter \#1 \$fieldTypes of class Ibexa\\Core\\FieldType\\FieldTypeRegistry constructor expects array\, array\ given\.$#' identifier: argument.type - count: 4 - path: tests/lib/Search/FieldNameResolverTest.php + count: 1 + path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php - - message: '#^Parameter \#5 \$name of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects string, null given\.$#' - identifier: argument.type - count: 4 - path: tests/lib/Search/FieldNameResolverTest.php + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Iterator\\BatchIteratorTestAdapter\:\:__construct\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:\$contentTypeHandlerMock \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Iterator\\BatchIteratorTestAdapter\:\:\$data type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/Iterator/BatchIteratorTestAdapter.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:\$fieldNameGeneratorMock \(Ibexa\\Core\\Search\\Common\\FieldNameGenerator&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Cannot access property \$locations on iterable\\.$#' + identifier: property.nonObject + count: 2 + path: tests/lib/Repository/Mapper/ContentLocationMapper/DecoratedLocationServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\AllValidationErrorsOccur\:\:extractTranslatable\(\) has parameter \$fieldErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:\$fieldRegistryMock \(Ibexa\\Core\\Search\\Common\\FieldRegistry&PHPUnit\\Framework\\MockObject\\MockObject\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^PHPDoc tag @param has invalid value \(array\\>\> \$fieldErrors\)\: Unexpected token "\<", expected type at offset 29 on line 2$#' + identifier: phpDoc.parseError count: 1 - path: tests/lib/Search/FieldNameResolverTest.php + path: tests/lib/Repository/PHPUnitConstraint/AllValidationErrorsOccur.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:compareArrays\(\) has parameter \$actual with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has parameter \$expectedIds with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:compareArrays\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has parameter \$searchResult with no type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\PHPUnitConstraint\\ContentItemEquals\:\:evaluate\(\) has parameter \$content with no type specified\.$#' identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/PHPUnitConstraint/ContentItemEquals.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getContentTypeHandler\(\) has Doctrine\\DBAL\\DBALException in PHPDoc @throws tag but it''s not thrown\.$#' - identifier: throws.unusedType + message: '#^Class Ibexa\\Tests\\Core\\Repository\\Parallel\\ParallelProcessList implements generic interface IteratorAggregate but does not specify its types\: TKey, TValue$#' + identifier: missingType.generics count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Parallel/ParallelProcessList.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getConverterRegistry\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionCriterionResolverMock\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getIds\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getIds\(\) has parameter \$searchResult with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:testPermissionResolverPassTrough\(\) has parameter \$arguments with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:\$contentTypeHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getLimitationServiceMock\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:\$converterRegistry \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getPermissionResolverMock\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/AbstractTestCase.php + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php - - message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Field constructor invoked with 4 parameters, 2\-3 required\.$#' - identifier: arguments.count - count: 2 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has parameter \$criterionMock with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testNoSorting\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:mockServices\(\) has parameter \$permissionSets with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortContentName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$className of method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\) expects class\-string\, string given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/Base.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortDateModified\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$searchHandler of class Ibexa\\Core\\Repository\\Repository constructor expects Ibexa\\Contracts\\Core\\Search\\Handler, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/Base.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortDatePublished\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Unable to resolve the template type T in call to method PHPUnit\\Framework\\TestCase\:\:getMockBuilder\(\)$#' + identifier: argument.templateType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/Base.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortFieldNumeric\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:createBookmarkService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/BookmarkTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortFieldText\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\BookmarkTest\:\:\$bookmarkHandler \(Ibexa\\Contracts\\Core\\Persistence\\Bookmark\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/BookmarkTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortSectionIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:testSortSectionName\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getContentHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getLanguageHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Property Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:\$fieldRegistry \(Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry\) in isset\(\) is not nullable\.$#' - identifier: isset.property + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:getTypeHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$contentIds with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentAndCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$contentInfoList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$languageFilter with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentIdFilterCount\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:testBuildLocationDomainObjectsOnSearchResult\(\) has parameter \$locationHits with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentNotCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#2 \$locationHandler of class Ibexa\\Core\\Repository\\Mapper\\ContentDomainMapper constructor expects Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentOrCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\FieldType\\Value\:\:\$value\.$#' + identifier: property.notFound count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentSubtreeFilterEq\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentSubtreeFilterIn\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentTypeGroupFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$fieldDefinitions with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentTypeIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$mainLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testContentTypeIdentifierFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForCreateContentContentValidationException\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testDateMetadataFilterCreatedBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestCreateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testDateMetadataFilterModifiedBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testDateMetadataFilterModifiedGreater\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testDateMetadataFilterModifiedGreaterOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$allFieldErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testDateMetadataFilterModifiedIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterContainsPartial\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterContainsSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$fieldDefinitions with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterContainsSimpleNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForUpdateContentContentValidationException\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldFilterOr\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForCreate\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterContainsArray\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForCreate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterContainsArrayNotMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForUpdate\(\) has parameter \$languageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterContainsSingle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:determineValuesForUpdate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterContainsSingleNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:internalLoadContentProviderById\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterInArray\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:internalLoadContentProviderByRemoteId\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFieldRelationFilterInArrayNotMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mapStructFieldsForCreate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindContentWithNonSearchableField\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mapStructFieldsForUpdate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindSingle\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockBuildContentDomainObject\(\) has parameter \$translations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindSingleTooMany\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockGetDefaultObjectStates\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindSingleWithNonSearchableField\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockPublishUrlAliasesForContent\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindSingleZero\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:mockSetDefaultObjectStates\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindWithNullLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$existingFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindWithOffsetToNonexistent\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$existingLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindWithZeroLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:prepareContentForTestCreateAndUpdateContent\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFindWithoutOffsetLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextDisabledWildcardFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$mainLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextFilterInvalidStopwordThreshold\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:provideCommonCreateContentObjects\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextFilterNoStopwordRemoval\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentFieldValidationException\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextFilterStopwordRemoval\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSetComplex\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testFullTextWildcardFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentFieldValidationException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testLanguageCodeFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:stubValues\(\) has parameter \$fieldValues with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testLanguageCodeFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentFieldValidationException\(\) has parameter \$mainLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testLanguageCodeFilterWithAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testInternalLoadContentById\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testLocationIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testInternalLoadContentByRemoteId\(\) has parameter \$languages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testLocationRemoteIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$identifier with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testObjectStateIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testObjectStateIdFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$languageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testParentLocationIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentRequiredField\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testRemoteIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$allFieldErrors with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testSectionFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$initialLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testStatusFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$spiField with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterCreatorEqAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterCreatorInAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$languageHandlerMock of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:loadByLanguageCodeMock\(\) expects PHPUnit\\Framework\\MockObject\\MockObject, Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterEqGroupMember\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + message: '#^Parameter \#1 \$singular of class Ibexa\\Core\\FieldType\\ValidationError constructor expects string, int given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterEqGroupMemberNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\MetadataUpdateStruct\:\:\$publicationDate \(int\) does not accept int\|null\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/ContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterInGroupMember\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:expects\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterInGroupMemberNoMatch\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterOwnerAdministrator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$locationHandlerMock with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterOwnerEqAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$type with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterOwnerInAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$contentId with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testUserMetadataFilterOwnerWrongUserId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$id with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:testVisibilityFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) has parameter \$type with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelations\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:testAppendFieldRelations\(\) has parameter \$fieldRelations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Field constructor invoked with 4 parameters, 2\-3 required\.$#' - identifier: arguments.count - count: 2 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^Parameter \#5 \$fieldDefinitionId of method Ibexa\\Core\\Repository\\Helper\\RelationProcessor\:\:appendFieldRelations\(\) expects string, int given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:getIds\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:getIds\(\) has parameter \$searchResult with no type specified\.$#' - identifier: missingType.parameter + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:getPartlyMockedRoleService\(\) has parameter \$settings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testNoSorting\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Role is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: varTag.nativeType + count: 6 + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortContentId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleCreateStruct is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: varTag.nativeType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortContentName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: varTag.nativeType + count: 3 + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortDateModified\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroup is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: varTag.nativeType + count: 3 + path: tests/lib/Repository/Service/Mock/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortDatePublished\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Search\\Handler\:\:expects\(\)\.$#' + identifier: method.notFound + count: 7 + path: tests/lib/Repository/Service/Mock/SearchTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortFieldNumeric\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^PHPDoc tag @var with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: varTag.nativeType + count: 5 + path: tests/lib/Repository/Service/Mock/SearchTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortFieldText\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$searchHits \(list\\>\) does not accept array\, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchHit\\>\.$#' + identifier: assign.propertyType + count: 2 + path: tests/lib/Repository/Service/Mock/SearchTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortIsMainLocationAscending\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to new Ibexa\\Core\\Repository\\URLAliasService\(\) on a separate line has no effect\.$#' + identifier: new.resultUnused count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortIsMainLocationDescending\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:getPartlyMockedURLAliasServiceService\(\) has parameter \$prioritizedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationDepth\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestReverseLookup\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationDepthAndPath\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestReverseLookupAlwaysAvailablePath\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationId\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:setConfiguration\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationPath\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:setConfiguration\(\) has parameter \$configuration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationPriority\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$paths with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationVisibilityAscending\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$reverseLookupLanguageCode with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortLocationVisibilityDescending\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type + count: 12 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortSectionIdentifier\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:\$urlAliasHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:testSortSectionName\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + message: '#^Cannot call method getTimestamp\(\) on DateTimeInterface\|null\.$#' + identifier: method.nonObject + count: 2 + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' - identifier: argument.type + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configurePermissions\(\) has no return type specified\.$#' + identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configurePermissions\(\) has parameter \$permissions with no value type specified in iterable type array\.$#' identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterBetween\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterEq\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has parameter \$hasAccess with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterGreaterThan\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlUpdatePermission\(\) has parameter \$object with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterGreaterThanOrEqual\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has parameter \$hasAccess with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterLessThan\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermission\(\) has parameter \$object with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentDepthFilterLessThanOrEqual\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermissionForHasAccess\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentIdFilterEquals\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:configureUrlViewPermissionForHasAccess\(\) has parameter \$hasAccess with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentIdFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:createUrlService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentTypeGroupFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:getApiUrl\(\) has parameter \$id with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentTypeIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:getApiUrl\(\) has parameter \$url with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testContentTypeIdentifierFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:testFindUsages\(\) has parameter \$usages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testDateMetadataFilterCreatedBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker\:\:withConsecutive\(\) invoked with unpacked array with possibly string key, but it''s not allowed because of @no\-named\-arguments\.$#' + identifier: argument.named count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testDateMetadataFilterModifiedBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$limit \(int\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testDateMetadataFilterModifiedGreater\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URLQuery\:\:\$offset \(int\) does not accept string\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testDateMetadataFilterModifiedGreaterOrEqual\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:\$urlHandler \(Ibexa\\Contracts\\Core\\Repository\\URLService&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testDateMetadataFilterModifiedIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestTranslate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestTranslateThrowsNotFoundException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterBetween\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:\$urlWildcardHandler \(Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlWildcard\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterContainsPartial\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:dateProviderForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterContainsSimple\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:testValidate\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterContainsSimpleNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPasswordValidatorTest\:\:testValidate\(\) has parameter \$expectedErrors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserPasswordValidatorTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:createAPIUserPreferenceService\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldFilterOr\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserPreferenceTest\:\:\$userSPIPreferenceHandler \(Ibexa\\Contracts\\Core\\Persistence\\UserPreference\\Handler&PHPUnit\\Framework\\MockObject\\MockObject\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserPreferenceTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterContainsArray\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Persistence\\User\\Handler\:\:expects\(\)\.$#' + identifier: method.notFound count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterContainsArrayNotMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$methods of method PHPUnit\\Framework\\MockObject\\MockBuilder\\:\:onlyMethods\(\) expects array\, array\\|null given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Service/Mock/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterContainsSingle\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Parameter \#6 \$userHandler of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UserTest\:\:mockDeleteUserFlow\(\) expects Ibexa\\Contracts\\Core\\Persistence\\User\\Handler&PHPUnit\\Framework\\MockObject\\MockObject, Ibexa\\Contracts\\Core\\Persistence\\User\\Handler given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Repository/Service/Mock/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterContainsSingleNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:getDataForTestGetPrioritizedLanguages\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterInArray\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$configLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFieldRelationFilterInArrayNotMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$expectedPrioritizedLanguagesList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFindWithNullLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\SiteAccessAware\\Language\\LanguageResolverTest\:\:testGetPrioritizedLanguages\(\) has parameter \$forcedLanguages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/SiteAccessAware/Language/LanguageResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFindWithOffsetToNonexistent\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Language\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/Content/LanguageTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFindWithZeroLimit\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\Location\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/Content/LocationTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFindWithoutOffsetLimit\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Content\\Query\\Aggregation\\RangeTest\:\:dataProviderForTestToString\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Content/Query/Aggregation/RangeTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextDisabledWildcardFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Section\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/Content/SectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\Content\\TrashItem\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/Content/TrashItemTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextFilterInvalidStopwordThreshold\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitions\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextFilterNoStopwordRemoval\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitionsWith\(\) has parameter \$values with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextFilterStopwordRemoval\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCollectionTest\:\:createFieldDefinitionsWith\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/ContentType/FieldDefinitionCollectionTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testFullTextWildcardFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getComplexFilterTestData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testIsMainLocationFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getFilters\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testIsNotMainLocationFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getFiltersWithInvalidSliceData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLanguageCodeFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:getInvalidSortClausesData\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLanguageCodeFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Values\\Filter\\FilterTest\:\:testConstructorThrowsBadStateException\(\) has parameter \$sortClauses with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLanguageCodeFilterWithAlwaysAvailable\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$value of class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\RemoteId constructor expects array\\|string, int given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Repository/Values/Filter/FilterTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationIdAndCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectStateGroup\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/ObjectState/ObjectStateGroupTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\ObjectState\\ObjectState\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/ObjectState/ObjectStateTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationIdParentLocationIdAndCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\Policy\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/User/PolicyTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationNotCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\Role\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/User/RoleTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationOrCombinatorFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\UserGroup\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/User/UserGroupTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationPriorityFilter\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Access to an undefined property Ibexa\\Core\\Repository\\Values\\User\\User\:\:\$notDefined\.$#' + identifier: property.notFound + count: 2 + path: tests/lib/Repository/Values/User/UserTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testLocationRemoteIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Common\\FieldValueMapper\\RemoteIdentifierMapperTest\:\:getDataForTestCanMap\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testMatchAllFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Common\\FieldValueMapper\\RemoteIdentifierMapperTest\:\:getDataForTestMap\(\) return type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Common/FieldValueMapper/RemoteIdentifierMapperTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testObjectStateIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\FieldNameResolverTest\:\:getMockedFieldNameResolver\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/FieldNameResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testObjectStateIdFilterIn\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Parameter \#5 \$name of method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) expects string, null given\.$#' + identifier: argument.type + count: 4 + path: tests/lib/Search/FieldNameResolverTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testParentLocationIdFilter\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/AbstractTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testRemoteIdFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has parameter \$expectedIds with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/AbstractTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testSectionFilter\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:assertSearchResults\(\) has parameter \$searchResult with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/AbstractTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterCreatorEqAMember\(\) has no return type specified\.$#' + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getConverterRegistry\(\) has no return type specified\.$#' identifier: missingType.return count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/AbstractTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterCreatorInAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\AbstractTestCase\:\:getIds\(\) has parameter \$searchResult with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/AbstractTestCase.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterEqGroupMember\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Field constructor invoked with 4 parameters, 2\-3 required\.$#' + identifier: arguments.count + count: 2 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterEqGroupMemberNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterInGroupMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterInGroupMemberNoMatch\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterOwnerAdministrator\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterOwnerEqAMember\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#3 \$ruleFiles of class Ibexa\\Core\\Persistence\\TransformationProcessor\\DefinitionBased constructor expects array, list\\|false given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterOwnerInAMember\(\) has no return type specified\.$#' - identifier: missingType.return - count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + message: '#^Class Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\SortClause\\Field constructor invoked with 4 parameters, 2\-3 required\.$#' + identifier: arguments.count + count: 2 + path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testUserMetadataFilterOwnerWrongUserId\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationSortTest\:\:getIds\(\) has parameter \$searchResult with no type specified\.$#' + identifier: missingType.parameter count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testVisibilityFilterHidden\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Parameter \#1 \$contentTypeHandler of method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\LanguageAwareTestCase\:\:getFullTextMapper\(\) expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler, Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler given\.$#' + identifier: argument.type count: 1 - path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php - - message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:testVisibilityFilterVisible\(\) has no return type specified\.$#' - identifier: missingType.return + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerLocationTest\:\:getContentSearchHandler\(\) has parameter \$fullTextSearchConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue count: 1 path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php From 399d2400203bb14ceaceb77f1ab1a5b55a682c5a Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Tue, 15 Apr 2025 15:40:00 +0200 Subject: [PATCH 131/185] [TMP] WiP created baseline with sf7 and related new non-critical issues --- phpstan-baseline.sf7-upgrade.neon | 6907 +++++++++++++++++++++++++++++ phpstan.neon.dist | 1 + 2 files changed, 6908 insertions(+) create mode 100644 phpstan-baseline.sf7-upgrade.neon diff --git a/phpstan-baseline.sf7-upgrade.neon b/phpstan-baseline.sf7-upgrade.neon new file mode 100644 index 0000000000..34178726da --- /dev/null +++ b/phpstan-baseline.sf7-upgrade.neon @@ -0,0 +1,6907 @@ +parameters: + ignoreErrors: + - + message: '#^Cannot call method writeln\(\) on Symfony\\Component\\Console\\Output\\OutputInterface\|null\.$#' + identifier: method.nonObject + count: 4 + path: src/bundle/Core/Command/DeleteContentTranslationCommand.php + + - + message: '#^Parameter \#1 \$input of method Symfony\\Component\\Console\\Helper\\QuestionHelper\:\:ask\(\) expects Symfony\\Component\\Console\\Input\\InputInterface, Symfony\\Component\\Console\\Input\\InputInterface\|null given\.$#' + identifier: argument.type + count: 2 + path: src/bundle/Core/Command/DeleteContentTranslationCommand.php + + - + message: '#^Parameter \#2 \$output of method Symfony\\Component\\Console\\Helper\\QuestionHelper\:\:ask\(\) expects Symfony\\Component\\Console\\Output\\OutputInterface, Symfony\\Component\\Console\\Output\\OutputInterface\|null given\.$#' + identifier: argument.type + count: 2 + path: src/bundle/Core/Command/DeleteContentTranslationCommand.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\Command\\NormalizeImagesPathsCommand\:\:updateImagePathsToNormalize\(\) has parameter \$imageData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/Core/Command/NormalizeImagesPathsCommand.php + + - + message: '#^Instanceof between Ibexa\\Core\\Search\\Common\\Indexer and Ibexa\\Core\\Search\\Common\\Indexer will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/bundle/Core/Command/ReindexCommand.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\Command\\ReindexCommand\:\:getPhpPath\(\) should return string but returns string\|true\.$#' + identifier: return.type + count: 1 + path: src/bundle/Core/Command/ReindexCommand.php + + - + message: '#^PHPDoc tag @return with type string is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: src/bundle/Core/DependencyInjection/Configuration/ConfigResolver.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerInterface is not subtype of native type Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\Contextualizer\.$#' + identifier: return.phpDocType + count: 1 + path: src/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessor.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\:\:handleUrlChecker\(\) has parameter \$config with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/Core/DependencyInjection/IbexaCoreExtension.php + + - + message: '#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/bundle/Core/EventListener/ConfigScopeListener.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Bundle\\Core\\EventListener\\ConfigScopeListener\:\:\$viewManager with type Ibexa\\Core\\MVC\\Symfony\\SiteAccess\\SiteAccessAware\|Ibexa\\Core\\MVC\\Symfony\\View\\ViewManagerInterface is not subtype of native type Ibexa\\Core\\MVC\\Symfony\\View\\ViewManagerInterface\.$#' + identifier: property.phpDocType + count: 1 + path: src/bundle/Core/EventListener/ConfigScopeListener.php + + - + message: '#^Parameter \#2 \$trustedHeaderSet of static method Symfony\\Component\\HttpFoundation\\Request\:\:setTrustedProxies\(\) expects int\<0, 63\>, int given\.$#' + identifier: argument.type + count: 1 + path: src/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriber.php + + - + message: '#^Property Ibexa\\Bundle\\Core\\Features\\Context\\BasicContentContext\:\:\$contentPaths type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/Core/Features/Context/BasicContentContext.php + + - + message: '#^Parameter \#1 \$string of function trim expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/bundle/Core/Features/Context/ConsoleContext.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinitionCreateStruct\:\:\$position \(int\) does not accept float\|int\.$#' + identifier: assign.propertyType + count: 1 + path: src/bundle/Core/Features/Context/FieldTypeContext.php + + - + message: '#^Result of method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createContent\(\) \(void\) is used\.$#' + identifier: method.void + count: 1 + path: src/bundle/Core/Features/Context/FieldTypeContext.php + + - + message: '#^Result of method Ibexa\\Bundle\\Core\\Features\\Context\\FieldTypeContext\:\:createField\(\) \(void\) is used\.$#' + identifier: method.void + count: 2 + path: src/bundle/Core/Features/Context/FieldTypeContext.php + + - + message: '#^Left side of && is always true\.$#' + identifier: booleanAnd.leftAlwaysTrue + count: 1 + path: src/bundle/Core/Features/Context/UserContext.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\User is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 3 + path: src/bundle/Core/Features/Context/UserContext.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\IbexaCoreBundle\:\:getContainerExtension\(\) never returns null so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: src/bundle/Core/IbexaCoreBundle.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\IbexaCoreBundle\:\:getContainerExtension\(\) should return Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface\|null but returns Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface\|false\.$#' + identifier: return.type + count: 1 + path: src/bundle/Core/IbexaCoreBundle.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistry\:\:\$providers with type Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProvider is incompatible with native type array\.$#' + identifier: property.phpDocType + count: 1 + path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php + + - + message: '#^Property Ibexa\\Bundle\\Core\\Imagine\\PlaceholderProviderRegistry\:\:\$providers type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/Core/Imagine/PlaceholderProviderRegistry.php + + - + message: '#^Method Ibexa\\Bundle\\Core\\Imagine\\VariationPurger\\LegacyStorageImageFileList\:\:key\(\) should return int but returns int\|null\.$#' + identifier: return.type + count: 1 + path: src/bundle/Core/Imagine/VariationPurger/LegacyStorageImageFileList.php + + - + message: '#^Class Ibexa\\Bundle\\Core\\Routing\\DefaultRouter extends @final class Symfony\\Bundle\\FrameworkBundle\\Routing\\Router\.$#' + identifier: class.extendsFinalByPhpDoc + count: 1 + path: src/bundle/Core/Routing/DefaultRouter.php + + - + message: '#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 2 + path: src/bundle/IO/Command/MigrateFilesCommand.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:\$configuredBinarydataHandlers with type mixed is not subtype of native type array\.$#' + identifier: property.phpDocType + count: 1 + path: src/bundle/IO/Command/MigrateFilesCommand.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:\$configuredMetadataHandlers with type mixed is not subtype of native type array\.$#' + identifier: property.phpDocType + count: 1 + path: src/bundle/IO/Command/MigrateFilesCommand.php + + - + message: '#^Property Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:\$configuredBinarydataHandlers type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/IO/Command/MigrateFilesCommand.php + + - + message: '#^Property Ibexa\\Bundle\\IO\\Command\\MigrateFilesCommand\:\:\$configuredMetadataHandlers type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/bundle/IO/Command/MigrateFilesCommand.php + + - + message: '#^Method Ibexa\\Bundle\\LegacySearchEngine\\IbexaLegacySearchEngineBundle\:\:getContainerExtension\(\) should return Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface\|null but returns Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface\|false\.$#' + identifier: return.type + count: 1 + path: src/bundle/LegacySearchEngine/IbexaLegacySearchEngineBundle.php + + - + message: '#^Instanceof between Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo will always evaluate to true\.$#' + identifier: instanceof.alwaysTrue + count: 1 + path: src/contracts/Repository/Values/Content/DraftList/Item/ContentDraftListItem.php + + - + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type + count: 1 + path: src/contracts/Repository/Values/Content/Search/AggregationResult/RangeAggregationResult.php + + - + message: '#^Parameter \#1 \$value of function count expects array\|Countable, iterable\ given\.$#' + identifier: argument.type + count: 1 + path: src/contracts/Repository/Values/Content/Search/AggregationResult/TermAggregationResult.php + + - + message: '#^Cannot call method getFixtures\(\) on Symfony\\Component\\HttpKernel\\KernelInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/contracts/Test/IbexaKernelTestCase.php + + - + message: '#^Cannot call method getSchemaFiles\(\) on Symfony\\Component\\HttpKernel\\KernelInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/contracts/Test/IbexaKernelTestCase.php + + - + message: '#^Parameter \#1 \$object of function get_class expects object, Symfony\\Component\\HttpKernel\\KernelInterface\|null given\.$#' + identifier: argument.type + count: 1 + path: src/contracts/Test/IbexaKernelTestCase.php + + - + message: '#^Method Ibexa\\Contracts\\Core\\Test\\Repository\\SetupFactory\:\:getRepository\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: src/contracts/Test/Repository/SetupFactory.php + + - + message: '#^Instantiated class Symfony\\Bridge\\ProxyManager\\LazyProxy\\PhpDumper\\ProxyDumper not found\.$#' + identifier: class.notFound + count: 1 + path: src/lib/Base/ServiceContainer.php + + - + message: '#^Method Ibexa\\Core\\Base\\ServiceContainer\:\:getRepository\(\) should return Ibexa\\Contracts\\Core\\Repository\\Repository\|null but returns object\.$#' + identifier: return.type + count: 1 + path: src/lib/Base/ServiceContainer.php + + - + message: '#^Parameter \#1 \$proxyDumper of method Symfony\\Component\\DependencyInjection\\Dumper\\PhpDumper\:\:setProxyDumper\(\) expects Symfony\\Component\\DependencyInjection\\LazyProxy\\PhpDumper\\DumperInterface, Symfony\\Bridge\\ProxyManager\\LazyProxy\\PhpDumper\\ProxyDumper given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Base/ServiceContainer.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\FieldType\\ValidationError\|null is not subtype of native type Ibexa\\Core\\FieldType\\ValidationError\|null\.$#' + identifier: return.phpDocType + count: 2 + path: src/lib/FieldType/Author/Type.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\FieldType\\BinaryBase\\BinaryBaseStorage\:\:deleteFieldData\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:deleteFieldData\(\)$#' + identifier: method.childReturnType + count: 2 + path: src/lib/FieldType/BinaryBase/BinaryBaseStorage.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\Date\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/Date/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Date/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type int\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Date/Type.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\Date\\Value is not subtype of native type static\(Ibexa\\Core\\FieldType\\Date\\Value\)\.$#' + identifier: return.phpDocType + count: 2 + path: src/lib/FieldType/Date/Value.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\DateAndTime\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/DateAndTime/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/DateAndTime/Type.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\DateAndTime\\Value is not subtype of native type static\(Ibexa\\Core\\FieldType\\DateAndTime\\Value\)\.$#' + identifier: return.phpDocType + count: 2 + path: src/lib/FieldType/DateAndTime/Value.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\FieldTypeRegistry\:\:getConcreteFieldTypesIdentifiers\(\) should return array\ but returns array\\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/FieldType/FieldTypeRegistry.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\ISBN\\Type\:\:validateISBN13Checksum\(\) has parameter \$isbnNr with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/ISBN/Type.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\ISBN\\Type\:\:validateISBNChecksum\(\) has parameter \$isbnNr with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/ISBN/Type.php + + - + message: '#^Parameter \#1 \$string of function strlen expects string, array\|string given\.$#' + identifier: argument.type + count: 2 + path: src/lib/FieldType/ISBN/Type.php + + - + message: '#^Parameter \#1 \$string of function strtoupper expects string, array\|string\|null given\.$#' + identifier: argument.type + count: 1 + path: src/lib/FieldType/ISBN/Type.php + + - + message: '#^Parameter \#1 \$string of function substr expects string, array\|string given\.$#' + identifier: argument.type + count: 3 + path: src/lib/FieldType/ISBN/Type.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\FieldType\\Image\\ImageStorage\:\:deleteFieldData\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:deleteFieldData\(\)$#' + identifier: method.childReturnType + count: 2 + path: src/lib/FieldType/Image/ImageStorage.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\Image\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/Image/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Image/Type.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\FieldType\\MapLocation\\MapLocationStorage\:\:deleteFieldData\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:deleteFieldData\(\)$#' + identifier: method.childReturnType + count: 2 + path: src/lib/FieldType/MapLocation/MapLocationStorage.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\MapLocation\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/MapLocation/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/MapLocation/Type.php + + - + message: '#^Property Ibexa\\Core\\FieldType\\Media\\Type\:\:\$availableTypes type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/Media/Type.php + + - + message: '#^PHPDoc tag @return with type bool\|null is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/NullStorage.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\Relation\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/Relation/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Relation/Type.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\RelationList\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/RelationList/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/RelationList/Type.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\Time\\Value is not subtype of native type static\(Ibexa\\Core\\FieldType\\Time\\Value\)\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Time/Value.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\Url\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/Url/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/Url/Type.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\FieldType\\Url\\UrlStorage\:\:deleteFieldData\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\FieldType\\FieldStorage\:\:deleteFieldData\(\)$#' + identifier: method.childReturnType + count: 2 + path: src/lib/FieldType/Url/UrlStorage.php + + - + message: '#^Access to an undefined property Ibexa\\Core\\FieldType\\Value\:\:\$passwordHashType\.$#' + identifier: property.notFound + count: 1 + path: src/lib/FieldType/User/Type.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\User\\Type\:\:toHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/FieldType/User/Type.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/FieldType/User/Type.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:fetchUserData\(\) should return array\{contentId\: int\|null, login\: string\|null, email\: string\|null, passwordHash\: string\|null, passwordHashType\: string\|null, passwordUpdatedAt\: int\|null\} but returns array\{\}\|array\{contentId\?\: int\|null, login\?\: string\|null, email\?\: string\|null, passwordHash\?\: string\|null, passwordHashType\?\: string\|null, passwordUpdatedAt\?\: int\|null\}\.$#' + identifier: return.type + count: 1 + path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php + + - + message: '#^Method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\\DoctrineStorage\:\:fetchUserSettings\(\) should return array\{enabled\: bool, maxLogin\: int\|null\} but returns array\{\}\|array\{contentId\?\: int\|null, login\?\: string\|null, email\?\: string\|null, passwordHash\?\: string\|null, passwordHashType\?\: string\|null, passwordUpdatedAt\?\: int\|null\}\.$#' + identifier: return.type + count: 1 + path: src/lib/FieldType/User/UserStorage/Gateway/DoctrineStorage.php + + - + message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:getPreviewedContent\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/Helper/ContentPreviewHelper.php + + - + message: '#^Method Ibexa\\Core\\Helper\\ContentPreviewHelper\:\:getPreviewedLocation\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/Helper/ContentPreviewHelper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\MatchNone\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/BlockingLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\BlockingLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/BlockingLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/BlockingLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ContentTypeId\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ContentTypeLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LocationId\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/LocationLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\LocationLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/LocationLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewObjectStateLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\NewObjectStateLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewObjectStateLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewObjectStateLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewSectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\NewSectionLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewSectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/NewSectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LogicalAnd\|Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\ObjectStateId\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ObjectStateLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ObjectStateLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ObjectStateLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\UserMetadata\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/OwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\OwnerLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/OwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/OwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentContentTypeLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentContentTypeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentDepthLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentDepthLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentDepthLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentDepthLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentOwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentOwnerLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentOwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentOwnerLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentUserGroupLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentUserGroupLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentUserGroupLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/ParentUserGroupLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\SectionId\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\SectionLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SectionLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SiteAccessLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\SiteAccessLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SiteAccessLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SiteAccessLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/StatusLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\StatusLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/StatusLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/StatusLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Core\\Repository\\Values\\Content\\Query\\Criterion\\PermissionSubtree\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SubtreeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/SubtreeLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\CriterionInterface is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\UserMetadata\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/UserGroupLimitationType.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\UserGroupLimitation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/UserGroupLimitationType.php + + - + message: '#^PHPDoc tag @return with type array\\|int is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Limitation/UserGroupLimitationType.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Controller\\Content\\ViewController\:\:handleViewException\(\) has parameter \$params with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/MVC/Symfony/Controller/Content/ViewController.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Event\\APIContentExceptionEvent\:\:getContentView\(\) should return Ibexa\\Core\\MVC\\Symfony\\View\\View but returns Ibexa\\Core\\MVC\\Symfony\\View\\View\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/MVC/Symfony/Event/APIContentExceptionEvent.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\ExpressionLanguage\\ExpressionLanguage\:\:__construct\(\) has parameter \$providers with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/MVC/Symfony/ExpressionLanguage/ExpressionLanguage.php + + - + message: '#^PHPDoc tag @return with type bool is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/MVC/Symfony/Matcher/ContentBased/UrlAlias.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest is not subtype of native type static\(Ibexa\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest\)\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/MVC/Symfony/Routing/SimplifiedRequest.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\Security\\User\:\:getUserIdentifier\(\) should return non\-empty\-string but returns string\.$#' + identifier: return.type + count: 1 + path: src/lib/MVC/Symfony/Security/User.php + + - + message: '#^Cannot access property \$name on Ibexa\\Core\\MVC\\Symfony\\SiteAccess\|null\.$#' + identifier: property.nonObject + count: 1 + path: src/lib/MVC/Symfony/SiteAccess/SiteAccessService.php + + - + message: '#^If condition is always true\.$#' + identifier: if.alwaysTrue + count: 2 + path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\|null is not subtype of native type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/MVC/Symfony/Templating/Twig/Extension/ContentExtension.php + + - + message: '#^Property Ibexa\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtension\:\:\$suffixes type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtension.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\BaseView\:\:getControllerReference\(\) should return Symfony\\Component\\HttpKernel\\Controller\\ControllerReference but returns Symfony\\Component\\HttpKernel\\Controller\\ControllerReference\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/MVC/Symfony/View/BaseView.php + + - + message: '#^PHPDoc tag @param for parameter \$contentId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 2 + path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\MVC\\Symfony\\View\\View is not subtype of native type Ibexa\\Core\\MVC\\Symfony\\View\\ContentView\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/MVC/Symfony/View/Builder/ContentViewBuilder.php + + - + message: '#^Method Ibexa\\Core\\MVC\\Symfony\\View\\ContentView\:\:getContent\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/MVC/Symfony/View/ContentView.php + + - + message: '#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: src/lib/MVC/Symfony/View/CustomLocationControllerChecker.php + + - + message: '#^Offset string might not exist on array\\|null\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/MVC/Symfony/View/GenericVariableProviderRegistry.php + + - + message: '#^Offset mixed might not exist on array\\>\|null\.$#' + identifier: offsetAccess.notFound + count: 1 + path: src/lib/MVC/Symfony/View/Provider/Registry.php + + - + message: '#^Parameter \#1 \$array of function array_keys expects array, array\\>\|null given\.$#' + identifier: argument.type + count: 1 + path: src/lib/MVC/Symfony/View/Provider/Registry.php + + - + message: '#^Binary operation "\+" between float\|string and float\|int results in an error\.$#' + identifier: binaryOp.invalid + count: 1 + path: src/lib/Persistence/Cache/InMemory/InMemoryCache.php + + - + message: '#^Parameter \#1 \$languageCode of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:deleteTranslatedFields\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/Legacy/Content/FieldHandler.php + + - + message: '#^Caught class Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\PDOException not found\.$#' + identifier: class.notFound + count: 1 + path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + + - + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\\ExceptionConversion\:\:loadVersionNoArchivedWithin\(\) should return array\ but returns array\\>\.$#' + identifier: return.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Gateway/ExceptionConversion.php + + - + message: '#^PHPDoc tag @return with type bool is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 2 + path: src/lib/Persistence/Legacy/Content/Handler.php + + - + message: '#^Parameter \#1 \$contentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler\:\:loadContentInfo\(\) expects int, int\|string given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Handler.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:deleteContent\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler\:\:deleteContent\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/lib/Persistence/Legacy/Content/Handler.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler\:\:deleteVersion\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Handler\:\:deleteVersion\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/lib/Persistence/Legacy/Content/Handler.php + + - + message: '#^Dead catch \- Doctrine\\DBAL\\Exception is never thrown in the try block\.$#' + identifier: catch.neverThrown + count: 8 + path: src/lib/Persistence/Legacy/Content/Location/Gateway/ExceptionConversion.php + + - + message: '#^PHPDoc tag @return with type bool is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 2 + path: src/lib/Persistence/Legacy/Content/Location/Handler.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:removeSubtree\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:removeSubtree\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/lib/Persistence/Legacy/Content/Location/Handler.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler\:\:swap\(\) should be compatible with return type \(bool\) of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:swap\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/lib/Persistence/Legacy/Content/Location/Handler.php + + - + message: '#^PHPDoc tag @param for parameter \$contentId with type int\|string is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @param for parameter \$contentId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @param for parameter \$locationId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @param for parameter \$sectionId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @param for parameter \$status with type mixed is not subtype of native type int\|null\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @return with type bool is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^Parameter \#1 \$rows of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionedNameData\(\) expects list\\>, non\-empty\-array\ given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/TreeHandler.php + + - + message: '#^PHPDoc tag @param for parameter \$contentTypeId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater.php + + - + message: '#^Parameter \#1 \$rows of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionedNameData\(\) expects list\\>, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddField.php + + - + message: '#^Parameter \#1 \$rows of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway\:\:loadVersionedNameData\(\) expects list\\>, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveField.php + + - + message: '#^PHPDoc tag @param for parameter \$contentTypeId with type mixed is not subtype of native type int\|null\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Handler.php + + - + message: '#^Return type \(void\) of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler\:\:addFieldDefinition\(\) should be compatible with return type \(Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\FieldDefinition\) of method Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Handler\:\:addFieldDefinition\(\)$#' + identifier: method.childReturnType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Handler.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\CreateStruct\:\:\$description \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\UpdateStruct\:\:\$description \(array\\) does not accept array\\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Persistence/Legacy/Content/Type/Mapper.php + + - + message: '#^Method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:deleteCorruptedUrlAliases\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^PHPDoc tag @param for parameter \$id with type mixed is not subtype of native type int\|null\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^PHPDoc tag @param for parameter \$locationId with type mixed is not subtype of native type string\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^PHPDoc tag @param for parameter \$newParentId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^PHPDoc tag @param for parameter \$oldParentId with type mixed is not subtype of native type int\.$#' + identifier: parameter.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type int\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^Parameter \#1 \$hierarchyData of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadPathDataByHierarchy\(\) expects list\, array\, array\{id\: mixed, parent\: mixed, action\: mixed\}\> given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^Parameter \#1 \$locationId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Handler\:\:getRealAliasId\(\) expects string, int given\.$#' + identifier: argument.type + count: 2 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^Parameter \#1 \$parentId of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway\:\:loadAutogeneratedEntries\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Handler.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\:\:\$pathData \(list\\}\>\) does not accept array\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlAlias/Mapper.php + + - + message: '#^Parameter \#4 \$sortClauses of method Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlWildcard\\Gateway\:\:find\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/Content/UrlWildcard/Handler.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:\$gateways with type array\\|iterable is not subtype of native type iterable\.$#' + identifier: property.phpDocType + count: 1 + path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + + - + message: '#^Property Ibexa\\Core\\Persistence\\Legacy\\SharedGateway\\GatewayFactory\:\:\$gateways type has no value type specified in iterable type iterable\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Persistence/Legacy/SharedGateway/GatewayFactory.php + + - + message: '#^Parameter \#2 \$limitations of method Ibexa\\Core\\Persistence\\Legacy\\User\\Role\\Gateway\:\:addPolicyLimitations\(\) expects array\\>, array\|string given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/Legacy/User/Handler.php + + - + message: '#^Anonymous function never returns array so it can be removed from the return type\.$#' + identifier: return.unusedType + count: 1 + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + + - + message: '#^Parameter \#1 \$charCode of method Ibexa\\Core\\Persistence\\Utf8Converter\:\:toUTF8Character\(\) expects int, float\|int\|false given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Persistence/TransformationProcessor/PcreCompiler.php + + - + message: '#^Cannot call method consume\(\) on Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + + - + message: '#^Cannot call method getInput\(\) on Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + + - + message: '#^Cannot call method isEOF\(\) on Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + + - + message: '#^Cannot call method peek\(\) on Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerInterface\|null\.$#' + identifier: method.nonObject + count: 2 + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + + - + message: '#^Property Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecParser\:\:\$lexer \(Ibexa\\Core\\QueryType\\BuiltIn\\SortSpec\\SortSpecLexerInterface\|null\) is never assigned null so it can be removed from the property type\.$#' + identifier: property.unusedType + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/SortSpecParser.php + + - + message: '#^Strict comparison using \!\=\= between string and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/Token.php + + - + message: '#^Unreachable statement \- code above always terminates\.$#' + identifier: deadCode.unreachable + count: 1 + path: src/lib/QueryType/BuiltIn/SortSpec/Token.php + + - + message: '#^Cannot call method createContentProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 2 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createContentTypeProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createLanguageProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 2 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createLanguageProxyList\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createLocationProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 3 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createSectionProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createUserProxy\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 2 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation is not subtype of native type Ibexa\\Core\\Repository\\Values\\Content\\Relation\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/Mapper/ContentDomainMapper.php + + - + message: '#^Cannot call method createContentTypeGroupProxyList\(\) on Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapperInterface\|null\.$#' + identifier: method.nonObject + count: 1 + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\FieldDefinition is not subtype of native type Ibexa\\Core\\Repository\\Values\\ContentType\\FieldDefinition\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/Mapper/ContentTypeDomainMapper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleDraft is not subtype of native type Ibexa\\Core\\Repository\\Values\\User\\RoleDraft\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/Mapper/RoleDomainMapper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment is not subtype of native type Ibexa\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/Mapper/RoleDomainMapper.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\User\\UserRoleAssignment is not subtype of native type Ibexa\\Core\\Repository\\Values\\User\\UserRoleAssignment\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/Mapper/RoleDomainMapper.php + + - + message: '#^Property Ibexa\\Core\\Repository\\Permission\\CachedPermissionService\:\:\$permissionCriterionTs \(int\) does not accept float\|int\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Repository/Permission/CachedPermissionService.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Core\\Repository\\ProxyFactory\\ProxyDomainMapper\:\:\$proxyGenerator with type ProxyManager\\Factory\\LazyLoadingValueHolderFactory is not subtype of native type Ibexa\\Core\\Repository\\ProxyFactory\\ProxyGeneratorInterface\.$#' + identifier: property.phpDocType + count: 1 + path: src/lib/Repository/ProxyFactory/ProxyDomainMapper.php + + - + message: '#^Method Ibexa\\Core\\Repository\\RoleService\:\:loadRoleAssignment\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\User\\RoleAssignment but returns Ibexa\\Core\\Repository\\Values\\User\\UserGroupRoleAssignment\|Ibexa\\Core\\Repository\\Values\\User\\UserRoleAssignment\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/Repository/RoleService.php + + - + message: '#^Strict comparison using \!\=\= between Ibexa\\Contracts\\Core\\Persistence\\Setting\\Setting and null will always evaluate to true\.$#' + identifier: notIdentical.alwaysTrue + count: 1 + path: src/lib/Repository/SettingService.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Core\\Repository\\SiteAccessAware\\Repository\:\:\$notificationService with type Ibexa\\Core\\Repository\\NotificationService is incompatible with native type Ibexa\\Core\\Repository\\SiteAccessAware\\NotificationService\.$#' + identifier: property.phpDocType + count: 1 + path: src/lib/Repository/SiteAccessAware/Repository.php + + - + message: '#^Cannot access offset ''translations'' on array\{always\-available\: bool, translations\: array\\}\|false\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 2 + path: src/lib/Repository/URLAliasService.php + + - + message: '#^Class Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias referenced with incorrect case\: Ibexa\\Contracts\\Core\\Persistence\\Content\\URLAlias\.$#' + identifier: class.nameCase + count: 1 + path: src/lib/Repository/URLAliasService.php + + - + message: '#^Method Ibexa\\Core\\Repository\\URLAliasService\:\:selectAliasLanguageCode\(\) should return bool\|string but returns string\|null\.$#' + identifier: return.type + count: 1 + path: src/lib/Repository/URLAliasService.php + + - + message: '#^PHPDoc tag @return with type bool\|string is not subtype of native type string\|false\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Repository/URLAliasService.php + + - + message: '#^Variable \$affectedLocationIds on left side of \?\? always exists and is not nullable\.$#' + identifier: nullCoalesce.variable + count: 1 + path: src/lib/Repository/UserService.php + + - + message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getAggregationFieldName\(\) should return string\|null but returns int\|string\|false\.$#' + identifier: return.type + count: 1 + path: src/lib/Search/Common/FieldNameResolver.php + + - + message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getIndexFieldName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: src/lib/Search/Common/FieldNameResolver.php + + - + message: '#^Method Ibexa\\Core\\Search\\Common\\FieldNameResolver\:\:getSortFieldName\(\) should return false\|null but returns int\|string\|false\.$#' + identifier: return.type + count: 1 + path: src/lib/Search/Common/FieldNameResolver.php + + - + message: '#^PHPDoc tag @return with type string is incompatible with native type array\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Search/Common/FieldNameResolver.php + + - + message: '#^PHPDoc tag @return with type string\|null is not subtype of native type false\|null\.$#' + identifier: return.phpDocType + count: 1 + path: src/lib/Search/Common/FieldNameResolver.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/AbstractRandom.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentId.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/ContentName.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DateModified.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/DatePublished.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Field.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/MapLocationDistance.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionIdentifier.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/SectionName.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/ContentTypeName.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/DateTrashed.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler/Trash/UserLogin.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$totalCount \(int\<0, max\>\|null\) does not accept int\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Search/Legacy/Content/Handler.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Search\\SearchResult\\:\:\$totalCount \(int\<0, max\>\|null\) does not accept int\|null\.$#' + identifier: assign.propertyType + count: 1 + path: src/lib/Search/Legacy/Content/Handler.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Depth.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Id.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/IsMainLocation.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Path.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Priority.php + + - + message: '#^Parameter \#1 \$columnNameExpressions of method Ibexa\\Core\\Search\\Legacy\\Content\\Common\\Gateway\\SortClauseHandler\:\:getSortColumnName\(\) expects string, int given\.$#' + identifier: argument.type + count: 1 + path: src/lib/Search/Legacy/Content/Location/Gateway/SortClauseHandler/Location/Visibility.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:hasParameterProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:parameterProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\ConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainConfigResolverPassTest\:\:addResolverProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Compiler/ChainConfigResolverPassTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ChainRoutingPassTest\:\:addRouterProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Compiler/ChainRoutingPassTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\SlugConverterConfigurationPassTest\:\:configurationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Compiler/SlugConverterConfigurationPassTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Compiler\\ViewProvidersPassTest\:\:addViewProviderProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Compiler/ViewProvidersPassTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:provideSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testContainsDynamicSettings\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ComplexSettings\\ComplexSettingParserTest\:\:testParseComplexSetting\(\) has parameter \$expected with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ComplexSettings/ComplexSettingParserTest.php + + - + message: '#^Parameter \#1 \$configParsers of method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigParser\:\:setConfigParsers\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigParserTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterDefaultScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterRelativeScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ChainConfigResolverTest\:\:testGetParameterSpecificScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ChainConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\ConfigResolver\\ConfigResolverTest\:\:testGetParameterGlobalScope\(\) has parameter \$expectedValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/ConfigResolver/ConfigResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\CommonTest\:\:sessionSettingsProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/CommonTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\Parser\\ContentTest\:\:contentSettingsProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/Parser/ContentTest.php + + - + message: '#^Parameter \#1 \$containerBuilder of class Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor constructor expects Symfony\\Component\\DependencyInjection\\ContainerInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 8 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php + + - + message: '#^Parameter \#1 \$contextualizer of method Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ConfigurationProcessor\:\:setContextualizer\(\) expects Ibexa\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 3 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ConfigurationProcessorTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:fullMapConfigArrayProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:setContextualParameterProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\ContextualizerTest\:\:testSetContextualParameter\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^PHPDoc tag @return contains unresolvable type\.$#' + identifier: return.unresolvableType + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/ContextualizerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:isDynamicSettingProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserTest\:\:parseDynamicSettingProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/Configuration/SiteAccessAware/DynamicSettingParserTest.php + + - + message: '#^Cannot call method addPolicyProvider\(\) on Ibexa\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtension\|null\.$#' + identifier: method.nonObject + count: 2 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:cacheConfigurationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:repositoriesConfigurationFieldGroupsProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationFieldGroups\(\) has parameter \$expectedRepositories with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:testRepositoriesConfigurationFieldGroups\(\) has parameter \$repositories with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\DependencyInjection\\IbexaCoreExtensionTest\:\:\$siteaccessConfig type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/DependencyInjection/IbexaCoreExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\BackgroundIndexingTerminateListenerTest\:\:indexDeleteProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php + + - + message: '#^PHPDoc tag @param for parameter \$contentReturn with type PHPUnit\\Framework\\MockObject\\Stub\|null is not subtype of native type PHPUnit\\Framework\\MockObject\\Stub\\Exception\|null\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php + + - + message: '#^PHPDoc tag @param for parameter \$infoReturn with type PHPUnit\\Framework\\MockObject\\Stub is incompatible with native type PHPUnit\\Framework\\MockObject\\Stub\\Exception\|PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/bundle/Core/EventListener/BackgroundIndexingTerminateListenerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Bundle\\Core\\EventListener\\ConsoleCommandListenerTest\:\:\$testOutput with type Symfony\\Component\\Console\\Output\\Output is not subtype of native type Ibexa\\Tests\\Bundle\\Core\\EventListener\\Stubs\\TestOutput\.$#' + identifier: property.phpDocType + count: 1 + path: tests/bundle/Core/EventListener/ConsoleCommandListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:badRequestExceptionProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/ExceptionListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\ExceptionListenerTest\:\:otherExceptionProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/ExceptionListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\IndexRequestListenerTest\:\:indexPageProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/IndexRequestListenerTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertNull\(\) with void will always evaluate to false\.$#' + identifier: staticMethod.impossibleType + count: 1 + path: tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php + + - + message: '#^Result of method Ibexa\\Bundle\\Core\\EventListener\\SessionInitByPostListener\:\:onSiteAccessMatch\(\) \(void\) is used\.$#' + identifier: method.void + count: 1 + path: tests/bundle/Core/EventListener/SessionInitByPostListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SessionSetDynamicNameListenerTest\:\:testOnSiteAccessMatch\(\) has parameter \$configuredSessionStorageOptions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/SessionSetDynamicNameListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:siteAccessMatchProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventListener\\SiteAccessListenerTest\:\:testOnSiteAccessMatchSubRequest\(\) has parameter \$expectedViewParameters with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventListener/SiteAccessListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\EventSubscriber\\CrowdinRequestLocaleSubscriberTest\:\:testSetRequestsProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/EventSubscriber/CrowdinRequestLocaleSubscriberTest.php + + - + message: '#^Parameter \#2 \$trustedHeaderSet of static method Symfony\\Component\\HttpFoundation\\Request\:\:setTrustedProxies\(\) expects int\<0, 63\>, \-1 given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php + + - + message: '#^Parameter \#2 \$trustedHeaderSet of static method Symfony\\Component\\HttpFoundation\\Request\:\:setTrustedProxies\(\) expects int\<0, 63\>, int given\.$#' + identifier: argument.type + count: 1 + path: tests/bundle/Core/EventSubscriber/TrustedHeaderClientIpEventSubscriberTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Fragment\\FragmentListenerFactoryTest\:\:buildFragmentListenerProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Fragment/FragmentListenerFactoryTest.php + + - + message: '#^PHPDoc tag @param for parameter \$value with type Ibexa\\Contracts\\Core\\FieldType\\Value is not subtype of native type \(Ibexa\\Contracts\\Core\\FieldType\\Value&PHPUnit\\Framework\\MockObject\\MockObject\)\|Ibexa\\Core\\FieldType\\Image\\Value\|Ibexa\\Core\\FieldType\\TextLine\\Value\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/bundle/Core/Imagine/AliasGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:getSetOptionNoDefaulValueProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:getSetOptionWithDefaulValueProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionNoDefaultValue\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has parameter \$defaultValue with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:testGetSetOptionWithDefaultValue\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Property Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\AbstractFilterTest\:\:\$filter \(Ibexa\\Bundle\\Core\\Imagine\\Filter\\AbstractFilter\) does not accept PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: assign.propertyType + count: 1 + path: tests/bundle/Core/Imagine/Filter/AbstractFilterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\BorderFilterLoaderTest\:\:loadProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/BorderFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\CropFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/CropFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleDownOnlyFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleDownOnlyFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleExactFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleExactFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScaleFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/ScaleFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\ScalePercentFilterLoaderTest\:\:loadInvalidProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/ScalePercentFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\Filter\\Loader\\SwirlFilterLoaderTest\:\:loadWithOptionProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/Filter/Loader/SwirlFilterLoaderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:getFilePathProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\IORepositoryResolverTest\:\:resolveProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/IORepositoryResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Imagine\\PlaceholderProvider\\GenericProviderTest\:\:getPlaceholderDataProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Imagine/PlaceholderProvider/GenericProviderTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:providerGenerateNoSiteAccess\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Routing/DefaultRouterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\Routing\\DefaultRouterTest\:\:providerGenerateWithSiteAccess\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/bundle/Core/Routing/DefaultRouterTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) has invalid return type list\.$#' + identifier: class.notFound + count: 1 + path: tests/bundle/Core/URLChecker/URLCheckerTest.php + + - + message: '#^Method Ibexa\\Tests\\Bundle\\Core\\URLChecker\\URLCheckerTest\:\:createGroupedUrls\(\) should return array\\> but returns array\\>\.$#' + identifier: return.type + count: 1 + path: tests/bundle/Core/URLChecker/URLCheckerTest.php + + - + message: '#^Parameter \#1 \$collector of method Ibexa\\Bundle\\Debug\\Collector\\IbexaCoreCollector\:\:addCollector\(\) expects Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 7 + path: tests/bundle/Debug/Collector/IbexaCoreCollectorTest.php + + - + message: '#^Using nullsafe method call on non\-nullable type Symfony\\Component\\HttpFoundation\\Response\. Use \-\> instead\.$#' + identifier: nullsafe.neverNull + count: 1 + path: tests/bundle/IO/EventListener/StreamFileListenerTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\BaseCoreFieldTypeIntegrationTest\:\:getDatabaseConnection\(\) should return Doctrine\\DBAL\\Connection but returns object\|null\.$#' + identifier: return.type + count: 1 + path: tests/integration/Core/BaseCoreFieldTypeIntegrationTest.php + + - + message: '#^Parameter \#2 \$policiesData of method Ibexa\\Tests\\Integration\\Core\\Repository\\BaseTest\:\:createUserWithPolicies\(\) expects list\\}\>, array\\> given\.$#' + identifier: argument.type + count: 1 + path: tests/integration/Core/Limitation/UserGroupLimitationTest.php + + - + message: '#^Access to property \$content on an unknown class AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225\.$#' + identifier: class.notFound + count: 6 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Access to property \$reverseRelations on an unknown class AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225\.$#' + identifier: class.notFound + count: 9 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 10 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentCreateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentInfo'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentInfo will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentMetadataUpdateStruct'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentMetadataUpdateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Relation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Relation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\VersionInfo will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:createContentWithReverseRelations\(\) has invalid return type AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225\.$#' + identifier: class.notFound + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:createContentWithReverseRelations\(\) should return AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225 but returns class@anonymous/tests/integration/Core/Repository/ContentServiceTest\.php\:6892\.$#' + identifier: return.type + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentServiceTest\:\:testLoadVersionInfoByIdWithSecondParameter\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^PHPDoc tag @return with type object is not subtype of native type AnonymousClass13a5954aa9e8fdf09c5a832a6eaba225\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/ContentServiceTest.php + + - + message: '#^Access to an undefined property Ibexa\\Contracts\\Core\\Repository\\Values\\ValueObject\:\:\$fieldDefinitions\.$#' + identifier: property.notFound + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testAddFieldDefinitionAddsFieldToContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentType\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraft\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeDraftStructValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroup\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testCreateContentTypeGroupStructValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testRemoveFieldDefinitionRemovesFieldFromContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraft\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeDraftStructValues\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroup\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ContentTypeServiceTest\:\:testUpdateContentTypeGroupStructValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ContentTypeServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getMultivaluedSearchTargetValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getMultivaluedSearchTargetValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidMultivaluedSearchValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidMultivaluedSearchValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidSearchValueOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidSearchValueTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\AuthorIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/AuthorIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CheckboxIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Checkbox\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Checkbox\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/CheckboxIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidMultivaluedSearchValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidMultivaluedSearchValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidSearchValueOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidSearchValueTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\CountryIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Country\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Country\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/CountryIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateAndTimeIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\DateAndTime\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\DateAndTime\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/DateAndTimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\DateIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Date\\Value\.$#' + identifier: return.phpDocType + count: 2 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/DateIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\EmailAddressIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\EmailAddress\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\EmailAddress\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/EmailAddressIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\FloatIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Float\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/FloatIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\ISBNIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\ISBN\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\ISBN\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/ISBNIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\IntegerIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Integer\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Integer\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/IntegerIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidMultivaluedSearchValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidMultivaluedSearchValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\KeywordIntegrationTest\:\:providerForTestTruncateField\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Keyword\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Keyword\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/KeywordIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\MapLocationIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\MapLocation\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\MapLocation\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/MapLocationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Relation\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/RelationIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidMultivaluedSearchValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidMultivaluedSearchValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidSearchValueOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidSearchValueTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\RelationListIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\RelationList\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/RelationListIntegrationTest.php + + - + message: '#^Parameter \#2 \$fieldName of method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SearchBaseIntegrationTest\:\:doModifyField\(\) expects string, false\|null given\.$#' + identifier: argument.type + count: 1 + path: tests/integration/Core/Repository/FieldType/SearchBaseIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidMultivaluedSearchValuesOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidMultivaluedSearchValuesTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidSearchValueOne\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidSearchValueTwo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Selection\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Selection\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/SelectionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getAdditionallyIndexedMultivaluedFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\SelectionMultilingualIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/SelectionMultilingualIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextBlockIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\TextBlock\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\TextBlock\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/TextBlockIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TextLineIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\TextLine\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\TextLine\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/TextLineIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\TimeIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Time\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/TimeIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UrlIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type Ibexa\\Core\\FieldType\\Url\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type Ibexa\\Core\\FieldType\\Url\\Value\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/UrlIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getInvalidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:getValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:providerForTestIsEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\FieldType\\UserIntegrationTest\:\:providerForTestIsNotEmptyValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type array is incompatible with native type void\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 4 + path: tests/integration/Core/Repository/FieldType/UserIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testCreateObjectState\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectState\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\ObjectStateServiceTest\:\:testUpdateObjectStateGroup\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/ObjectStateServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21109EzIntegerTest\:\:validIntegerValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP21109EzIntegerTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP21906SearchOneContentMultipleLocationsTest\:\:searchContentQueryProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP21906SearchOneContentMultipleLocationsTest.php + + - + message: '#^Parameter \#1 \$contentType of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:newContentCreateStruct\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentType, Ibexa\\Contracts\\Core\\Repository\\Values\\ContentType\\ContentTypeDraft\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/integration/Core/Repository/Regression/EZP22408DeleteRelatedObjectTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:searchContentQueryProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:searchContentQueryWithInvalidDataProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtree\(\) has parameter \$pathString with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\EZP22958SearchSubtreePathstringFormatTest\:\:testSearchContentSubtreeShouldThrowException\(\) has parameter \$pathString with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/EZP22958SearchSubtreePathstringFormatTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Regression\\PureNegativeQueryTest\:\:providerForTestMatchAll\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php + + - + message: '#^PHPDoc tag @param for parameter \$criterion with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion is incompatible with native type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LogicalAnd\|Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LogicalOr\.$#' + identifier: parameter.phpDocType + count: 4 + path: tests/integration/Core/Repository/Regression/PureNegativeQueryTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRole\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/RoleServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testCreateRoleWithPolicy\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/RoleServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/RoleServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\RoleServiceTest\:\:testRoleCreateStructValuesWithPolicy\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/RoleServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getCaseInsensitiveSearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getContentQuerySearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getFilterContentSearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getLocationQuerySearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getRelationFieldFilterSearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSeedsForRandomSortClause\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:getSortedLocationSearches\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestMultilingualFieldFilter\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:providerForTestMultilingualFieldSort\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContent\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentInfo\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortContentLocations\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindAndSortLocations\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFieldFiltersCaseSensitivity\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentFiltered\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindContentInfoFiltered\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsContentFiltered\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindLocationsFieldFiltersCaseSensitivity\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldContentInfoFiltered\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testFindRelationFieldLocationsFiltered\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContent\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentInfo\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryContentLocations\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTest\:\:testQueryLocations\(\) has parameter \$queryData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Property Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\ContentCreateStruct\:\:\$mainLanguageCode \(string\) does not accept string\|null\.$#' + identifier: assign.propertyType + count: 1 + path: tests/integration/Core/Repository/SearchServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SearchServiceTranslationLanguageFallbackTest\:\:createContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 1 + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php + + - + message: '#^Parameter \#2 \$mainLanguageCode of method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:newContentCreateStruct\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 1 + path: tests/integration/Core/Repository/SearchServiceTranslationLanguageFallbackTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\SettingServiceTest\:\:testCreateSetting\(\) has parameter \$value with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/SettingServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:dataProviderForFindUrlsWithSorting\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/URLServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\URLServiceTest\:\:dataProviderForFindUsages\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/URLServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\Values\\User\\Limitation\\RolePolicyLimitationTest\:\:providerForTestRolePoliciesWithOverlappingLimitations\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/integration/Core/Repository/Values/User/Limitation/RolePolicyLimitationTest.php + + - + message: '#^Parameter \#1 \$fieldId of method Ibexa\\Core\\FieldType\\User\\UserStorage\\Gateway\:\:getFieldData\(\) expects int, int\|null given\.$#' + identifier: argument.type + count: 1 + path: tests/integration/Core/User/UserStorage/UserStorageGatewayTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Author\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/AuthorTest.php + + - + message: '#^Call to function is_array\(\) with \*NEVER\* will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Call to function is_object\(\) with Ibexa\\Contracts\\Core\\FieldType\\Value will always evaluate to true\.$#' + identifier: function.alreadyNarrowedType + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with arguments \*NEVER\*, mixed and ''fromHash\(\) method…'' will always evaluate to false\.$#' + identifier: staticMethod.impossibleType + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:assertIsValidHashValue\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:assertIsValidHashValue\(\) has parameter \$keyChain with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:doValidate\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:doValidate\(\) has parameter \$fieldDefinitionData with no type specified\.$#' + identifier: missingType.parameter + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:getFieldDefinitionMock\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideDataForGetName\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInputForFromHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInputForToHash\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInvalidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideValidDataForValidate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideValidFieldSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideValidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testFieldSettingsFromHash\(\) has parameter \$inputSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testFieldSettingsToHash\(\) has parameter \$inputSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testGetName\(\) has parameter \$fieldSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testToHash\(\) has parameter \$expectedResult with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateFieldSettingsInvalid\(\) has parameter \$inputSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateFieldSettingsValid\(\) has parameter \$inputSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateInvalid\(\) has parameter \$errors with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateInvalid\(\) has parameter \$fieldDefinitionData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateValid\(\) has parameter \$fieldDefinitionData with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateValidatorConfigurationInvalid\(\) has parameter \$inputConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidateValidatorConfigurationValid\(\) has parameter \$inputConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidatorConfigurationFromHash\(\) has parameter \$inputConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:testValidatorConfigurationToHash\(\) has parameter \$inputConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^PHPDoc tag @param for parameter \$inputConfiguration with type mixed is not subtype of native type array\.$#' + identifier: parameter.phpDocType + count: 4 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^PHPDoc tag @param for parameter \$inputSettings with type mixed is not subtype of native type array\.$#' + identifier: parameter.phpDocType + count: 2 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^PHPDoc tag @param for parameter \$inputValue with type mixed is not subtype of native type Ibexa\\Contracts\\Core\\FieldType\\Value\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^PHPDoc tag @param references unknown parameter\: \$inputConfiguration$#' + identifier: parameter.notFound + count: 2 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^PHPDoc tag @var has invalid value \(\|\\PHPUnit\\Framework\\MockObject\\MockObject \$fieldDefinitionMock\)\: Unexpected token "\|", expected type at offset 9 on line 1$#' + identifier: phpDoc.parseError + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Parameter \#1 \$expected of static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) contains unresolvable type\.$#' + identifier: argument.unresolvableType + count: 2 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Property Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:\$fieldTypeUnderTest \(Ibexa\\Contracts\\Core\\FieldType\\FieldType\) in isset\(\) is not nullable\.$#' + identifier: isset.property + count: 1 + path: tests/lib/FieldType/BaseFieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:getBlackListValidatorMock\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:getConfigResolverMock\(\) has no return type specified\.$#' + identifier: missingType.return + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:getSettingsSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:getValidatorConfigurationSchemaExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:provideInvalidInputForAcceptValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:provideInvalidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:provideValidValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^Property Ibexa\\Tests\\Core\\FieldType\\BinaryBaseTestCase\:\:\$blackListedExtensions has no type specified\.$#' + identifier: missingType.property + count: 1 + path: tests/lib/FieldType/BinaryBaseTestCase.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Checkbox\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/CheckboxTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Country\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/CountryTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\DateAndTimeTest\:\:testTimeStringFromHash\(\) has parameter \$inputHash with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/DateAndTimeTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Date\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/DateTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\EmailAddress\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/EmailAddressTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:providerForTestApplyDefaultSettings\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:providerForTestApplyDefaultValidatorConfiguration\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettings\(\) has parameter \$expectedSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultSettings\(\) has parameter \$initialSettings with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfiguration\(\) has parameter \$expectedConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeMockTest\:\:testApplyDefaultValidatorConfiguration\(\) has parameter \$initialConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeMockTest.php + + - + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\FieldType\\FieldType\:\:valuesEqual\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/FieldType/FieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FieldTypeTestCase\:\:provideInputForValuesEqual\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FieldTypeTestCase.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateConstraintsKO\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateConstraintsOK\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateKO\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:providerForValidateOK\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsCorrectValues\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$constraints with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$expectedMessages with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateConstraintsWrongValues\(\) has parameter \$values with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has parameter \$message with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\FileSizeValidatorTest\:\:testValidateWrongValues\(\) has parameter \$values with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/FileSizeValidatorTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Float\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/FloatTest.php + + - + message: '#^Return type \(Ibexa\\Tests\\Core\\FieldType\\Generic\\Stubs\\Type\) of method Ibexa\\Tests\\Core\\FieldType\\Generic\\GenericTest\:\:createFieldTypeUnderTest\(\) should be compatible with return type \(Ibexa\\Core\\FieldType\\FieldType\) of method Ibexa\\Tests\\Core\\FieldType\\BaseFieldTypeTestCase\:\:createFieldTypeUnderTest\(\)$#' + identifier: method.childReturnType + count: 1 + path: tests/lib/FieldType/Generic/GenericTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\ISBN\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/ISBNTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\PathGenerator\\LegacyPathGeneratorTest\:\:provideStoragePathForFieldData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\FieldType\\Image\\PathGenerator\\LegacyPathGeneratorTest\:\:testGetStoragePathForField\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php + + - + message: '#^PHPDoc tag @param for parameter \$data with type mixed is not subtype of native type array\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php + + - + message: '#^PHPDoc tag @param for parameter \$expectedPath with type mixed is not subtype of native type string\.$#' + identifier: parameter.phpDocType + count: 1 + path: tests/lib/FieldType/Image/PathGenerator/LegacyPathGeneratorTest.php + + - + message: '#^Parameter \#1 \$fieldValue of method Ibexa\\Core\\FieldType\\ImageAsset\\Type\:\:getRelations\(\) expects Ibexa\\Core\\FieldType\\ImageAsset\\Value, Ibexa\\Core\\FieldType\\Value given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/FieldType/ImageAssetTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Image\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/ImageTest.php + + - + message: '#^Parameter \#1 \$validators of class Ibexa\\Core\\FieldType\\Image\\Type constructor expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/FieldType/ImageTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Integer\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/IntegerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Keyword\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/KeywordTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\MapLocation\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/MapLocationTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Media\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/MediaTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Selection\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/SelectionTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Time\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/TimeTest.php + + - + message: '#^Parameter \#1 \$ids of method Ibexa\\Core\\FieldType\\Url\\UrlStorage\\Gateway\:\:getIdUrlMap\(\) expects array\, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/FieldType/Url/Gateway/DoctrineStorageTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\FieldType\\FieldType is not subtype of native type Ibexa\\Core\\FieldType\\Url\\Type\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/FieldType/UrlTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Helper\\FieldsGroups\\ArrayTranslatorFieldsGroupsListTest\:\:getTranslatorMock\(\) should return PHPUnit\\Framework\\MockObject\\MockObject&Symfony\\Contracts\\Translation\\TranslatorInterface but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Helper/FieldsGroups/ArrayTranslatorFieldsGroupsListTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\IO\\\\BinaryFile'' and Ibexa\\Contracts\\Core\\IO\\BinaryFile will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/IO/IOMetadataHandler/FlysystemTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\IO\\\\BinaryFile'' and Ibexa\\Contracts\\Core\\IO\\BinaryFile will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\IO\\\\Values\\\\BinaryFileCreateStruct'' and Ibexa\\Core\\IO\\Values\\BinaryFileCreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/IO/IOServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\IO\\UrlDecorator\\PrefixTest\:\:provideData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/IO/UrlDecorator/PrefixTest.php + + - + message: '#^Cannot call method expects\(\) on \(Ibexa\\Core\\IO\\UrlDecorator&PHPUnit\\Framework\\MockObject\\MockObject\)\|null\.$#' + identifier: method.nonObject + count: 4 + path: tests/lib/IO/UrlRedecoratorTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion\\\\MatchNone'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\MatchNone will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/BlockingLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\BlockingLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\BlockingLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/BlockingLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion\\\\LocationId'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Query\\Criterion\\LocationId will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/Limitation/LocationLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\LocationLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\LocationLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/LocationLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\LocationLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/LocationLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\ParentContentTypeLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentContentTypeLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentContentTypeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/ParentContentTypeLimitationTypeTest.php + + - + message: '#^Argument of an invalid type array\|null supplied for foreach, only iterables are supported\.$#' + identifier: foreach.nonIterable + count: 1 + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\ParentDepthLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\ParentDepthLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\ParentDepthLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/ParentDepthLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestEvaluate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/RoleLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\RoleLimitationTypeTest\:\:providerForTestValidateError\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/RoleLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SectionLimitationTypeTest\:\:testEvaluate\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/SectionLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\SiteAccessLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\SiteAccessLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/SiteAccessLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\StatusLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\StatusLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/StatusLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion\\\\Subtree'' and Ibexa\\Core\\Repository\\Values\\Content\\Query\\Criterion\\PermissionSubtree will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\User\\\\Limitation\\\\SubtreeLimitation'' and Ibexa\\Contracts\\Core\\Repository\\Values\\User\\Limitation\\SubtreeLimitation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query\\\\Criterion\\\\PermissionSubtree'' and Ibexa\\Core\\Repository\\Values\\Content\\Query\\Criterion\\PermissionSubtree will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Limitation\\SubtreeLimitationTypeTest\:\:testEvaluateInvalidArgument\(\) has parameter \$targets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Limitation/SubtreeLimitationTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\Relation\\ParameterProviderTest\:\:providerForTestGetViewParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/FieldType/Relation/ParameterProviderTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\RelationList\\ParameterProviderTest\:\:providerForTestGetViewParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/FieldType/RelationList/ParameterProviderTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProviderTest\:\:providerForTestGetViewParameters\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php + + - + message: '#^Parameter \#1 \$localeConverter of class Ibexa\\Core\\MVC\\Symfony\\FieldType\\View\\ParameterProvider\\LocaleParameterProvider constructor expects Ibexa\\Core\\MVC\\Symfony\\Locale\\LocaleConverterInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/MVC/Symfony/FieldType/View/ParameterProvider/LocaleParameterProviderTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\DepthTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/DepthTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ContentTypeTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ContentTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\LocationTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/LocationTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentContentTypeTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentContentTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\ParentLocationTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/ParentLocationTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\RemoteTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/RemoteTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:matchContentInfoProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Id\\SectionTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Id/SectionTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\ParentContentTypeTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/ParentContentTypeTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\Identifier\\SectionTest\:\:matchSectionProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/Identifier/SectionTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:getRepository\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:getValues\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:setMatchingConfig\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:setRepository\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php + + - + message: '#^Call to function is_array\(\) with string will always evaluate to false\.$#' + identifier: function.impossibleType + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/MultipleValuedTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:matchLocationProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:setMatchingConfigProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\ContentBased\\UrlAliasTest\:\:testSetMatchingConfig\(\) has parameter \$matchingConfig with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/ContentBased/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$matchedConfig with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Matcher\\DynamicallyConfiguredMatcherFactoryDecoratorTest\:\:testMatch\(\) has parameter \$viewsConfiguration with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Matcher/DynamicallyConfiguredMatcherFactoryDecoratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\GeneratorTest\:\:generateProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/GeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\RouteReferenceGeneratorTest\:\:generateGenerator\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/RouteReferenceGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequestTest\:\:fromUrlProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/SimplifiedRequestTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerateRootLocation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestDoGenerateWithSiteaccess\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasGeneratorTest\:\:providerTestIsPrefixExcluded\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/UrlAliasGeneratorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Routing\\UrlAliasRouterTest\:\:providerTestSupports\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Routing/UrlAliasRouterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:checkRequestPathProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:generateUriProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\HttpUtilsTest\:\:generateUriStandardProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/HttpUtilsTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:supportsAttributeProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:supportsClassProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:testSupportsAttribute\(\) has parameter \$attribute with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:voteInvalidAttributeProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\CoreVoterTest\:\:voteProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Parameter \#1 \$attribute of method Ibexa\\Core\\MVC\\Symfony\\Security\\Authorization\\Voter\\CoreVoter\:\:supportsAttribute\(\) expects string, array\|Ibexa\\Core\\MVC\\Symfony\\Security\\Authorization\\Attribute\|stdClass\|string given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/CoreVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:supportsAttributeProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:supportsClassProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:voteInvalidAttributeProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Security\\Voter\\ValueObjectVoterTest\:\:voteProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Security/Voter/ValueObjectVoterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundAndTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundAndTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\Compound\\CompoundOrTest\:\:matchProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/Compound/CompoundOrTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterHostElementTest\:\:reverseMatchProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/RouterHostElementTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:fixupURIProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterMapURITest\:\:setRequestProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/RouterMapURITest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElement2Test\:\:analyseProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElement2Test.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\SiteAccess\\RouterURIElementTest\:\:analyseProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/SiteAccess/RouterURIElementTest.php + + - + message: '#^Parameter \#1 \$configResolver of class Ibexa\\Core\\Helper\\TranslationHelper constructor expects Ibexa\\Contracts\\Core\\SiteAccess\\ConfigResolverInterface, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php + + - + message: '#^Property Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FieldRenderingExtensionIntegrationTest\:\:\$fieldDefinitions type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FieldRenderingExtensionIntegrationTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\Templating\\Twig\\Extension\\FileSizeExtensionTest\:\:getLocale\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php + + - + message: '#^PHPDoc tag @return with type string is incompatible with native type array\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/MVC/Symfony/Templating/Twig/Extension/FileSizeExtensionTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\MVC\\Symfony\\View\\ContentViewTest\:\:constructProvider\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/MVC/Symfony/View/ContentViewTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testClearAndInvalidation\(\) has parameter \$argument with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Cache\\Adapter\\InMemoryClearingProxyAdapterTest\:\:testDelete\(\) has parameter \$argument with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Cache/Adapter/InMemoryClearingProxyAdapterTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorTest\:\:\$cacheIdentifierGenerator with type Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface is not subtype of native type Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGenerator\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Cache/Identifier/CacheIdentifierGeneratorTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Persistence\\FieldType is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/FieldTypeRegistryTest.php + + - + message: '#^Parameter \#1 \$coreFieldTypes of class Ibexa\\Core\\Persistence\\FieldTypeRegistry constructor expects array\, array\ given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/FieldTypeRegistryTest.php + + - + message: '#^Parameter \#2 \$fieldType of method Ibexa\\Core\\Persistence\\FieldTypeRegistry\:\:register\(\) expects Ibexa\\Contracts\\Core\\FieldType\\FieldType, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/FieldTypeRegistryTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:copy\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:createDraftFromVersion\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:deleteContent\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:publish\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:updateContent\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:updateMetadata\(\)\.$#' + identifier: method.notFound + count: 3 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getContentTypeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getFieldHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getLocationGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getSlugConverterMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getTreeHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getTypeGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:getUrlAliasGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$contentTypeHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$fieldHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$locationGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$mapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$slugConverterMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverter is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$treeHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\TreeHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$typeGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ContentHandlerTest\:\:\$urlAliasGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getFieldTypeMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\FieldType&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getFieldTypeRegistryMock\(\) should return Ibexa\\Core\\Persistence\\FieldTypeRegistry&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:getStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$contentGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$fieldTypeMock with type Ibexa\\Contracts\\Core\\FieldType\\FieldType is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$fieldTypeRegistryMock with type Ibexa\\Core\\Persistence\\FieldTypeRegistry is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$mapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldHandlerTest\:\:\$storageHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:providerForTestToFieldValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:providerForTestToStorageValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToFieldValue\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\CountryTest\:\:testToStorageValue\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/CountryTest.php + + - + message: '#^Cannot access offset ''timestamp'' on array\|bool\|float\|int\|string\|null\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateAndTimeTest.php + + - + message: '#^Cannot access offset ''timestamp'' on array\|bool\|float\|int\|string\|null\.$#' + identifier: offsetAccess.nonOffsetAccessible + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/DateTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter\\ISBNTest\:\:providerForTestToFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValue/Converter/ISBNTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/FieldValueConverterRegistryTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''eng\-GB'', 2, 14, 4, ''Hello world\!'', ''eng\-GB''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{int\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getCacheIdentifierGeneratorMock\(\) should return Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getInnerLanguageHandlerMock\(\) should return Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:getLanguageCacheMock\(\) should return Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$cacheIdentifierGeneratorMock with type Ibexa\\Core\\Persistence\\Cache\\Identifier\\CacheIdentifierGeneratorInterface is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$innerHandlerMock with type Ibexa\\Contracts\\Core\\Persistence\\Content\\Language\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\CachingLanguageHandlerTest\:\:\$languageCacheMock with type Ibexa\\Core\\Persistence\\Cache\\InMemory\\InMemoryCache is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/CachingLanguageHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Language\\LanguageHandlerTest\:\:\$mapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php + + - + message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\Handler\:\:delete\(\) \(void\) is used\.$#' + identifier: method.void + count: 2 + path: tests/lib/Persistence/Legacy/Content/Language/LanguageHandlerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Persistence\\Content\\Language is incompatible with native type never\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/LanguageHandlerMock.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{0, 1\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{0\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 0, 0\}, array\{2, 0, 0\}, array\{69, 0, 0\}, array\{70, 1, 1\}, array\{71, 0, 1\}, array\{75, 0, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 0, 0\}, array\{2, 0, 0\}, array\{69, 0, 0\}, array\{75, 0, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 0, 0\}, array\{2, 0, 0\}, array\{69, 1, 1\}, array\{70, 0, 1\}, array\{71, 0, 1\}, array\{75, 0, 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 0, 0\}, array\{2, 0, 0\}, array\{69, 1, 1\}, array\{75, 0, 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{228\}, array\{228\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{228\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{2\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{65, ''/1/2/'', '''', 1, 1, 0, 0\}, array\{67, ''/1/2/77/69/'', ''solutions/products'', 77, 3, 0, 0\}, array\{68, ''/1/2/77/69/70/'', ''solutions/products…'', 69, 4, 1, 1\}, array\{69, ''/1/2/77/69/70/71/'', ''solutions/products…'', 70, 5, 0, 1\}, array\{73, ''/1/2/77/69/72/75/'', ''solutions/products…'', 72, 5, 0, 0\}, array\{75, ''/1/2/77/'', ''solutions'', 2, 2, 0, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{65, ''/1/2/'', '''', 1, 1, 0, 0\}, array\{67, ''/1/2/77/69/'', ''solutions/products'', 77, 3, 0, 0\}, array\{69, ''/1/2/77/69/70/71/'', ''solutions/products…'', 70, 5, 0, 0\}, array\{73, ''/1/2/77/69/72/75/'', ''solutions/products…'', 72, 5, 0, 0\}, array\{75, ''/1/2/77/'', ''solutions'', 2, 2, 0, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{65, ''/1/2/'', '''', 1, 1, 0, 0\}, array\{67, ''/1/2/77/69/'', ''solutions/products'', 77, 3, 0, 1\}, array\{69, ''/1/2/77/69/70/71/'', ''solutions/products…'', 70, 5, 0, 1\}, array\{73, ''/1/2/77/69/72/75/'', ''solutions/products…'', 72, 5, 0, 1\}, array\{75, ''/1/2/77/'', ''solutions'', 2, 2, 1, 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{65, ''/1/2/'', '''', 1, 1, 0, 0\}, array\{67, ''/1/2/77/69/'', ''solutions/products'', 77, 3, 1, 1\}, array\{69, ''/1/2/77/69/70/71/'', ''solutions/products…'', 70, 5, 0, 1\}, array\{73, ''/1/2/77/69/72/75/'', ''solutions/products…'', 72, 5, 0, 1\}, array\{75, ''/1/2/77/'', ''solutions'', 2, 2, 0, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{67, 1, 0, 53, 1, 5, 77, ''9cec85d730eec757819…'', \.\.\.\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{68\}, array\{69\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{70, ''/1/2/69/70/''\}, array\{77, ''/1/2/77/''\}, array\{228, ''/1/2/77/228/''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{70, 76\}, array\{78, 68\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{int\|string\}\} given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{int\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{string\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''228'', ''1'', ''/1/228/''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 0\}, array\{2, 0\}, array\{69, 0\}, array\{70, 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{71, ''/1/2/69/70/71/''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{int\|string\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTrashTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Location\\\\Trash\\\\TrashResult'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Trash\\TrashResult will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\TrashItemDeleteResultList'' and Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Trash\\TrashItemDeleteResultList will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^Cannot call method expects\(\) on PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: method.nonObject + count: 48 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:\$locationGateway with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:\$locationHandler with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Location\\TrashHandlerTest\:\:\$locationMapper with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Location/TrashHandlerTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:copySubtree\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/LocationHandlerTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\CreateStruct'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\CreateStruct will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 2 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Relation'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\Relation will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Core\\\\Persistence\\\\Legacy\\\\Content\\\\StorageFieldValue'' and Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageFieldValue will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:getValueConverterRegistryMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContent\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentBasicProperties\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldCount\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentFieldsNoId\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:testCreateCreateStructFromContentParentLocationsEmpty\(\) has parameter \$data with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\MapperTest\:\:\$valueConverterRegistryMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\ObjectState\\ObjectStateHandlerTest\:\:\$mapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\ObjectState\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/ObjectState/ObjectStateHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Section\\SectionHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php + + - + message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:assign\(\) \(void\) is used\.$#' + identifier: method.void + count: 1 + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php + + - + message: '#^Result of method Ibexa\\Core\\Persistence\\Legacy\\Content\\Section\\Handler\:\:delete\(\) \(void\) is used\.$#' + identifier: method.void + count: 2 + path: tests/lib/Persistence/Legacy/Content/Section/SectionHandlerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\FieldType\\FieldStorage is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/StorageRegistryTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:publish\(\)\.$#' + identifier: method.notFound + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:getUpdateHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$mapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentTypeHandlerTest\:\:\$updateHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentTypeHandlerTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getContentStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:getFieldValueConverterMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentMapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$contentStorageHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\AddFieldTest\:\:\$fieldValueConverterMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/AddFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:getContentStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentMapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdater\\Action\\RemoveFieldTest\:\:\$contentStorageHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdater/Action/RemoveFieldTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:getContentGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:getContentMapperMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:getContentStorageHandlerMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:getConverterRegistryMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentGatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentMapperMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$contentStorageHandlerMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\StorageHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\Type\\ContentUpdaterTest\:\:\$converterRegistryMock with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/ContentUpdaterTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\ given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''1''\}, array\{''3''\}, array\{''4''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''1''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''4''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1\}\} given\.$#' + identifier: argument.type + count: 4 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{2\}\} given\.$#' + identifier: argument.type + count: 4 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{3\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{5\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{int\|string\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/Gateway/DoctrineDatabaseTest.php + + - + message: '#^Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject\:\:extractTypesFromRows\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) with ''Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\Group'' and Ibexa\\Contracts\\Core\\Persistence\\Content\\Type\\Group will always evaluate to true\.$#' + identifier: staticMethod.alreadyNarrowedType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^Parameter \#1 \$converterRegistry of class Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 5 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^Parameter \#2 \$maskGenerator of class Ibexa\\Core\\Persistence\\Legacy\\Content\\Type\\Mapper constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Language\\MaskGenerator, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 7 + path: tests/lib/Persistence/Legacy/Content/Type/MapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:cleanupTextData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:convertData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\SlugConverterTest\:\:providerForTestGetUniqueCounterValue\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/SlugConverterTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:getExpectation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Content\\UrlAlias\\UrlAliasMapperTest\:\:providerForTestExtractUrlAliasFromData\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Persistence/Legacy/Content/UrlAlias/UrlAliasMapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Persistence\\Legacy\\Setting\\SettingHandlerTest\:\:getGatewayMock\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Persistence\\Legacy\\Setting\\SettingHandlerTest\:\:\$gatewayMock with type Ibexa\\Core\\Persistence\\Legacy\\Setting\\Gateway is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Persistence/Legacy/Setting/SettingHandlerTest.php + + - + message: '#^Parameter \#2 \$array of static method PHPUnit\\Framework\\Assert\:\:assertArrayHasKey\(\) expects array\|ArrayAccess, array\|string given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/Role/LimitationConverterTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{"3, 0\\n3, 0\\n3, 0\\n3, 0…"\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''0800fc577294c34e0b2…'', 1, 0, 42\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''0800fc577294c34e0b2…'', 1, 1234567890, 42\}\} given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''0800fc577294c34e0b2…'', 1, 2234567890, 42\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{''3'', 0\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''/1'', 1\}, array\{2, ''/1/2'', 1\}, array\{3, ''Bar'', 2\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''Changed''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''Subtree'', 1\}, array\{2, ''Foo'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''Test'', \-1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''Test'', 0\}, array\{2, ''Test'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''foo'', ''bar'', 1\}, array\{2, ''foo'', ''blubb'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, ''foo'', ''bar'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 42, 1, ''Subtree'', ''/1''\}, array\{2, 42, 1, ''Subtree'', ''/1/2''\}, array\{3, 42, 1, ''Foo'', ''Bar''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 42, 1, ''Subtree'', ''/1''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{1, 42, 1, null, null\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{2, ''foo'', ''blubb'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{3, ''Foo'', 2\}, array\{4, ''new'', 1\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{3, ''Foo'', 2\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{3\}, array\{3\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{4, 3, ''Blubb''\}, array\{5, 4, ''something''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^Parameter \#1 \$expectation of static method Ibexa\\Tests\\Core\\Persistence\\Legacy\\TestCase\:\:assertQueryResult\(\) expects list\\>, array\{array\{4, 3, ''Blubb''\}\} given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Persistence/Legacy/User/UserHandlerTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Repository\\ContentServiceTest\:\:\$contentService with type Ibexa\\Contracts\\Core\\Repository\\ContentService is not subtype of native type Ibexa\\Core\\Repository\\ContentService\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Repository/ContentServiceTest.php + + - + message: '#^Parameter \#1 \$fieldTypes of class Ibexa\\Core\\FieldType\\FieldTypeRegistry constructor expects array\, array\ given\.$#' + identifier: argument.type + count: 3 + path: tests/lib/Repository/Helper/FieldTypeRegistryTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Repository\\LocationServiceTest\:\:\$locationService with type Ibexa\\Contracts\\Core\\Repository\\LocationService is not subtype of native type Ibexa\\Core\\Repository\\LocationService\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Repository/LocationServiceTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Repository\\Mapper\\ContentLocationMapper\\InMemoryContentLocationMapperTest\:\:\$mapper with type Ibexa\\Core\\Repository\\Mapper\\ContentLocationMapper\\ContentLocationMapper is not subtype of native type Ibexa\\Core\\Repository\\Mapper\\ContentLocationMapper\\InMemoryContentLocationMapper\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Repository/Mapper/ContentLocationMapper/InMemoryContentLocationMapperTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Content is not subtype of native type Ibexa\\Core\\Repository\\Values\\Content\\Content\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Repository/NameSchema/NameSchemaServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionCriterionResolverMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:getPermissionResolverMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\CachedPermissionServiceTest\:\:providerForTestPermissionResolverPassTrough\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/CachedPermissionServiceTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getLimitationServiceMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:getPermissionResolverMock\(\) has parameter \$methods with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:providerForTestGetPermissionsCriterion\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:providerForTestGetPermissionsCriterionBooleanPermissionSets\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Permission\\PermissionCriterionResolverTest\:\:testGetPermissionsCriterion\(\) has parameter \$permissionSets with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Permission/PermissionCriterionResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:providerForBuildLocationDomainObjectsOnSearchResult\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentDomainMapperTest\:\:providerForBuildVersionInfo\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentDomainMapperTest.php + + - + message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Repository\\Repository\:\:expects\(\)\.$#' + identifier: method.notFound + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Cannot call method createContent\(\) on PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: method.nonObject + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Cannot call method updateContent\(\) on PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: method.nonObject + count: 3 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentNonRedundantFieldSet\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$existingFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentRequiredField\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$existingFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentThrowsContentFieldValidationException\(\) has parameter \$fieldDefinitions with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:fixturesForTestCreateContentNonRedundantFieldSetComplex\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:fixturesForTestUpdateContentNonRedundantFieldSetComplex\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:getContentTypeServiceMock\(\) should return Ibexa\\Contracts\\Core\\Repository\\ContentTypeService&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:getLocationServiceMock\(\) should return Ibexa\\Contracts\\Core\\Repository\\LocationService&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:getPartlyMockedContentService\(\) should return Ibexa\\Core\\Repository\\ContentService&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSet1\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSet2\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentNonRedundantFieldSetComplex\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionRequiredField\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentThrowsContentValidationExceptionTranslation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestCreateContentWithInvalidLanguage\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet1\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet2\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet3\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentNonRedundantFieldSet4\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentRequiredField\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsBadStateException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentThrowsContentValidationExceptionTranslation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:providerForTestUpdateContentWithInvalidLanguage\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:stubValues\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet1\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSet2\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentNonRedundantFieldSetComplex\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentRequiredField\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentFieldValidationException\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testCreateContentWithInvalidLanguage\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet1\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet2\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet3\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSet4\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has parameter \$spiFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentNonRedundantFieldSetComplex\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionFieldDefinition\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentThrowsContentValidationExceptionTranslation\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:testUpdateContentWithInvalidLanguage\(\) has parameter \$structFields with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^PHPDoc tag @return with type mixed is not subtype of native type array\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:\$partlyMockedContentService with type Ibexa\\Core\\Repository\\ContentService is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Parameter \#1 \$initialLanguageCode of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\ContentTest\:\:assertForTestUpdateContentNonRedundantFieldSet\(\) expects string, string\|null given\.$#' + identifier: argument.type + count: 2 + path: tests/lib/Repository/Service/Mock/ContentTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:assertLocationHandlerExpectation\(\) has parameter \$fieldRelations with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:providerForTestAppendRelations\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + + - + message: '#^Parameter \#3 \$fieldDefinitionId of method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RelationProcessorTest\:\:getStubbedRelation\(\) expects string\|null, int given\.$#' + identifier: argument.type + count: 6 + path: tests/lib/Repository/Service/Mock/RelationProcessorTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:getPartlyMockedRoleService\(\) should return Ibexa\\Core\\Repository\\RoleService&PHPUnit\\Framework\\MockObject\\MockObject but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Repository/Service/Mock/RoleTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\RoleTest\:\:\$partlyMockedRoleService with type Ibexa\\Core\\Repository\\RoleService is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Repository/Service/Mock/RoleTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:providerForFindContentValidatesLocationCriteriaAndSortClauses\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/SearchTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\SearchTest\:\:providerForFindSingleValidatesLocationCriteria\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/SearchTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesEmpty\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesPath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestListAutogeneratedLocationAliasesWithLanguageCodePath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookup\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookupThrowsNotFoundExceptionPath\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:providerForTestLookupWithSharedTranslation\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesAlwaysAvailablePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmpty\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmpty\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmpty\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesMultipleLanguagesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmpty\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailableEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeAlwaysAvailablePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmpty\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmpty\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesEmptyCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodeMultipleLanguagesPathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testListAutogeneratedLocationAliasesWithLanguageCodePathCustomConfiguration\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookup\(\) has parameter \$prioritizedLanguageList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupThrowsNotFoundExceptionPathNotMatchedOrNotLoadable\(\) has parameter \$prioritizedLanguageList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testLookupWithSharedTranslation\(\) has parameter \$prioritizedLanguageList with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupAlwaysAvailablePath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$paths with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$prioritizedLanguageCodes with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlAliasTest\:\:testReverseLookupPath\(\) has parameter \$spiUrlAliases with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlAliasTest.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$id\.$#' + identifier: property.protected + count: 13 + path: tests/lib/Repository/Service/Mock/UrlTest.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$isValid\.$#' + identifier: property.protected + count: 2 + path: tests/lib/Repository/Service/Mock/UrlTest.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$lastChecked\.$#' + identifier: property.protected + count: 2 + path: tests/lib/Repository/Service/Mock/UrlTest.php + + - + message: '#^Access to protected property Ibexa\\Contracts\\Core\\Repository\\Values\\URL\\URL\:\:\$url\.$#' + identifier: property.protected + count: 5 + path: tests/lib/Repository/Service/Mock/UrlTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlTest\:\:dateProviderForFindUsages\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestCreate\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:providerForTestCreateThrowsContentValidationException\(\) return type has no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslate\(\) has parameter \$createArray with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Repository\\Service\\Mock\\UrlWildcardTest\:\:testTranslateThrowsNotFoundException\(\) has parameter \$createArray with no value type specified in iterable type array\.$#' + identifier: missingType.iterableValue + count: 1 + path: tests/lib/Repository/Service/Mock/UrlWildcardTest.php + + - + message: '#^Cannot call method expects\(\) on \(Ibexa\\Core\\Search\\Common\\FieldNameGenerator&PHPUnit\\Framework\\MockObject\\MockObject\)\|null\.$#' + identifier: method.nonObject + count: 6 + path: tests/lib/Search/FieldNameResolverTest.php + + - + message: '#^Cannot call method expects\(\) on \(Ibexa\\Core\\Search\\Common\\FieldRegistry&PHPUnit\\Framework\\MockObject\\MockObject\)\|null\.$#' + identifier: method.nonObject + count: 6 + path: tests/lib/Search/FieldNameResolverTest.php + + - + message: '#^Method Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:getFieldRegistry\(\) should return Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry but returns PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.type + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + + - + message: '#^PHPDoc tag @var for property Ibexa\\Tests\\Core\\Search\\Legacy\\Content\\HandlerContentSortTest\:\:\$fieldRegistry with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldValue\\ConverterRegistry is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\|null\.$#' + identifier: property.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + + - + message: '#^Parameter \#4 \$contentMapper of class Ibexa\\Core\\Search\\Legacy\\Content\\Handler constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentSortTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\FieldHandler is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + + - + message: '#^Parameter \#4 \$contentMapper of class Ibexa\\Core\\Search\\Legacy\\Content\\Handler constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Mapper, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerContentTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + + - + message: '#^Parameter \#5 \$locationMapper of class Ibexa\\Core\\Search\\Legacy\\Content\\Handler constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php + + - + message: '#^PHPDoc tag @return with type Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject\.$#' + identifier: return.phpDocType + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php + + - + message: '#^Parameter \#5 \$locationMapper of class Ibexa\\Core\\Search\\Legacy\\Content\\Handler constructor expects Ibexa\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper, PHPUnit\\Framework\\MockObject\\MockObject given\.$#' + identifier: argument.type + count: 1 + path: tests/lib/Search/Legacy/Content/HandlerLocationTest.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c448982be5..d608bc9022 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -3,6 +3,7 @@ includes: - vendor/phpstan/phpstan-symfony/extension.neon - phpstan-baseline.neon - phpstan-baseline.pagerfanta.neon + - phpstan-baseline.sf7-upgrade.neon parameters: level: 8 From 3c0360017dac2ff779b1ba591e455e7b785ca258 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 28 Apr 2025 02:35:31 +0200 Subject: [PATCH 132/185] IBX-9811: [Tests] Aligned LegacyDFSClusterTest with doctrine/dbal v3 --- .../IO/IOMetadataHandler/LegacyDFSClusterTest.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php index a342351994..ac512e75bc 100644 --- a/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php +++ b/tests/lib/IO/IOMetadataHandler/LegacyDFSClusterTest.php @@ -41,6 +41,7 @@ protected function setUp(): void $this->dbalMock->method('createQueryBuilder')->willReturn($this->qbMock); $this->urlDecoratorMock = $this->createMock(UrlDecorator::class); + $this->urlDecoratorMock->method('decorate')->willReturnArgument(0); $this->handler = new LegacyDFSCluster( $this->dbalMock, @@ -158,7 +159,7 @@ public function testExistsNot(): void self::assertFalse($this->handler->exists('prefix/my/file.png')); } - public function testDeletedirectory(): void + public function testDeleteDirectory(): void { $this->urlDecoratorMock ->expects(self::once()) @@ -174,21 +175,18 @@ public function testDeletedirectory(): void $this->qbMock ->expects(self::once()) ->method('where') - ->with('name LIKE :spiPath ESCAPE :esc') + ->with('name LIKE :path_name ESCAPE :esc') ->willReturnSelf(); $this->qbMock ->expects(self::exactly(2)) ->method('setParameter') - ->withConsecutive( - [':esc', '\\'], - [':spiPath', 'prefix/images/\_alias/subfolder/%'], - ) + ->withAnyParameters() ->willReturnSelf(); $this->qbMock ->expects(self::once()) - ->method('execute') + ->method('executeStatement') ->willReturn(1); $this->handler->deleteDirectory('images/_alias/subfolder/'); @@ -243,7 +241,7 @@ private function setupQueryBuilderLoad(int $rowCount, ?array $result): void ->willReturnSelf(); $this->qbMock - ->method('execute') + ->method('executeQuery') ->willReturn($resultMock); } } From 26fe1a2366977a00eb1ab67142d46a92ddd07c32 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 28 Apr 2025 02:43:12 +0200 Subject: [PATCH 133/185] IBX-9727: [Tests] Aligned IO handlers tests with added strict types --- .../Compiler/IOConfigurationPassTest.php | 6 +-- ...stemTest.php => BaseFlysystemTestCase.php} | 26 +++------- .../BinarydataHandler/FlysystemTest.php | 12 ++++- .../MetadataHandler/LegacyDFSClusterTest.php | 37 ++++++------- ...t.php => ConfigurationFactoryTestCase.php} | 52 +++++-------------- 5 files changed, 51 insertions(+), 82 deletions(-) rename tests/bundle/IO/DependencyInjection/ConfigurationFactory/{BaseFlysystemTest.php => BaseFlysystemTestCase.php} (55%) rename tests/bundle/IO/DependencyInjection/{ConfigurationFactoryTest.php => ConfigurationFactoryTestCase.php} (60%) diff --git a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php index bde32bd420..291ca5085c 100644 --- a/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php +++ b/tests/bundle/IO/DependencyInjection/Compiler/IOConfigurationPassTest.php @@ -18,11 +18,9 @@ class IOConfigurationPassTest extends AbstractCompilerPassTestCase { - /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected ?MockObject $metadataConfigurationFactoryMock = null; + protected ConfigurationFactory & MockObject $metadataConfigurationFactoryMock; - /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory|\PHPUnit\Framework\MockObject\MockObject */ - protected ?MockObject $binarydataConfigurationFactoryMock = null; + protected ConfigurationFactory & MockObject $binarydataConfigurationFactoryMock; protected function setUp(): void { diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTestCase.php similarity index 55% rename from tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php rename to tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTestCase.php index 098248bc04..57ff78a665 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BaseFlysystemTestCase.php @@ -7,17 +7,17 @@ namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory; -use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTest; +use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTestCase; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; -abstract class BaseFlysystemTest extends ConfigurationFactoryTest +abstract class BaseFlysystemTestCase extends ConfigurationFactoryTestCase { private string $flysystemAdapterServiceId = 'oneup_flysystem.test_adapter'; private string $filesystemServiceId = 'ezpublish.core.io.flysystem.my_test_handler_filesystem'; - public function provideHandlerConfiguration() + public function provideHandlerConfiguration(): array { $this->setDefinition($this->flysystemAdapterServiceId, new Definition()); @@ -26,29 +26,17 @@ public function provideHandlerConfiguration() ]; } - public function provideParentServiceDefinition() + public function provideParentServiceDefinition(): Definition { return new Definition(null, [null]); } - public function validateConfiguredHandler($handlerDefinitionId): void + public function validateConfiguredHandler(string $handlerServiceId): void { - self::assertContainerBuilderHasServiceDefinitionWithArgument( - $handlerDefinitionId, + $this->assertContainerBuilderHasServiceDefinitionWithArgument( + $handlerServiceId, 0, new Reference($this->filesystemServiceId) ); } - - public function validateConfiguredContainer(): void - { - self::assertContainerBuilderHasService( - $this->filesystemServiceId - ); - self::assertContainerBuilderHasServiceDefinitionWithArgument( - 'ezpublish.core.io.flysystem.my_test_handler_filesystem', - 0, - new Reference($this->flysystemAdapterServiceId) - ); - } } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php index 42a641da82..70e0e3cf06 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/BinarydataHandler/FlysystemTest.php @@ -8,9 +8,10 @@ namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\BinarydataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\BinarydataHandler\Flysystem; -use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\BaseFlysystemTest; +use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\BaseFlysystemTestCase; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -class FlysystemTest extends BaseFlysystemTest +class FlysystemTest extends BaseFlysystemTestCase { public function provideTestedFactory(): Flysystem { @@ -24,4 +25,11 @@ public function provideExpectedParentServiceId(): string { return 'ibexa.core.io.binarydata_handler.flysystem'; } + + public function testAddConfiguration(): void + { + $node = new ArrayNodeDefinition('handler'); + $this->factory->addConfiguration($node); + self::assertArrayHasKey('adapter', $node->getChildNodeDefinitions()); + } } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php index 8d7ac71a44..c1020f1149 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSClusterTest.php @@ -7,25 +7,26 @@ namespace Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; -use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster; -use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTest; +use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler\LegacyDFSCluster as LegacyDFSClusterConfigurationFactory; +use Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster; +use Ibexa\Tests\Bundle\IO\DependencyInjection\ConfigurationFactoryTestCase; +use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; -class LegacyDFSClusterTest extends ConfigurationFactoryTest +class LegacyDFSClusterTest extends ConfigurationFactoryTestCase { /** * Returns an instance of the tested factory. - * - * @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory */ - public function provideTestedFactory(): LegacyDFSCluster + public function provideTestedFactory(): LegacyDFSClusterConfigurationFactory { - return new LegacyDFSCluster(); + return new LegacyDFSClusterConfigurationFactory(); } public function provideExpectedParentServiceId(): string { - return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; + return LegacyDFSCluster::class; } public function provideParentServiceDefinition(): Definition @@ -38,19 +39,19 @@ public function provideHandlerConfiguration(): array return ['connection' => 'doctrine.dbal.test_connection']; } - /** - * Lets you test the handler definition after it was configured. - * - * Use the assertContainer* methods from matthiasnoback/SymfonyDependencyInjectionTest. - * - * @param string $handlerServiceId id of the service that was registered by the compiler pass - */ - public function validateConfiguredHandler($handlerServiceId): void + public function testAddConfiguration(): void + { + $node = new ArrayNodeDefinition('handler'); + $this->factory->addConfiguration($node); + self::assertArrayHasKey('connection', $node->getChildNodeDefinitions()); + } + + public function validateConfiguredHandler(string $handlerServiceId): void { - self::assertContainerBuilderHasServiceDefinitionWithArgument( + $this->assertContainerBuilderHasServiceDefinitionWithArgument( $handlerServiceId, 0, - 'doctrine.dbal.test_connection' + new Reference('doctrine.dbal.test_connection') ); } } diff --git a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTestCase.php similarity index 60% rename from tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php rename to tests/bundle/IO/DependencyInjection/ConfigurationFactoryTestCase.php index 2730326f7e..a59828f125 100644 --- a/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTest.php +++ b/tests/bundle/IO/DependencyInjection/ConfigurationFactoryTestCase.php @@ -7,9 +7,8 @@ namespace Ibexa\Tests\Bundle\IO\DependencyInjection; +use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractContainerBuilderTestCase; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\Definition; /** @@ -17,10 +16,11 @@ * * The part about the container can rely on the matthiasnoback/SymfonyDependencyInjectionTest assertContainer* methods. */ -abstract class ConfigurationFactoryTest extends AbstractContainerBuilderTestCase +abstract class ConfigurationFactoryTestCase extends AbstractContainerBuilderTestCase { - /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory */ - protected $factory; + protected ConfigurationFactory $factory; + + abstract public function testAddConfiguration(): void; protected function setUp(): void { @@ -37,15 +37,6 @@ public function testGetParentServiceId(): void ); } - public function testAddConfiguration(): void - { - $node = new ArrayNodeDefinition('handler'); - $this->factory->addConfiguration($node); - self::assertInstanceOf(ArrayNodeDefinition::class, $node); - - // @todo customized testing of configuration node ? - } - public function testConfigureHandler(): void { $handlerConfiguration = @@ -57,16 +48,12 @@ public function testConfigureHandler(): void $this->factory->configureHandler($this->container, $this->container->getDefinition($handlerServiceId), $handlerConfiguration); $this->validateConfiguredHandler($handlerServiceId); - - if ($this->factory instanceof ContainerAwareInterface) { - $this->validateConfiguredContainer(); - } } /** * Registers the handler in the container, like the pass would have done. */ - private function registerHandler($name): string + private function registerHandler(string $name): string { $this->setDefinition($this->provideExpectedParentServiceId(), $this->provideParentServiceDefinition()); $handlerServiceId = sprintf('%s.%s', $this->provideExpectedParentServiceId(), $name); @@ -77,33 +64,27 @@ private function registerHandler($name): string /** * Returns an instance of the tested factory. - * - * @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory */ - abstract public function provideTestedFactory(); + abstract public function provideTestedFactory(): ConfigurationFactory; /** * Returns the expected parent service id. */ - abstract public function provideExpectedParentServiceId(); + abstract public function provideExpectedParentServiceId(): string; /** * Provides the parent service definition, as defined in the bundle's services definition. * Required so that getArguments / replaceCalls work correctly. - * - * @return \Symfony\Component\DependencyInjection\Definition */ - abstract public function provideParentServiceDefinition(); + abstract public function provideParentServiceDefinition(): Definition; /** - * Provides the configuration array given to the handler, and initializes the container. + * Provides the configuration array given to the handler and initializes the container. * The name and type index are automatically set to respectively 'my_handler' and 'my_handler_test'. * - * The method can also configure the container via $this->container. - * - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * @return array */ - abstract public function provideHandlerConfiguration(); + abstract public function provideHandlerConfiguration(): array; /** * Lets you test the handler definition after it was configured. @@ -112,12 +93,5 @@ abstract public function provideHandlerConfiguration(); * * @param string $handlerServiceId id of the service that was registered by the compiler pass */ - abstract public function validateConfiguredHandler($handlerServiceId); - - /** - * Lets you test extra changes that may have been done to the container during configuration. - */ - public function validateConfiguredContainer() - { - } + abstract public function validateConfiguredHandler(string $handlerServiceId): void; } From f5bebf5668902a08896857c6cc95b47e79060b45 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 28 Apr 2025 02:47:29 +0200 Subject: [PATCH 134/185] IBX-9727: Fixed strict types of IO binary and meta-data handlers --- .../Compiler/IOConfigurationPass.php | 97 ++++++++++--------- .../ConfigurationFactory.php | 15 +-- .../ConfigurationFactory/Flysystem.php | 4 +- .../MetadataHandler/LegacyDFSCluster.php | 7 +- .../SiteAccessDependentMetadataHandler.php | 23 ++--- src/lib/IO/IOMetadataHandler/Flysystem.php | 27 +++--- .../IO/IOMetadataHandler/LegacyDFSCluster.php | 40 ++++---- 7 files changed, 110 insertions(+), 103 deletions(-) diff --git a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php index fdcec0dd47..04c85a3d84 100644 --- a/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php +++ b/src/bundle/IO/DependencyInjection/Compiler/IOConfigurationPass.php @@ -8,33 +8,33 @@ namespace Ibexa\Bundle\IO\DependencyInjection\Compiler; use ArrayObject; +use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; /** - * This compiler pass will create the metadata and binarydata IO handlers depending on container configuration. - * - * @todo Refactor into two passes, since they're very very close. + * This compiler pass will create the metadata and binary-data IO handlers depending on the container configuration. */ class IOConfigurationPass implements CompilerPassInterface { - /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject */ - private ?ArrayObject $metadataHandlerFactories; + /** @var \ArrayObject */ + private ArrayObject $metadataHandlerFactories; - /** @var \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject */ - private ?ArrayObject $binarydataHandlerFactories; + /** @var \ArrayObject */ + private ArrayObject $binaryDataHandlerFactories; - public function __construct( - ArrayObject $metadataHandlerFactories = null, - ArrayObject $binarydataHandlerFactories = null - ) { + /** + * @param \ArrayObject $metadataHandlerFactories + * @param \ArrayObject $binaryDataHandlerFactories + */ + public function __construct(ArrayObject $metadataHandlerFactories, ArrayObject $binaryDataHandlerFactories) + { $this->metadataHandlerFactories = $metadataHandlerFactories; - $this->binarydataHandlerFactories = $binarydataHandlerFactories; + $this->binaryDataHandlerFactories = $binaryDataHandlerFactories; } /** @@ -44,36 +44,27 @@ public function __construct( */ public function process(ContainerBuilder $container): void { - $ioMetadataHandlers = $container->hasParameter('ibexa.io.metadata_handlers') ? - $container->getParameter('ibexa.io.metadata_handlers') : - []; - $this->processHandlers( + $this->processHandlersOfType( $container, - $container->getDefinition('ibexa.core.io.metadata_handler.registry'), - $ioMetadataHandlers, - $this->metadataHandlerFactories, - 'ibexa.core.io.metadata_handler.flysystem.default' + 'ibexa.io.metadata_handlers', + 'ibexa.core.io.metadata_handler.registry', + 'ibexa.core.io.metadata_handler.flysystem.default', + $this->metadataHandlerFactories ); - $ioBinarydataHandlers = $container->hasParameter('ibexa.io.binarydata_handlers') ? - $container->getParameter('ibexa.io.binarydata_handlers') : - []; - $this->processHandlers( + $this->processHandlersOfType( $container, - $container->getDefinition('ibexa.core.io.binarydata_handler.registry'), - $ioBinarydataHandlers, - $this->binarydataHandlerFactories, - 'ibexa.core.io.binarydata_handler.flysystem.default' + 'ibexa.io.binarydata_handlers', + 'ibexa.core.io.binarydata_handler.registry', + 'ibexa.core.io.binarydata_handler.flysystem.default', + $this->binaryDataHandlerFactories ); - - // Unset parameters that are no longer required ? } /** - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container * @param \Symfony\Component\DependencyInjection\Definition $factory The factory service that should receive the list of handlers - * @param array $configuredHandlers Handlers configuration declared via semantic config - * @param \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject $factories Map of alias => handler service id + * @param array> $configuredHandlers Handlers configuration declared via semantic config + * @param \ArrayObject $factories Map of alias => handler service id * @param string $defaultHandler default handler id */ protected function processHandlers( @@ -81,8 +72,8 @@ protected function processHandlers( Definition $factory, array $configuredHandlers, ArrayObject $factories, - $defaultHandler - ) { + string $defaultHandler + ): void { $handlers = ['default' => new Reference($defaultHandler)]; foreach ($configuredHandlers as $name => $config) { @@ -104,21 +95,37 @@ protected function processHandlers( /** * Returns from $factories the factory for handler $type. * - * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container - * @param \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory[]|\ArrayObject $factories - * @param string $type - * - * @return \Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory + * @param \ArrayObject $factories */ - protected function getFactory(ArrayObject $factories, $type, ContainerBuilder $container) + protected function getFactory(ArrayObject $factories, string $type, ContainerBuilder $container): ConfigurationFactory { if (!isset($factories[$type])) { throw new InvalidConfigurationException("Unknown handler type $type"); } - if ($factories[$type] instanceof ContainerAwareInterface) { - $factories[$type]->setContainer($container); - } return $factories[$type]; } + + /** + * @param \ArrayObject $handlerFactories + */ + private function processHandlersOfType( + ContainerBuilder $container, + string $handlerContainerParameterName, + string $handlerServiceId, + string $defaultHandlerServiceId, + ArrayObject $handlerFactories + ): void { + /** @var array> $ioHandlers */ + $ioHandlers = $container->hasParameter($handlerContainerParameterName) ? + $container->getParameter($handlerContainerParameterName) : + []; + $this->processHandlers( + $container, + $container->getDefinition($handlerServiceId), + $ioHandlers, + $handlerFactories, + $defaultHandlerServiceId + ); + } } diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php index c68944abad..5243567b66 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory.php @@ -35,16 +35,14 @@ interface ConfigurationFactory * * @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node The handler's configuration node. */ - public function addConfiguration(ArrayNodeDefinition $node); + public function addConfiguration(ArrayNodeDefinition $node): void; /** * Returns the ID of the base, abstract service used to create the handlers. * * It will be used as the base name for instances of this handler, and as the parent of the instances' services. - * - * @return string */ - public function getParentServiceId(); + public function getParentServiceId(): string; /** * Configure the handler service based on the configuration. @@ -54,8 +52,11 @@ public function getParentServiceId(); * * Note: if the factory implements ContainerAwareInterface, the ContainerBuilder will be made available as $this->container. * - * @param \Symfony\Component\DependencyInjection\Definition $serviceDefinition - * @param array $config + * @param array $config */ - public function configureHandler(ContainerBuilder $container, ServiceDefinition $serviceDefinition, array $config); + public function configureHandler( + ContainerBuilder $container, + ServiceDefinition $serviceDefinition, + array $config + ): void; } diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php index fd44173625..dab61c51c0 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/Flysystem.php @@ -42,10 +42,10 @@ public function addConfiguration(ArrayNodeDefinition $node): void ->end(); } - public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config): void + public function configureHandler(ContainerBuilder $container, ServiceDefinition $serviceDefinition, array $config): void { $filesystemId = $this->createFilesystem($container, $config['name'], $config['adapter']); - $definition->replaceArgument(0, new Reference($filesystemId)); + $serviceDefinition->replaceArgument(0, new Reference($filesystemId)); } /** diff --git a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php index f40a597eb7..8434eeafb6 100644 --- a/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php +++ b/src/bundle/IO/DependencyInjection/ConfigurationFactory/MetadataHandler/LegacyDFSCluster.php @@ -8,6 +8,7 @@ namespace Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory\MetadataHandler; use Ibexa\Bundle\IO\DependencyInjection\ConfigurationFactory; +use Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster as LegacyDFSClusterHandler; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition as ServiceDefinition; @@ -17,12 +18,12 @@ class LegacyDFSCluster implements ConfigurationFactory { public function getParentServiceId(): string { - return \Ibexa\Core\IO\IOMetadataHandler\LegacyDFSCluster::class; + return LegacyDFSClusterHandler::class; } - public function configureHandler(ContainerBuilder $container, ServiceDefinition $definition, array $config): void + public function configureHandler(ContainerBuilder $container, ServiceDefinition $serviceDefinition, array $config): void { - $definition->replaceArgument(0, new Reference($config['connection'])); + $serviceDefinition->replaceArgument(0, new Reference($config['connection'])); } public function addConfiguration(ArrayNodeDefinition $node): void diff --git a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php index b0e4e51693..492c9bc103 100644 --- a/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php +++ b/src/lib/IO/IOBinarydataHandler/SiteAccessDependentMetadataHandler.php @@ -8,6 +8,7 @@ namespace Ibexa\Core\IO\IOBinarydataHandler; use Ibexa\Bundle\IO\ApiLoader\HandlerRegistry; +use Ibexa\Contracts\Core\IO\BinaryFile; use Ibexa\Contracts\Core\IO\BinaryFileCreateStruct; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Core\IO\IOMetadataHandler; @@ -36,33 +37,33 @@ private function getHandler(): IOMetadataHandler ); } - public function create(BinaryFileCreateStruct $spiBinaryFileCreateStruct) + public function create(BinaryFileCreateStruct $spiBinaryFileCreateStruct): BinaryFile { return $this->getHandler()->create($spiBinaryFileCreateStruct); } - public function delete($spiBinaryFileId) + public function delete(string $binaryFileId): void { - return $this->getHandler()->delete($spiBinaryFileId); + $this->getHandler()->delete($binaryFileId); } - public function load($spiBinaryFileId) + public function load(string $binaryFileId): BinaryFile { - return $this->getHandler()->load($spiBinaryFileId); + return $this->getHandler()->load($binaryFileId); } - public function exists($spiBinaryFileId) + public function exists(string $binaryFileId): bool { - return $this->getHandler()->exists($spiBinaryFileId); + return $this->getHandler()->exists($binaryFileId); } - public function getMimeType($spiBinaryFileId) + public function getMimeType(string $binaryFileId): string { - return $this->getHandler()->getMimeType($spiBinaryFileId); + return $this->getHandler()->getMimeType($binaryFileId); } - public function deleteDirectory($spiPath) + public function deleteDirectory(string $pathName): void { - return $this->getHandler()->deleteDirectory($spiPath); + $this->getHandler()->deleteDirectory($pathName); } } diff --git a/src/lib/IO/IOMetadataHandler/Flysystem.php b/src/lib/IO/IOMetadataHandler/Flysystem.php index 678d10f4ec..5086281b80 100644 --- a/src/lib/IO/IOMetadataHandler/Flysystem.php +++ b/src/lib/IO/IOMetadataHandler/Flysystem.php @@ -49,48 +49,46 @@ public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct): IO /** * Does really nothing, the binary data handler takes care of it. - * - * @param $spiBinaryFileId */ - public function delete($spiBinaryFileId) + public function delete(string $binaryFileId): void { } - public function load($spiBinaryFileId): IOBinaryFile + public function load(string $binaryFileId): IOBinaryFile { try { - return $this->getIOBinaryFile($spiBinaryFileId); + return $this->getIOBinaryFile($binaryFileId); } catch (FilesystemException $e) { - throw new BinaryFileNotFoundException($spiBinaryFileId); + throw new BinaryFileNotFoundException($binaryFileId); } } - public function exists($spiBinaryFileId): bool + public function exists(string $binaryFileId): bool { try { - return $this->filesystem->fileExists($spiBinaryFileId); + return $this->filesystem->fileExists($binaryFileId); } catch (CorruptedPathDetected $e) { $this->logger->error( - sprintf('Binary file with ID="%s" does not exist: %s', $spiBinaryFileId, $e->getMessage()), + sprintf('Binary file with ID="%s" does not exist: %s', $binaryFileId, $e->getMessage()), ['exception' => $e], ); return false; } catch (FilesystemException $e) { throw new IOException( - "Unable to check if file '$spiBinaryFileId' exists: {$e->getMessage()}", + "Unable to check if file '$binaryFileId' exists: {$e->getMessage()}", $e ); } } - public function getMimeType($spiBinaryFileId): string + public function getMimeType(string $binaryFileId): string { try { - return $this->filesystem->mimeType($spiBinaryFileId); + return $this->filesystem->mimeType($binaryFileId); } catch (FilesystemException $e) { throw new IOException( - "Unable to get mime type of file '$spiBinaryFileId': {$e->getMessage()}", + "Unable to get mime type of file '$binaryFileId': {$e->getMessage()}", $e ); } @@ -99,12 +97,13 @@ public function getMimeType($spiBinaryFileId): string /** * Does nothing, as the binary data handler takes care of it. */ - public function deleteDirectory($spiPath) + public function deleteDirectory(string $pathName): void { } /** * @throws \League\Flysystem\FilesystemException + * @throws \DateMalformedStringException */ private function getIOBinaryFile(string $spiBinaryFileId): IOBinaryFile { diff --git a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php index cce8d6cc15..dd0a6476ea 100644 --- a/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php +++ b/src/lib/IO/IOMetadataHandler/LegacyDFSCluster.php @@ -88,14 +88,14 @@ public function create(SPIBinaryFileCreateStruct $spiBinaryFileCreateStruct): SP /** * Deletes file $spiBinaryFileId. * - * @param string $spiBinaryFileId + * @param string $binaryFileId * * @throws \Doctrine\DBAL\Exception * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException If $spiBinaryFileId is not found */ - public function delete($spiBinaryFileId): void + public function delete(string $binaryFileId): void { - $path = $this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($binaryFileId); // Unlike the legacy cluster, the file is directly deleted. It was inherited from the DB cluster anyway $affectedRows = (int)$this->db->delete('ezdfsfile', [ @@ -113,9 +113,9 @@ public function delete($spiBinaryFileId): void * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception * @throws \DateMalformedStringException */ - public function load($spiBinaryFileId): SPIBinaryFile + public function load(string $binaryFileId): SPIBinaryFile { - $path = $this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($binaryFileId); $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder @@ -143,7 +143,7 @@ public function load($spiBinaryFileId): SPIBinaryFile } /** @var array{id: string, name_hash: string, name_trunk: string, datatype: string, scope: string, size: int, mtime: int, expired: bool, status: bool} $properties */ - $properties = $row + ['id' => $spiBinaryFileId]; + $properties = $row + ['id' => $binaryFileId]; return $this->mapArrayToSPIBinaryFile($properties); } @@ -151,9 +151,9 @@ public function load($spiBinaryFileId): SPIBinaryFile /** * @throws \Doctrine\DBAL\Exception Any unhandled DBAL exception */ - public function exists($spiBinaryFileId): bool + public function exists(string $binaryFileId): bool { - $path = $this->addPrefix($spiBinaryFileId); + $path = $this->addPrefix($binaryFileId); $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder @@ -226,12 +226,10 @@ protected function removePrefix(string $prefixedId): string } /** - * @param string $spiBinaryFileId - * * @throws \Ibexa\Core\IO\Exception\BinaryFileNotFoundException * @throws \Doctrine\DBAL\Exception */ - public function getMimeType($spiBinaryFileId): string + public function getMimeType(string $binaryFileId): string { $queryBuilder = $this->db->createQueryBuilder(); $result = $queryBuilder @@ -240,39 +238,39 @@ public function getMimeType($spiBinaryFileId): string ->andWhere('e.name_hash = :' . self::NAME_HASH_PARAM_NAME) ->andWhere(self::DFS_IS_EXPIRED_COMPARISON) ->andWhere('e.mtime > 0') - ->setParameter(self::NAME_HASH_PARAM_NAME, md5($this->addPrefix($spiBinaryFileId))) + ->setParameter(self::NAME_HASH_PARAM_NAME, md5($this->addPrefix($binaryFileId))) ->executeQuery() ; if ($result->rowCount() === 0) { - throw new BinaryFileNotFoundException($spiBinaryFileId); + throw new BinaryFileNotFoundException($binaryFileId); } $dataType = $result->fetchOne(); if (false === $dataType) { - throw new LogicException("Failed to get mime type for $spiBinaryFileId"); + throw new LogicException("Failed to get mime type for $binaryFileId"); } return $dataType; } /** - * Delete directory and all the content under specified directory. + * Delete the directory and all the content under the specified directory. * - * @param string $spiPath SPI Path, not prefixed by URL decoration + * @param string $pathName storage path, not prefixed by URL decoration * * @throws \Doctrine\DBAL\Exception */ - public function deleteDirectory($spiPath): void + public function deleteDirectory(string $pathName): void { $query = $this->db->createQueryBuilder(); $query ->delete('ezdfsfile') - ->where('name LIKE :spiPath ESCAPE :esc') - ->setParameter(':esc', '\\') + ->where('name LIKE :path_name ESCAPE :esc') + ->setParameter('esc', '\\') ->setParameter( - ':spiPath', - addcslashes($this->addPrefix(rtrim($spiPath, '/')), '%_') . '/%' + 'path_name', + addcslashes($this->addPrefix(rtrim($pathName, '/')), '%_') . '/%' ); $query->executeStatement(); } From d18247fd7d179a1284eba456a985c304447b1ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 08:00:13 +0200 Subject: [PATCH 135/185] IBX-9728: [Tests] Enabled save points in database connection --- tests/bundle/Core/Resources/config/doctrine.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/bundle/Core/Resources/config/doctrine.php b/tests/bundle/Core/Resources/config/doctrine.php index 87267fc31d..ebbf226763 100644 --- a/tests/bundle/Core/Resources/config/doctrine.php +++ b/tests/bundle/Core/Resources/config/doctrine.php @@ -39,6 +39,7 @@ 'url' => '%env(DATABASE_URL)%', 'logging' => false, 'platform_service' => $platform, + 'use_savepoints' => true, ], ]); }; From 1645443ec068a2d3844237992aac7d2a11948e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 09:32:09 +0200 Subject: [PATCH 136/185] fixup! IBX-9811: Upgraded URL Alias Doctrine Gateway to doctrine/dbal v3 and improved code quality --- .../Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php index cfeea77b6f..d545604e30 100644 --- a/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php @@ -1149,8 +1149,8 @@ private function loadLocationEntriesMatchingMultipleLanguages( ->where('action = :action') // fetch rows matching any of the given Languages ->andWhere('lang_mask & :languageMask <> 0') - ->setParameter(self::ACTION_PARAMETER_NAME, 'eznode:' . $locationId) - ->setParameter(self::LANGUAGE_MASK_PARAMETER_NAME, $languageMask); + ->setParameter('action', 'eznode:' . $locationId) + ->setParameter('languageMask', $languageMask); return $query->executeQuery()->fetchAllAssociative(); } @@ -1283,7 +1283,7 @@ public function repairBrokenUrlAliasesForLocation(int $locationId): void ->andWhere( $expr->eq('text_md5', ':textMD5') ) - ->setParameter(self::ACTION_PARAMETER_NAME, "eznode:$locationId"); + ->setParameter('action', "eznode:$locationId"); foreach ($urlAliasesData as $urlAliasData) { if ($urlAliasData['is_original'] === 1 || !isset($originalUrlAliases[$urlAliasData['lang_mask']])) { From 9b5ce52c08d01466fa9584f0597a313420413e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 09:53:51 +0200 Subject: [PATCH 137/185] fixup! IBX-9727: [Rector] Applied SetList::TYPE_DECLARATION built-in Rector set --- src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php | 4 ++-- tests/lib/Persistence/Legacy/Content/Location/MapperTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php index c86c6825b6..ea23042905 100644 --- a/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php +++ b/src/lib/Persistence/Legacy/Content/Location/Trash/Handler.php @@ -73,7 +73,7 @@ public function loadTrashItem($id) { $data = $this->locationGateway->loadTrashByLocation($id); - return $this->locationMapper->createLocationFromRow($data, null, new Trashed()); + return $this->locationMapper->createLocationFromRow($data, '', new Trashed()); } /** @@ -166,7 +166,7 @@ public function findTrashItems(CriterionInterface $criterion = null, $offset = 0 $items = []; foreach ($rows as $row) { - $items[] = $this->locationMapper->createLocationFromRow($row, null, new Trashed()); + $items[] = $this->locationMapper->createLocationFromRow($row, '', new Trashed()); } return new TrashResult([ diff --git a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php index 4f63d5e999..05a7d55c91 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/MapperTest.php @@ -117,7 +117,7 @@ public function testCreateTrashedFromRow(): void $location = $mapper->createLocationFromRow( $this->locationRow, - null, + '', new Trashed() ); From 9a756227ed4e6e839b36df1cfa33feefdb1aea16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 10:44:55 +0200 Subject: [PATCH 138/185] fixup! IBX-9811: Upgraded Filtering Content Gateway to doctrine/dbal v3 and fixed strict types --- .../Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php index 877205c35a..517c41ae11 100644 --- a/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php +++ b/src/lib/Persistence/Legacy/Filter/Gateway/Content/Doctrine/DoctrineGateway.php @@ -240,7 +240,7 @@ private function bulkFetchVersionNames(FilteringQueryBuilder $query): array ) // reset not needed parts, keeping FROM, other JOINs, and WHERE constraints ->setMaxResults(null) - ->setFirstResult(1) + ->setFirstResult(0) ->resetOrderBy(); return $query->executeQuery()->fetchAllAssociative(); From cdff462c833e3de6e59723fd8fe0ad48e373bc9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 11:23:26 +0200 Subject: [PATCH 139/185] fixup! IBX-9811: [Test contracts] Upgraded FixtureImporter to doctrine/dbal v3 --- src/contracts/Test/Persistence/Fixture/FixtureImporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php index 2a1810ac9c..973c6aa8cd 100644 --- a/src/contracts/Test/Persistence/Fixture/FixtureImporter.php +++ b/src/contracts/Test/Persistence/Fixture/FixtureImporter.php @@ -130,7 +130,7 @@ private function getSequenceResetStatements(array $affectedTables): iterable self::$resetSequenceStatements[$tableName] = sprintf( $queryTemplate, $sequenceName, - sprintf('MAX(%s),', $this->connection->quoteIdentifier($columnName)), + sprintf('MAX(%s)', $this->connection->quoteIdentifier($columnName)), $this->connection->quoteIdentifier($tableName) ); } From 35d613bea88dcafc90da67ebd2f2a4e5f27ea3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 14:30:03 +0200 Subject: [PATCH 140/185] Allowed int in Ibexa\Core\Search\Legacy\Content\Common\Gateway\SortClauseHandler::getSortColumnName --- .../Search/Legacy/Content/Common/Gateway/SortClauseHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php index b6be1b07f7..30d3fe04f0 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/SortClauseHandler.php @@ -69,7 +69,7 @@ public function applyJoin( /** * Returns the quoted sort column name. */ - protected function getSortColumnName(string $columnNameExpressions): string + protected function getSortColumnName(string|int $columnNameExpressions): string { return $this->connection->quoteIdentifier('sort_column_' . $columnNameExpressions); } From fd930a34d0fbf97fd4c068236078f9db4a70c35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 18:23:41 +0200 Subject: [PATCH 141/185] [Installer] Fixed premature database connection --- .../Command/InstallPlatformCommand.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index 06d4879827..b5375dd6b5 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -120,18 +120,22 @@ private function checkPermissions(): void } } + private function getConnectionName(): string + { + return $this->repositoryConfigurationProvider->getStorageConnectionName(); + } + private function checkCreateDatabase(OutputInterface $output): void { $output->writeln( sprintf( - 'Creating database %s if it does not exist, using doctrine:database:create --if-not-exists', - $this->connection->getDatabase() + 'Creating connection %s if it does not exist, using doctrine:database:create --if-not-exists', + $this->getConnectionName() ) ); try { $bufferedOutput = new BufferedOutput(); - $connectionName = $this->repositoryConfigurationProvider->getStorageConnectionName(); - $command = sprintf('doctrine:database:create --if-not-exists --connection=%s', $connectionName); + $command = sprintf('doctrine:database:create --if-not-exists --connection=%s', $this->getConnectionName()); $this->executeCommand($bufferedOutput, $command); $output->writeln($bufferedOutput->fetch()); } catch (\RuntimeException $exception) { From 5d25620cff13424fc833619ba176f0ffda508175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Wed, 30 Apr 2025 18:30:37 +0200 Subject: [PATCH 142/185] [Installer] Fixed exit status code check in ibexa:install --- .../RepositoryInstaller/Command/InstallPlatformCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php index b5375dd6b5..b74c9117bf 100644 --- a/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php +++ b/src/bundle/RepositoryInstaller/Command/InstallPlatformCommand.php @@ -250,7 +250,7 @@ private function executeCommand(OutputInterface $output, string $cmd, int $timeo $process->run(static function ($type, $buffer) use ($output): void { $output->write($buffer, false); }); // treating null exit code (process that hasn't terminated yet) as success due to lack of information at this point $exitCode = $process->getExitCode() ?? 0; - if ($exitCode !== 1) { + if ($exitCode !== self::SUCCESS) { throw new \RuntimeException(sprintf('An error occurred when executing the "%s" command.', escapeshellarg($cmd))); } } From cc55deb4e3a46e133d8b7c504469ef309c3a12c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Thu, 1 May 2025 22:35:27 +0200 Subject: [PATCH 143/185] fixup! IBX-8471: Upgraded SiteAccess Matcher serializers to Symfony 7 --- src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php index f648f3871a..6e446a72e1 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Map.php @@ -15,7 +15,7 @@ abstract class Map implements VersatileMatcher /** * String that will be looked up in the map. */ - protected string $key; + protected ?string $key = null; /** * Map used for the matching. @@ -68,14 +68,14 @@ public function getRequest(): SimplifiedRequest /** * Injects the key that will be used for matching against the map configuration. */ - public function setMapKey(string $key): void + public function setMapKey(?string $key): void { $this->key = $key; } public function getMapKey(): ?string { - return $this->key ?? null; + return $this->key; } public function match(): string|bool From b5e2b83dc5e01cd39fe430c68de491940d2299f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:22:55 +0200 Subject: [PATCH 144/185] Fixed access to Ibexa\Core\MVC\Symfony\SiteAccess\Matcher\Regex::$element before it's initialization --- src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php index 35e86e3b65..8a35c26cb0 100644 --- a/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php +++ b/src/lib/MVC/Symfony/SiteAccess/Matcher/Regex.php @@ -15,7 +15,7 @@ abstract class Regex implements Matcher /** * Element that will be matched against the regex. */ - protected string $element; + protected ?string $element = null; /** * Regular expression used for matching. From 0d6a00aac6c9ef1b57d81d049c786bede0f58eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:25:32 +0200 Subject: [PATCH 145/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\ContentHandlerTest::testLoadContentInfoByRemoteId test --- tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php index fd93f1e490..db1641e3ab 100644 --- a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php @@ -572,7 +572,7 @@ public function testLoadContentList(): void public function testLoadContentInfoByRemoteId(): void { - $contentInfoData = [new ContentInfo()]; + $contentInfoData = new ContentInfo(); $this->getGatewayMock()->expects(self::once()) ->method('loadContentInfoByRemoteId') ->with( From d46905e565015441c2bb29f9dc7fa8ea411a7984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:30:24 +0200 Subject: [PATCH 146/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\ContentHandlerTest::testLoadReverseRelations test --- .../Persistence/Legacy/Content/ContentHandlerTest.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php index db1641e3ab..9113c3a029 100644 --- a/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/ContentHandlerTest.php @@ -893,6 +893,7 @@ public function testLoadReverseRelations(): void { $handler = $this->getContentHandler(); + $relation = $this->getRelationFixture(); $gatewayMock = $this->getGatewayMock(); $mapperMock = $this->getMapperMock(); @@ -908,13 +909,17 @@ public function testLoadReverseRelations(): void $mapperMock->expects(self::once()) ->method('extractRelationsFromRows') ->with(self::equalTo([42])) - ->will(self::returnValue($this->getRelationFixture())); + ->will(self::returnValue([ + $relation->id => $relation, + ])); $result = $handler->loadReverseRelations(23); self::assertEquals( $result, - $this->getRelationFixture() + [ + $relation->id => $relation, + ] ); } From c83459b3d52df338017de725ff998ed5c1dbb21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:32:45 +0200 Subject: [PATCH 147/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\TreeHandlerTest::testLoadContentInfoByRemoteId test --- tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php index 62281085c6..7b82a8779d 100644 --- a/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php +++ b/tests/lib/Persistence/Legacy/Content/TreeHandlerTest.php @@ -26,7 +26,7 @@ class TreeHandlerTest extends TestCase { public function testLoadContentInfoByRemoteId(): void { - $contentInfoData = [new ContentInfo()]; + $contentInfo = new ContentInfo(); $this->getContentGatewayMock() ->expects(self::once()) @@ -38,10 +38,10 @@ public function testLoadContentInfoByRemoteId(): void ->expects(self::once()) ->method('extractContentInfoFromRow') ->with(self::equalTo([42])) - ->will(self::returnValue($contentInfoData)); + ->will(self::returnValue($contentInfo)); self::assertSame( - $contentInfoData, + $contentInfo, $this->getTreeHandler()->loadContentInfo(42) ); } From d85450f0f4de417fc809f861deab377866724b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:36:57 +0200 Subject: [PATCH 148/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\UrlWildcard\UrlWildcardHandlerTest::testLoad test --- .../Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 37741060d3..9deb48b4bb 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -162,7 +162,7 @@ public function loadUrlWildcardData(int $id): array ) ); - return $query->executeQuery()->fetchAllAssociative(); + return $query->executeQuery()->fetchAssociative(); } /** From a560c1856e52619ef0387bee4ff7afb6350dfa75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:41:49 +0200 Subject: [PATCH 149/185] Fixed Ibexa\Tests\Core\Search\FieldNameResolverTest::testGetSortFieldName test --- src/lib/Search/Common/FieldNameResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Search/Common/FieldNameResolver.php b/src/lib/Search/Common/FieldNameResolver.php index e071e7cfd8..a5b1c989fc 100644 --- a/src/lib/Search/Common/FieldNameResolver.php +++ b/src/lib/Search/Common/FieldNameResolver.php @@ -161,7 +161,7 @@ public function getSortFieldName( $contentTypeIdentifier, $fieldDefinitionIdentifier, $name = null - ): ?false { + ): ?string { $fieldMap = $this->getSearchableFieldMap(); // First check if field exists in type, there is nothing to do if it doesn't From e250dee13bb0ef21183f01d67bc94117d73569d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:42:55 +0200 Subject: [PATCH 150/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabaseTest::testHideUnhidePartialSubtree test --- .../Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index eb99fc7df1..58c86c0302 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -581,7 +581,7 @@ public function testHideUnhidePartialSubtree(): void ->where( $query->expr()->in( 'node_id', - $query->createNamedParameter([1, 2, 69, 70, 71, 75], ArrayParameterType::INTEGER, 'node_ids') + $query->createNamedParameter([1, 2, 69, 70, 71, 75], ArrayParameterType::INTEGER, ':node_ids') ) ) ->orderBy('node_id') From 576aa00cebea932ec5bfbec4858a5012d81052d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:43:20 +0200 Subject: [PATCH 151/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabaseTest::testSwapLocations test --- .../Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php index 58c86c0302..5af0a8dfce 100644 --- a/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Location/Gateway/DoctrineDatabaseTest.php @@ -609,7 +609,7 @@ public function testSwapLocations(): void ->where( $query->expr()->in( 'node_id', - $query->createNamedParameter([70, 78], ArrayParameterType::INTEGER, 'node_ids') + $query->createNamedParameter([70, 78], ArrayParameterType::INTEGER, ':node_ids') ) ) ->orderBy('node_id') From 9403a032ad00e43e32cadd00cfb30e99b8ccad34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:46:54 +0200 Subject: [PATCH 152/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\DoctrineDatabaseTest::testDeleteUrlWildcard test --- .../Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php index 9deb48b4bb..cabad438b1 100644 --- a/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php @@ -162,7 +162,7 @@ public function loadUrlWildcardData(int $id): array ) ); - return $query->executeQuery()->fetchAssociative(); + return $query->executeQuery()->fetchAssociative() ?: []; } /** From 0f62041d872b52c9ad142fbd8e74f171a23cd853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:50:17 +0200 Subject: [PATCH 153/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Notification\Gateway\DoctrineDatabaseTest::testCountUserPendingNotifications test --- .../Legacy/Notification/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index 0eb0b9a9ac..9014572789 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -134,7 +134,7 @@ public function countUserPendingNotifications(int $userId): int ->select('COUNT(' . self::COLUMN_ID . ')') ->from(self::TABLE_NOTIFICATION) ->where($expr->eq(self::COLUMN_OWNER_ID, ':' . self::USER_ID_PARAM_NAME)) - ->andWhere($expr->eq(self::COLUMN_IS_PENDING, self::IS_PENDING_PARAM_NAME)) + ->andWhere($expr->eq(self::COLUMN_IS_PENDING, ':' . self::IS_PENDING_PARAM_NAME)) ->setParameter(self::IS_PENDING_PARAM_NAME, true, ParameterType::BOOLEAN) ->setParameter(self::USER_ID_PARAM_NAME, $userId, ParameterType::INTEGER); From 96229d89bd53ef32301683ea139226d798941115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 16:51:32 +0200 Subject: [PATCH 154/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\Notification\Gateway\DoctrineDatabaseTest::testLoadUserNotifications test --- .../Legacy/Notification/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php index 9014572789..556226c956 100644 --- a/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Notification/Gateway/DoctrineDatabase.php @@ -150,7 +150,7 @@ public function loadUserNotifications(int $userId, int $offset = 0, int $limit = $query ->select(...$this->getColumns()) ->from(self::TABLE_NOTIFICATION) - ->where($query->expr()->eq(self::COLUMN_OWNER_ID, self::USER_ID_PARAM_NAME)) + ->where($query->expr()->eq(self::COLUMN_OWNER_ID, ':' . self::USER_ID_PARAM_NAME)) ->setFirstResult($offset); if ($limit > 0) { From d932473e2c8a3aeee5ab37f578a59dd33a6ec62e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 18:48:49 +0200 Subject: [PATCH 155/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler\LogicalAndTest::testHandle test --- .../Legacy/URL/Query/CriterionHandler/LogicalAndTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php index a54c888f9a..7490bbbecb 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalAndTest.php @@ -45,7 +45,7 @@ public function testHandle(): void $converter = $this->mockConverterForLogicalOperator( CompositeExpression::TYPE_AND, $queryBuilder, - 'andX', + 'and', $fooExpr, $barExpr, $foo, From 5d79448133516489132d950771a311d118ec33dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 18:49:20 +0200 Subject: [PATCH 156/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\URL\Query\CriterionHandler\LogicalOrTest::testHandle test --- .../Legacy/URL/Query/CriterionHandler/LogicalOrTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php index 23bb74b4cc..2ed19a3dc7 100644 --- a/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php +++ b/tests/lib/Persistence/Legacy/URL/Query/CriterionHandler/LogicalOrTest.php @@ -45,7 +45,7 @@ public function testHandle(): void $converter = $this->mockConverterForLogicalOperator( CompositeExpression::TYPE_OR, $queryBuilder, - 'orX', + 'or', $fooExpr, $barExpr, $foo, From 07044263196129ef6d68ba43042f2a43262c34b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 18:51:12 +0200 Subject: [PATCH 157/185] Fixed Ibexa\Tests\Core\Persistence\Legacy\UserPreference\Gateway\DoctrineDatabaseTest::testCountUserPreferences test --- .../Legacy/UserPreference/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php index e901305edd..47cf715339 100644 --- a/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/UserPreference/Gateway/DoctrineDatabase.php @@ -125,7 +125,7 @@ public function countUserPreferences(int $userId): int $query = $this->connection->createQueryBuilder(); $query ->select( - 'COUNT(self::COLUMN_ID)' + 'COUNT(id)' ) ->from(self::TABLE_USER_PREFERENCES) ->where($query->expr()->eq(self::COLUMN_USER_ID, ':' . self::USER_ID_PARAM_NAME)) From 191981e5024581e06c13cadc8511eb84feba5c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 18:52:03 +0200 Subject: [PATCH 158/185] Fixed Ibexa\Tests\Core\Repository\Values\ContentType\ContentTypeDraftTest::testObjectProperties test --- .../Repository/Values/ContentType/ContentTypeDraftTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php index 43393acef1..956167b394 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeDraftTest.php @@ -9,6 +9,7 @@ use Ibexa\Core\Repository\Values\ContentType\ContentType; use Ibexa\Core\Repository\Values\ContentType\ContentTypeDraft; +use Ibexa\Core\Repository\Values\ContentType\FieldDefinitionCollection; use PHPUnit\Framework\TestCase; /** @@ -20,7 +21,9 @@ public function testObjectProperties(): void { $object = new ContentTypeDraft( [ - 'innerContentType' => new ContentType(['fieldDefinitions' => []]), + 'innerContentType' => new ContentType([ + 'fieldDefinitions' => new FieldDefinitionCollection(), + ]), ] ); $properties = $object->attributes(); From 380c6e4fd91c10db3f1d1c2791e587eff04bf6c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 18:54:24 +0200 Subject: [PATCH 159/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortContentName test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index b909796a18..4c852f7066 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -353,7 +353,7 @@ public function testSortContentName(): void [ 'filter' => new Criterion\SectionId([2, 3]), 'offset' => 0, - 'limit' => null, + 'limit' => 0, 'sortClauses' => [ new SortClause\ContentName(), ], From a89ed43916a0e311ab87e0f398824583e60a0081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:00:51 +0200 Subject: [PATCH 160/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortContentName test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 4c852f7066..1fae4d3d74 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -353,7 +353,7 @@ public function testSortContentName(): void [ 'filter' => new Criterion\SectionId([2, 3]), 'offset' => 0, - 'limit' => 0, + 'limit' => 999, 'sortClauses' => [ new SortClause\ContentName(), ], From 359d7f4866cd22af027cb0498ecdbc5524ed2a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:01:12 +0200 Subject: [PATCH 161/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortContentName test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 1fae4d3d74..ab2e489cee 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -386,7 +386,7 @@ public function testSortFieldText(): void ] ), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Field('article', 'title', Query::SORT_ASC, 'eng-US'), ], From d9f363cc2f5d48863ffe5ff5fae5cb8b6ab549c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:01:32 +0200 Subject: [PATCH 162/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortFieldNumeric test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index ab2e489cee..9a961a89b5 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -455,7 +455,7 @@ public function testSortFieldNumeric(): void ] ), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Field('product', 'price', Query::SORT_ASC, 'eng-US'), ], From 172f9347339ea71f996cb9f46f83e259a706d46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:01:50 +0200 Subject: [PATCH 163/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortSectionIdentifier test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 9a961a89b5..079850ef84 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -255,7 +255,7 @@ public function testSortSectionIdentifier(): void [ 'filter' => new Criterion\SectionId([4, 2, 6, 3]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\SectionIdentifier(), ], From 741190754b576fe4bd97ca22fb2980ec694a6438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:02:35 +0200 Subject: [PATCH 164/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerContentSortTest::testSortSectionName test --- tests/lib/Search/Legacy/Content/HandlerContentSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php index 079850ef84..e336b4003c 100644 --- a/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerContentSortTest.php @@ -300,7 +300,7 @@ public function testSortSectionName(): void [ 'filter' => new Criterion\SectionId([4, 2, 6, 3]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\SectionName(), ], From 21130f2971c3ce7ca589769dfefe25df92af3df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:43:02 +0200 Subject: [PATCH 165/185] Fixed Ibexa\Tests\Core\Repository\Values\ContentType\ContentTypeTest::{testGetFieldDefinition,testHasFieldDefinition, testHasFieldDefinitionOfType} test --- .../Values/ContentType/ContentTypeTest.php | 45 +++++++------------ 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php index 83e110f075..cd2b6ccf39 100644 --- a/tests/lib/Repository/Values/ContentType/ContentTypeTest.php +++ b/tests/lib/Repository/Values/ContentType/ContentTypeTest.php @@ -11,6 +11,7 @@ use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinitionCollection as APIFieldDefinitionCollection; use Ibexa\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Core\Repository\Values\ContentType\FieldDefinitionCollection; use PHPUnit\Framework\TestCase; /** @@ -72,23 +73,12 @@ public function testStrictGetters(): void public function testGetFieldDefinition(): void { $fieldDefinition = $this->createMock(FieldDefinition::class); - - $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); - - $fieldDefinitionCollection - ->expects(self::once()) - ->method('has') - ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) - ->willReturn(true); - - $fieldDefinitionCollection - ->expects(self::once()) - ->method('get') - ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) - ->willReturn($fieldDefinition); + $fieldDefinition->method('getIdentifier')->willReturn(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER); $contentType = new ContentType([ - 'fieldDefinitions' => $fieldDefinitionCollection, + 'fieldDefinitions' => new FieldDefinitionCollection([ + $fieldDefinition, + ]), ]); self::assertEquals( @@ -99,15 +89,13 @@ public function testGetFieldDefinition(): void public function testHasFieldDefinition(): void { - $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); - $fieldDefinitionCollection - ->expects(self::once()) - ->method('has') - ->with(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER) - ->willReturn(true); + $fieldDefinition = $this->createMock(FieldDefinition::class); + $fieldDefinition->method('getIdentifier')->willReturn(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER); $contentType = new ContentType([ - 'fieldDefinitions' => $fieldDefinitionCollection, + 'fieldDefinitions' => new FieldDefinitionCollection([ + $fieldDefinition, + ]), ]); self::assertTrue( @@ -117,15 +105,14 @@ public function testHasFieldDefinition(): void public function testHasFieldDefinitionOfType(): void { - $fieldDefinitionCollection = $this->createMock(APIFieldDefinitionCollection::class); - $fieldDefinitionCollection - ->expects(self::once()) - ->method('anyOfType') - ->with(self::EXAMPLE_FIELD_TYPE_IDENTIFIER) - ->willReturn(true); + $fieldDefinition = $this->createMock(FieldDefinition::class); + $fieldDefinition->method('getIdentifier')->willReturn(self::EXAMPLE_FIELD_DEFINITION_IDENTIFIER); + $fieldDefinition->method('getFieldTypeIdentifier')->willReturn(self::EXAMPLE_FIELD_TYPE_IDENTIFIER); $contentType = new ContentType([ - 'fieldDefinitions' => $fieldDefinitionCollection, + 'fieldDefinitions' => new FieldDefinitionCollection([ + $fieldDefinition, + ]), ]); self::assertTrue( From 37ae56b87fb032978daa02e4a4df30de3662e8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:56:42 +0200 Subject: [PATCH 166/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortContentId test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 0429ff25c0..106468455f 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -375,7 +375,7 @@ public function testSortContentId(): void [ 'filter' => new Criterion\LocationId([13, 15, 44, 45, 228]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\ContentId(), ], From b1b019eb2b2b1d8ea0b54853866e6b0c1a4051f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:56:57 +0200 Subject: [PATCH 167/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortContentName test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 106468455f..01aab35e4d 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -352,7 +352,7 @@ public function testSortContentName(): void [ 'filter' => new Criterion\LocationId([13, 15, 44, 45, 228]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\ContentName(), ], From dd4d9c19828e11a559ad612e1adb10426743b30e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:57:18 +0200 Subject: [PATCH 168/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortFieldNumeric test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 01aab35e4d..26a212fc24 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -594,7 +594,7 @@ public function testSortFieldNumeric(): void ] ), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Field('product', 'price', LocationQuery::SORT_ASC, 'eng-US'), ], From 6a9d986ac35eee7f34f96ae613a438605755e654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:57:56 +0200 Subject: [PATCH 169/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortFieldText test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 26a212fc24..477f21ac0a 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -525,7 +525,7 @@ public function testSortFieldText(): void ] ), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Field('article', 'title', LocationQuery::SORT_ASC, 'eng-US'), ], From abc55d262864278e4dd236f0482af2ec2c0daa43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:58:27 +0200 Subject: [PATCH 170/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortIsMainLocationAscending test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 477f21ac0a..ab13809846 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -622,7 +622,7 @@ public function testSortIsMainLocationAscending(): void [ 'filter' => new Criterion\ParentLocationId(224), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Location\IsMainLocation(LocationQuery::SORT_ASC), ], From f9c934f13a5186cd990d12f1cb0e040d973fb830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:58:39 +0200 Subject: [PATCH 171/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortIsMainLocationDescending test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index ab13809846..e40df2869e 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -645,7 +645,7 @@ public function testSortIsMainLocationDescending(): void [ 'filter' => new Criterion\ParentLocationId(224), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Location\IsMainLocation(LocationQuery::SORT_DESC), ], From 7304c48c30dbfb78cce1704c0e1a6d04d6cfccd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:58:56 +0200 Subject: [PATCH 172/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortLocationId test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index e40df2869e..b029d6c79b 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -398,7 +398,7 @@ public function testSortLocationId(): void [ 'filter' => new Criterion\LocationId([13, 15, 44, 45, 228]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Location\Id(LocationQuery::SORT_DESC), ], From 4d600b6057d71636955d3e2c398d7c92abb194db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:59:21 +0200 Subject: [PATCH 173/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortLocationVisibilityAscending test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index b029d6c79b..78c5c9d18d 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -421,7 +421,7 @@ public function testSortLocationVisibilityAscending(): void [ 'filter' => new Criterion\LocationId([45, 228]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Location\Visibility(LocationQuery::SORT_ASC), ], From 8a36389f8566081438871382a825cee5115071e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 19:59:44 +0200 Subject: [PATCH 174/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortLocationVisibilityDescending test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 78c5c9d18d..01e5370c55 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -444,7 +444,7 @@ public function testSortLocationVisibilityDescending(): void [ 'filter' => new Criterion\LocationId([45, 228]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\Location\Visibility(LocationQuery::SORT_DESC), ], From 2869aa6211c6381c8d0fafbd7f4c4795915c4745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 20:00:14 +0200 Subject: [PATCH 175/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortSectionIdentifier test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 01e5370c55..4bdc3b5437 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -312,7 +312,7 @@ public function testSortSectionIdentifier(): void [5, 43, 45, 48, 51, 54, 156, 157] ), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\SectionIdentifier(), ], From 6610ee27145c5508bc3d463f0c82a712595a6e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Fri, 2 May 2025 20:00:25 +0200 Subject: [PATCH 176/185] Fixed Ibexa\Tests\Core\Search\Legacy\Content\HandlerLocationSortTest::testSortSectionName test --- tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php index 4bdc3b5437..70a8363cd2 100644 --- a/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php +++ b/tests/lib/Search/Legacy/Content/HandlerLocationSortTest.php @@ -467,7 +467,7 @@ public function testSortSectionName(): void [ 'filter' => new Criterion\SectionId([4, 2, 6, 3]), 'offset' => 0, - 'limit' => null, + 'limit' => 999, 'sortClauses' => [ new SortClause\SectionName(), ], From 6f68bf9e2cbaf3595f4e91f0c6d27ef225657c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 08:05:18 +0200 Subject: [PATCH 177/185] [doctrine/dbal] Fixed incorrectly bound "filenames" parameter in Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage --- .../BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index f5b51212f5..41db9e9ea6 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -406,7 +406,7 @@ public function countFileReferences(array $files): array $this->connection->quoteIdentifier('mime_type') ) ->setParameter( - ':filenames', + 'filenames', array_map( [$this, 'removeMimeFromPath'], $files From 7dc8f4ad23c9be35b4e3915a9266b0cd81d9dd49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 08:05:35 +0200 Subject: [PATCH 178/185] [doctrine/dbal] Fixed incorrectly bound "downloadCount" parameter in Ibexa\Core\FieldType\BinaryFile\BinaryFileStorage\Gateway\DoctrineStorage --- .../BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php index a38121526d..37ff63f55d 100644 --- a/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryFile/BinaryFileStorage/Gateway/DoctrineStorage.php @@ -50,7 +50,7 @@ protected function setInsertColumns(QueryBuilder $queryBuilder, VersionInfo $ver $queryBuilder ->setValue('download_count', ':downloadCount') ->setParameter( - ':downloadCount', + 'downloadCount', $field->value->externalData['downloadCount'], ParameterType::INTEGER ) From f2a253a5dcac9ff2806cd73c245f023e4f04c340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 08:08:39 +0200 Subject: [PATCH 179/185] Handled null path in Ibexa\Core\FieldType\BinaryBase\BinaryBaseStorage\Gateway\DoctrineStorage::removeMimeFromPath --- .../BinaryBaseStorage/Gateway/DoctrineStorage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php index 41db9e9ea6..764ee71195 100644 --- a/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/BinaryBase/BinaryBaseStorage/Gateway/DoctrineStorage.php @@ -192,8 +192,12 @@ protected function storeNewFieldData(VersionInfo $versionInfo, Field $field): vo /** * Remove the prepended mime-type directory from $path for legacy storage. */ - public function removeMimeFromPath(string $path): string + public function removeMimeFromPath(?string $path): string { + if ($path === null) { + return ''; + } + return substr($path, strpos($path, '/') + 1); } From 5661dd129376eb4c95bb28ef2b0536e144d58b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 08:58:20 +0200 Subject: [PATCH 180/185] [doctrine/dbal] Fixed incorrectly bound "downloadCount" parameter in Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::deleteTranslatedFields --- src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index a351303122..4f3ee06388 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -2087,7 +2087,7 @@ public function deleteTranslatedFields( ->setParameters( [ self::CONTENT_ID_PARAM_NAME => $contentId, - ':languageCode' => $languageCode, + 'languageCode' => $languageCode, ] ) ; From c44032fbe374cdd573169f3596a4f5f9cdbbe13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 08:59:17 +0200 Subject: [PATCH 181/185] Allowed passing null to Ibexa\Core\FieldType\Image\ImageStorage\Gateway\DoctrineStorage::extractFilesFromXml --- .../FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php index a4f428dd9d..1afeba006e 100644 --- a/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php +++ b/src/lib/FieldType/Image/ImageStorage/Gateway/DoctrineStorage.php @@ -350,7 +350,7 @@ protected function canRemoveImageReference(string $path, int $versionNo, int $fi /** * @throws \Ibexa\Core\IO\Exception\InvalidBinaryFileIdException */ - public function extractFilesFromXml(string $xml): ?array + public function extractFilesFromXml(?string $xml): ?array { if (empty($xml)) { // Empty image value From 75fb2073a7ad7319d0b2c72c73810396d79b8f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 09:04:04 +0200 Subject: [PATCH 182/185] [doctrine/dbal] Fixed incorrectly bound "content_id" parameter in Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::deleteTranslationFromContentVersions --- .../Persistence/Legacy/Content/Gateway/DoctrineDatabase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 4f3ee06388..39ef05bd01 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -2220,7 +2220,7 @@ private function deleteTranslationFromContentVersions( ->set( 'initial_language_id', 'CASE WHEN initial_language_id = :languageId ' . - 'THEN (SELECT initial_language_id AS main_language_id FROM ezcontentobject c WHERE c.id = :contentId) ' . + 'THEN (SELECT initial_language_id AS main_language_id FROM ezcontentobject c WHERE c.id = :content_id) ' . 'ELSE initial_language_id END' ) ->where(self::CONTENT_ITEM_ID_EQ_CONTENT_ID_PARAM_COMPARISON) @@ -2232,7 +2232,7 @@ private function deleteTranslationFromContentVersions( ) ) ->setParameter('now', time()) - ->setParameter(self::CONTENT_ID_PARAM_NAME, $contentId) + ->setParameter('content_id', $contentId) ->setParameter('languageId', $languageId) ; From 9cb5cf06ab8ac5055df06d9a95f6400fcc063280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 13:57:03 +0200 Subject: [PATCH 183/185] [doctrine/dbal] Fixed incorrectly bound "contentId" parameter in Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::deleteTranslationFromContentNames --- .../Persistence/Legacy/Content/Gateway/DoctrineDatabase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 39ef05bd01..1a5cd9c462 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -2145,8 +2145,8 @@ private function deleteTranslationFromContentNames( ->andWhere('real_translation=:languageCode') ->setParameters( [ - ':languageCode' => $languageCode, - self::CONTENT_ID_PARAM_NAME => $contentId, + 'languageCode' => $languageCode, + 'contentId' => $contentId, ] ) ; From 025f6a7d0f266f04d74ced0b6e861aed2f638db4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 14:01:40 +0200 Subject: [PATCH 184/185] [doctrine/dbal] Fixed incorrectly bound "contentId" parameter in Ibexa\Core\Persistence\Legacy\Content\Gateway\DoctrineDatabase::deleteTranslationFromContentObject --- src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index 1a5cd9c462..13e8b94410 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -2174,7 +2174,7 @@ private function deleteTranslationFromContentObject(int $contentId, int $languag // parameter for bitwise operation has to be placed verbatim (w/o binding) for this to work cross-DBMS ->set('language_mask', $this->getLanguageRemovalFromLanguageMaskExpression($languageId)) ->set('modified', ':now') - ->where('id = :contentId') + ->where('id = :content_id') ->andWhere( // make sure removed translation is not the last one (incl. alwaysAvailable) $query->expr()->and( From 64998a7f51936b04f3ccfe82a4d46508aaf8b144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Sun, 4 May 2025 18:41:51 +0200 Subject: [PATCH 185/185] [doctrine/dbal] Removed unnecessary quote in Ibexa\Core\Search\Legacy\Content\Common\Gateway\CriterionHandler\ContentName::toLowerCase --- .../Content/Common/Gateway/CriterionHandler/ContentName.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php index 0a2ebab882..31c7c71fae 100644 --- a/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php +++ b/src/lib/Search/Legacy/Content/Common/Gateway/CriterionHandler/ContentName.php @@ -52,7 +52,7 @@ public function handle( self::CONTENTOBJECT_ALIAS . '.current_version' ), $queryBuilder->expr()->like( - $this->toLowerCase(self::CONTENTOBJECT_NAME_ALIAS . '.name'), + $this->toLowerCase(self::CONTENTOBJECT_NAME_ALIAS . '.name', false), $this->toLowerCase( $queryBuilder->createNamedParameter( $this->prepareValue($criterion) @@ -84,6 +84,6 @@ private function prepareValue(Criterion $criterion): string private function toLowerCase(string $value): string { - return sprintf('LOWER( %s )', $this->connection->quote($value)); + return sprintf('LOWER( %s )', $value); } }